/* Extracted verbatim from the approved design (cjps/facilities.html). Theme additions are marked. */

/* ── INTERIOR PAGE HERO ─────────────────────────── */
.page-hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: heroDrift 24s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes heroDrift {
    from {
        transform: scale(1.04);
    }

    to {
        transform: scale(1.14);
    }
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(6, 14, 28, 0.62) 0%,
            rgba(6, 14, 28, 0.55) 45%,
            rgba(6, 14, 28, 0.92) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 0 48px 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 22px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb .sep {
    color: rgba(201, 168, 76, 0.6);
}

.breadcrumb .current {
    color: var(--gold);
}

.page-hero-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.page-hero-eyebrow::before {
    content: '';
    width: 36px;
    height: 2px;
    background: var(--gold);
}

.page-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 6vw, 76px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.06;
    margin-bottom: 18px;
}

.page-hero-title em {
    color: var(--gold-light);
    font-style: italic;
}

.page-hero-sub {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.72);
    max-width: 560px;
}

/* ── INTRO ──────────────────────────────────────── */
.fac-intro-section {
    background: var(--white);
}

.fac-intro {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 72px;
    align-items: start;
}

.fac-intro h2 {
    margin-bottom: 0;
}

/* Nudge the body column down so its first line sits with the
   headline block rather than level with the small eyebrow. */
.fac-intro-copy {
    padding-top: 10px;
}

.fac-intro-body {
    font-size: 15.5px;
    line-height: 1.9;
    color: var(--muted);
}

.fac-intro-body strong {
    color: var(--navy);
    font-weight: 600;
}

/* Stat cards — three raised boxes beneath both intro columns */
.fac-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 56px;
}

.fac-fact {
    position: relative;
    background: linear-gradient(158deg, var(--white) 0%, var(--stone) 100%);
    border: 1px solid var(--stone-border);
    border-radius: 14px;
    padding: 32px 30px 28px;
    overflow: hidden;
    /* Stacked shadows: inner top highlight reads as the lit face,
       the layered drops give the box its depth. */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(10, 22, 40, 0.05),
        0 6px 14px rgba(10, 22, 40, 0.07),
        0 16px 32px rgba(10, 22, 40, 0.07);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.fac-fact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 3px;
    background: var(--gold);
}

.fac-fact:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 2px 4px rgba(10, 22, 40, 0.06),
        0 12px 24px rgba(10, 22, 40, 0.1),
        0 28px 52px rgba(10, 22, 40, 0.1);
}

.fac-fact-num {
    font-family: 'Playfair Display', serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

/* Superscript suffix — for + and % only, never a dash */
.fac-fact-num sup {
    color: var(--gold);
    font-size: 0.55em;
    vertical-align: super;
    line-height: 0;
    margin-left: 1px;
}

.fac-fact-lbl {
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 10px;
}

/* ── FACILITY GRID ──────────────────────────────── */
.fac-grid-section {
    background: var(--offwhite);
}

.fac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-top: 48px;
}

.f-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.f-card:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 20px 52px rgba(10, 22, 40, 0.13);
}

/* Gold rule that draws across the top edge on hover */
.f-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 3;
}

.f-card:hover::before {
    transform: scaleX(1);
}

.f-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--stone);
}

.f-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.f-card:hover .f-card-media img {
    transform: scale(1.07);
}

.f-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 14, 28, 0.55) 0%, transparent 55%);
    opacity: 0.9;
}

.f-card-index {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--navy-deep);
    background: var(--gold);
    padding: 5px 10px;
    border-radius: 3px;
}

.f-card-body {
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.f-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 10px;
}

.f-card-text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted);
    margin-bottom: 20px;
    flex: 1;
}

.f-card-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.25s, color 0.2s;
}

.f-card:hover .f-card-link {
    gap: 14px;
    color: var(--gold);
}

.f-card-link svg {
    width: 15px;
    height: 15px;
}

/* Cards whose detail page is not built yet */
.f-card.soon {
    cursor: default;
}

.f-card.soon .f-card-link {
    color: var(--muted);
}

.f-card.soon:hover .f-card-link {
    gap: 8px;
    color: var(--muted);
}

/* ── CTA BAND ───────────────────────────────────── */
.cta-band {
    background: linear-gradient(120deg, var(--stone), var(--gold-pale));
    border-top: 1px solid var(--stone-border);
    position: relative;
    overflow: hidden;
    padding: 84px 48px;
}

.cta-band::before {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -6%;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.16) 0%, transparent 70%);
}

.cta-inner {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.cta-title span {
    color: var(--gold);
    font-style: italic;
}

.cta-sub {
    font-size: 15px;
    color: var(--muted);
    margin-top: 12px;
    max-width: 460px;
    line-height: 1.7;
}

.cta-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1100px) {
    .page-hero-content {
        padding: 0 40px 64px;
    }

    .fac-intro {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .fac-intro-copy {
        padding-top: 0;
    }

    .fac-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .fac-facts {
        gap: 16px;
    }

    .fac-fact {
        padding: 26px 24px 24px;
    }

    .cta-band {
        padding: 64px 40px;
    }
}

@media (max-width: 640px) {
    .page-hero {
        min-height: 48vh;
    }

    .page-hero-content {
        padding: 0 24px 44px;
    }

    .page-hero-bg img {
        animation: none;
    }

    .breadcrumb {
        font-size: 9.5px;
        letter-spacing: 1px;
        gap: 7px;
        margin-bottom: 16px;
    }

    .page-hero-eyebrow {
        font-size: 9px;
        letter-spacing: 2.5px;
        margin-bottom: 14px;
    }

    .page-hero-title {
        font-size: clamp(30px, 9vw, 40px);
        margin-bottom: 14px;
    }

    .page-hero-sub {
        font-size: 14.5px;
    }

    .fac-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 32px;
    }

    .fac-facts {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 36px;
    }

    .fac-fact {
        padding: 22px 22px 20px;
        border-radius: 12px;
    }

    /* No hover lift on touch — avoids a stuck raised state */
    .fac-fact:hover {
        transform: none;
    }

    .fac-fact-num {
        font-size: 30px;
    }

    .fac-fact-lbl {
        font-size: 9px;
        letter-spacing: 1.3px;
        margin-top: 7px;
    }

    .cta-band {
        padding: 48px 24px;
    }

    .cta-inner {
        gap: 26px;
    }

    .cta-btns {
        width: 100%;
    }

    /* Disable transforms on mobile to prevent overflow */
    .f-card {
        transform: none !important;
    }
}

/* Theme addition: gold italic emphasis in the CTA heading (<em> typed in the editor) */
.cta-title em {
    color: var(--gold);
    font-style: italic;
}

/* Theme addition: switch between the Public School and Kindergarten facilities listings */
.fac-tabs {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 18px 48px;
}

.fac-tabs-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fac-tab {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 10px 20px;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.fac-tab:hover {
    border-color: var(--gold);
}

.fac-tab.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

@media (max-width: 640px) {
    .fac-tabs {
        padding: 14px 24px;
    }
}
