/* ====================================================================================================
   ACCESSIBILITY FOUNDATION & CORE VARIABLES (WCAG 2.0 AA COMPLIANT / WCAG 3.0 APCA TARGETED)
   ==================================================================================================== */
:root {
    --bg: #ffffff;
    --ink: #101828;            /* Rich Slate Gray - APCA optimal readability profile */
    --muted: #475467;          /* Accessible secondary description standard output */
    --line: #eaecf0;           /* Soft UI borders */
    --teal: #0e7490;           /* High contrast accent primary teal */
    --teal-dark: #0f766e;
    --teal-light: #f0fdfa;     /* Safe tone containers */
    --white: #ffffff;
    --shadow-sm: 0 4px 12px rgba(16, 24, 40, 0.02);
    --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.04);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Accessible focus ring indicators for keyboard navigation controls */
*:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

/* Hidden accessible link mechanism for assistive software skipping navigation anchors */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--teal);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 20px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ====================================================================================================
   HEADER & LOCALIZATION CONTROLS
   ==================================================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(20px, 5vw, 80px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    color: var(--teal);
    display: grid;
    place-items: center;
}

.header-navigation-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Add or update these rules in static/css/site.css */
.header-action.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    /* Forces consistent text size */
    line-height: 1.25rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    #nav-menu-wrapper.hidden {
        display: flex !important;
        /* Forces desktop view to ignore mobile hidden state during paint */
    }
}

/* Language Selection Trigger Widget Layout styles */
.lang-selector-container {
    position: relative;
    display: inline-block;
}

.lang-picker-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--line);
    padding: 8px 12px;
    border-radius: 16px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-picker-button:hover,
.lang-selector-container:hover .lang-picker-button {
    border-color: var(--ink);
    color: var(--ink);
}

/* CSS-driven micro translation selector panel popup display tree logic */
.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin: 8px 0 0;
    padding: 6px;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-selector-container:hover .lang-dropdown-menu,
.lang-selector-container:focus-within .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    color: var(--muted);
}

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

/* Button & Action Pill Component Classes */
.header-action,
.button {
    display: inline-flex;
    min-height: 40px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.header-action.secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}

.header-action.secondary:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.header-action.primary,
.button-primary {
    background: var(--teal);
    color: var(--white);
}

.header-action.primary:hover,
.button-primary:hover {
    background: var(--teal-dark);
}

/* ====================================================================================================
   STRUCTURAL WORKSPACES & MAIN HERO SPLIT SYSTEM
   ==================================================================================================== */
.section {
    padding-right: clamp(20px, 5vw, 80px);
    padding-left: clamp(20px, 5vw, 80px);
    max-width: 1440px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: center;
    min-height: calc(85vh - 74px);
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero-label {
    display: block;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-copy p {
    color: var(--muted);
    font-size: clamp(1.1rem, 1.3vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.button-secondary-outlined {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-secondary-outlined:hover {
    background: #f9fafb;
    border-color: var(--ink);
}

/* Container pod handling the visual illustration assets */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-concept-pod {
    width: 100%;
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.lottie-viewport {
    width: 100%;
    max-width: 480px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Forces the web component custom tag element to expand cleanly inside the layout viewport */
.lottie-viewport dotlottie-wc {
    width: 100% !important;
    height: 100% !important;
    max-height: 450px;
}

/* ====================================================================================================
   FEATURE GRID & METRIC ROW COMPONENT BLOCKS
   ==================================================================================================== */
.program-features {
    padding-top: 40px;
    padding-bottom: 60px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    border-top: 1px solid var(--line);
    padding-top: 60px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-icon {
    color: var(--teal);
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.feature-card p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Flexible Dashboard Metrics Bar */
.metrics-banner {
    padding-top: 40px;
    padding-bottom: 40px;
}

.metrics-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px 64px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--teal);
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

/* ====================================================================================================
   MISSION CORE & MAIN PROGRAM GRID ENVIRONMENT
   ==================================================================================================== */
h2 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.badge {
    display: inline-block;
    background: var(--teal-light);
    color: var(--teal);
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.mission {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding-top: 80px;
    padding-bottom: 80px;
    border-top: 1px solid var(--line);
}

.mission-content p {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.7;
}

/* Centered Programs Hub Styling Header Layout rules */
.programs-hub {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-heading-centered {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}

.section-heading-centered p {
    font-size: 1.15rem;
    color: var(--muted);
    margin-top: 12px;
}

/* Responsive 2x2 Platform Track Block Matrix */
.programs-modern-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.program-modern-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-modern-card:hover {
    transform: translateY(-4px);
    border-color: var(--teal);
    box-shadow: var(--shadow-md);
}

.card-glow-icon {
    width: 44px;
    height: 44px;
    background: var(--teal-light);
    color: var(--teal);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.program-modern-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.program-modern-card p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ====================================================================================================
   IMPACT MATRIX & FULL COMPONENT CTA WRAPPERS
   ==================================================================================================== */
.impact {
    padding-top: 60px;
    padding-bottom: 80px;
}

.impact-panel-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 64px;
    align-items: center;
}

.impact-copy p {
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 16px;
}

.impact-interactive-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-item-ui {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.checkbox-icon {
    color: var(--teal);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
}

.list-item-ui p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Bottom Structural Immersive CTA Callout */
.volunteer {
    padding-top: 40px;
    padding-bottom: 80px;
}

.cta-banner-card {
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 100%);
    color: var(--white);
    border-radius: 32px;
    padding: 64px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.cta-banner-card h2 {
    margin-bottom: 16px;
}

.cta-banner-card p {
    max-width: 600px;
    margin: 0 auto 36px;
    color: #e0f2fe;
    font-size: 1.1rem;
}

.button-white {
    background: var(--white);
    color: var(--teal-dark);
    font-weight: 700;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 24px;
}

.button-white:hover {
    background: #f8fafc;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px clamp(20px, 5vw, 80px);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ====================================================================================================
   RESPONSIVE DESIGN ADAPTATION MATRIX (MEDIA BREAKPOINTS)
   ==================================================================================================== */
@media (max-width: 1024px) {
    .hero, .mission, .programs-modern-grid, .impact-panel-modern {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-visual {
        order: -1;
    }

    .metrics-container {
        padding: 32px;
        justify-content: grid;
    }
}

@media (max-width: 768px) {
    .header-navigation-wrapper {
        display: none; /* Simplifies complex multi-actions for clean mobile toggles */
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .metrics-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .impact-panel-modern, .cta-banner-card {
        padding: 40px 24px;
    }
    
    .site-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}