/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - High Contrast (WCAG AA compliant) */
    --primary-dark: #1a1a2e;
    --primary-light: #16213e;
    --accent: #d63850;          /* Slightly deeper for better contrast: 4.9:1 on white */
    --accent-hover: #e94560;
    --text-light: #ffffff;
    --text-dark: #1a1a2e;
    --bg-light: #faf9f7;        /* Warmer off-white */
    --bg-white: #ffffff;
    --bg-warm: #f5f3ef;         /* Warm neutral for variety */
    --border: #d8d4ce;          /* Warmer border */
    --success: #1e7b34;         /* Deeper green for contrast */
    --warning: #b38600;         /* Darker gold for contrast */
    --info: #0d6986;            /* Deeper teal for contrast */

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Typography - Larger base for readability */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;
    --font-size-base: 1rem;     /* 16px base */
    --line-height-body: 1.7;    /* More generous line spacing */
    --line-height-heading: 1.3;

    /* Touch Targets - 44px minimum per WCAG */
    --touch-target-min: 44px;

    /* Animations - Subtle, respectful of motion preferences */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: var(--line-height-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ACCESSIBILITY - Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: var(--text-light);
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 5px 0;
}

.skip-link:focus {
    top: 0;
}

/* ACCESSIBILITY - Respect reduced motion preference */
@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;
    }
}

/* ACCESSIBILITY - Focus states */
*:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

button:focus,
a:focus,
select:focus,
input:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Improve text readability */
p, li {
    max-width: 75ch;
}

/* Headers in headers should be full width and centered */
header h1,
header p {
    max-width: 100%;
}

/* Section headers should be centered */
.section-header h2,
.cases-section h2,
.learning-path h2,
.reading-levels h2 {
    max-width: 100%;
    text-align: center;
}

/* Section subtitles need margin auto to center the block */
.section-header p,
.section-subtitle {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

h1, h2, h3, h4 {
    max-width: 65ch;
}

/* Center text elements only in header and hero sections */
header .container p,
header .container h1,
.hero .container p,
.hero .container h2 {
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* COMPACT HEADER WITH NAV */
.site-header {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    min-height: var(--touch-target-min);
}

.site-logo:hover {
    opacity: 0.9;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-family: var(--font-heading);
}

.header-nav {
    display: flex;
    gap: 0.25rem;
}

.header-nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast), background-color var(--transition-fast);
    border-radius: 4px;
}

.header-nav a:hover {
    color: var(--accent);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Legacy header/nav styles for other pages */
header:not(.site-header) {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 1rem 0;
    text-align: center;
}

header:not(.site-header) h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    text-align: center;
    max-width: 100%;
}

header:not(.site-header) p {
    font-size: 0.95rem;
    opacity: 0.9;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

/* NAVIGATION for other pages */
.main-nav {
    background-color: var(--primary-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.75rem 1rem;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast), background-color var(--transition-fast);
    border-radius: 4px;
}

.main-nav a:hover {
    color: var(--accent-hover);
    background-color: rgba(255, 255, 255, 0.1);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem 0;
}

.hero h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.hero p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 1rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-target-min);
    background-color: var(--accent);
    color: var(--text-light);
padding: 0.75rem 2rem;
    min-width: 160px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    border: 2px solid var(--accent);
    text-align: center;
}

.cta-button:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 56, 80, 0.35);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(214, 56, 80, 0.25);
}

/* GUIDING QUESTION */
.guiding-question {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
}

.guiding-question-box {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 2rem;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.guiding-question-label {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.guiding-question-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    max-width: 100%;
}

.learn-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.6rem 1.25rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.learn-more-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.learn-more-btn .arrow {
    transition: transform 0.2s ease;
}

.learn-more-btn.expanded .arrow {
    transform: rotate(180deg);
}

.guiding-question-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.guiding-question-details.expanded {
    max-height: 300px;
    opacity: 1;
    margin-top: 1.25rem;
}

.guiding-question-simple {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    max-width: 100%;
    text-align: left;
}

.guiding-question-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 100%;
    text-align: center;
}

/* LEARNING PATH */
.learning-path {
    padding: 1.25rem 0;
    background-color: var(--bg-white);
}

.learning-path h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.path-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.step {
    text-align: center;
    padding: 1.25rem 1rem;
    background-color: var(--bg-warm);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.step:focus-within {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 auto 0.5rem;
}

.step h3 {
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
    font-size: 1rem;
}

.step p {
    font-size: 0.9rem;
}

/* CASES SECTION */
.cases-section {
    padding: 1.5rem 0;
}

.cases-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.case-card {
    background-color: var(--bg-white);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
    border: 2px solid transparent;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

.case-card:focus-within {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.case-year {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.case-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.case-card p {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    opacity: 0.8;
    font-size: 0.9rem;
}

.case-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target-min);
    padding: 0.5rem 0;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.case-link:hover {
    color: var(--accent-hover);
}

/* READING LEVELS */
.reading-levels {
    padding: 1.25rem 0;
    background-color: var(--primary-light);
    color: var(--text-light);
}

.reading-levels h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.level-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.level-badge {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    min-width: 180px;
    transition: transform var(--transition-normal), background-color var(--transition-fast);
}

.level-badge:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.level-badge span {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

.level-badge h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.level-badge p {
    font-size: 0.9rem;
}

/* FOOTER */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: var(--spacing-lg) 0;
}

footer .container {
    text-align: center;
}

footer p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .site-header {
        padding: 0.5rem 0;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .site-logo {
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.25rem;
    }

    .header-nav {
        gap: 0;
    }

    .header-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    header:not(.site-header) h1 {
        font-size: 1.5rem;
    }

    .path-steps {
        grid-template-columns: 1fr;
    }

    .case-grid {
        grid-template-columns: 1fr;
    }

    .guiding-question-text {
        font-size: 1.15rem;
    }

    .guiding-question-box {
        padding: 1.5rem 1.25rem;
    }

    .guiding-question-simple {
        font-size: 1rem;
    }
}
