/* ============================================
   MAIN.CSS - Base Styles, Layout, and Global Components
   ============================================ */

/* ============================================
   ACCESSIBILITY - Skip Links
   ============================================ */

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: var(--z-skip-link);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 0;
    /* Visually hidden but accessible to screen readers */
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

.skip-link:focus-visible {
    clip: auto;
    clip-path: none;
    width: auto;
    height: auto;
    overflow: visible;
    white-space: normal;
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
    /* The Nursing Collective Brand Colors (constant across themes) */
    --primary-color: #2E86AB;        /* Medical Blue - Primary brand color */
    --primary-dark: #236b8a;         /* Darker blue for hover states */
    --primary-light: #5ba3c4;        /* Lighter blue for backgrounds */
    --secondary-color: #A23B72;      /* Healthcare Accent - Secondary brand color */
    --secondary-dark: #81305b;       /* Darker accent for hover */
    --secondary-light: #c96f9f;      /* Lighter accent */
    --accent-color: #f59e0b;         /* Warm accent for highlights */

    /* Semantic Status Colors */
    --danger-color: #dc2626;         /* Error states, destructive actions */
    --danger-dark: #b91c1c;          /* Danger hover */
    --danger-light: #ef4444;         /* Danger lighter variant */
    --danger-bg: #fef2f2;           /* Danger background tint */
    --danger-bg-subtle: #fee2e2;    /* Danger subtle background */
    --success-color: #059669;        /* Success states, confirmations */
    --success-dark: #047857;         /* Success hover */
    --success-light: #10b981;        /* Success lighter variant */
    --success-bg: #ecfdf5;          /* Success background tint */
    --warning-color: #d97706;        /* Warning states, caution */
    --warning-dark: #b45309;         /* Warning hover */
    --warning-light: #f59e0b;        /* Warning lighter variant (same as accent) */
    --warning-bg: #fffbeb;          /* Warning background tint */
    --info-color: #2563eb;           /* Informational states */
    --info-dark: #1d4ed8;            /* Info hover */
    --info-light: #3b82f6;           /* Info lighter variant */
    --info-bg: #eff6ff;             /* Info background tint */

    /* Gradient Accent Colors */
    --gradient-blue: #4A90E2;        /* Hero gradient blue stop */
    --gradient-purple: #7B68EE;      /* Hero gradient purple stop */
    --indigo-primary: #4f5fd9;       /* Admin/indigo gradient start */
    --indigo-dark: #5a3996;          /* Admin/indigo gradient end */
    --pink-primary: #f093fb;         /* Premium gradient start */
    --pink-dark: #f5576c;            /* Premium gradient end */

    /* Category Colors */
    --cat-cardiovascular: #dc2626;
    --cat-cardiovascular-dark: #b91c1c;
    --cat-respiratory: #3b82f6;
    --cat-respiratory-dark: #2563eb;
    --cat-neurological: #a855f7;
    --cat-neurological-dark: #9333ea;
    --cat-endocrine: #fb923c;
    --cat-endocrine-dark: #ea580c;
    --cat-renal: #14b8a6;
    --cat-renal-dark: #0d9488;
    --cat-gastrointestinal: #84cc16;
    --cat-gastrointestinal-dark: #65a30d;
    --cat-musculoskeletal: #78716c;
    --cat-musculoskeletal-dark: #57534e;
    --cat-clinical-skills: #6366f1;
    --cat-clinical-skills-dark: #4f46e5;
    --cat-pharmacology: #8b5cf6;
    --cat-pharmacology-dark: #7c3aed;
    --cat-mental-health: #10b981;
    --cat-mental-health-dark: #059669;
    --cat-maternal-newborn: #ec4899;
    --cat-maternal-newborn-dark: #db2777;
    --cat-pediatrics: #f59e0b;
    --cat-pediatrics-dark: #d97706;
    --cat-lab-values: #06b6d4;
    --cat-lab-values-dark: #0891b2;
    --cat-safety: #f97316;
    --cat-safety-dark: #ea580c;

    /* Light Mode Colors (default) */
    --white: #FFFFFF;
    --text-primary: #1f2937;         /* Dark gray for body text */
    --text-secondary: #6b7280;       /* Medium gray for secondary text */
    --text-light: #9ca3af;           /* Light gray for tertiary text */
    --background-light: #f8fafc;     /* Very light blue-gray background */
    --background-white: #ffffff;     /* White background */
    --card-bg: #ffffff;              /* Card background */
    --border-color: #e5e7eb;         /* Light border color */
    --navbar-bg: rgba(255, 255, 255, 0.92);
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
    --footer-bg: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Aliases used by feedback widget and other components */
    --text-color: #1a1a1a;              /* General text color (alias) */
    --text-muted: #6b7280;              /* Muted/hint text */
    --input-bg: #fafafa;                /* Input field background */
    --hover-bg: rgba(0, 0, 0, 0.05);   /* Subtle hover highlight */

    /* Focus Ring */
    --focus-ring: 0 0 0 3px rgba(46, 134, 171, 0.4);

    /* Z-index scale */
    --z-content: 1;
    --z-sticky: 10;
    --z-navbar: 1000;
    --z-dropdown: 1100;
    --z-toast: 2000;
    --z-mobile-nav: 9000;
    --z-feedback: 9100;
    --z-modal-backdrop: 9500;
    --z-modal: 9600;
    --z-skip-link: 9700;
    --z-cookie-banner: 9800;
    --z-content-gate: 9900;
    --z-lockscreen: 9999;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --white: #e5e7eb;
    --text-primary: #f9fafb;         /* Very light gray for body text */
    --text-secondary: #d1d5db;       /* Light gray for secondary text */
    --text-light: #9ca3af;           /* Medium gray for tertiary text */
    --background-light: #1f2937;     /* Dark gray background */
    --background-white: #111827;     /* Very dark background */
    --card-bg: #1f2937;              /* Dark card background */
    --border-color: #374151;         /* Dark border color */
    --navbar-bg: rgba(17, 24, 39, 0.92);
    --navbar-bg-scrolled: rgba(17, 24, 39, 0.98);
    --footer-bg: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);

    /* Aliases used by feedback widget and other components */
    --text-color: #f5f5f5;
    --text-muted: #9ca3af;
    --input-bg: #374151;
    --hover-bg: rgba(255, 255, 255, 0.08);

    /* Semantic Status Colors - Dark Mode */
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #f87171;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-bg-subtle: rgba(239, 68, 68, 0.1);
    --success-color: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --warning-light: #fbbf24;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --info-color: #3b82f6;
    --info-dark: #2563eb;
    --info-light: #60a5fa;
    --info-bg: rgba(59, 130, 246, 0.15);

    /* Focus Ring (dark) */
    --focus-ring: 0 0 0 3px rgba(91, 163, 196, 0.5);
}


/* ============================================
   RESET AND BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-white);
    overflow-x: hidden;
    max-width: 100vw;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-anchor: none;
}

/* ============================================
   GLOBAL FOCUS STYLES (Accessibility)
   ============================================ */

/* Visible focus ring for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

/* Remove default outline for mouse/touch clicks */
:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}


/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Source Sans 3', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.nav-brand span {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}


/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs .separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}


/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: var(--navbar-bg-scrolled);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 95px;
    overflow: visible;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-right: auto;
}

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

.nav-logo {
    height: 55px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Join Discord button in navbar - force white text */
.nav-links .btn-primary {
    color: white !important;
}

/* Hide Home link on desktop (logo serves as home button) */
.nav-link-home {
    display: none;
}

/* Dark Mode Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

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

.theme-toggle .light-icon,
.theme-toggle .dark-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .light-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .dark-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle .light-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle .dark-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="dark"] .mobile-menu-btn {
    color: var(--text-primary);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto; /* Push to far right */
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    opacity: 0.7;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        margin-left: auto; /* Push to far right edge */
    }

    .nav-container {
        justify-content: space-between;
        width: 100%;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 0;
        gap: 0;
        z-index: 9999;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
    }

    .nav-links.mobile-open {
        display: flex;
        animation: fadeIn 0.3s ease;
        padding: 80px 32px 80px 32px;
        gap: 8px;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .nav-links a {
        color: var(--text-primary);
        font-size: 1.25rem;
        font-weight: 600;
        padding: 12px 24px;
        width: 100%;
        max-width: 320px;
        text-align: center;
        border-radius: 12px;
        transition: all 0.3s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .nav-link-home {
        display: flex !important;
    }

    .theme-toggle {
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    .theme-toggle:hover {
        background: var(--background-light);
        border-color: var(--primary-color);
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: rgba(46, 134, 171, 0.1);
        color: var(--primary-color);
    }

    .nav-links .btn-primary {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        color: white !important;
        border: none;
        padding: 16px 32px;
        font-size: 1.15rem;
        margin-top: 16px;
        box-shadow: 0 4px 15px rgba(46, 134, 171, 0.4);
        flex-shrink: 0;
    }

    .nav-links .btn-primary:hover,
    .nav-links .btn-primary:active {
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(46, 134, 171, 0.5);
    }

    /* Position X button when menu is open */
    .nav-links.mobile-open ~ .mobile-menu-btn {
        position: fixed;
        right: 20px;
        top: 30px;
        z-index: var(--z-mobile-nav);
        color: var(--text-primary) !important;
    }

    [data-theme="dark"] .nav-links.mobile-open ~ .mobile-menu-btn {
        color: #f9fafb !important;
    }

    [data-theme="dark"] .nav-links {
        background: rgba(17, 24, 39, 0.98);
    }

    [data-theme="dark"] .nav-links a {
        color: var(--text-primary);
    }

    [data-theme="dark"] .nav-links a:hover,
    [data-theme="dark"] .nav-links a:active {
        background: rgba(46, 134, 171, 0.15);
        color: var(--text-primary);
    }

    [data-theme="dark"] .theme-toggle {
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
    }

    [data-theme="dark"] .theme-toggle:hover {
        background: rgba(46, 134, 171, 0.15);
        border-color: var(--primary-color);
    }

    .nav-container {
        padding: 0 32px;
        min-height: 80px;
    }

    .nav-logo {
        height: 50px;
        width: auto;
    }

    /* Hide user avatar button on mobile - show dropdown items directly */
    .user-menu .user-avatar {
        display: none;
    }

    /* Add separator before user menu */
    .user-menu {
        width: 100%;
        max-width: 320px;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 2px solid var(--border-color);
    }

    /* Show user dropdown directly in mobile menu */
    .user-menu .user-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0;
        width: 100%;
        max-width: 320px;
        box-shadow: none;
        border: none;
        background: transparent;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Style user dropdown links for mobile */
    .user-menu .user-dropdown a {
        background: rgba(46, 134, 171, 0.1);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px 24px;
        font-size: 1.25rem;
        font-weight: 600;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .user-menu .user-dropdown a:hover {
        background: rgba(46, 134, 171, 0.2);
        padding-left: 24px; /* Keep consistent padding on mobile */
    }

    [data-theme="dark"] .user-menu .user-dropdown {
        background: transparent;
    }

    [data-theme="dark"] .user-menu .user-dropdown a {
        background: rgba(46, 134, 171, 0.15);
        border-color: rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .user-menu .user-dropdown a:hover {
        background: rgba(46, 134, 171, 0.25);
    }
}


/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--footer-bg);
    color: white;
    padding: 64px 0 32px;
    transition: background-color 0.3s ease;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-icon {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.footer-logo {
    height: 30px;
    width: 30px;
    object-fit: contain;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

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

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 134, 171, 0.3);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 32px;
    text-align: center;
    color: #9ca3af;
}

/* Footer Mobile Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 48px 0 24px;
        text-align: center !important;
    }

    .footer .container {
        width: 100%;
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 40px;
        text-align: center !important;
        margin-bottom: 32px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .footer-section {
        margin-bottom: 0;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        text-align: center !important;
    }

    .footer-section p {
        max-width: 280px;
        margin: 0 auto !important;
        line-height: 1.6;
        text-align: center !important;
        width: 100%;
    }

    .footer-brand {
        justify-content: center !important;
        font-size: 1.15rem;
        margin-bottom: 12px;
        display: flex !important;
        align-items: center;
        width: 100%;
    }

    .footer-logo {
        height: 28px;
        width: 28px;
    }

    .footer-section h4 {
        font-size: 1.05rem;
        margin-bottom: 16px;
        font-weight: 600;
        text-align: center !important;
        width: 100%;
    }

    .footer-section ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px;
        width: 100%;
        text-align: center !important;
    }

    .footer-section ul li {
        margin-bottom: 0 !important;
        width: 100%;
        text-align: center !important;
        display: flex;
        justify-content: center;
    }

    .footer-section a {
        font-size: 0.95rem;
        padding: 8px 16px;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 44px;
        line-height: 1.4;
        gap: 8px;
        text-align: center;
    }

    .footer-section .contact-info {
        text-align: center !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .footer-section p {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px;
        flex-wrap: wrap;
        text-align: center !important;
    }

    .footer-section p i {
        color: var(--secondary-color);
        font-size: 1.1rem;
    }

    .social-links {
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
        margin-top: 16px;
        gap: 24px;
        width: 100%;
    }

    .social-links a {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .footer-bottom {
        padding-top: 32px;
        font-size: 0.9rem;
        text-align: center !important;
        width: 100%;
    }

    .footer-bottom p {
        margin: 0;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 40px 0 24px;
    }

    .footer-content {
        gap: 32px;
    }

    .footer-section h4 {
        font-size: 1rem;
    }

    .footer-section a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .footer-section p {
        font-size: 0.9rem;
        max-width: 260px;
    }

    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .footer-bottom {
        font-size: 0.85rem;
    }

    .container {
        padding: 0 16px;
    }

    .nav-container {
        min-height: 70px;
        padding: 0 20px;
    }

    .nav-logo {
        height: 45px;
    }

    .mobile-menu-btn {
        font-size: 1.3rem;
        padding: 8px;
        margin-left: auto; /* Keep pushed to right on mobile */
    }
}


/* ============================================
   GLOBAL ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 134, 171, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(46, 134, 171, 0);
    }
}

@keyframes ripple-animation {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* ============================================
   LOADING STATE
   ============================================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color, white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

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

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
