/**
 * DRNF Modern Navbar - Glassmorphism Design
 * Professional, beautiful navigation system
 * Uses ONLY DRNF green theme (NO PURPLE!)
 */

:root {
    /* DRNF Brand Colors - OFFICIAL THEME */
    --drnf-primary: #2c5530;
    --drnf-primary-dark: #1a3320;
    --drnf-primary-light: #34663b;
    --drnf-secondary: #8b4513;
    --drnf-accent: #f39c12;
    --drnf-gold: #D4B258;

    /* Neutral Colors */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Z-indexes */
    --z-navbar: 1000;
    --z-dropdown: 1010;
    --z-mobile-menu: 1020;
}

/* ============================================================================
   MODERN NAVBAR - Glassmorphism Style
   ============================================================================ */

/* Top Bar (WhatsApp, Email) */
.top-bar {
    background: var(--drnf-primary);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.top-bar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.top-bar-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.top-bar-link i {
    font-size: 16px;
}

.top-bar-link strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    .top-bar-container {
        justify-content: center;
        text-align: center;
    }

    .top-bar-link span {
        font-size: 13px;
    }
}

/* Main Navigation - Glassmorphism */
nav {
    position: sticky;
    top: 0;
    z-index: var(--z-navbar);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(44, 85, 48, 0.1);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

/* Logo */
nav .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--drnf-primary);
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
}

nav .logo img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.2);
    transition: all 0.3s ease;
}

nav .logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

nav .logo span {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, var(--drnf-primary) 0%, var(--drnf-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    nav .logo span {
        font-size: 16px;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Desktop Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 10px 18px;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, var(--drnf-primary) 0%, var(--drnf-accent) 100%);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--drnf-primary);
    background: rgba(44, 85, 48, 0.05);
}

.nav-links a:hover::before {
    transform: scaleX(1);
}

.nav-links a.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--drnf-primary) 0%, var(--drnf-primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.3);
}

.nav-links a.active::before {
    display: none;
}

/* Dropdown Menu */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.3s ease;
}

.nav-links .dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dropdown);
    border: 1px solid rgba(44, 85, 48, 0.1);
    padding: 8px;
}

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

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--gray-700);
    border-radius: 8px;
}

.dropdown-menu a i {
    width: 20px;
    color: var(--drnf-primary);
}

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

.dropdown-menu a:hover {
    background: rgba(44, 85, 48, 0.08);
    color: var(--drnf-primary);
}

/* CTA Button */
.nav-cta {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--drnf-primary) 0%, var(--drnf-primary-dark) 100%);
    color: var(--white) !important;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.nav-cta:hover::before {
    width: 300px;
    height: 300px;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 85, 48, 0.4);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(44, 85, 48, 0.08);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--drnf-primary);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 121px; /* Below top bar + nav */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-mobile-menu);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

/* Hide mobile menu completely on desktop */
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-links a {
    display: block;
    padding: 14px 18px;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: linear-gradient(135deg, var(--drnf-primary) 0%, var(--drnf-primary-dark) 100%);
    color: var(--white);
    transform: translateX(4px);
}

.mobile-menu-cta {
    margin-top: 24px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--drnf-primary) 0%, var(--drnf-primary-dark) 100%);
    color: var(--white);
    text-decoration: none;
    display: block;
    text-align: center;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Body Scroll Lock (when mobile menu open) */
body.mobile-menu-open {
    overflow: hidden;
}

/* ============================================================================
   MOBILE DROPDOWN MENUS
   ============================================================================ */

.mobile-dropdown {
    list-style: none;
}

.mobile-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: none;
    border: none;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: left;
}

.mobile-dropdown-toggle:hover {
    background: rgba(44, 85, 48, 0.05);
    color: var(--drnf-primary);
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.mobile-dropdown.active .mobile-dropdown-toggle {
    background: rgba(44, 85, 48, 0.08);
    color: var(--drnf-primary);
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 16px;
    margin-top: 4px;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 500px;
}

.mobile-dropdown-content a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 16px !important;
    color: var(--gray-600) !important;
    text-decoration: none;
    font-weight: 400 !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.mobile-dropdown-content a i {
    width: 20px;
    font-size: 16px;
    color: var(--drnf-primary);
    opacity: 0.7;
}

.mobile-dropdown-content a:hover {
    background: rgba(44, 85, 48, 0.05) !important;
    color: var(--drnf-primary) !important;
    transform: translateX(4px) !important;
}

.mobile-dropdown-content a:hover i {
    opacity: 1;
}

/* Desktop Dropdown Icon Styling */
.nav-links .dropdown > a i {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-links .dropdown:hover > a i {
    transform: rotate(180deg);
}
