/**
 * Sadaka Derneği - Modern Navbar v2.0
 * Features: Unified Auth Button, Sticky Header, Mobile-First, Premium Aesthetics
 */

:root {
    --nav-height: 80px;
    --nav-bg: #ffffff;
    --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --primary-color: #D4B97A;
    --primary-gradient: linear-gradient(135deg, #D4B97A 0%, #C9A961 100%);
    --secondary-color: #1f2937;
    --text-color: #374151;
    --hover-bg: #f9fafb;
}

/* Base Reset for Navbar Context */
.modern-navbar * {
    box-sizing: border-box;
}

.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    box-shadow: var(--nav-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}


.modern-navbar.scrolled {
    height: 70px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    /* Stronger shadow on scroll */
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================
   1. Brand / Logo
   ============================ */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1002;
    /* Above mobile menu */
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

/* ============================
   2. Desktop Menu (Center)
   ============================ */
.navbar-menu {
    display: none;
    /* Hidden on mobile */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(212, 185, 122, 0.1);
}

.nav-link svg {
    width: 10px;
    height: 10px;
    transition: transform 0.2s;
}

.nav-item:hover .nav-link svg {
    transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-link {
    display: block;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
    transform: translateX(4px);
}

/* ============================
   3. Actions (Right)
   ============================ */
.navbar-actions {
    display: none;
    /* Hidden on mobile */
    align-items: center;
    gap: 16px;
}

/* Combined Auth Button */
.btn-auth-combined {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
}

.btn-auth-combined:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.user-avatar-placeholder {
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Donate Button */
.btn-donate-modern {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(212, 185, 122, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-donate-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 185, 122, 0.4);
}

.btn-donate-modern svg {
    width: 18px;
    height: 18px;
}

/* ============================
   4. Mobile Menu
   ============================ */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    /* Slide from left usually feels more natural for nav, but user said right earlier, let's stick to standard right for consistency or left for modern */
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 80px 24px 24px;
    /* Top padding for header space */
}

.mobile-menu-drawer.active {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

/* Overlay for mobile menu */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-item {
    border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary-color);
    text-decoration: none;
}

.mobile-dropdown-content {
    display: none;
    padding-left: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.mobile-nav-item.active .mobile-dropdown-content {
    display: block;
}

.mobile-auth-area {
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
}

.mobile-auth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-mobile-auth {
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    background: #f3f4f6;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-mobile-donate {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    gap: 8px;
}

/* ============================
   Media Queries
   ============================ */
@media (min-width: 992px) {
    .navbar-menu {
        display: flex;
    }

    .navbar-actions {
        display: flex;
    }

    .mobile-toggle {
        display: none;
    }

    .mobile-menu-drawer {
        display: none;
    }
}

@media (max-width: 991px) {
    .mobile-toggle {
        display: block;
    }
}