/* CSS Custom Properties (Variables) - Apple-inspired with blue, yellow, red, black, white */
:root {
    /* Primary Brand Colors */
    --primary-color: #007AFF;        /* iOS Blue - main brand color */
    --secondary-color: #FF3B30;      /* iOS Red - accent/alert color */
    --accent-color: #FFCC00;         /* iOS Yellow - highlight color */
    --black: #000000;                /* Pure 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, #007AFF 0%, #0056D6 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);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, 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-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: var(--gradient-primary);
    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);
}

.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);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    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: 32px;
    width: auto;
    border-radius: 6px;
}

.nav-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.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;
}

.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;
}

.login-btn {
    color: var(--text-secondary);
}

.register-btn {
    background: var(--primary-color);
    color: white;
    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: #0056d6;
    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;
}

/* 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;
}

.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;
}

.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;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    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: white;
}

.footer-logo img {
    height: 24px;
    width: auto;
    border-radius: 4px;
}

.footer-logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.footer-section h4 {
    color: white;
    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: white;
    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;
    }

    .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: #dc2626;
        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;
    }

    .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;
    }

    .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; }
} 