/* ==========================================================================
   APE Distribution Kits — Program Page
   Scoped to body.ape-program-page
   ========================================================================== */

/* ==========================================================================
   Variables
   ========================================================================== */

body.ape-program-page {
    --program-primary: #2878c8;
    --program-primary-dark: #1f68b2;
    --program-navy: #183150;
    --program-muted: #63758c;
    --program-border: #e3edf8;
    --program-soft: #f7fbff;
    --program-card-radius: 16px;
    --program-card-shadow: 0 10px 24px rgba(28, 64, 110, 0.05);
    --program-container: min(1180px, calc(100% - 48px));
    font-family: Inter, sans-serif;
    color: var(--program-navy);
    background: #ffffff;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.ape-program {
    overflow: hidden;
}

.ape-program *,
.ape-program *::before,
.ape-program *::after {
    box-sizing: border-box;
}

.program-container {
    width: var(--program-container);
    margin: 0 auto;
}

.program-section {
    padding: 40px 0;
    background: #ffffff;
}

.program-section-soft {
    background: var(--program-soft);
}

.program-section-head {
    max-width: 760px;
    margin-bottom: 32px;
}

.program-section-head:has(+ .program-story-flow) {
    max-width: none;
}

@media (min-width: 992px) {
    .program-section-head:has(+ .program-story-flow) h2 {
        font-size: clamp(28px, 2.5vw, 34px);
        white-space: nowrap;
    }
}

.program-section-head--center {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.program-section-head h2,
.program-cta h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--program-navy);
}

.program-section-head p,
.program-cta p {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--program-muted);
}

.program-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--program-primary);
}

.program-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: start;
}

.program-split-col .program-section-head {
    margin-bottom: 24px;
}

.program-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.program-btn-primary {
    color: #ffffff;
    background: var(--program-primary);
    box-shadow: 0 12px 28px rgba(40, 120, 200, 0.22);
}

.program-btn-primary:hover {
    transform: translateY(-2px);
    background: var(--program-primary-dark);
    color: #ffffff;
    text-decoration: none;
}

.program-btn-secondary {
    color: var(--program-primary);
    background: #ffffff;
    border: 1px solid var(--program-border);
}

.program-btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--program-primary);
    color: var(--program-primary);
    text-decoration: none;
}

.program-btn-light {
    color: var(--program-primary);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.program-btn-light:hover {
    transform: translateY(-2px);
    color: var(--program-primary);
    text-decoration: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.program-hero {
    padding: 100px 0 72px;
    background:
        radial-gradient(circle at top right, rgba(40, 120, 200, 0.1), transparent 38%),
        linear-gradient(180deg, var(--program-soft) 0%, #ffffff 100%);
}

.program-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 36px;
    align-items: center;
}

.program-hero-copy h1 {
    margin: 12px 0 0;
    max-width: none;
    font-size: clamp(34px, 3.7vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--program-navy);
}

@media (min-width: 1200px) {
    .program-hero-copy h1 {
        font-size: 48px;
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .program-hero-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 28px;
    }

    .program-hero-copy h1 {
        font-size: clamp(34px, 3.4vw, 42px);
    }
}

.program-hero-copy p {
    max-width: 620px;
    margin: 18px 0 0;
    font-size: 17px;
    line-height: 1.75;
    color: var(--program-muted);
}

.program-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.program-hero-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.program-hero-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--program-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--program-card-shadow);
    font-size: 13px;
    font-weight: 700;
    color: var(--program-navy);
}

.program-hero-badge i {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef6ff;
    color: var(--program-primary);
    display: grid;
    place-items: center;
    font-size: 13px;
}

/* ==========================================================================
   Journey
   ========================================================================== */

.program-journey-card {
    padding: 28px 24px 32px;
    border: 1px solid var(--program-border);
    border-radius: var(--program-card-radius);
    background:
        radial-gradient(circle at top right, rgba(40, 120, 200, 0.08), transparent 42%),
        #ffffff;
    box-shadow: 0 16px 42px rgba(28, 64, 110, 0.08);
}

.program-journey-card h2 {
    margin: 8px 0 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--program-navy);
}

@media (min-width: 992px) {
    .program-journey-card h2 {
        font-size: 18px;
        white-space: nowrap;
    }
}

.program-journey-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 28px;
}

.program-journey-flow::before {
    content: "";
    position: absolute;
    top: 78px;
    left: 10%;
    right: 10%;
    height: 0;
    border-top: 2px dashed #b8d4f0;
    z-index: 0;
}

.program-journey-step {
    position: relative;
    z-index: 1;
    text-align: center;
}

.program-journey-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 14px;
    background: #eef6ff;
    color: var(--program-primary);
    font-size: 22px;
}

.program-journey-marker {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: 10px auto 12px;
    border-radius: 50%;
    background: var(--program-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.program-journey-step h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--program-navy);
}

.program-journey-step p {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
    color: var(--program-muted);
}

.program-journey-note {
    margin: 28px 0 0;
    padding: 14px 18px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--program-primary-dark);
    background: #eaf4ff;
    border: 1px solid #c5ddf7;
    border-radius: 12px;
}

/* ==========================================================================
   Story
   ========================================================================== */

.program-story-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
    width: 100%;
}

.program-story-card {
    padding: 22px 18px;
    border: 1px solid var(--program-border);
    border-radius: var(--program-card-radius);
    background: #ffffff;
    box-shadow: var(--program-card-shadow);
    min-width: 0;
}

.program-story-card--challenge {
    background: #fff7f7;
    border-color: #ffd9d9;
}

.program-story-card--solution {
    background: #f3f9ff;
    border-color: #cfe3f8;
}

.program-story-card--impact {
    background: #f2fbf5;
    border-color: #cce9d4;
}

.program-story-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 50%;
    font-size: 18px;
}

.program-story-card--challenge .program-story-icon {
    background: #ffe3e3;
    color: #e04545;
}

.program-story-card--solution .program-story-icon {
    background: #e3f0ff;
    color: var(--program-primary);
}

.program-story-card--impact .program-story-icon {
    background: #dff5e6;
    color: #2f9b57;
}

.program-story-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--program-navy);
}

.program-story-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--program-muted);
}

.program-story-arrow {
    display: none;
}

@media (max-width: 991px) {
    .program-story-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .program-story-flow {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Focus
   ========================================================================== */

.program-focus-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.program-focus-card {
    min-height: 240px;
    padding: 28px;
    border: 1px solid #dbe9f6;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(24, 49, 80, .06);
}

.program-focus-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 12px;
    font-size: 20px;
}

.program-focus-icon--blue {
    background: #eef6ff;
    color: var(--program-primary);
}

.program-focus-icon--green {
    background: #eaf8ef;
    color: #2f9b57;
}

.program-focus-icon--orange {
    background: #fff4e8;
    color: #e08a24;
}

.program-focus-icon--purple {
    background: #f3efff;
    color: #7c59d6;
}

.program-focus-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--program-navy);
}

.program-focus-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--program-muted);
}

@media (max-width: 1024px) {
    .program-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .program-focus-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.program-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-top: 12px;
}

.program-timeline-line {
    position: absolute;
    top: 54px;
    left: 8%;
    right: 8%;
    height: 0;
    border-top: 2px dashed #b8d4f0;
    z-index: 0;
}

.program-timeline-step {
    position: relative;
    z-index: 1;
    text-align: center;
}

.program-timeline-number {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 22px;
    padding: 0 8px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--program-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.program-timeline-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border: 1px solid var(--program-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--program-card-shadow);
    color: var(--program-primary);
    font-size: 24px;
}

.program-timeline-step h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--program-navy);
}

.program-timeline-step p {
    max-width: 180px;
    margin: 0 auto;
    font-size: 13px;
    line-height: 1.6;
    color: var(--program-muted);
}

/* ==========================================================================
   Monitoring
   ========================================================================== */

.program-monitor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.program-monitor-card {
    padding: 24px 20px;
    border: 1px solid var(--program-border);
    border-radius: var(--program-card-radius);
    background: #ffffff;
    box-shadow: var(--program-card-shadow);
    text-align: center;
}

.program-monitor-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: #eef6ff;
    color: var(--program-primary);
    font-size: 22px;
}

.program-monitor-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--program-navy);
}

.program-monitor-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--program-muted);
}

/* ==========================================================================
   CTA
   ========================================================================== */

.program-cta {
    padding: 72px 0;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #1c5f9f 0%, var(--program-primary) 100%);
}

.program-cta h2 {
    color: #ffffff;
}

.program-cta p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.88);
}

.program-cta .program-btn {
    margin-top: 24px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .program-split-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .program-journey-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 24px;
    }

    .program-journey-flow::before {
        display: none;
    }

    .program-timeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 28px;
    }

    .program-timeline-line {
        display: none;
    }

    .program-monitor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .program-hero {
        padding: 40px 0 56px;
    }

    .program-section {
        padding: 56px 0;
    }

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

    .program-hero-copy h1 {
        font-size: clamp(30px, 8vw, 40px);
    }

    .program-hero-actions {
        flex-direction: column;
    }

    .program-hero-actions .program-btn {
        width: 100%;
    }

    .program-hero-badges {
        grid-template-columns: 1fr;
    }

    .program-journey-flow {
        grid-template-columns: 1fr;
    }

    .program-journey-step {
        display: grid;
        grid-template-columns: 56px 1fr;
        gap: 4px 14px;
        text-align: left;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--program-border);
    }

    .program-journey-step:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .program-journey-icon {
        grid-row: 1 / span 3;
        margin: 0;
    }

    .program-journey-marker {
        margin: 0 0 4px;
        justify-self: start;
    }

    .program-journey-step h3,
    .program-journey-step p {
        grid-column: 2;
    }

    .program-timeline {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .program-timeline-step {
        display: grid;
        grid-template-columns: 64px 1fr;
        gap: 4px 16px;
        text-align: left;
    }

    .program-timeline-number {
        grid-column: 2;
        justify-self: start;
        margin-bottom: 6px;
    }

    .program-timeline-icon {
        grid-row: 1 / span 4;
        margin: 0;
    }

    .program-timeline-step h3,
    .program-timeline-step p {
        grid-column: 2;
        max-width: none;
        margin: 0;
    }

    .program-monitor-grid {
        grid-template-columns: 1fr;
    }

    .program-cta {
        padding: 56px 0;
    }
}

@media (max-width: 560px) {
    .program-container {
        width: min(100% - 28px, 1180px);
    }
}