/**
 * 4D Greens Website - Dropdown Navigation Styles
 * 
 * Clean dropdown menus with smooth hover effects and page overlay
 */

/* ========================================
   PAGE OVERLAY - Fades content when menu open
   ======================================== */
.nav-page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 4150;
    pointer-events: none;
}

.nav-page-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================================
   MAIN NAVIGATION CONTAINER
   ======================================== */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 8px;
}

/* ========================================
   NAVIGATION LINKS - Simple clean style
   ======================================== */
.nav-menu > li {
    margin: 0;
    position: relative;
}

.nav-menu > li > a {
    color: #f4fff5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(44, 142, 62, 0.25), rgba(39, 174, 96, 0.25));
    border: 1px solid rgba(44, 142, 62, 0.35);
    white-space: nowrap;
}

.nav-menu > li > a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(44, 142, 62, 0.45), rgba(39, 174, 96, 0.45));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.nav-menu > li.active > a {
    color: #1f4d34;
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Chevron icons in dropdown toggles */
.nav-dropdown-toggle i {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

/* ========================================
   DROPDOWN MENUS
   ======================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: fixed;
    top: auto;
    left: auto;
    margin-top: 6px;
    background: linear-gradient(180deg, rgba(26, 60, 44, 0.98) 0%, rgba(20, 45, 35, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    min-width: 240px;
    list-style: none;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4300;
    border: 1px solid rgba(44, 142, 62, 0.4);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 18px;
    color: #d4f5d4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
    letter-spacing: 0.3px;
}

.nav-dropdown-menu a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44, 142, 62, 0.25), transparent);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.nav-dropdown-menu a:hover {
    background: rgba(44, 142, 62, 0.3);
    color: #ffffff;
    border-left-color: #2ecc71;
    padding-left: 24px;
    box-shadow: inset 4px 0 12px rgba(44, 142, 62, 0.2);
}

.nav-dropdown-menu a:hover::before {
    opacity: 1;
}

.nav-dropdown-menu .nav-divider {
    height: 1px;
    background: rgba(44, 142, 62, 0.15);
    margin: 6px 0;
}

/* Alert item in dropdown */
.nav-dropdown-menu .nav-alert-item a {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.1));
    color: #e74c3c;
    font-weight: 600;
    position: relative;
}

.nav-dropdown-menu .nav-alert-item a:hover {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
}

.nav-dropdown-menu .nav-alert-item .pulse-dot {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(231, 76, 60, 0);
    }
}

/* ========================================
   MOBILE MENU TOGGLE
   ======================================== */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

@media (max-width: 576px) {
    /* Keep burger visible on small screens */
    .menu-toggle {
        position: fixed;
        left: 12px;
        top: 12px;
        transform: none;
        z-index: 2200;
    }
}
.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-toggle .bar {
    width: 24px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile menu open state */
.mobile-nav-open .menu-toggle .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-open .menu-toggle .bar:nth-child(2) {
    opacity: 0;
}

.mobile-nav-open .menu-toggle .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   HEADER LAYOUT FIX FOR MOBILE
   ======================================== */
.header-inner {
    position: relative;
}

.header-inner .logo {
    text-align: center;
    width: 100%;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    /* Logo needs space for burger menu */
    .header-inner .logo {
        padding-left: 60px;
    }
}

/* ========================================
   OFF-CANVAS MOBILE MENU
   ======================================== */
.offcanvas {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 20px;
}

.offcanvas.open {
    right: 0;
}

.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.offcanvas-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.offcanvas-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offcanvas-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 60px 0 0 0;
}

.mobile-nav-list > li {
    margin: 8px 0;
}

.mobile-nav-list .nav-dropdown-menu li {
    margin: 0;
}

.mobile-nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.mobile-nav-list > li > a:hover,
.mobile-nav-list > li > a.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-nav-list > li > a i {
    font-size: 1.2rem;
    opacity: 0.9;
    width: 24px;
    text-align: center;
}

.mobile-nav-list .menu-section {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 16px 8px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav-list .menu-section:first-child {
    margin-top: 0;
    border-top: none;
}

/* Mobile dropdown handling */
.mobile-nav-list .nav-dropdown-menu {
    display: none;
    padding: 2px 0 0;
    margin: 4px 0 0;
    list-style: none;
}

.mobile-nav-list .nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.mobile-nav-list .nav-dropdown-menu li {
    margin: 0;
}

.mobile-nav-list .nav-dropdown-menu a {
    margin: 0;
    padding: 8px 12px 8px 22px;
    font-size: 0.88rem;
    line-height: 1.2;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transform: none !important;
}

.mobile-nav-list .nav-dropdown-menu a:hover,
.mobile-nav-list .nav-dropdown-menu a.active {
    background: rgba(255, 255, 255, 0.14);
    transform: none !important;
    box-shadow: none;
}

.mobile-nav-list .nav-dropdown-toggle i.fa-chevron-down {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mobile-nav-list .nav-dropdown.open .nav-dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

/* ========================================
   DROPDOWN HOVER OVERLAY ACTIVATION
   ======================================== */
/* JavaScript will handle adding/removing .active class */
