﻿/* ========================================
   ADVANCED NAVIGATION SYSTEM
   ======================================== */

/* Navigation Variables */
:root {
    --nav-height: 80px;
    --nav-height-scroll: 65px;
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --mega-menu-width: 900px;
}

/* ========================================
   HEADER & MAIN NAV STRUCTURE
   ======================================== */

header {
    background-color: var(--primary-color);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: var(--nav-transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: var(--nav-height);
    max-width: 1400px;
    margin: 0 auto;
}

/* Remove shrinking behavior */
header.scrolled .header-content {
    height: var(--nav-height);
}

/* Spacer for fixed header */
body {
    padding-top: var(--nav-height);
}

/* ========================================
   LOGO
   ======================================== */

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    z-index: 10001;
    letter-spacing: -0.5px;
}

/* Remove logo shrinking */
header.scrolled .logo {
    font-size: 1.8rem;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo a::before {
    display: none;
}

.logo-image {
    height: 120px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.logo a:hover .logo-image {
    transform: scale(1.05);
}

.logo a:hover .logo-text {
    color: #25D366;
}

.logo a svg {
    transition: transform 0.3s ease;
}

.logo a:hover svg {
    transform: scale(1.1) rotate(-5deg);
}

.logo a:hover {
    color: var(--secondary-color);
}

/* ========================================
   NAVIGATION MENU
   ======================================== */

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
    padding-left: 3rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu>li {
    position: relative;
}

.nav-menu>li>a {
    color: #FFFFFF;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    transition: var(--nav-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
}

.nav-menu>li>a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-dark));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

/* Only show underline on non-dropdown links */
.nav-menu>li:not(.dropdown)>a:hover::after,
.nav-menu>li:not(.dropdown)>a.active::after {
    width: 70%;
}

.nav-menu>li>a:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-menu>li>a.active {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.15);
}

/* ========================================
   DROPDOWN INDICATOR
   ======================================== */

.dropdown-toggle {
    position: relative;
}

.dropdown-toggle::before {
    content: "▼";
    font-size: 0.65rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.dropdown:hover .dropdown-toggle::before,
.dropdown.active .dropdown-toggle::before {
    transform: rotate(180deg);
}

/* ========================================
   MEGA MENU - SERVICES
   ======================================== */

.mega-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: var(--background-light);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: var(--mega-menu-width);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    z-index: 10000;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--background-light);
}

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

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.mega-menu-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.mega-menu-item:hover {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.1);
}

.mega-menu-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #2c5f2d);
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(45, 106, 79, 0.2);
}

.mega-menu-icon svg {
    color: white;
    transition: all 0.3s ease;
}

.mega-menu-item:hover .mega-menu-icon {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 15px rgba(45, 106, 79, 0.3);
    background: linear-gradient(135deg, #2c5f2d, var(--primary-color));
}

.mega-menu-item:hover .mega-menu-icon svg {
    transform: scale(1.1);
}

.mega-menu-item h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mega-menu-item p {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   STANDARD DROPDOWN MENU
   ======================================== */

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    background-color: var(--background-light);
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    border: 1px solid var(--border-color);
    z-index: 10000;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 2rem;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--background-light);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-menu li a::before {
    content: "→";
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    padding-left: 2rem;
}

.dropdown-menu li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   SEARCH BAR
   ======================================== */

.nav-search {
    position: relative;
    margin-left: 1rem;
}

.search-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--nav-transition);
}

.search-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg) scale(1.05);
}

.search-box {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background-color: var(--background-light);
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    width: 350px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    border: 1px solid var(--border-color);
}

.search-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-input-wrapper button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-input-wrapper button:hover {
    background-color: var(--primary-color);
}

/* ========================================
   CTA BUTTON
   ======================================== */

.nav-cta {
    margin-left: 1rem;
}

.nav-cta .btn {
    background-color: #25D366;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    border: 2px solid #25D366;
}

.nav-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background-color: #128C7E;
    border-color: #128C7E;
}

.nav-cta .btn::after {
    content: "→";
    transition: transform 0.3s ease;
}

.nav-cta .btn:hover::after {
    transform: translateX(4px);
}

/* ========================================
   MOBILE MENU
   ======================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

/* Mobile menu toggle animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.mobile-menu-close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10002;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.mobile-menu-close::before {
    content: "×";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Mobile overlay */
.mobile-menu-open {
    overflow: hidden;
}

/* Create overlay backdrop */
body.mobile-menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    pointer-events: none;
}

/* Remove the nav::before overlay that was blocking clicks */
nav[aria-hidden="false"].mobile-active::before {
    display: none;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */

@media (max-width: 1200px) {
    .mega-menu {
        min-width: 700px;
    }

    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
    }

    .nav-menu>li>a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .mega-menu {
        min-width: 600px;
    }

    .nav-search {
        margin-left: 0.5rem;
    }

    .search-box {
        width: 300px;
    }
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    /* Hide logo text on mobile */
    .logo-text {
        display: none;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }

    /* Hide desktop navigation */
    nav {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: calc(100vh - var(--nav-height));
        background: linear-gradient(135deg, var(--primary-color) 0%, #245240 100%);
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 10000;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        overflow-x: hidden;
        pointer-events: auto;
    }

    /* Show mobile menu when active */
    nav.mobile-active {
        right: 0;
        pointer-events: auto;
    }

    nav.mobile-active .mobile-menu-close {
        display: block;
    }

    /* Mobile menu styles */
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
        margin: 0;
        pointer-events: auto;
    }

    .nav-menu>li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        pointer-events: auto;
    }

    .nav-menu>li:first-child {
        border-top: none;
    }

    .nav-menu>li:last-child {
        border-bottom: none;
    }

    .nav-menu>li>a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1.25rem 2rem;
        color: #FFFFFF;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 0;
        text-align: left;
        background: transparent;
        transition: all 0.3s ease;
        text-decoration: none;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-menu>li>a:hover,
    .nav-menu>li>a.active {
        background-color: rgba(255, 255, 255, 0.15);
        color: #FFFFFF;
        transform: none;
        padding-left: 2.5rem;
    }

    .nav-menu>li>a::after {
        display: none;
    }

    /* Mobile dropdown indicators */
    .dropdown-toggle::before {
        content: "▼";
        font-size: 0.8rem;
        transition: transform 0.3s ease;
        margin-left: auto;
        margin-right: 0;
    }

    .dropdown.mobile-open .dropdown-toggle::before {
        transform: rotate(180deg);
    }

    /* Mobile mega menu */
    .mega-menu {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        min-width: auto;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        left: 0 !important;
        right: 0 !important;
    }

    .mega-menu::before {
        display: none;
    }

    .dropdown.mobile-open .mega-menu {
        max-height: 500px;
        padding: 1rem 0;
    }

    .mega-menu-content {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: relative;
        left: 0;
        right: 0;
    }

    .mega-menu-item {
        flex-direction: row;
        align-items: center;
        padding: 1rem 1.5rem;
        width: 100%;
        border-radius: 0;
        border: none;
        background: transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-decoration: none;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
        position: relative;
    }

    .mega-menu-item:last-child {
        border-bottom: none;
    }

    .mega-menu-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: none;
        box-shadow: none;
        border-color: rgba(255, 255, 255, 0.05);
        padding-left: 2rem;
    }

    .mega-menu-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        margin-right: 1rem;
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--primary-color), #2c5f2d);
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(45, 106, 79, 0.2);
    }

    .mega-menu-icon svg {
        width: 18px;
        height: 18px;
        color: white;
    }

    .mega-menu-item-content {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .mega-menu-item h3 {
        color: #FFFFFF;
        font-size: 1rem;
        margin-bottom: 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mega-menu-item p {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.85rem;
        line-height: 1.4;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* Mobile standard dropdown */
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        min-width: auto;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        left: auto;
        right: auto;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown.mobile-open .dropdown-menu {
        max-height: 300px;
        padding: 0.5rem 0;
    }

    .dropdown-menu li a {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        width: 100%;
        color: #FFFFFF;
        font-size: 1rem;
        background: transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-decoration: none;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
    }

    .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    .dropdown-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 2rem;
    }

    .dropdown-menu li a::before {
        content: "→";
        margin-right: 0.75rem;
        color: #25D366;
        font-weight: bold;
        opacity: 1;
        transform: translateX(0);
    }

    /* Hide desktop search and CTA on mobile */
    .nav-search,
    .nav-cta {
        display: none;
    }

    /* Mobile CTA in menu */
    .nav-menu::after {
        content: '';
        display: block;
        width: 100%;
        padding: 2rem;
    }

    .nav-menu::after {
        content: '';
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
    }

    /* Add mobile CTA buttons */
    nav.mobile-active::after {
        content: '';
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
        margin-top: auto;
    }

    /* Mobile CTA styling - we'll add this with JavaScript */

    /* Mobile CTA Container */
    .mobile-cta-container {
        margin-top: auto;
        padding: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        pointer-events: auto;
    }

    .mobile-cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        pointer-events: auto;
    }

    .mobile-cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        border-radius: 0.75rem;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        border: 2px solid transparent;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-cta-primary {
        background: linear-gradient(135deg, #25D366 0%, #20b358 100%);
        color: #FFFFFF;
        border-color: #25D366;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }

    .mobile-cta-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
        background: linear-gradient(135deg, #20b358 0%, #1a9647 100%);
    }

    .mobile-cta-whatsapp {
        background: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
        border-color: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(10px);
    }

    .mobile-cta-whatsapp:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-2px);
    }

    /* Mobile menu animation keyframes */
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideOutRight {
        from {
            transform: translateX(0);
            opacity: 1;
        }

        to {
            transform: translateX(100%);
            opacity: 0;
        }
    }

    /* Mobile menu items stagger animation */
    nav.mobile-active .nav-menu>li {
        animation: slideInItem 0.4s ease forwards;
        opacity: 0;
        transform: translateX(30px);
    }

    nav.mobile-active .nav-menu>li:nth-child(1) {
        animation-delay: 0.1s;
    }

    nav.mobile-active .nav-menu>li:nth-child(2) {
        animation-delay: 0.2s;
    }

    nav.mobile-active .nav-menu>li:nth-child(3) {
        animation-delay: 0.3s;
    }

    nav.mobile-active .nav-menu>li:nth-child(4) {
        animation-delay: 0.4s;
    }

    nav.mobile-active .nav-menu>li:nth-child(5) {
        animation-delay: 0.5s;
    }

    nav.mobile-active .mobile-cta-container {
        animation: slideInItem 0.4s ease forwards;
        animation-delay: 0.6s;
        opacity: 0;
        transform: translateX(30px);
    }

    @keyframes slideInItem {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Improved mobile accessibility */
    .mobile-menu-toggle:focus {
        outline: 2px solid #25D366;
        outline-offset: 2px;
    }

    nav.mobile-active {
        animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    /* Mobile landscape adjustments */
    @media (max-width: 768px) and (orientation: landscape) {
        nav {
            padding: 4rem 0 1rem 0;
        }

        .nav-menu>li>a {
            padding: 1rem 2rem;
        }

        .mobile-cta-container {
            padding: 1.5rem 2rem;
        }
    }

    /* Small mobile screens */
    @media (max-width: 480px) {
        nav {
            width: 90%;
        }

        .nav-menu>li>a {
            font-size: 1rem;
            padding: 1.1rem 1.5rem;
        }

        .mega-menu-item {
            padding: 0.875rem 1.5rem 0.875rem 2.5rem;
        }

        .dropdown-menu li a {
            padding: 0.875rem 1.5rem 0.875rem 2.5rem;
        }

        .mobile-cta-container {
            padding: 1.5rem;
        }

        .mobile-cta-btn {
            padding: 0.875rem 1.25rem;
            font-size: 0.95rem;
        }
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus styles for keyboard navigation */
.nav-menu a:focus,
.search-toggle:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10002;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Stagger animation for mega menu items */
.mega-menu-item {
    animation: slideDown 0.3s ease forwards;
    opacity: 0;
}

.dropdown:hover .mega-menu-item:nth-child(1) {
    animation-delay: 0.05s;
}

.dropdown:hover .mega-menu-item:nth-child(2) {
    animation-delay: 0.1s;
}

.dropdown:hover .mega-menu-item:nth-child(3) {
    animation-delay: 0.15s;
}

.dropdown:hover .mega-menu-item:nth-child(4) {
    animation-delay: 0.2s;
}

.dropdown:hover .mega-menu-item:nth-child(5) {
    animation-delay: 0.25s;
}

.dropdown:hover .mega-menu-item:nth-child(6) {
    animation-delay: 0.3s;
}