/* CSS Custom Properties (Variables) - Apple-inspired with blue, yellow, red, black, white */
:root {
    /* Primary Brand Colors */
    --primary-color: #0D3F91;        /* Blue - main brand color */
    --secondary-color: #D2141E;      /* Red - accent/alert color */
    --accent-color: #FCD92D;         /* Yellow - highlight color */
    --black: #251B22;                /* Black for high contrast */
    
    /* Text Colors */
    --text-primary: #1d1d1f;         /* Apple's dark text - main content */
    --text-secondary: #86868b;       /* Apple's gray text - secondary content */
    --text-light: #a1a1a6;           /* Lighter gray - supporting text */
    --text-inverse: #FFFFFF;         /* White text for dark backgrounds */
    
    /* Background Colors */
    --background: #FFFFFF;            /* Pure white - main background */
    --background-alt: #f5f5f7;       /* Apple's light gray - section backgrounds */
    --background-dark: #1d1d1f;      /* Dark background for contrast */
    --background-overlay: rgba(0, 0, 0, 0.05); /* Subtle overlay */
    
    /* Border Colors */
    --border: #d2d2d7;               /* Apple's border gray */
    --border-light: #f5f5f7;         /* Light border */
    --border-dark: #424245;          /* Dark border for contrast */
    
    /* State Colors */
    --success: #34c759;              /* iOS Green - success states */
    --warning: var(--accent-color);   /* Yellow - warning states */
    --error: var(--secondary-color);  /* Red - error states */
    --info: var(--primary-color);     /* Blue - info states */
    
    /* Shadows - Apple-style elevation */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0D3F91 0%, #061A3A 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-subtle: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    
    /* Border Radius - Apple's design language */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 980px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.25, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.25, 1);
}

/* Night Mode Variables */
[data-theme="dark"] {
    /* Primary Brand Colors - consistent across modes */
    --primary-color: #0D3F91;        /* Blue - consistent */
    --secondary-color: #D2141E;      /* Red - consistent */
    --accent-color: #FCD92D;         /* Yellow - consistent */
    
    /* Text Colors - inverted for dark mode */
    --text-primary: #f5f5f7;         /* Light text for dark backgrounds */
    --text-secondary: #a1a1a6;        /* Lighter gray for secondary content */
    --text-light: #86868b;           /* Medium gray for supporting text */
    --text-inverse: #FFFFFF;         /* White text - consistent */
    
    /* Background Colors - dark theme */
    --background: #1d1d1f;           /* Dark background - main */
    --background-alt: #2c2c2e;       /* Slightly lighter dark - section backgrounds */
    --background-dark: #251B22;      /* Black - consistent */
    --background-overlay: rgba(255, 255, 255, 0.05); /* Subtle overlay */
    
    /* Border Colors - adjusted for dark mode */
    --border: #424245;               /* Dark border gray */
    --border-light: #2c2c2e;         /* Dark border */
    --border-dark: #86868b;          /* Lighter border for contrast */
    
    /* Shadows - adjusted for dark mode */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    
    /* Gradients - consistent colors */
    --gradient-primary: linear-gradient(135deg, #0D3F91 0%, #061A3A 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-subtle: linear-gradient(135deg, #2c2c2e 0%, #1d1d1f 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background);
    font-weight: 400;
    letter-spacing: -0.01em;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography - Apple-inspired */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    line-height: 1.0834933333;
    margin-bottom: 0.5rem;
    letter-spacing: -0.003em;
}

h1 { 
    font-size: 3.5rem; 
    font-weight: 800;
    letter-spacing: -0.015em;
}
h2 { 
    font-size: 2.5rem; 
    font-weight: 700;
    letter-spacing: -0.01em;
}
h3 { 
    font-size: 1.75rem; 
    font-weight: 600;
}
h4 { 
    font-size: 1.25rem; 
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons - Apple-inspired with enhanced states */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 48px;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

/* Ensure spacing between button icons and text */
.btn i {
    margin-right: 8px;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: #0D3F91;
    color: var(--text-inverse);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--background);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Home page Learn More button - brand red text in dark mode */
[data-theme="dark"] .hero .btn-secondary {
    color: #D2141E;
    border-color: #D2141E;
}

[data-theme="dark"] .hero .btn-secondary:hover {
    background: #D2141E;
    color: #FFFFFF;
    border-color: #D2141E;
}

.btn-accent {
    background: var(--accent-color);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.btn-accent:hover {
    background: #e6b800;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Navigation - Enhanced Apple-inspired with better blur and contrast */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    /* Ensure the navbar is clickable */
    pointer-events: auto;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

/* Night mode navbar styles */
[data-theme="dark"] .navbar {
    background: rgba(29, 29, 31, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(29, 29, 31, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
    /* Ensure the nav container is clickable */
    pointer-events: auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.022em;
}

.nav-logo img {
    height: 48px;
    width: auto;
    border-radius: 6px;
}

.nav-logo .logo-dark {
    display: none;
}

[data-theme="dark"] .nav-logo .logo-light {
    display: none;
}

[data-theme="dark"] .nav-logo .logo-dark {
    display: inline-block;
}

.nav-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.2vw, 2.5rem);
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
    position: relative;
    letter-spacing: -0.022em;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-color);
    border-radius: 0.5px;
}

.nav-link.unavailable {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-link.unavailable:hover {
    color: var(--text-light);
}

.nav-auth {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
    align-items: center;
    flex-wrap: nowrap;
}

.login-btn {
    color: var(--text-secondary);
}

.register-btn {
    background: var(--primary-color);
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 980px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
}

.register-btn:hover {
    background: #061A3A;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    /* Ensure the nav toggle is clickable */
    pointer-events: auto;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Night Mode Toggle Button */
.night-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    margin-left: 1rem;
    position: relative;
    z-index: 1001;
    font-size: 1.25rem;
}

.night-mode-toggle:hover {
    background: var(--background-alt);
    transform: scale(1.1);
}

.night-mode-toggle:active {
    transform: scale(0.95);
}

.night-mode-toggle i {
    transition: var(--transition);
}

.night-mode-toggle .fa-sun {
    color: #FCD92D;
}

.night-mode-toggle .fa-moon {
    color: #0D3F91;
}

/* Hide moon icon by default (day mode) */
.night-mode-toggle .fa-moon {
    display: none;
}

/* Show moon icon when night mode is active */
[data-theme="dark"] .night-mode-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .night-mode-toggle .fa-moon {
    display: inline-block;
}

/* Active state for mobile menu toggle */
.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section - Apple-inspired */
.hero {
    padding: 8rem 2rem 6rem;
    background: var(--background);
    margin-top: 80px;
    border-bottom: 1px solid var(--border-light);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.0834933333;
    letter-spacing: -0.015em;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-icon {
    width: 280px;
    height: 280px;
    background: var(--background-alt);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.hero-icon img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 24px;
}

.hero-icon i {
    font-size: 5rem;
    color: var(--primary-color);
}

/* Section Styles - Apple-inspired */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1.0834933333;
}

.section-divider {
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 1px;
}

/* Mission Section */
.mission {
    background: var(--background-alt);
}

.mission-statement {
    font-size: 1.25rem;
    text-align: center;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 500;
}

.mission-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.mission-point {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.mission-point i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

/* Community icon - brand red (first mission point) */
.mission-points .mission-point:nth-child(1) i {
    color: #D2141E;
}

/* Safety icon - brand yellow (second mission point) */
.mission-points .mission-point:nth-child(2) i {
    color: #FCD92D;
}

.mission-point h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mission-point p {
    color: var(--text-secondary);
}

/* Quick Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.link-card {
    background: var(--background);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Events icon - brand yellow (first link card) */
.links-grid .link-card:nth-child(1) i {
    color: #FCD92D;
}

/* Support Us icon - brand red (third link card) */
.links-grid .link-card:nth-child(3) i {
    color: #D2141E;
}

.link-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.link-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Social Section */
.social-section {
    background: var(--background-alt);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

.social-link i {
    font-size: 1.25rem;
}

/* Keep Connect With Us buttons unchanged in night mode */
[data-theme="dark"] .social-section .social-link {
    background: white;
        color: #251B22;
    border: 1px solid #f5f5f7;
}

[data-theme="dark"] .social-section .social-link:hover {
    color: #0D3F91;
}

[data-theme="dark"] .social-section .social-split .telegram-root.social-link {
    background: white;
        color: #251B22;
    border: 1px solid #f5f5f7;
}

[data-theme="dark"] .social-section .social-split .telegram-root.social-link:hover {
        color: #0D3F91;
}

/* Keep split buttons unchanged in night mode */
[data-theme="dark"] .social-section .split-btn.sfw {
    background: #FCD92D;
    color: #251B22;
}

[data-theme="dark"] .social-section .split-btn.spaces {
    background: #0D3F91;
    color: #FFFFFF;
}

[data-theme="dark"] .social-section .split-btn.announcements {
    background: #D2141E;
    color: #FFFFFF;
}

[data-theme="dark"] .social-section .split-btn.cancel {
    background: #e5e7eb;
        color: #251B22;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: #FFFFFF;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.footer-logo img {
    height: 48px;
    width: auto;
    border-radius: 4px;
}

.footer-logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.footer-section h4 {
    color: #FFFFFF;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

/* Ensure standalone footer links (like Meet Our Team) match footer style */
.footer-section p a {
    color: #FFFFFF;
    text-decoration: none;
}

.footer-section p a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 1rem 0 3rem 0; /* Reduced top padding, increased bottom padding */
        overflow-y: auto; /* ensure scrollable to reach Logout */
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
        overscroll-behavior: contain; /* prevent body scroll chaining */
        z-index: 999;
        /* Ensure the menu is clickable */
        pointer-events: auto;
        /* Prevent any potential touch issues */
        touch-action: auto;
        /* Better scroll behavior */
        scroll-behavior: smooth;
        /* Ensure content fits */
        box-sizing: border-box;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-link {
        margin: 1rem 0;
        padding: 0.5rem 1rem;
        display: block;
        width: 100%;
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Dark mode styles for mobile nav menu */
    [data-theme="dark"] .nav-menu {
        background-color: #3a3a3c;
    }
    
    [data-theme="dark"] .nav-menu .nav-link {
        color: #f5f5f7;
    }
    
    [data-theme="dark"] .nav-menu .nav-link:hover,
    [data-theme="dark"] .nav-menu .nav-link.active {
        color: #FFFFFF;
    }
    
    [data-theme="dark"] .nav-auth {
        border-top-color: #424245;
    }
    
    [data-theme="dark"] .nav-auth .nav-link {
        color: #f5f5f7;
    }
    
    [data-theme="dark"] .nav-auth .user-name {
        background: #251B22;
        color: #FFFFFF;
        border-color: #424245;
    }

    .nav-auth {
        flex-direction: column;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 1rem 0 2rem 0; /* Added bottom padding */
        margin: 1rem 0 0;
        gap: 0.75rem; /* Increased gap for better touch targets */
        width: 100%;
    }

    /* Ensure nav-auth buttons have proper mobile styling */
    .nav-auth .nav-link,
    .nav-auth .logout-btn,
    .nav-auth .user-name {
        margin: 0.5rem 0;
        padding: 0.75rem 1rem;
        display: block;
        width: 100%;
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
        min-height: 44px; /* Ensure touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }

    /* Specific styling for logout button */
    .nav-auth .logout-btn {
        background: #f3f4f6;
        color: #D2141E;
        font-weight: 500;
        border: 1px solid #e5e7eb;
    }

    .nav-auth .logout-btn:hover {
        background: #fef2f2;
        border-color: #fecaca;
    }

    /* Specific styling for username link */
    .nav-auth .user-name {
        background: #f8fafc;
        color: var(--primary-color);
        font-weight: 600;
        border: 1px solid #e2e8f0;
    }

    .nav-toggle {
        display: flex;
        /* Ensure touch targets are properly sized for mobile */
        min-height: 44px;
        min-width: 44px;
        align-items: center;
        justify-content: center;
        /* Prevent text selection on tap */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
            
    /* Position night mode toggle on mobile - group with nav-toggle */
    .night-mode-toggle {
        margin-left: 0;
        margin-right: 0.5rem;
    }
    
    /* Group night mode toggle and nav-toggle together on the right */
    .nav-container {
        padding: 1rem 15px;
        justify-content: flex-start;
    }
    
    /* Push nav-logo to left, buttons to right */
    .nav-logo {
        margin-right: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-icon {
        width: 150px;
        height: 150px;
    }

    .hero-icon i {
        font-size: 4rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .mission-statement {
        font-size: 1.1rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 1rem 15px;
        /* On mobile, group buttons on the right instead of space-between */
        justify-content: flex-start;
    }
    
    /* Push nav-logo to left, buttons to right */
    .nav-logo {
        margin-right: auto;
    }

    .nav-menu {
        padding: 1rem 0 3rem 0; /* Consistent with tablet view */
    }

    .nav-menu .nav-link {
        margin: 0.75rem 0;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px; /* Minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ensure nav-auth has enough space on very small screens */
    .nav-auth {
        margin: 1rem 0 0;
        padding: 1rem 0 3rem 0; /* Extra bottom padding for small screens */
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 200px;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .social-link {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .logout-btn {
        padding: 8px 16px;
        border-radius: 4px;
        transition: opacity 0.3s;
    }

    .logout-btn:hover { opacity: 0.8; }

    .user-name { font-weight: 500; margin-right: 10px; }
} 