/* DAMP Navigation - Comprehensive Universal Navigation System */

/* Combined from navigation.css, navigation-optimized.css, and navigation-fixed.css */

/* Google Engineering Standards with Performance Optimization & Safe Area Support */

/* Copyright 2025 WeCr8 Solutions LLC */

:root {
    /* Navigation Layout */
    --nav-height: clamp(80px, 10vh, 120px); /* Increased touch target */
    --nav-item-padding: clamp(12px, 2vw, 24px);
    --nav-item-height: clamp(48px, 6vh, 64px);

    /* Color System */
    --primary-color: #00d4ff;
    --primary-dark: #09c;
    --secondary-color: #09c;
    --success-color: #0f8;
    --warning-color: #ff6b35;
    --accent-color: #ff4757;

    /* Navigation Backgrounds */
    --nav-bg: rgb(15 15 35 / 95%);
    --nav-bg-scrolled: rgb(15 15 35 / 98%);
    --mobile-menu-bg: rgb(15 15 35 / 98%);

    /* Text Colors */
    --text-color: #fff;
    --text-secondary: rgb(255 255 255 / 85%);
    --text-muted: rgb(255 255 255 / 60%);
    --hover-color: #00d4ff;

    /* Border & Shadow */
    --border-color: rgb(255 255 255 / 10%);
    --shadow-color: rgb(0 0 0 / 30%);
    --shadow-light: 0 2px 20px rgb(0 0 0 / 10%);
    --shadow-heavy: 0 8px 40px rgb(0 0 0 / 30%);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-standard: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Safe Area Support - Enhanced */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-right: env(safe-area-inset-right);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);

    /* DAMP Safe Area Compatibility */
    --damp-safe-area-top: var(--safe-area-top);
    --damp-safe-area-right: var(--safe-area-right);
    --damp-safe-area-bottom: var(--safe-area-bottom);
    --damp-safe-area-left: var(--safe-area-left);
}

/* ==========================================================================
   PERFORMANCE OPTIMIZED BASE STYLES
   ========================================================================== */

/* Enhanced Safe Area Container */
.safe-area-container {
    padding-left: max(20px, var(--safe-area-left));
    padding-right: max(20px, var(--safe-area-right));
}

/* Performance-Optimized Navigation Container */
.damp-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 9999;
    padding: 15px 0;
    padding-top: calc(15px + var(--safe-area-top));
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-standard);
    will-change: transform, background-color;
    contain: layout style; /* Performance optimization */
}

/* Navigation scroll states */
.nav-scrolled {
    background: var(--nav-bg-scrolled) !important;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(25px);
}

.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 50px;
    flex-wrap: nowrap;
}

/* ==========================================================================
   ENHANCED LOGO STYLING
   ========================================================================== */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all var(--transition-standard);
    position: relative;
    z-index: 1001;
    will-change: transform; /* Performance optimization */
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgb(0 212 255 / 30%));
}

.logo:focus {
    outline: 2px solid #00d4ff !important;
    outline-offset: 4px;
    border-radius: 8px;
}

.logo img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
    transition: filter var(--transition-standard);
}

.logo-text {
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Mobile logo in menu header */
.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ==========================================================================
   DESKTOP NAVIGATION (Responsive - Shows on desktop alongside hamburger)
   ========================================================================== */

.nav-links {
    display: none; /* Hidden on mobile, shown on desktop */
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Show desktop navigation on larger screens */
@media (width >= 1024px) {
    .nav-links {
        display: flex;
        animation: slideInFromTop 0.3s ease-out;
    }
}

/* Smooth animation for desktop nav appearance */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-standard);
    font-weight: 500;
    font-size: 1rem;
    padding: 10px 18px;
    border-radius: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #00d4ff;
    background: rgb(0 212 255 / 15%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 212 255 / 30%);
}

/* Enhanced hover animation */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: all var(--transition-standard);
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:focus {
    outline: 2px solid #00d4ff !important;
    outline-offset: 2px;
    background: rgb(0 212 255 / 20%);
}

/* CTA Link Styling */
.nav-cta {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color)) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgb(0 212 255 / 40%) !important;
}

/* ==========================================================================
   UNIVERSAL HAMBURGER MENU (Works on All Devices)
   ========================================================================== */

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 12px;
    z-index: 1001;
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: all var(--transition-standard);
    position: relative;
    will-change: transform; /* Performance optimization */
}

.hamburger:hover {
    background: rgb(255 255 255 / 10%);
    transform: scale(1.05);
}

.hamburger:focus {
    outline: 2px solid #00d4ff !important;
    outline-offset: 2px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all var(--transition-standard);
    border-radius: 2px;
    display: block;
    transform-origin: center;
    will-change: transform, opacity; /* Performance optimization */
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--primary-color);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--primary-color);
}

/* ==========================================================================
   UNIVERSAL MOBILE MENU (Responsive for All Platforms)
   ========================================================================== */

.safe-area-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform var(--transition-standard);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    border-right: 1px solid var(--border-color);
    will-change: transform; /* Performance optimization */
    contain: layout style; /* Performance optimization */
}

.safe-area-mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
    animation: slideInMobileMenu 0.3s ease-out;
}

/* Smooth mobile menu slide animation */
@keyframes slideInMobileMenu {
    from {
        transform: translateX(-100%);
        opacity: 0.8;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgb(0 0 0 / 50%);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-standard);
    backdrop-filter: blur(2px);
}

.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   MOBILE MENU HEADER
   ========================================================================== */

.mobile-menu-header {
    padding: 20px;
    padding-top: calc(20px + var(--safe-area-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: rgb(0 0 0 / 20%);
    backdrop-filter: blur(10px);
}

.mobile-close {
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgb(255 255 255 / 10%);
    transition: all var(--transition-standard);
    border: 2px solid transparent;
    color: var(--text-color);
    will-change: transform; /* Performance optimization */
}

.mobile-close:hover,
.mobile-close:focus {
    background: rgb(255 255 255 / 20%);
    transform: rotate(90deg) scale(1.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    outline: none;
}

.close-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

/* ==========================================================================
   MOBILE MENU CONTENT & NAVIGATION
   ========================================================================== */

.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
}

.mobile-nav-content {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

/* Navigation Sections */
.mobile-nav-section {
    margin-bottom: 30px;
    padding: 0 20px;
}

.mobile-nav-section-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin: 5px -20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-standard);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    will-change: transform, background-color; /* Performance optimization */
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 10%), transparent);
    transition: left var(--transition-standard);
}

.mobile-nav-link:hover::before {
    left: 100%;
}

.mobile-nav-link:hover {
    background: rgb(0 212 255 / 10%);
    color: var(--hover-color);
    transform: translateX(10px);
}

.mobile-nav-icon {
    font-size: 1.2em;
    min-width: 30px;
    text-align: center;
}

.mobile-nav-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Enhanced Mobile Navigation */
.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.mobile-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    font-weight: 600;
    padding: 15px 25px;
    border-radius: 12px;
    transition: all var(--transition-standard);
    text-align: left;
    width: 100%;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.mobile-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 10%), transparent);
    transition: left var(--transition-slow);
}

.mobile-nav a:hover::before,
.mobile-nav a:focus::before {
    left: 100%;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
    background: rgb(0 212 255 / 20%);
    color: #00d4ff;
    border-color: #00d4ff;
    outline: 2px solid #00d4ff !important;
    outline-offset: 2px;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 212 255 / 30%);
}

/* Mobile Nav Icon Styling */
.mobile-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Nav Text Styling */
.mobile-nav-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

/* Mobile Nav Content Container */
.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Mobile Nav Subtitle */
.mobile-nav-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Mobile Nav Section Title */
.mobile-nav-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding: 0 25px;
}

/* Mobile Nav Section Container */
.mobile-nav-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
    padding: 0 15px;
}

/* ==========================================================================
   CTA & ACTION BUTTONS
   ========================================================================== */

/* CTA Section in Mobile Menu */
.mobile-nav-cta-section {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.mobile-nav-cta {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    box-shadow: 0 4px 15px rgb(0 212 255 / 30%);
    text-align: center !important;
    justify-content: center !important;
    padding: 18px 25px !important;
    font-size: 1.2rem !important;
    border-radius: 50px !important;
    border: none !important;
}

.mobile-nav-cta:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color)) !important;
    transform: translateX(0) scale(1.02) !important;
    box-shadow: 0 6px 20px rgb(0 212 255 / 40%) !important;
}

/* Mobile Navigation Actions Section */
.mobile-nav-actions {
    margin-top: 20px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-actions a {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    margin: 8px 0 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
    transition: all var(--transition-standard) !important;
    border: 2px solid transparent !important;
}

/* Vote Button Styling */
.mobile-nav-vote {
    background: linear-gradient(45deg, #00d4ff, #09c) !important;
    color: white !important;
    border: 2px solid #00d4ff !important;
    font-weight: 700 !important;
}

.mobile-nav-vote:hover,
.mobile-nav-vote:focus {
    background: linear-gradient(45deg, #09c, #00d4ff) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 30px rgb(0 212 255 / 50%) !important;
}

/* Subscription Button Styling */
.mobile-nav-subscription {
    background: linear-gradient(45deg, #6a4c93, #9b59b6) !important;
    color: white !important;
    border-color: #6a4c93 !important;
    font-weight: 700 !important;
    margin-top: 5px;
}

.mobile-nav-subscription:hover,
.mobile-nav-subscription:focus {
    background: linear-gradient(45deg, #9b59b6, #6a4c93) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 30px rgb(106 76 147 / 50%) !important;
}

/* Cart Button with Count */
.mobile-nav-cart {
    background: rgb(0 255 136 / 10%) !important;
    border: 2px solid var(--success-color) !important;
    color: var(--success-color) !important;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: 15px;
    background: var(--success-color);
    color: var(--bg-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ==========================================================================
   SOCIAL PROOF & FOOTER
   ========================================================================== */

/* Social Proof in Menu */
.mobile-nav-social-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: rgb(0 0 0 / 20%);
}

.social-proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 5px;
}

.proof-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.proof-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.proof-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.proof-label {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Mobile Menu Footer with Safe Area */
.mobile-menu-footer {
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-area-bottom));
    border-top: 1px solid var(--border-color);
    background: rgb(0 0 0 / 20%);
    text-align: center;
}

.mobile-social-proof {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-stat {
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-rating {
    color: var(--warning-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mobile-legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.8rem;
}

.mobile-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.mobile-legal-links a:hover {
    color: var(--primary-color);
    background: rgb(0 212 255 / 10%);
}

/* ==========================================================================
   ACCESSIBILITY & UTILITY CLASSES
   ========================================================================== */

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Link for Accessibility */
.skip-link,
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: #000;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 0 0 8px;
    z-index: 10001; /* Higher than auth modal and navigation */
    transition: top var(--transition-fast);
    font-weight: 700;
}

.skip-link:focus,
.skip-to-content:focus {
    top: 6px; /* Position just below safe area */
    outline: 3px solid #00d4ff !important;
    outline-offset: 2px;
}

/* Body States */
.mobile-menu-open {
    overflow: hidden !important;
}

/* Device-Specific Classes */
.damp-ios-device .safe-area-mobile-menu {
    padding-top: var(--safe-area-top);
}

.android-device .hamburger {
    min-width: 48px;
    min-height: 48px;
}

.damp-has-notch .mobile-menu-header {
    padding-top: calc(30px + var(--safe-area-top));
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgb(0 212 255 / 70%);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgb(0 212 255 / 0%);
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    33% { opacity: 0.6; transform: scale(1.1); }
    66% { opacity: 0.3; transform: scale(0.9); }
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ========================================================================== */

/* Base Mobile Styles (up to 768px) */
@media (width <= 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .logo {
        font-size: 1.6rem;
    }

    .logo img {
        width: 28px;
        height: 28px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .mobile-nav a {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
        padding: 12px 20px;
    }

    .mobile-close {
        width: 40px;
        height: 40px;
    }

    .close-icon {
        font-size: 1.5rem;
    }

    .mobile-menu-content {
        padding: 30px 15px;
    }
}

/* Small Mobile (up to 480px) */
@media (width <= 480px) {
    .logo {
        font-size: 1.4rem;
    }

    .logo img {
        width: 24px;
        height: 24px;
    }

    .mobile-nav-section a {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .mobile-nav-section-title {
        font-size: 0.8rem;
        padding: 0 20px;
    }

    .mobile-nav-actions {
        padding: 0 20px;
    }

    .mobile-nav-cta {
        padding: 16px 20px !important;
        font-size: 1.1rem !important;
    }
}

/* Tablet Styles (769px to 1023px) */
@media (width >= 769px) {
    .safe-area-mobile-menu {
        max-width: 350px;
        box-shadow: var(--shadow-heavy);
    }

    .mobile-menu-header {
        padding: 15px 20px;
        padding-top: calc(15px + var(--safe-area-top));
    }

    .mobile-menu-content {
        justify-content: flex-start;
        padding: 20px;
    }

    .mobile-menu-footer {
        padding: 15px 20px;
        padding-bottom: calc(15px + var(--safe-area-bottom));
    }

    .mobile-nav-section a {
        font-size: 1rem;
        padding: 10px 20px;
        justify-content: flex-start;
    }
}

/* Desktop Styles (1024px and up) */
@media (width >= 1024px) {
    .damp-nav {
        padding: 20px 0;
        box-shadow: var(--shadow-light);
    }

    .nav-container {
        padding: 0 40px;
    }

    .logo {
        font-size: 2.2rem;
    }

    .logo:hover {
        filter: drop-shadow(0 0 20px rgb(0 212 255 / 60%));
    }

    .nav-links {
        gap: 40px;
    }

    .nav-links a {
        font-size: 1.1rem;
        font-weight: 600;
        padding: 12px 18px;
        border-radius: 12px;
    }

    .nav-links a:hover {
        box-shadow: 0 8px 25px rgb(0 212 255 / 25%);
    }
}

/* Large Desktop (1440px and up) */
@media (width >= 1440px) {
    .nav-container {
        padding: 0 60px;
        max-width: 1400px;
    }

    .logo {
        font-size: 2.5rem;
    }

    .nav-links {
        gap: 50px;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 14px 22px;
    }
}

/* ==========================================================================
   ACCESSIBILITY & PREFERENCE SUPPORT
   ========================================================================== */

/* High Contrast Mode Support */

/* @media (prefers-contrast: high) { */
    :root {
        --nav-bg: rgb(0 0 0 / 95%);
        --mobile-menu-bg: rgb(0 0 0 / 98%);
        --border-color: rgb(255 255 255 / 30%);
    }

    .mobile-nav-link {
        border: 1px solid var(--border-color);
    }

    .mobile-nav-link:hover {
        border-color: var(--primary-color);
    }

    .mobile-nav-section a {
        border: 2px solid currentcolor;
    }

    .mobile-nav-cta {
        background: var(--text-color) !important;
        color: var(--bg-primary) !important;
    }

/* } */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .mobile-nav a::before,
    .mobile-nav-link::before {
        display: none;
    }

    .hamburger,
    .mobile-nav-link,
    .safe-area-mobile-menu,
    .logo {
        transition-duration: 0.1s !important;
    }

    .mobile-nav-section a {
        transition: none;
    }

    .mobile-nav-cta:hover {
        transform: none !important;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

/* ==========================================================================
   AUTHENTICATION STYLES
   ========================================================================== */

/* Desktop Authentication Buttons */
.auth-buttons {
    display: none; /* Always hidden - auth is handled in hamburger menu */
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    flex-shrink: 0;
    min-width: fit-content;
}

.auth-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-standard);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 20%), transparent);
    transition: left var(--transition-standard);
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn.sign-in {
    background: rgb(0 212 255 / 10%);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.auth-btn.sign-in:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 212 255 / 30%);
}

.auth-btn.sign-up {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid transparent;
}

.auth-btn.sign-up:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 212 255 / 40%);
}

/* User Profile Menu */
.auth-user-menu {
    position: relative;
}

.auth-btn.user-profile {
    background: rgb(0 255 136 / 10%);
    color: var(--success-color);
    border: 2px solid var(--success-color);
    padding: 6px 12px;
}

.auth-btn.user-profile:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 255 136 / 30%);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 8px 25px rgb(0 0 0 / 30%);
    z-index: 1002;
    margin-top: 8px;
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-align: left;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgb(0 212 255 / 10%);
    color: var(--primary-color);
}

/* Mobile Authentication Section */
.mobile-nav-section.auth-section {
    background: rgb(0 212 255 / 5%);
    border-radius: 15px;
    border: 1px solid rgb(0 212 255 / 20%);
    margin: 0 20px 20px;
    padding: 20px;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-auth-buttons a {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all var(--transition-standard) !important;
    position: relative;
    overflow: hidden;
}

.mobile-auth-buttons .mobile-nav-cta-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    border: 2px solid transparent !important;
    font-weight: 700 !important;
}

.mobile-auth-buttons .mobile-nav-cta-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color)) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgb(0 212 255 / 40%) !important;
}

.mobile-auth-buttons a:not(.mobile-nav-cta-primary) {
    background: rgb(0 212 255 / 10%) !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.mobile-auth-buttons a:not(.mobile-nav-cta-primary):hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgb(0 212 255 / 30%) !important;
}

/* Mobile User Info (when signed in) */
.mobile-user-info {
    padding: 0;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgb(0 255 136 / 10%);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgb(0 255 136 / 30%);
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.mobile-user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.mobile-user-name {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-user-email {
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-user-info > a {
    background: rgb(255 255 255 / 5%) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    margin: 4px 0 !important;
}

.mobile-user-info > a:hover {
    background: rgb(0 212 255 / 10%) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.mobile-user-info > a[data-auth="signout"] {
    background: rgb(255 71 87 / 10%) !important;
    color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    margin-top: 12px !important;
}

.mobile-user-info > a[data-auth="signout"]:hover {
    background: var(--accent-color) !important;
    color: white !important;
}

/* Content spacing for navigation */
.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-nav-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
    line-height: 1.2;
}

/* ==========================================================================
   RESPONSIVE AUTHENTICATION STYLES
   ========================================================================== */

/* Desktop breakpoints */
@media (width >= 1024px) {
    .nav-links {
        display: none; /* Keep navigation in hamburger menu for clean layout */
    }

    .hamburger {
        display: flex; /* Always show hamburger menu on all screen sizes */
    }

    .auth-buttons {
        display: none; /* Auth buttons only in hamburger menu */
    }
}

/* Large desktop */
@media (width >= 1440px) {
    .nav-links {
        display: none; /* Keep navigation in hamburger menu for clean layout */
    }

    .hamburger {
        display: flex; /* Always show hamburger menu */
    }

    .auth-buttons {
        display: none; /* Auth buttons only in hamburger menu */
    }
}

/* Mobile specific adjustments */
@media (width <= 768px) {
    .auth-buttons {
        display: none; /* Hide desktop auth buttons on mobile */
    }

    .mobile-nav-section.auth-section {
        margin: 0 15px 20px;
        padding: 15px;
    }

    .mobile-user-profile {
        padding: 15px;
    }

    .mobile-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Small mobile */
@media (width <= 480px) {
    .auth-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .user-name {
        max-width: 80px;
    }

    .mobile-user-name {
        font-size: 1rem;
    }

    .mobile-user-email {
        font-size: 0.8rem;
    }
}

@media print {
    .damp-nav,
    .mobile-menu,
    .mobile-menu-backdrop,
    .hamburger,
    .auth-buttons,
    .mobile-auth-buttons {
        display: none !important;
    }
}

/* Ensure hamburger is visible on desktop */
.hamburger {
    display: flex !important;
    z-index: 1100; /* Ensure it's on top */
}

@media (min-width: 1024px) {
    .hamburger {
        display: flex !important;
    }
}