/**
 * LQA Navigation Structural Styles Only
 * NO COLORS OR CUSTOMIZABLE PROPERTIES - Those come from Elementor
 */

/* Base Navigation Structure */
.lqa-nav {
    padding: 0;
    position: relative;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lqa-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: relative;
    overflow: visible !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Menu List */
.lqa-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 40px;
    flex: 1;
    overflow: visible !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Menu Items Container - Desktop */
.lqa-nav-menu-items {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
}

/* Menu Items */
.lqa-nav-item {
    position: relative;
    list-style: none;
}

/* Spacer for right-aligned items */
.lqa-nav-spacer {
    flex: 1;
    min-width: 20px;
}

/* Right-aligned menu items */
.lqa-nav-item-right {
    margin-left: auto;
}

.lqa-nav-item > a {
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    padding: 30px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.lqa-nav-item > a:hover {
    opacity: 0.8;
}

/* Dropdown Arrow */
.dropdown-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 12px;
    opacity: 0.6;
}

.lqa-nav-item.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Mobile dropdown arrow animation */
@media (max-width: 991px) {
    .lqa-nav-item.dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
        opacity: 1;
    }
}

/* CTA Button Structure */
.lqa-nav-cta {
    padding: 12px 28px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 20px;
    display: inline-block;
    position: relative;
    z-index: 1;
}

/* Ensure no default box-shadow unless explicitly set */
.lqa-nav-cta-desktop {
    box-shadow: none;
}

/* Hide mobile elements on desktop */
.lqa-nav-toggle {
    display: none;
}

.lqa-nav-cta-mobile {
    display: none !important;
}

/* ================================
   DESKTOP DROPDOWN STYLES
   ================================ */
@media (min-width: 992px) {
    /* Ensure menu is visible on desktop */
    .lqa-nav-menu {
        position: relative !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        flex-direction: row !important;
        background: transparent !important;
        background-color: transparent !important;
    }
    
    /* Dropdown Container */
    .lqa-dropdown {
        /* Positioning */
        position: absolute;
        top: calc(100% + 30px);
        left: 50%;
        transform: translateX(-50%);
        
        /* Appearance */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        
        /* Visibility */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        
        /* Transitions */
        transition: opacity 0.3s ease, visibility 0.3s ease;
        
        /* Sizing */
        width: 900px;
        max-width: 80vw;
        
        /* Z-index */
        z-index: 9999;
    }
    
    /* Show dropdown on hover */
    .lqa-nav-item:hover .lqa-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* Dropdown Inner Container */
    .lqa-dropdown-inner {
        display: grid;
        grid-template-columns: 1fr 1fr 300px;
        padding: 40px;
        gap: 40px;
    }
    
    /* Dropdown Columns */
    .lqa-dropdown-column {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Dropdown Title */
    .lqa-dropdown-title {
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin: 0 0 10px 0;
        opacity: 0.6;
    }
    
    /* Dropdown Items */
    .lqa-dropdown-item {
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    
    .lqa-dropdown-item:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .lqa-dropdown-item a {
        display: block;
        padding: 12px;
        text-decoration: none;
        color: inherit;
    }
    
    .lqa-dropdown-item h4 {
        font-size: 16px;
        font-weight: 600;
        margin: 0 0 4px 0;
    }
    
    .lqa-dropdown-item p {
        font-size: 14px;
        margin: 0;
        line-height: 1.4;
    }
    
    /* Promo Section */
    .lqa-dropdown-promo {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 12px;
        padding: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 16px;
    }
    
    .lqa-dropdown-promo img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .lqa-dropdown-promo h3 {
        font-size: 16px;
        font-weight: 500;
        margin: 0;
        line-height: 1.4;
    }
    
    .lqa-dropdown-button {
        padding: 12px 24px;
        border-radius: 24px;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: background-color 0.3s ease, transform 0.2s ease;
        display: inline-block;
    }
    
    .lqa-dropdown-button:hover {
        transform: translateY(-2px);
    }
}

/* ================================
   MOBILE STYLES
   ================================ */
@media (max-width: 991px) {
    /* Ensure nav can contain dropdown */
    .lqa-nav {
        position: relative !important;
        overflow: visible !important;
    }
    
    /* Hamburger Button */
    .lqa-nav-toggle {
        display: block !important;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10001 !important;
        width: 30px !important;
        height: 24px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
    }
    
    .lqa-nav-toggle span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        position: absolute !important;
        left: 0 !important;
        transition: all 0.3s ease !important;
    }
    
    .lqa-nav-toggle span:nth-child(1) {
        top: 0 !important;
    }
    
    .lqa-nav-toggle span:nth-child(2) {
        top: 11px !important;
    }
    
    .lqa-nav-toggle span:nth-child(3) {
        bottom: 0 !important;
    }
    
    /* Mobile Menu */
    .lqa-nav-menu {
        position: fixed !important;
        top: 100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 420px !important;
        max-height: calc(100vh - 120px) !important; /* Prevent going off screen */
        height: auto !important; /* Dynamic height */
        flex-direction: column !important;
        padding: 24px 16px !important;
        gap: 0 !important;
        overflow-y: auto !important; /* Auto scroll only if content exceeds max-height */
        overflow-x: hidden !important;
        z-index: 999 !important;
        justify-content: flex-start !important; /* Changed from space-between */
        align-items: stretch !important;
        display: none !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
        border-radius: 16px !important;
        transition: all 0.3s ease !important; /* Smooth transitions */
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Show menu when active */
    .lqa-nav-menu.active {
        display: flex !important;
        animation: slideDown 0.3s ease forwards;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
    
    /* Menu Items Container - Mobile override */
    .lqa-nav-menu-items {
        flex: 0 1 auto !important; /* Changed from flex: 1 to allow natural height */
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important; /* Reduced gap since we have separators now */
        width: 100% !important;
        padding: 8px 0 !important;
    }
    
    /* Hide spacer on mobile */
    .lqa-nav-spacer {
        display: none !important;
    }
    
    /* Reset right-aligned items on mobile */
    .lqa-nav-item-right {
        margin-left: 0 !important;
    }
    
    /* Mobile Menu Items */
    .lqa-nav-item {
        width: 100%;
        position: relative;
    }
    
    .lqa-nav-item > a {
        padding: 16px 12px;
        font-size: 17px;
        font-weight: 500;
        width: 100%;
        justify-content: space-between;
        border-radius: 8px;
        transition: all 0.2s ease;
        position: relative;
    }
    
    /* Hover state for menu items */
    .lqa-nav-item > a:hover {
        background: rgba(0, 0, 0, 0.03);
        transform: translateX(4px);
    }
    
    /* Active/open state */
    .lqa-nav-item.dropdown-open > a {
        font-weight: 600;
        background: rgba(0, 0, 0, 0.03);
    }
    
    /* Visual separator between items */
    .lqa-nav-item:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 12px;
        right: 12px;
        height: 1px;
        background: rgba(0, 0, 0, 0.06);
    }
    
    /* Mobile CTA */
    .lqa-nav-cta-desktop {
        display: none !important;
    }
    
    /* CTA list item - simple container */
    .lqa-nav-cta-item {
        margin-top: 16px !important; /* Changed from auto to fixed margin */
        padding-top: 16px !important;
        border-top: 2px solid rgba(0, 0, 0, 0.08) !important;
        list-style: none !important;
        width: 100% !important;
    }
    
    /* The actual button - basic structure only */
    .lqa-nav-cta-mobile {
        display: block !important;
        text-align: center !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
        /* All other styles controlled by Elementor */
    }
    
    /* Mobile Dropdown - Simple nested links */
    .lqa-dropdown {
        position: static !important;
        transform: none !important;
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
        margin: 0 0 0 20px !important;
        padding: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        box-shadow: none !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: max-height 0.3s ease, padding 0.3s ease !important;
    }
    
    .lqa-nav-item.dropdown-open .lqa-dropdown {
        max-height: 500px !important; /* Enough for content */
        padding: 5px 0 10px 0 !important;
    }
    
    /* Remove all the container styling */
    .lqa-dropdown-inner,
    .lqa-dropdown-column {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
        grid-template-columns: none !important;
        background: transparent !important;
    }
    
    /* Hide titles and promo on mobile */
    .lqa-dropdown-promo,
    .lqa-dropdown-title {
        display: none !important;
    }
    
    /* Simple link items */
    .lqa-dropdown-item {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    /* Plain text links - improved hierarchy */
    .lqa-dropdown-item a {
        padding: 10px 0 10px 24px !important;
        display: block !important;
        text-decoration: none !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        line-height: 1.5 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 6px !important;
        margin: 2px 0 !important;
        transition: all 0.2s ease !important;
        position: relative !important;
    }
    
    /* Hover state for dropdown items */
    .lqa-dropdown-item a:hover {
        background: rgba(0, 0, 0, 0.02) !important;
        padding-left: 28px !important;
    }
    
    /* Show only the title text */
    .lqa-dropdown-item h4 {
        display: inline !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }
    
    /* Hide descriptions */
    .lqa-dropdown-item p {
        display: none !important;
    }
    
    /* Overlay */
    .lqa-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 998;
    }
    
    .lqa-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .lqa-dropdown {
        min-width: 750px;
    }
    
    .lqa-dropdown-inner {
        grid-template-columns: 1fr 1fr 250px;
        padding: 30px;
        gap: 30px;
    }
}