/* ============================================
   MODERN CSS RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   CSS CUSTOM PROPERTIES (THEME)
   ============================================ */
:root {
    /* Color Palette */
    --primary-color: #2c5f8d;
    --primary-dark: #1a3a54;
    --primary-light: #4a7fa8;
    --secondary-color: #5a8baf;
    --accent-color: #8b4789;
    --accent-light: #a66fa4;

    /* Text Colors */
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b6b6b;
    --text-muted: #999999;

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f8f9fb;
    --bg-lighter: #fafbfc;
    --bg-gradient-1: linear-gradient(135deg, rgba(44, 95, 141, 0.05), rgba(139, 71, 137, 0.05));
    --bg-gradient-2: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --bg-gradient-3: linear-gradient(135deg, var(--accent-color), #a05b9e);

    /* Border & Divider */
    --border-color: #e5e7eb;
    --border-light: #f0f0f0;

    /* Crisis/Urgent Colors */
    --crisis-red: #c41e3a;
    --crisis-red-dark: #9a1829;
    --crisis-red-light: #e63952;

    /* Success & Info */
    --success-green: #10b981;
    --info-blue: #3b82f6;
    --warning-orange: #f59e0b;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.15);

    /* Spacing Scale */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;

    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   SMOOTH SCROLL & SCROLL ANIMATIONS
   ============================================ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Fade in on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
    font-weight: 700;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-medium);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.lead {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--bg-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   CRISIS BANNER
   ============================================ */
.crisis-banner {
    background: var(--crisis-red);
    color: white;
    padding: 12px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease-out;
}

.crisis-banner p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
}

.crisis-banner strong {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 48px;
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    background: var(--bg-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand .tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-gradient-2);
    transition: width var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    min-width: 200px;
    list-style: none;
    z-index: var(--z-dropdown);
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    border-bottom: none;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all var(--transition-base);
    border-radius: 2px;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: var(--spacing-3xl) 0;
    position: relative;
}

section.alt-bg {
    background: var(--bg-light);
}

section.gradient-bg {
    background: var(--bg-gradient-1);
}

.page-header {
    background: var(--bg-gradient-2);
    color: white;
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    animation: backgroundScroll 20s linear infinite;
}

@keyframes backgroundScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

.page-header h1 {
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.25rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
}

/* ============================================
   STATISTICS SECTION
   ============================================ */
.statistics-section {
    background: var(--bg-gradient-2);
    color: white;
    padding: var(--spacing-2xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

.stat-item {
    text-align: center;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
}

.stat-label {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

/* ============================================
   GLASSMORPHISM CARD
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   IMAGE WITH TEXT OVERLAY
   ============================================ */
.image-text-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    align-items: center;
}

.image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.image-container:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-lg);
    color: white;
}

/* ============================================
   BLOCKQUOTES & CITATIONS
   ============================================ */
blockquote {
    position: relative;
    padding-left: 2rem;
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--text-light);
    border-left: 4px solid var(--accent-color);
    font-size: 1.125rem;
    line-height: 1.8;
}

blockquote::before {
    content: '"';
    position: absolute;
    left: -10px;
    top: -20px;
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

cite {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
    font-style: normal;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding: var(--spacing-lg) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bg-gradient-2);
    transform: translateX(-50%);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.timeline-content {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--bg-light);
}

.contact h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xl);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.contact-info h3,
.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.contact-details {
    margin: var(--spacing-lg) 0;
}

.contact-details p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-sm);
}

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

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom a:hover {
    color: white;
}

/* Social Links */
.social-links {
    margin-top: var(--spacing-md);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    transition: all var(--transition-base);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-link svg {
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 60px;
    }

    .timeline-item::before {
        left: 20px;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
        --spacing-3xl: 3rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 140px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-2xl);
        padding: var(--spacing-lg) 0;
        gap: 0;
    }

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

    .nav-menu li {
        margin: var(--spacing-sm) 0;
    }

    /* Mobile dropdown styles */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: var(--bg-light);
        margin-top: 0;
        padding: 0;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown > a::after {
        content: ' ▼';
        font-size: 0.7em;
    }

    section {
        padding: var(--spacing-2xl) 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--spacing-lg);
    }
}

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

    .crisis-banner p {
        font-size: 0.85rem;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
    }

    .nav-brand .tagline {
        font-size: 0.75rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

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

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .crisis-banner,
    header,
    footer,
    .hero-scroll-indicator,
    .hamburger,
    .interactive-btn,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }

    h1, h2, h3 {
        page-break-after: avoid;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
