/*=============================================
    MEGA MENU FINAL FIXES - MAXIMUM SPECIFICITY
    - Dropdown arrows on RIGHT side
    - 4 Columns SIDE-BY-SIDE (wide not tall)
    - STRONGEST overrides to prevent wrapping
    - STRONGER Mobile Accordion support
=============================================*/

/* ===== DROPDOWN ARROW FIX ===== */

/* Remove any existing arrows */
.menubar .menu-wrap>li.dropdown>a:before,
.menubar .menu-wrap>li.mega-menu-item>a:before {
    display: none !important;
}

/* Add dropdown arrows on the RIGHT side using :after */
.navbar-area .menubar .menu-wrap>li.dropdown>a:after,
.navbar-area .menubar .menu-wrap>li.mega-menu-item>a:after,
.navbar-area .menubar .menu-wrap>li.menu-item-has-children>a:after {
    content: '\f107' !important;
    font-family: 'FontAwesome' !important;
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 10px !important;
    opacity: 0.7 !important;
    display: inline-block !important;
    margin-left: 8px !important;
    pointer-events: none !important;
}

/* Ensure menu items have space for arrow */
.navbar-area .menubar .menu-wrap>li.mega-menu-item>a,
.navbar-area .menubar .menu-wrap>li.dropdown>a {
    position: relative !important;
    padding-right: 28px !important;
}

/* ===== MEGA MENU WIDE LAYOUT - DESKTOP ONLY ===== */
@media (min-width: 992px) {

    /* Base positioning for all mega menus */
    .navbar-area .menubar .mega-menu-dropdown {
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(10px) !important;
        opacity: 0;
        visibility: hidden;
        min-width: 1100px !important;
        max-width: 95vw !important;
        /* Never wider than screen */
        width: 1100px !important;
        box-sizing: border-box !important;
    }

    /* Products (nth-child(2)) and Solutions (nth-child(3)) - Prevent Left Overflow */
    /* We offset them rightwards because they are near the left edge of the page */
    .navbar-area .menubar li.mega-menu-item:nth-child(2) .mega-menu-dropdown,
    .navbar-area .menubar li.mega-menu-item:nth-child(3) .mega-menu-dropdown {
        left: 0 !important;
        transform: translateX(-15%) translateY(10px) !important;
    }

    /* Hover states for these specific offsets */
    .navbar-area .menubar li.mega-menu-item:nth-child(2):hover .mega-menu-dropdown,
    .navbar-area .menubar li.mega-menu-item:nth-child(3):hover .mega-menu-dropdown {
        transform: translateX(-15%) translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .mega-menu-item:hover .mega-menu-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) translateY(0) !important;
    }

    /* Force columns to NEVER wrap - CRITICAL - STRONGEST override */
    .navbar-area .menubar .mega-menu-row,
    .mega-menu-dropdown .mega-menu-content .mega-menu-row,
    .mega-menu-content>.mega-menu-row,
    div.mega-menu-row {
        display: flex !important;
        flex-direction: row !important;
        /* FORCE horizontal */
        flex-wrap: nowrap !important;
        /* NEVER wrap */
        gap: 0 !important;
        /* Gap handled by padding for vertical lines */
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    /* Make columns wider - STRONGEST override */
    .navbar-area .menubar .mega-menu-col,
    .mega-menu-dropdown .mega-menu-content .mega-menu-col,
    .mega-menu-row>.mega-menu-col,
    div.mega-menu-col {
        flex: 1 1 280px !important;
        flex-grow: 1 !important;
        flex-shrink: 1 !important;
        flex-basis: 280px !important;
        min-width: 260px !important;
        max-width: 300px !important;
        width: auto !important;
        padding: 0 20px !important;
        /* Increased padding for separation */
        display: block !important;
        border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
        /* Faint vertical line */
        text-align: left !important;
        /* Ensure left alignment */
    }

    .mega-menu-col:last-child {
        border-right: none !important;
    }

    /* Products menu - 4 columns - STRONGEST override */
    .navbar-area .menubar .mega-menu-item:first-of-type .mega-menu-dropdown,
    li.mega-menu-item:first-of-type>.mega-menu-dropdown {
        min-width: 1100px !important;
        max-width: 95vw !important;
        width: 1100px !important;
    }

    /* Solutions menu - 3 columns */
    .solutions-menu.mega-menu-dropdown,
    .mega-menu-item .solutions-menu {
        min-width: 950px !important;
        max-width: 1000px !important;
        width: 950px !important;
    }

    /* Resources menu - 3 columns */
    .resources-menu.mega-menu-dropdown,
    .mega-menu-item .resources-menu {
        min-width: 750px !important;
        max-width: 800px !important;
        width: 750px !important;
    }

    /* About menu - 2 columns */
    .about-menu.mega-menu-dropdown,
    .mega-menu-item .about-menu {
        min-width: 550px !important;
        max-width: 600px !important;
        width: 550px !important;
    }

    /* Ensure Titles are also left aligned */
    .mega-menu-title {
        text-align: left !important;
        justify-content: flex-start !important;
    }

    /* Reduce section spacing to fit more in width */
    .mega-menu-section {
        margin-bottom: 18px !important;
    }

    .mega-menu-section h5 {
        font-size: 12px !important;
        margin-bottom: 8px !important;
        text-align: left !important;
        /* Explicit left alignment */
    }

    /* Optimize list item spacing - INCREASED PADDING TO PREVENT OVERLAP */
    .mega-menu-list li a {
        padding: 7px 15px !important;
        /* Added horizontal padding */
        border-left: none !important;
        /* REMOVE BLUE LINE BORDER */
        font-size: 13px !important;
        text-align: left !important;
        display: block !important;
        position: relative !important;
    }

    /* REMOVE BLUE PSEUDO-ELEMENT LINE GLOBALLY FOR MEGA MENU */
    .mega-menu-list li a:before,
    .mega-menu-list li a:after {
        display: none !important;
        content: none !important;
        visibility: hidden !important;
    }

    /* Responsive: Allow wrapping only on smaller screens */
    @media (max-width: 1400px) {
        .mega-menu-dropdown {
            min-width: 1100px !important;
            width: 1100px !important;
        }

        .mega-menu-col {
            flex: 1 1 250px !important;
            min-width: 240px !important;
        }
    }

    @media (max-width: 1200px) {
        .mega-menu-dropdown {
            min-width: 900px !important;
            width: 900px !important;
        }

        .mega-menu-col {
            flex: 1 1 210px !important;
            min-width: 200px !important;
        }
    }
}

/* Mobile - stack columns and enable accordion - FINAL STABLE MOBILE FIX */
@media (max-width: 991px) {

    /* Aggressive Reset to prevent horizontal shifting and overflow
       Using high specificity and state targeting to beat theme/global rules */
    .navbar-area .menubar .mega-menu-dropdown,
    .navbar-area .menubar .mega-menu-item .mega-menu-dropdown,
    .mobile-menu .mega-menu-dropdown,
    .mega-menu-item .mega-menu-dropdown,
    .mega-menu-dropdown,
    .mega-menu-item:hover>.mega-menu-dropdown,
    .mega-menu-item.focus>.mega-menu-dropdown,
    .mega-menu-item:focus>.mega-menu-dropdown,
    .mega-menu-item:active>.mega-menu-dropdown {
        position: static !important;
        display: none;
        /* Controlled by slideToggle in JS */
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        /* REVERSES centering transform */
        -webkit-transform: none !important;
        left: 0 !important;
        /* REVERSES left: 50% */
        right: auto !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        transition: none !important;
        /* Prevents shift animations */
    }

    /* Force visibility when active */
    .mega-menu-item.active>.mega-menu-dropdown,
    .navbar-area .menubar .mega-menu-item.active>.mega-menu-dropdown {
        display: block !important;
    }

    /* Target all possible internal containers to ensure NO nested shifting */
    .mega-menu-dropdown *,
    .mega-menu-dropdown *:before,
    .mega-menu-dropdown *:after {
        box-sizing: border-box !important;
        max-width: 100% !important;
        transform: none !important;
        -webkit-transform: none !important;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transition: none !important;
    }

    /* Container for the columns - ZERO LEFT MARGIN/PADDING */
    .mega-menu-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        display: block !important;
    }

    /* Force row to be a simple vertical block - ZERO LEFT MARGIN/PADDING */
    .mega-menu-row {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        flex-direction: column !important;
    }

    /* Each column becomes a full-width item */
    .mega-menu-col {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid #f2f2f2 !important;
        text-align: left !important;
        flex: none !important;
    }

    .mega-menu-col:last-child {
        border-bottom: none !important;
    }

    /* Categories / Main Titles - START EXACT FROM LEFT */
    .mega-menu-title {
        margin: 0 !important;
        font-size: 14px !important;
        padding: 15px 15px 15px 0 !important;
        /* ZERO LEFT PADDING - Starts exact from left */
        background: #fdfdfd !important;
        border-bottom: 1px solid #eeeeee !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        /* Keeps text left and + icon right */
        width: 100% !important;
        color: var(--sp-secondary) !important;
        text-align: left !important;
        white-space: normal !important;
    }

    /* Icon within title (if any) */
    .mega-menu-title i:not(.mobile-sub-toggler) {
        margin-right: 10px !important;
        color: var(--sp-primary) !important;
    }

    /* Sub-sections (Indoor/Outdoor) - Indent for hierarchy */
    .mega-menu-section {
        margin: 0 !important;
        padding: 5px 0 10px 20px !important;
        background: #ffffff !important;
        width: 100% !important;
        border-left: none !important;
        /* REMOVE ANY CONTAINER BORDER */
    }

    .mega-menu-section h5 {
        font-size: 12px !important;
        margin: 10px 0 5px 0 !important;
        color: var(--sp-primary) !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    /* Deep list items */
    .mega-menu-list {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        list-style: none !important;
    }

    .mega-menu-list li a {
        padding: 10px 15px 10px 45px !important;
        /* INCREASED INDENT to 45px */
        font-size: 13px !important;
        border-left: none !important;
        /* REMOVE BLUE LINE BORDER */
        display: block !important;
        text-align: left !important;
        color: var(--sp-secondary-dark) !important;
        width: 100% !important;
        position: relative !important;
    }

    /* REMOVE BLUE PSEUDO-ELEMENT LINE ON MOBILE */
    .mega-menu-list li a:before,
    .mega-menu-list li a:after {
        display: none !important;
        content: none !important;
        visibility: hidden !important;
    }

    .mega-menu-list li a:hover {
        background-color: rgba(51, 204, 255, 0.05) !important;
        border-left: none !important;
        /* ENSURE NO LINE ON HOVER */
        padding-left: 50px !important;
    }

    /* Sub-toggler Icon (Handled by JS) */
    .mobile-sub-toggler {
        transition: transform 0.3s ease;
        font-size: 11px !important;
        color: var(--sp-primary) !important;
        margin-left: auto !important;
        /* Pushes to far right */
        padding: 5px !important;
    }

    .mega-menu-title.active .mobile-sub-toggler {
        transform: rotate(180deg);
    }

    /* Ensure main mobile toggler also looks good */
    .mobile-toggler button {
        background: none;
        border: none;
        color: var(--sp-primary);
        padding: 12px;
        cursor: pointer;
        font-size: 16px;
    }

    /* Hide the footer on mobile for a slim look */
    .mega-menu-footer,
    .mega-menu-cta {
        display: none !important;
    }
}

/* =============================================
   REDESIGNED FOOTER STYLES
   ============================================= */

/* Main Footer Container - Reduced Margins */
.footer-container-custom {
    max-width: 95% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin: 0 auto !important;
}

.footer-section {
    background-color: #0b111e !important;
    /* Premium Dark Navy */
    padding-top: 80px !important;
}

.footer-main .widget-title {
    color: #ffffff !important;
    font-size: 18px !important;
    margin-bottom: 30px !important;
    position: relative;
    padding-bottom: 15px;
}

.footer-main .widget-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--sp-primary);
}

/* Footer Link Lists */
.footer-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-list li {
    margin-bottom: 12px !important;
}

.footer-list li a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
}

.footer-list li a:hover {
    color: var(--sp-primary) !important;
    padding-left: 5px !important;
}

/* Contact Info Display */
.footer-contact-info {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-contact-info li {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 20px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
}

.footer-contact-info li i {
    color: var(--sp-primary) !important;
    margin-right: 15px !important;
    font-size: 18px !important;
    width: 20px;
    text-align: center;
}

/* Newsletter Customization */
.footer-subscribe-form input:focus {
    outline: none !important;
    border-color: var(--sp-primary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Bottom Footer Links */
.footer-bottom-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
}

.footer-bottom-links li {
    margin-left: 20px !important;
}

.footer-bottom-links li a {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px !important;
    transition: color 0.3s ease !important;
}

.footer-bottom-links li a:hover {
    color: var(--sp-primary) !important;
}

/* Responsive Footer */
@media (max-width: 991px) {
    .footer-bottom-links {
        justify-content: center !important;
        margin-top: 15px !important;
    }

    .footer-bottom-links li {
        margin: 5px 10px !important;
    }

    .text-av-right {
        text-align: center !important;
    }

    .footer-container-custom {
        max-width: 100% !important;
    }
}

/* =============================================
   PREMIUM BREADCRUMB STYLING
   ============================================= */

.breadcrumb-area {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Remove global dark overlay */
.breadcrumb-area:before {
    display: none !important;
}

.breadcrumb-center .av-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.breadcrumb-heading {
    background: rgba(21, 22, 53, 0.6) !important;
    display: inline-block !important;
    padding: 40px 60px !important;
    border-radius: 20px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    max-width: 850px !important;
    width: auto !important;
    margin: 0 auto !important;
    text-align: center !important;
    float: none !important;
    flex: none !important;
}

.breadcrumb-heading h1,
.breadcrumb-heading h2 {
    color: #ffffff !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    margin-bottom: 15px !important;
    text-transform: none !important;
}

.breadcrumb-heading p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1.1rem !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

@media (max-width: 768px) {
    .breadcrumb-heading {
        padding: 30px 25px !important;
        max-width: 90% !important;
    }

    .breadcrumb-heading h1,
    .breadcrumb-heading h2 {
        font-size: 2rem !important;
    }
}

/* =============================================
   PREMIUM VIDEO SHOWCASE STYLING
   ============================================= */

.video-showcase-section {
    background: linear-gradient(180deg, #ffffff 0%, rgba(51, 204, 255, 0.08) 50%, #ffffff 100%);
    padding: 0px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.video-showcase-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(51, 204, 255, 0.2);
    background: #fff;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid #ffffff;
    animation: floating-vid 6s ease-in-out infinite;
}

@keyframes floating-vid {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.video-player-wrapper:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 35px 80px rgba(51, 204, 255, 0.3);
}

.video-player-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-showcase-section::before,
.video-showcase-section::after {
    content: '';
    position: absolute;
    width: 15vw;
    height: 15vw;
    background: var(--sp-primary);
    filter: blur(80px);
    opacity: 0.1;
    z-index: 1;
    border-radius: 50%;
}

.video-showcase-section::before {
    top: -5%;
    left: -5%;
}

.video-showcase-section::after {
    bottom: -5%;
    right: -5%;
}

@media (max-width: 991px) {
    .video-showcase-section {
        padding: 40px 0;
    }

    .video-player-wrapper {
        border-radius: 15px;
        animation: none;
    }
}