/*
 * George Washington Carver Life - Modern CSS Architecture
 * Mobile-First, SEO-Optimized, Accessible Design
 * Version 2.0 - 2025
 */

/* ========================================
   CSS CUSTOM PROPERTIES (CSS Variables)
   ======================================== */
:root {
    /* Color System - Light Mode */
    --color-primary: #2C1810;
    --color-secondary: #8B4513;
    --color-accent: #D4A574;
    --color-accent-bright: #F4D03F;

    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F8F6F3;
    --color-bg-tertiary: #F0EDE8;
    --color-bg-dark: #1a1a1a;
    --color-bg-black: #000000;

    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-muted: #6a6a6a;
    --color-text-light: #ffffff;

    --color-border-light: #e0e0e0;
    --color-border-medium: #333333;
    --color-border-dark: #000000;

    /* Typography Scale */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    --font-family-serif: 'Georgia', 'Cambria', 'Times New Roman', serif;
    --font-family-mono: 'Consolas', 'Monaco', 'Courier New', monospace;

    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
    --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.375rem);
    --font-size-xl: clamp(1.25rem, 1.125rem + 0.625vw, 1.75rem);
    --font-size-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.5rem);
    --font-size-3xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);
    --font-size-4xl: clamp(2.5rem, 2rem + 2.5vw, 5rem);

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.2;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;

    /* Spacing System (8px base) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.5rem;    /* 24px */
    --space-6: 2rem;      /* 32px */
    --space-8: 3rem;      /* 48px */
    --space-10: 4rem;     /* 64px */
    --space-12: 5rem;     /* 80px */
    --space-16: 8rem;     /* 128px */

    /* Layout */
    --container-max-width: 1200px;
    --container-padding: var(--space-4);
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);

    /* 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;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg-primary: #0a0a0a;
        --color-bg-secondary: #1a1a1a;
        --color-bg-tertiary: #2a2a2a;
        --color-bg-dark: #ffffff;
        --color-bg-black: #ffffff;

        --color-text-primary: #f0f0f0;
        --color-text-secondary: #d0d0d0;
        --color-text-muted: #a0a0a0;
        --color-text-light: #0a0a0a;

        --color-border-light: #3a3a3a;
        --color-border-medium: #cccccc;
        --color-border-dark: #ffffff;

        --color-accent: #E8C89E;
        --color-accent-bright: #FFE55C;
    }
}

[data-theme="dark"] {
    --color-bg-primary: #0a0a0a;
    --color-bg-secondary: #1a1a1a;
    --color-bg-tertiary: #2a2a2a;
    --color-bg-dark: #ffffff;
    --color-bg-black: #ffffff;

    --color-text-primary: #f0f0f0;
    --color-text-secondary: #d0d0d0;
    --color-text-muted: #a0a0a0;
    --color-text-light: #0a0a0a;

    --color-border-light: #3a3a3a;
    --color-border-medium: #cccccc;
    --color-border-dark: #ffffff;

    --color-accent: #E8C89E;
    --color-accent-bright: #FFE55C;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-serif);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.container {
    max-width: var(--container-max-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-bg-black);
    color: var(--color-text-light);
    padding: var(--space-2) var(--space-4);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-bg-black);
    color: var(--color-text-light);
    border: 2px solid var(--color-border-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.dark-mode-icon {
    display: block;
    line-height: 1;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: linear-gradient(135deg, var(--color-bg-black) 0%, var(--color-bg-dark) 100%);
    color: var(--color-text-light);
    padding: var(--space-6) 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
}

header h1 {
    color: var(--color-text-light);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: var(--space-6);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-light);
}

/* Hero Stats Grid */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
    justify-items: center;
    max-width: 1000px;
    margin-inline: auto;
}

.stat-item {
    text-align: center;
    padding: var(--space-6) var(--space-5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
    width: 100%;
    max-width: 250px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item.clickable {
    cursor: pointer;
}

.stat-item.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    display: block;
    margin-bottom: var(--space-2);
    font-family: var(--font-family-serif);
}

.stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: var(--line-height-normal);
}

/* ========================================
   NAVIGATION
   ======================================== */
.search-nav {
    background: var(--color-bg-dark);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 2px solid transparent;
    text-align: center;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.search-nav.scrolled {
    border-bottom-color: var(--color-border-medium);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
}

.search-box {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--color-border-medium);
    background: var(--color-bg-black);
    color: var(--color-text-light);
    font-size: var(--font-size-base);
    border-radius: var(--border-radius-sm);
    width: 100%;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    font-family: var(--font-family-primary);
}

.search-box:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

nav {
    background: var(--color-bg-dark);
    padding: var(--space-4) 0;
    border-bottom: 2px solid var(--color-border-medium);
    text-align: center;
}

.filters {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-border-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--font-weight-medium);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family-primary);
    min-height: 44px;
    min-width: 44px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.filter-btn.active {
    background: var(--color-text-light);
    color: var(--color-bg-black);
    border-color: var(--color-text-light);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    padding: var(--space-10) 0;
    text-align: center;
    min-height: 60vh;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
    justify-items: center;
}

/* Timeline Cards */
.timeline-card {
    background: var(--color-bg-primary);
    border: 3px solid var(--color-border-dark);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.timeline-card:focus-within {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

.timeline-image {
    width: 100%;
    height: 300px;
    background: var(--color-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter var(--transition-base), transform var(--transition-slow);
}

.timeline-card:hover .timeline-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--color-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    transition: all var(--transition-base);
}

.timeline-card:hover .placeholder-image {
    background: var(--color-bg-secondary);
    transform: scale(1.1);
}

.timeline-content {
    padding: var(--space-6);
    text-align: center;
}

.timeline-date {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
}

.timeline-age {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.event-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    text-align: center;
}

.event-location {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    text-align: center;
}

.event-description {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-5);
    text-align: center;
}

.category-tag {
    display: inline-block;
    background: var(--color-bg-black);
    color: var(--color-text-light);
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
    border-radius: var(--border-radius-sm);
    font-weight: var(--font-weight-medium);
}

.importance-level {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-align: center;
}

/* ========================================
   TIMELINE DETAIL PAGE
   ======================================== */
.timeline-detail {
    display: none;
    max-width: 800px;
    margin-inline: auto;
    padding: var(--space-6);
}

.timeline-detail.active {
    display: block;
}

.event-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.event-portrait {
    width: min(300px, 100%);
    height: min(300px, 100%);
    margin-inline: auto;
    margin-bottom: var(--space-6);
    border: 5px solid var(--color-border-dark);
    overflow: hidden;
    border-radius: var(--border-radius-md);
}

.event-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-main-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-4);
}

.event-date-location {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.event-highlight {
    background: var(--color-bg-secondary);
    border: 3px solid var(--color-border-dark);
    padding: var(--space-6);
    margin: var(--space-6) 0;
    text-align: center;
    border-radius: var(--border-radius-md);
}

.event-highlight-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-4);
}

.detailed-description {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin: var(--space-6) 0;
    color: var(--color-text-secondary);
}

.impact-list {
    list-style: none;
    padding: 0;
}

.impact-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
}

.impact-list li:before {
    content: "→";
    margin-right: var(--space-2);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
}

/* Related Events */
.related-events-section {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 2px solid var(--color-border-light);
}

.related-events-section h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-6);
    text-align: center;
    color: var(--color-text-primary);
}

.related-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.related-event-tile {
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-border-light);
    padding: var(--space-5);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    border-radius: var(--border-radius-md);
}

.related-event-tile:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-dark);
    box-shadow: var(--shadow-lg);
}

.related-tile-emoji {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

.related-tile-date {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
}

.related-tile-event {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.related-tile-location {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.relation-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-bg-black);
    color: var(--color-text-light);
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--border-radius-sm);
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 80px;
    left: 20px;
    background: var(--color-bg-black);
    color: var(--color-text-light);
    border: none;
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    font-size: var(--font-size-base);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    min-height: 44px;
    font-family: var(--font-family-primary);
}

.back-btn:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

body.viewing-event header {
    display: none;
}

/* ========================================
   CARVER QUOTE SECTION
   ======================================== */
.carver-quote-section {
    background: var(--color-bg-primary);
    padding: var(--space-8) 0 var(--space-10);
    text-align: center;
}

.quote-container {
    max-width: 900px;
    margin-inline: auto;
    padding: var(--space-8) var(--space-6);
    border: 3px solid var(--color-border-dark);
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.quote-text {
    font-size: var(--font-size-xl);
    font-style: italic;
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-6);
    color: var(--color-text-primary);
    font-family: var(--font-family-serif);
}

.quote-attribution {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: linear-gradient(135deg, var(--color-bg-black) 0%, var(--color-bg-dark) 100%);
    color: var(--color-text-light);
    padding: var(--space-12) 0 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.5), rgba(139, 69, 19, 0.5), rgba(212, 165, 116, 0.5));
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-10);
    margin-bottom: var(--space-8);
    align-items: start;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-5);
    color: var(--color-text-light);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

.footer-description {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-6);
}

.social-links {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    color: var(--color-text-light);
    text-decoration: none;
    font-size: var(--font-size-lg);
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.footer-section h4 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-5);
    color: var(--color-text-light);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

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

.footer-section li {
    margin-bottom: var(--space-3);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    position: relative;
    padding-left: 0;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--color-text-light);
    padding-left: var(--space-2);
}

.footer-section a::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.footer-section a:hover::before {
    width: 5px;
}

.footer-contact {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-6);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-sm);
}

.contact-icon {
    font-size: var(--font-size-lg);
    margin-top: 0.1rem;
    opacity: 0.8;
}

.contact-info {
    flex: 1;
}

.contact-info strong {
    color: var(--color-text-light);
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-info span {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
}

.newsletter-section {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-section h5 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-4);
    color: var(--color-text-light);
    font-weight: var(--font-weight-semibold);
}

.newsletter-signup {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    font-family: var(--font-family-primary);
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-btn {
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 44px;
    font-family: var(--font-family-primary);
}

.newsletter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-6) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.footer-bottom-right {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-bottom a:hover {
    color: var(--color-text-light);
}

.footer-legal {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.loading {
    text-align: center;
    padding: var(--space-8);
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.no-results {
    text-align: center;
    padding: var(--space-8);
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.hidden {
    display: none !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    :root {
        --container-padding: var(--space-5);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    :root {
        --container-padding: var(--space-6);
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-stats {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    .nav-container {
        gap: var(--space-4);
    }

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

    .timeline-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .timeline-card {
        margin-inline: auto;
        max-width: 400px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }

    .back-btn {
        top: 70px;
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-sm);
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    footer {
        padding: var(--space-8) 0 0;
    }

    .footer-brand h3 {
        font-size: var(--font-size-xl);
    }

    .footer-contact {
        padding: var(--space-5);
    }

    .contact-item {
        flex-direction: column;
        gap: var(--space-2);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-5);
    }

    .footer-bottom-left,
    .footer-bottom-right {
        flex-direction: column;
        gap: var(--space-4);
    }

    .newsletter-signup {
        flex-direction: column;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    .footer-brand {
        max-width: none;
    }

    .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }

    .footer-section h4 {
        font-size: var(--font-size-sm);
    }

    .stat-item {
        min-height: 160px;
        padding: var(--space-5) var(--space-4);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

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

    .back-btn,
    .search-nav,
    nav,
    footer {
        display: none;
    }
}
