:root {
    --shadow: 0 24px 70px rgb(25 83 163 / 12%);
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; color: var(--color-text-main); background: var(--color-bg-main); font-family: var(--font-body); line-height: var(--line-height-body); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.hero :focus-visible, .contact-cta :focus-visible, .page-hero :focus-visible, .site-footer :focus-visible { outline-color: var(--color-bg-main); }

.container { width: min(calc(100% - 2rem), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 0.75rem; left: 0.75rem; transform: translateY(-160%); padding: 0.75rem 1rem; background: var(--color-bg-main); color: var(--color-primary); font-weight: 800; border-radius: 0.25rem; }
.skip-link:focus { transform: translateY(0); }
.preview-control { position: fixed; z-index: 300; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 2rem); }
.preview-control summary { display: flex; min-height: 2.9rem; align-items: center; justify-content: center; gap: .7rem; padding: .65rem 1rem; border: 2px solid var(--color-bg-main); border-radius: 999px; background: var(--color-primary); box-shadow: 0 8px 25px rgb(35 31 32 / 22%); color: var(--color-bg-main); cursor: pointer; font-size: .8rem; font-weight: 800; list-style: none; }
.preview-control summary::-webkit-details-marker { display: none; }
.preview-control summary:hover { background: var(--color-primary-hover); }
.preview-control summary:focus-visible { outline: 3px solid var(--color-bg-main); outline-offset: 2px; box-shadow: 0 0 0 6px var(--color-text-main); }
.preview-control summary span { display: inline-block; transition: transform 180ms ease; }
.preview-control[open] summary span { transform: rotate(180deg); }
.preview-control__panel { position: absolute; right: 0; bottom: calc(100% + .75rem); width: min(18rem, calc(100vw - 2rem)); padding: 1.2rem; border: 1px solid var(--color-border); border-top: 3px solid var(--color-border-gold); border-radius: .4rem; background: var(--color-bg-main); box-shadow: var(--shadow); }
.preview-control__panel p { margin-bottom: 1rem; color: var(--color-text-main); font-size: .85rem; line-height: var(--line-height-body); }
.preview-control__panel a { display: block; padding: .72rem .8rem; border-radius: .2rem; background: var(--color-accent); color: var(--color-text-main); font-size: .8rem; font-weight: 800; text-align: center; text-decoration: none; }
.preview-control__panel a:hover { text-decoration: underline; text-underline-offset: .2rem; }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--color-primary); font-family: var(--font-heading); font-weight: 700; line-height: var(--line-height-heading); letter-spacing: -.025em; text-wrap: balance; overflow-wrap: break-word; }
h1 { margin-bottom: var(--space-heading); font-size: var(--type-h1); }
h2 { margin-bottom: var(--space-heading); font-size: var(--type-h2); }
h3, h4 { margin-bottom: var(--space-subheading); font-size: var(--type-h3); }
p { margin-bottom: var(--space-paragraph); line-height: var(--line-height-body); overflow-wrap: anywhere; }
li, dd { line-height: var(--line-height-body); overflow-wrap: anywhere; }
ul, ol { margin-top: 0; margin-bottom: var(--space-paragraph); }
.lead { color: var(--color-primary); font-family: var(--font-heading); font-size: var(--type-lead); font-weight: 500; line-height: var(--line-height-body); }
.eyebrow { margin-bottom: 1rem; color: var(--color-primary); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow--light { color: var(--color-bg-main); }
.eyebrow--gold { display: inline-block; padding-bottom: .3rem; border-bottom: 2px solid var(--color-gold); color: inherit; }

/* Brand utilities. Gold text belongs on charcoal surfaces, not on white. */
.bg-alt { background-color: var(--color-bg-alt); }
.text-gold { color: var(--color-gold); }
.divider-gold { width: 3.5rem; height: 2px; border: 0; background-color: var(--color-gold); }
.card-institutional { border: 1px solid var(--color-border); border-top: 2px solid var(--color-border-gold); background: var(--color-bg-card); }
.badge-enrollment { display: inline-block; padding: .3rem .65rem; background: var(--color-accent); color: var(--color-text-main); font-size: .75rem; font-weight: 800; }

.button, .btn-primary, .btn-cta { display: inline-flex; min-height: 3.25rem; align-items: center; justify-content: center; gap: 0.9rem; padding: 0.78rem 1.35rem; border: 1px solid transparent; border-radius: 0.15rem; font-size: 0.84rem; font-weight: 800; letter-spacing: 0.03em; text-decoration: none; transition: background-color 180ms ease, color 180ms ease, transform 180ms ease; }
.button:hover, .btn-primary:hover, .btn-cta:hover { transform: translateY(-2px); }
.button--light { background: var(--color-bg-main); color: var(--color-primary); }
.button--light:hover { background: var(--color-bg-alt); }
.button--primary, .btn-primary { background: var(--color-primary); color: var(--color-bg-main); }
.button--primary:hover, .btn-primary:hover { background: var(--color-primary-hover); }
.button--cta, .btn-cta { background: var(--color-accent); color: var(--color-text-main); }
.button--cta:hover, .btn-cta:hover { background: var(--color-accent); text-decoration: underline; text-underline-offset: .2rem; }
.button--outline-light { border-color: rgba(255,255,255,.7); color: var(--color-bg-main); }
.button--outline-light:hover { background: var(--color-bg-main); color: var(--color-primary); }
.text-link { display: inline-flex; gap: 0.6rem; align-items: center; color: var(--color-primary); font-weight: 800; text-underline-offset: 0.35rem; }
.text-link:hover { color: var(--color-primary-hover); text-decoration-thickness: 2px; }

.utility-bar { background: var(--color-text-main); color: var(--color-bg-main); font-size: 0.72rem; }
.utility-bar__inner { display: flex; min-height: 2.1rem; align-items: center; justify-content: space-between; gap: 1rem; }
.utility-bar p { margin: 0; letter-spacing: 0.025em; }
.utility-bar__links { display: flex; align-items: center; gap: 1.2rem; }
.utility-bar__email, .social-links, .social-links a { display: inline-flex; align-items: center; gap: .4rem; }
.social-links { gap: 1rem; }
.social-links svg, .utility-bar__email svg { flex: 0 0 auto; }
.social-links a { text-decoration: none; }
.social-links a, .utility-bar__email { min-height: 24px; }
.social-links a:hover { text-decoration: underline; text-underline-offset: .25rem; }
.utility-bar a { text-decoration: none; }
.utility-bar a:hover { color: var(--color-bg-main); text-decoration: underline; }
.enrollment-strip { background: var(--color-primary); color: var(--color-bg-main); }
.enrollment-strip__inner { display: flex; min-height: 3.25rem; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem 1.25rem; padding-block: .45rem; text-align: center; }
.enrollment-strip__inner > div { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .15rem .8rem; }
.enrollment-strip strong { font-size: .84rem; letter-spacing: .015em; }
.enrollment-strip span { font-size: .77rem; }
.enrollment-strip__button { display: inline-flex; min-height: 2rem; align-items: center; gap: .35rem; padding: .25rem .65rem; border: 1px solid rgb(255 255 255 / 65%); border-radius: .15rem; color: var(--color-bg-main); font-size: .75rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.enrollment-strip__button-short { display: none; }
.enrollment-strip__button:hover { background: rgb(255 255 255 / 12%); border-color: var(--color-bg-main); }
.enrollment-strip :focus-visible, .utility-bar :focus-visible { outline-color: var(--color-bg-main); }
.site-header { position: relative; z-index: 100; background: var(--color-bg-main); box-shadow: 0 1px 0 rgb(25 83 163 / 12%); }
.nav-shell__inner { display: flex; min-height: 5.6rem; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; text-decoration: none; }
.brand img { width: clamp(13.5rem, 22vw, 19rem); height: auto; }
.site-brands { display: flex; flex: 0 0 auto; align-items: center; gap: .75rem; }
.site-brands .brand img { width: clamp(13.5rem, 22vw, 19rem); }
.brand-society { display: inline-flex; align-items: center; min-height: 2.8rem; }
.brand-society img { display: block; width: clamp(6.25rem, 9vw, 8rem); height: auto; }

.main-nav__list, .submenu, .mega-menu ul, .footer-links, .pillar-list { margin: 0; padding: 0; list-style: none; }
.main-nav__list { display: flex; align-items: center; gap: 0.12rem; }
.main-nav__item { position: relative; }
.main-nav__link-row { display: flex; align-items: center; }
.main-nav__link { padding: 0.8rem 0.58rem; color: var(--color-primary); font-size: 0.76rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.main-nav__link:hover, .main-nav__link[aria-current="page"] { color: var(--color-primary); box-shadow: inset 0 -2px 0 var(--color-primary); }
.main-nav__link--featured { margin-left: 0.5rem; padding: 0.72rem 0.9rem; border: 2px solid var(--color-primary); border-radius: 0.15rem; background: var(--color-accent); color: var(--color-text-main); }
.main-nav__link--featured:hover, .main-nav__link--featured[aria-current="page"] { background: var(--color-accent); color: var(--color-text-main); box-shadow: 0 0 0 2px var(--color-primary); }
.submenu-toggle { display: grid; width: 1.5rem; height: 2.5rem; margin-left: -0.4rem; padding: 0; place-items: center; border: 0; background: transparent; color: var(--color-primary); cursor: pointer; }
.submenu-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 180ms ease; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.submenu, .mega-menu { position: absolute; top: calc(100% + 0.8rem); left: 0; visibility: hidden; min-width: 16rem; padding: 0.65rem; background: var(--color-bg-main); box-shadow: var(--shadow); opacity: 0; transform: translateY(-0.5rem); transition: opacity 160ms ease, transform 160ms ease, visibility 160ms; }
.submenu::before, .mega-menu::before { position: absolute; right: 0; bottom: 100%; left: 0; height: 0.9rem; content: ""; }
.submenu a, .mega-menu a { display: block; padding: 0.63rem 0.75rem; color: var(--color-primary); font-size: 0.8rem; line-height: 1.25; text-decoration: none; }
.submenu a:hover, .mega-menu li a:hover { background: var(--color-bg-alt); color: var(--color-primary-hover); }
.main-nav__item:hover > .submenu, .main-nav__item:hover > .mega-menu, .main-nav__item:focus-within > .submenu, .main-nav__item:focus-within > .mega-menu, .submenu.is-open, .mega-menu.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
.mega-menu { right: -24rem; left: auto; display: grid; width: min(52rem, 85vw); grid-template-columns: repeat(4, 1fr); gap: 0.3rem; padding: 1.25rem; }
.mega-menu__group { min-width: 0; }
.mega-menu .mega-menu__title { margin-bottom: 0.35rem; color: var(--color-primary); font-family: var(--font-heading); font-size: 1rem; font-weight: 700; }
.nav-toggle { display: none; }

.hero { position: relative; min-height: max(28rem, calc(100svh - var(--site-header-height, 10.95rem))); overflow: hidden; background: var(--color-primary); color: var(--color-bg-main); }
.hero__viewport, .hero__slide { min-height: inherit; }
.hero__slide { position: absolute; inset: 0; visibility: hidden; opacity: 0; transition: opacity 700ms ease, visibility 700ms; }
.hero__slide.is-active { position: relative; visibility: visible; opacity: 1; }
.hero__picture { position: absolute; inset: 0; display: block; }
.hero__image, .hero__scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__image { object-fit: cover; object-position: var(--hero-image-position, center); }
.hero__scrim { background: linear-gradient(90deg, rgb(8 32 67 / 83%) 0%, rgb(8 32 67 / 54%) 44%, rgb(8 32 67 / 8%) 84%), linear-gradient(0deg, rgb(8 32 67 / 45%), transparent 42%); }
.hero__content { position: relative; z-index: 2; display: flex; min-height: inherit; flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 4rem 6rem; }
.hero__title, .hero__text, .hero__content .eyebrow { text-shadow: 0 2px 12px rgb(4 19 42 / 55%); }
.hero__title { max-width: 780px; margin-bottom: var(--space-heading); font-size: var(--type-h1); text-wrap: balance; }
.hero__text { max-width: 620px; margin-bottom: 2.2rem; color: var(--color-bg-main); font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.hero__controls { position: absolute; z-index: 5; right: 0; bottom: 2.2rem; left: 0; display: flex; align-items: center; gap: 0.7rem; }
.carousel-arrow { border: 1px solid var(--color-bg-main); background: rgb(25 83 163 / 85%); color: var(--color-bg-main); cursor: pointer; backdrop-filter: blur(5px); }
.carousel-arrow { width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.carousel-arrow:hover { background: var(--color-bg-main); color: var(--color-primary); }
.carousel-dots { display: flex; gap: 0.5rem; margin-inline: 0.35rem; }
.carousel-dot { display: grid; align-items: center; width: 1.8rem; height: 1.5rem; padding: 0; border: 0; background: transparent; cursor: pointer; }
.carousel-dot::before { height: .22rem; background: rgb(255 255 255 / 55%); content: ''; }
.carousel-dot.is-active::before { background: var(--color-bg-main); }
.hero :focus-visible, .page-hero :focus-visible, .site-footer :focus-visible { outline-color: var(--color-bg-main); }

.intro { background: var(--color-bg-main); }
.intro__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 9vw, 8rem); }
.intro__copy { padding-top: 2rem; }
.intro__copy > p:not(.lead) { max-width: 650px; color: var(--color-text-main); }
.facts { display: grid; margin-top: clamp(3rem, 6vw, 6rem); padding-block: 2.2rem; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); grid-template-columns: repeat(4, 1fr); }
.facts div { padding-inline: 1.8rem; border-right: 1px solid var(--color-border); }
.facts div:first-child { padding-left: 0; }
.facts div:last-child { border: 0; }
.facts strong, .facts span { display: block; }
.facts strong { color: var(--color-primary); font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 500; }
.facts span { color: var(--color-text-secondary); font-size: 0.78rem; }

.levels { background: var(--color-bg-alt); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.section-heading h2 { max-width: 720px; margin-bottom: 0; }
.section-heading > p { max-width: 430px; margin-bottom: 0.5rem; color: var(--color-text-main); }
.section-heading--centered { align-items: center; }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.level-card { position: relative; display: flex; min-height: 34rem; flex-direction: column; overflow: hidden; border-top: 2px solid var(--color-border-gold); border-right: 1px solid var(--color-border); background: var(--color-bg-card); }
.level-card:first-child { border-radius: .25rem 0 0 .25rem; }
.level-card:last-child { border-right: 0; border-radius: 0 .25rem .25rem 0; }
.level-card::after { position: absolute; right: -4rem; bottom: -5rem; width: 13rem; height: 13rem; border: 1px solid rgb(25 83 163 / 12%); border-radius: 50%; content: ""; transition: transform 350ms ease; }
.level-card:hover::after { transform: scale(1.25); }
.level-card__media { height: 13rem; margin: 0; overflow: hidden; background: var(--color-bg-alt); }
.level-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.level-card:hover .level-card__media img { transform: scale(1.04); }
/* Focus this card on the Sagrado Corazon and the students directly below it. */
.level-card--secondary .level-card__media img { transform: scale(1.5); transform-origin: 15% 50%; }
.level-card--secondary:hover .level-card__media img { transform: scale(1.55); }
.level-card__content { position: relative; display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 2rem 2.5rem 2.5rem; }
.level-card__number { position: absolute; top: -2.2rem; right: 1.5rem; display: grid; width: 3rem; height: 3rem; place-items: center; background: var(--color-primary); color: var(--color-bg-main); font-family: var(--font-heading); font-size: 1rem; }
.level-card h3 { color: var(--color-primary); font-family: var(--font-heading); font-size: var(--type-h3); font-weight: 700; }
.level-card p:not(.eyebrow) { color: var(--color-text-main); }
.level-card__content > a { position: relative; z-index: 1; display: flex; gap: .65rem; margin-top: auto; padding-top: 1.5rem; color: var(--color-primary); font-size: .82rem; font-weight: 800; text-underline-offset: .35rem; }
.level-card--initial, .level-card--primary, .level-card--secondary { background: var(--color-bg-card); }

.pillars { background: var(--color-bg-alt); color: var(--color-text-main); }
.pillars__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.pillars__visual { position: relative; min-height: 38rem; overflow: hidden; background: radial-gradient(circle at 55% 25%, #3A70B7, transparent 36%), var(--color-primary); }
.pillars__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pillars__visual::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(0deg, rgb(8 32 67 / 72%), rgb(8 32 67 / 8%) 75%); content: ""; }
.pillars__visual::after { position: absolute; z-index: 1; inset: 1.5rem; border: 1px solid var(--color-border-gold); content: ""; }
.arch { position: absolute; bottom: 0; width: 48%; height: 72%; border: 1px solid rgba(255,255,255,.12); border-radius: 50% 50% 0 0; background: rgba(255,255,255,.035); }
.arch--one { left: 8%; }
.arch--two { right: -8%; height: 92%; }
.pillars blockquote { position: absolute; z-index: 2; right: 3.5rem; bottom: 3.5rem; left: 3.5rem; margin: 0; color: var(--color-bg-main); font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.3; text-shadow: 0 2px 12px rgb(4 19 42 / 55%); }
.pillars__content h2 { max-width: 600px; }
.pillars__content > .lead { color: var(--color-text-main); font-family: var(--font-body); font-size: 1.08rem; }
.pillar-list { margin-top: 2.5rem; border-top: 1px solid var(--color-border); }
.pillar-list li { display: grid; padding-block: 1.25rem; border-bottom: 1px solid var(--color-border); grid-template-columns: 2.5rem 1fr auto; gap: 1rem; align-items: center; }
.pillar-list > li > span { color: var(--color-primary); font-family: var(--font-heading); }
.pillar-list h3, .pillar-list p { margin-bottom: .2rem; }
.pillar-list h3 { font-family: var(--font-heading); font-size: var(--type-h3); }
.pillar-list p { color: var(--color-text-secondary); font-size: .88rem; }
.pillar-list a { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid var(--color-primary); border-radius: 50%; color: var(--color-primary); text-decoration: none; }
.pillar-list a:hover { background: var(--color-primary); color: var(--color-bg-main); }

.news { background: var(--color-bg-main); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.news-card { display: flex; min-height: 20rem; flex-direction: column; padding: 2rem; border: 1px solid var(--color-border); border-top: 2px solid var(--color-border-gold); background: var(--color-bg-card); transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.news-card:hover { transform: translateY(-4px); border-color: var(--color-primary); box-shadow: 0 18px 45px rgb(25 83 163 / 9%); }
.news-card__meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; color: var(--color-text-secondary); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.news-card__meta span { color: var(--color-primary); font-weight: 800; }
.news-card h3 { font-family: var(--font-heading); font-size: var(--type-h3); font-weight: 700; }
.news-card h3 a { text-decoration: none; }
.news-card h3 a:hover { color: var(--color-primary); }
.news-card > p { color: var(--color-text-main); font-size: .92rem; }
.news-card__link { margin-top: auto; color: var(--color-primary); font-size: .8rem; font-weight: 800; text-underline-offset: .3rem; }

.contact-cta { position: relative; overflow: hidden; padding-block: clamp(5rem, 9vw, 8.5rem); background: var(--color-primary); color: var(--color-bg-main); }
.contact-cta__pattern { position: absolute; inset: 0; opacity: .16; background-image: radial-gradient(circle at 85% 50%, transparent 0 14%, #fff 14.2% 14.4%, transparent 14.6% 23%, #fff 23.2% 23.4%, transparent 23.6%), linear-gradient(115deg, transparent 65%, rgba(255,255,255,.25) 65.2%, transparent 65.4%); }
.contact-cta__content { position: relative; z-index: 1; max-width: 850px; margin-inline: auto; text-align: center; }
.contact-cta h2 { margin-bottom: var(--space-heading); }
.contact-cta__content > p:not(.eyebrow) { max-width: 650px; margin: 0 auto 2.2rem; color: var(--color-bg-main); }
.contact-cta .button--cta { border: 2px solid var(--color-bg-main); }
.button-row { display: flex; justify-content: center; gap: 1rem; }

.page-hero { position: relative; overflow: hidden; padding-block: clamp(6rem, 10vw, 10rem); background: var(--color-primary); color: var(--color-bg-main); }
.page-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__image--slide { opacity: 0; transition: opacity 900ms ease; }
.page-hero__image--slide.is-active { opacity: 1; }
.page-hero--photo::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgb(8 32 67 / 79%) 0%, rgb(8 32 67 / 49%) 52%, rgb(8 32 67 / 9%) 100%), linear-gradient(0deg, rgb(8 32 67 / 22%), transparent 48%); content: ""; }
.page-hero__pattern { --pattern-x: 86%; position: absolute; inset: 0; background: radial-gradient(circle at var(--pattern-x) 50%, transparent 0 9%, rgb(255 255 255 / 19%) 9.15% 9.35%, transparent 9.5% 17%, rgb(255 255 255 / 15%) 17.15% 17.35%, transparent 17.5% 25%, rgb(167 158 100 / 38%) 25.15% 25.35%, transparent 25.5%), linear-gradient(115deg, transparent 62%, rgb(255 255 255 / 9%) 62.15%, transparent 62.3%), radial-gradient(circle at var(--pattern-x) 50%, rgb(255 255 255 / 8%), transparent 38%); }
.page-hero--photo .page-hero__pattern { display: none; }
.page-hero__content { position: relative; z-index: 2; }
.page-hero--photo .page-hero__content > * { text-shadow: 0 2px 12px rgb(4 19 42 / 55%); }
.breadcrumbs { margin-bottom: clamp(2rem, 4vw, 3.25rem); color: var(--color-bg-main); font-size: .82rem; font-weight: 700; line-height: 1.5; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: baseline; gap: .6rem; min-width: 0; }
.breadcrumbs li + li::before { color: var(--color-gold); content: '/'; }
.breadcrumbs a { color: inherit; text-decoration: none; text-underline-offset: .25rem; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { opacity: .85; }
.breadcrumbs--dark .breadcrumbs { color: var(--color-primary); }
.breadcrumbs--dark .breadcrumbs [aria-current="page"] { color: var(--color-text-secondary); opacity: 1; }
.page-hero h1 { max-width: 850px; margin-bottom: var(--space-heading); font-size: var(--type-h1); }
.page-hero__content > p:last-child { max-width: 680px; color: var(--color-bg-main); font-size: clamp(1.05rem, 2vw, 1.3rem); }
/* Keep the Society's supplied identity intact instead of cropping it like a photo. */
.page-hero--society::before { display: none; }
.page-hero--society .page-hero__image { inset: 2rem 3% 2rem auto; width: 42%; height: calc(100% - 4rem); padding: clamp(1rem, 2vw, 2rem); border-radius: 1rem; background: #fff; object-fit: contain; }
.page-hero--society .page-hero__content > * { max-width: 48%; text-shadow: none; }
/* The group and the statue need more vertical room than a panoramic banner. */
.page-hero--secondary { min-height: clamp(34rem, 40vw, 48rem); padding-block: clamp(2.5rem, 5vw, 5rem); }
.page-hero--secondary .page-hero__image { object-position: center 55%; }
.page-hero--secondary .breadcrumbs { margin-bottom: clamp(1.25rem, 2vw, 2rem); }
@media (max-width: 700px) {
    /* Use the same content-driven height and spacing as other page heroes. */
    .page-hero--secondary { display: block; min-height: 0; padding-block: clamp(6rem, 10vw, 10rem); }
    .page-hero--secondary .breadcrumbs { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
    .page-hero--secondary.page-hero--photo::before { background: linear-gradient(0deg, rgb(8 32 67 / 93%) 0%, rgb(8 32 67 / 74%) 42%, rgb(8 32 67 / 10%) 100%); }
    .page-hero--secondary .page-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-position: 38% top; }
}
.society-content { display: grid; gap: var(--space-text-section); }
.history-content { display: grid; gap: var(--space-text-section); }
.history-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.history-level { min-width: 0; padding: 1.25rem; background: var(--color-bg-alt); }
.history-level > :last-child { margin-bottom: 0; }
@media (max-width: 700px) {
    .history-levels { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .page-hero--society { display: flex; flex-direction: column; padding-block: 3rem; }
    .page-hero--society .page-hero__content { order: 0; }
    .page-hero--society .page-hero__content > * { max-width: none; }
    .page-hero--society .page-hero__image { position: relative; inset: auto; order: 1; width: min(90%, 600px); height: auto; margin: 2rem auto 0; }
}
.page-content__grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(3rem, 8vw, 7rem); }
.page-content__grid--wide { display: block; }
.page-content article > p:not(.eyebrow) { max-width: 720px; color: var(--color-text-main); }
.legacy-content { max-width: 760px; overflow-wrap: anywhere; }
.legacy-content p { margin: 0 0 var(--space-paragraph); color: var(--color-text-main); line-height: var(--line-height-body); }
.legacy-content h3 { margin: var(--space-text-section) 0 var(--space-subheading); color: var(--color-primary); font-size: var(--type-h3); }
.content-review { max-width: 760px; margin-bottom: 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--color-accent); background: var(--color-bg-alt); color: var(--color-text-main); }
.content-review strong { display: block; margin-bottom: .35rem; color: var(--color-primary); }
.content-review p { margin: 0; line-height: var(--line-height-body); }
.page-link-list { display: grid; gap: .75rem; padding-left: 1.25rem; }
.page-link-list a { color: var(--color-primary); font-weight: 700; }
.hub-heading { max-width: 52rem; margin: 0 auto 2.5rem; text-align: center; }
.hub-heading h2 { margin-bottom: var(--space-heading); }
.hub-heading > p:last-child { color: var(--color-text-secondary); }
.hub-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.hub-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-bottom: 3px solid var(--color-gold); border-radius: 1rem; color: var(--color-text-main); background: var(--color-bg-card); text-decoration: none; transition: box-shadow 250ms ease, border-color 250ms ease; }
.hub-card:hover, .hub-card:focus-visible { border-color: var(--color-primary); box-shadow: 0 12px 30px rgb(25 83 163 / 12%); }
.hub-card__image { overflow: hidden; aspect-ratio: 16 / 10; background: var(--color-bg-alt); }
.hub-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.hub-card[href$="/niveles/secundario"] .hub-card__image img { transform: scale(1.5); transform-origin: 15% 50%; }
.hub-card[href$="/niveles/secundario"]:hover .hub-card__image img,
.hub-card[href$="/niveles/secundario"]:focus-visible .hub-card__image img { transform: scale(1.55); }
.hub-card:hover img, .hub-card:focus-visible img { transform: scale(1.04); }
.hub-card__body { display: flex; flex: 1; flex-direction: column; padding: clamp(1.25rem, 2vw, 1.75rem); }
.hub-card h3, .hub-resource h3, .hub-help h3 { margin: 0 0 var(--space-subheading); color: var(--color-primary); font-size: var(--type-h3); }
.hub-card p { margin: 0 0 1.5rem; }
.hub-card__action { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: auto; color: var(--color-primary); font-weight: 700; }
.hub-card__action > span { font-size: 1.5rem; }
.hub-resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.hub-resource:only-child { grid-column: 1 / -1; }
.hub-resource { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: .75rem; background: var(--color-bg-alt); color: var(--color-text-main); text-decoration: none; transition: border-color 250ms ease, background-color 250ms ease; }
.hub-resource:hover, .hub-resource:focus-visible { border-color: var(--color-primary); background: var(--color-bg-card); }
.hub-resource__number { align-self: flex-start; color: var(--color-primary); font-size: 1.1rem; font-weight: 800; border-bottom: 2px solid var(--color-gold); }
.hub-resource p { margin: 0; color: var(--color-text-secondary); }
.hub-resource__arrow { margin-left: auto; color: var(--color-primary); font-size: 1.5rem; }
.hub-help { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 2.5rem; padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 1rem; border-top: 2px solid var(--color-gold); background: var(--color-bg-alt); }
.hub-help p { margin: 0; }
.hub-help .button { flex-shrink: 0; }
@media (max-width: 900px) {
    .hub-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-card:last-child:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .hub-card-grid, .hub-resource-grid { grid-template-columns: 1fr; }
    .hub-card:last-child:nth-child(3) { grid-column: auto; }
    .hub-resource { padding: 1.25rem; gap: .85rem; }
    .hub-help { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
}
.page-gallery__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.25rem; }
.page-gallery__item { margin: 0; border-top: 2px solid var(--color-border-gold); background: var(--color-bg-main); }
.page-gallery__item img { display: block; width: 100%; height: 16rem; object-fit: cover; }
.page-gallery__item--portrait img { object-fit: contain; background: var(--color-bg-alt); }
.page-gallery__item figcaption { padding: 1rem 1.25rem; color: var(--color-text-secondary); font-size: .9rem; }
.page-gallery__link { position: relative; display: block; cursor: zoom-in; }
.page-gallery__link:focus-visible { outline-offset: -4px; }
.page-gallery__zoom { position: absolute; right: .75rem; bottom: .75rem; display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; background: var(--color-primary); color: var(--color-bg-main); }
/* The viewport sizes the viewer; object-fit keeps every photo fully inside it. */
.has-gallery-modal { overflow: hidden; }
.gallery-modal { width: min(72rem, calc(100vw - 2rem)); height: min(52rem, calc(100vh - 2rem)); height: min(52rem, calc(100dvh - 2rem)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--color-border-gold); border-radius: .4rem; background: var(--color-bg-main); color: var(--color-text-main); box-shadow: var(--shadow); }
.gallery-modal[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.gallery-modal::backdrop { background: rgb(4 19 42 / 85%); }
.gallery-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1rem; border-bottom: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: .85rem; }
.gallery-modal__control { display: inline-grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-bg-main); color: var(--color-primary); cursor: pointer; }
.gallery-modal__control:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.gallery-modal__figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .75rem; min-width: 0; min-height: 0; margin: 0; padding: .75rem; }
.gallery-modal__image-wrap { min-width: 0; min-height: 0; }
.gallery-modal__image-wrap img { width: 100%; height: 100%; object-fit: contain; }
.gallery-modal__figure figcaption { max-height: 4rem; overflow-y: auto; color: var(--color-text-secondary); font-size: .9rem; text-align: center; }
.gallery-modal__navigation { display: flex; justify-content: center; gap: 1rem; padding: .5rem 1rem .75rem; }
.gallery-modal [hidden] { display: none; }
.page-aside { padding: 2.2rem; background: var(--color-bg-alt); align-self: start; }
.page-aside h2 { font-size: var(--type-h2); }
.page-aside p { color: var(--color-text-main); }
.content-block-grid, .team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.content-block { min-width: 0; padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--color-border); border-top: 2px solid var(--color-gold); background: var(--color-bg-main); }
.content-block h2, .content-block h3 { color: var(--color-primary); }
.content-block h2 { margin-bottom: var(--space-heading); font-size: var(--type-h2); }
.content-block h3 { margin-bottom: var(--space-subheading); font-size: var(--type-h3); }
.content-block p:last-child { margin-bottom: 0; }
.music-section { margin-top: var(--space-text-section); }
.page-content article > p.music-intro { max-width: none; text-align: center; text-wrap: balance; }
.music-section > p { max-width: none; }
.music-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.music-grid--levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.music-direction { margin: 1.5rem 0 0; text-align: center; }
.pastoral-sections { display: grid; gap: 1.5rem; margin-top: 2rem; }
.green-school { display: grid; gap: var(--space-text-section); }
.museum-night { display: grid; gap: var(--space-text-section); }
.technology-content { display: grid; gap: var(--space-text-section); }
.secondary-content { display: grid; gap: var(--space-text-section); }
.secondary-programs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.secondary-programs__grid .content-accordion { min-width: 0; }
@media (max-width: 700px) {
    .secondary-programs__grid { grid-template-columns: 1fr; }
}
@media print {
    .secondary-programs__grid { display: block; }
}
.technology-level--wide { grid-column: 1 / -1; }
.technology-content > p { margin-bottom: 0; }
.pastoral-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.pastoral-levels dt { color: var(--color-primary); font-weight: 800; }
.pastoral-levels dd { margin: .35rem 0 var(--space-paragraph); }
.content-block-grid .content-block:first-child { grid-column: 1 / -1; }
.content-block-grid .content-block--wide { grid-column: 1 / -1; }
.initial-content__wide { grid-column: 1 / -1; }
.initial-content h2 { font-size: var(--type-h2); }
.initial-projects { display: grid; gap: .75rem; }
.primary-content__wide { grid-column: 1 / -1; }
.primary-projects { display: grid; gap: .75rem; margin-bottom: var(--space-paragraph); }
.mission-copy, .symbol-sections, .admission-guide { display: grid; gap: 1.5rem; }
.mission-copy > .lead { max-width: 70ch; }
.institutional-list { display: grid; gap: var(--space-list-item); padding-left: 1.25rem; }
.content-block > :last-child, .content-accordion__body > :last-child, .pastoral-intro > :last-child { margin-bottom: 0; }
.institutional-list li::marker { color: var(--color-gold); }
.symbol-visual { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; align-items: start; gap: 2rem; }
.symbol-visual figure { width: 100%; max-width: 18rem; justify-self: center; margin: 0; padding: 1.4rem; background: var(--color-bg-alt); text-align: center; }
.symbol-visual img { width: min(100%, 11rem); height: auto; margin-inline: auto; }
.symbol-visual figcaption, .text-muted { color: var(--color-text-secondary); font-size: .85rem; }
.hymn-lines { line-height: var(--line-height-body); }
.team-intro { max-width: 70ch; margin-bottom: 2rem; }
.team-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.team-card { display: flex; overflow: hidden; min-width: 0; flex-direction: column; border: 1px solid var(--color-border); border-top: 2px solid var(--color-gold); background: var(--color-bg-main); }
.team-card__portrait { display: grid; height: 13rem; place-items: center; background: var(--color-bg-alt); color: var(--color-primary); }
.team-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.team-card__body { padding: 1.25rem; }
.team-card h3 { margin: 0 0 var(--space-subheading); color: var(--color-primary); font-family: var(--font-heading); }
.team-card p { margin: 0; color: var(--color-text-secondary); }
.content-accordion, .document-section { border: 1px solid var(--color-border); background: var(--color-bg-main); }
.content-accordion + .content-accordion, .document-section + .document-section { margin-top: .65rem; }
/* Grid gaps already separate these accordions; stacked sibling margins offset rows. */
.secondary-programs__grid > .content-accordion { margin: 0; }
.content-accordion summary, .document-section summary { padding: 1rem 1.25rem; color: var(--color-primary); cursor: pointer; font-weight: 800; }
.content-accordion[open] summary, .document-section[open] summary { border-bottom: 1px solid var(--color-border); }
.content-accordion__body, .content-accordion > .institutional-list { padding: 1rem 1.5rem 1.4rem; }
.content-accordion__body p:last-child { margin-bottom: 0; }
.resource-accordions { max-width: 60rem; }
.admission-guide .content-block { padding: clamp(1.5rem, 3vw, 2.5rem); }
.step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 0; list-style: none; counter-reset: step; }
.step-grid li { position: relative; min-width: 0; padding: 1.1rem 1.1rem 1.1rem 3.8rem; background: var(--color-bg-alt); line-height: var(--line-height-body); counter-increment: step; }
.step-grid li::before { position: absolute; top: 1rem; left: 1rem; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--color-primary); color: var(--color-bg-main); content: counter(step); font-weight: 800; }
.document-reader { max-width: 67rem; }
.document-reader__actions, .interview-sheet__actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.document-reader__actions p { margin: 0; }
.document-reader__links { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1.2rem; }
.document-action { display: inline-flex; min-height: 24px; align-items: center; padding: .1rem 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--color-primary); font: inherit; font-size: .88rem; font-weight: 700; line-height: 1.4; text-decoration: none; cursor: pointer; }
.document-action:hover { color: var(--color-primary-hover); border-bottom-width: 2px; }
.document-action:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.document-group + .document-group { margin-top: var(--space-text-section); }
.document-group h2 { font-size: var(--type-h2); }
.document-section__text { padding: 1.25rem clamp(1.25rem, 3vw, 2.5rem); }
.document-section__text p { max-width: 78ch; line-height: var(--line-height-body); white-space: pre-line; }
.document-section__text h3 { margin-top: var(--space-text-section); color: var(--color-primary); }
.document-clause { padding-left: 1rem; border-left: 2px solid var(--color-gold); }
.document-table-wrap { max-width: 100%; overflow-x: auto; margin: 1.5rem 0; }
.document-table { width: 100%; min-width: 48rem; border-collapse: collapse; font-size: .78rem; }
.document-table caption { margin-bottom: .6rem; color: var(--color-text-secondary); text-align: left; }
.document-table th, .document-table td { padding: .55rem .65rem; border: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.document-table thead { background: var(--color-primary); color: var(--color-bg-main); }
.document-table tbody tr:nth-child(even) { background: var(--color-bg-alt); }
.interview-sheet__paper { max-width: 64rem; margin-inline: auto; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--color-border); border-top: 4px solid var(--color-gold); background: var(--color-bg-main); }
.interview-sheet__heading { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.interview-sheet__heading img { width: 4.125rem; height: 5rem; object-fit: contain; }
.interview-sheet__heading h1 { margin-bottom: .35rem; font-size: var(--type-h2); }
.interview-sheet__heading p { margin: 0; }
.interview-fields { display: grid; gap: 2rem; }
.interview-fields fieldset { display: grid; gap: 1rem; min-width: 0; margin: 0; padding: 1.5rem 0 0; border: 0; border-top: 1px solid var(--color-border); }
.interview-fields legend { padding-right: 1rem; color: var(--color-primary); font-family: var(--font-heading); font-size: 1.5rem; }
.interview-fields__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.interview-fields__full { grid-column: 1 / -1; }
.interview-fields label { display: grid; gap: .35rem; color: var(--color-text-main); font-size: .85rem; font-weight: 700; }
.interview-fields input:not([type="checkbox"]):not([type="radio"]), .interview-fields select, .interview-fields textarea { width: 100%; min-width: 0; padding: .7rem; border: 1px solid var(--color-border); background: var(--color-bg-main); color: var(--color-text-main); }
.interview-fields__choices { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; }
.interview-fields__choices label { display: inline-flex; align-items: center; gap: .4rem; }
.interview-source { max-width: 64rem; margin: 2rem auto 0; }

/* Reveal animations do not affect layout or hide content when JS is unavailable. */
.motion-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 550ms ease var(--reveal-delay, 0ms), transform 550ms ease var(--reveal-delay, 0ms); }
.motion-ready [data-reveal].is-visible, .motion-ready [data-reveal]:focus-within { opacity: 1; transform: none; }
.enrollment-hero { padding-block: clamp(5rem, 8vw, 8rem); }
.enrollment-hero h1 { overflow-wrap: anywhere; }
.enrollment-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(16rem, .8fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.enrollment-layout > *, .enrollment-form, .enrollment-form__group, .form-field { min-width: 0; }
.enrollment-layout > div > p:not(.eyebrow) { max-width: 42rem; }
.enrollment-form { display: grid; gap: 1.25rem; margin-top: 2rem; padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-field { display: grid; gap: .4rem; }
.form-field label, .enrollment-form__group legend { color: var(--color-primary); font-size: .86rem; font-weight: 800; }
.form-field input:not([type="checkbox"]), .form-field select, .form-field textarea { width: 100%; min-height: 3rem; padding: .7rem .85rem; border: 1px solid var(--color-border); border-radius: .2rem; background: var(--color-bg-main); color: var(--color-text-main); font: inherit; }
.form-field textarea { min-height: 10rem; resize: vertical; }
.form-antibot { min-width: 0; margin-block: 1rem; }
.form-antibot__label { color: var(--color-primary); font-size: .86rem; font-weight: 800; margin-bottom: .5rem; }
.form-antibot [data-antibot-widget] { min-height: 65px; max-width: 100%; }
.form-antibot [data-antibot-status] { display: block; margin-block: .5rem; }
.form-antibot__retry { border: 0; padding: .4rem 0; background: transparent; color: var(--color-primary); text-decoration: underline; font: inherit; font-size: .85rem; cursor: pointer; }
.form-field input[aria-invalid="true"], .form-field select[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border: 2px solid var(--color-accent); }
.form-field__error { color: var(--color-text-main); font-size: .8rem; font-weight: 700; }
.enrollment-form__group { display: grid; gap: 1.25rem; margin: .25rem 0 0; padding: 1.5rem 0 0; border: 0; border-top: 1px solid var(--color-border); }
.enrollment-form__group legend { padding-right: .75rem; }
.form-field--consent label { display: flex; align-items: flex-start; gap: .7rem; color: var(--color-text-main); font-weight: 500; }
.form-field--consent input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin: .15rem 0 0; accent-color: var(--color-primary); }
.enrollment-form__privacy { margin: 0; color: var(--color-text-secondary); font-size: .8rem; }
.enrollment-form button { justify-self: start; cursor: pointer; }
.enrollment-form button:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.form-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-message { max-width: 42rem; margin-top: 1.5rem; padding: 1rem 1.2rem; border-left: 4px solid var(--color-primary); background: var(--color-bg-alt); color: var(--color-text-main); }
.form-message--error { border-color: var(--color-accent); }
.form-message--success { border-color: var(--color-gold); }
.form-message a { color: var(--color-primary); font-weight: 800; }
.enrollment-aside { padding: 2rem; border-top: 3px solid var(--color-gold); background: var(--color-bg-alt); }
.enrollment-aside h2 { font-size: var(--type-h2); }
.contact-directory { margin: 0 0 2.5rem; }
.contact-directory > div { padding-block: 1rem; border-bottom: 1px solid var(--color-border); }
.contact-directory dt { color: var(--color-primary); font-weight: 800; }
.contact-directory dd { margin: .35rem 0 0; font-size: .92rem; overflow-wrap: anywhere; }
.contact-directory a { text-underline-offset: .2rem; }
.contact-phones > div { padding-block: .65rem; }
.contact-phones dd { font-size: 1rem; font-variant-numeric: tabular-nums; }
.enrollment-faq__inner { max-width: 850px; }
.enrollment-faq details { border-bottom: 1px solid var(--color-border); }
.enrollment-faq summary { padding: 1.25rem .25rem; color: var(--color-primary); cursor: pointer; font-weight: 800; }
.enrollment-faq details p { padding: 0 .25rem 1.2rem; }
.enrollment-faq details a { color: var(--color-primary); font-weight: 700; }
.error-page { min-height: 60vh; text-align: center; }
.error-page h1 { font-size: var(--type-h1); }

.site-footer { padding-top: 4.5rem; background: var(--color-primary); color: var(--color-bg-main); }
.site-footer__grid { display: grid; padding-bottom: 4rem; grid-template-columns: 1.55fr repeat(3, 1fr); gap: 3rem; }
.site-footer__brand { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.site-footer__brand > img { width: 6rem; height: auto; }
.site-footer__brand > div { flex: 1; min-width: 10rem; }
.site-footer__society { display: flex; flex-basis: calc(100% - 7rem); min-width: 0; margin-left: 7rem; }
.site-footer__society img { display: block; width: 10rem; height: auto; padding: .4rem; border-radius: .2rem; background: #fff; }
.site-footer__name { margin-bottom: .2rem; color: var(--color-bg-main); font-family: var(--font-heading); font-size: 1.35rem; line-height: var(--line-height-heading); }
.site-footer__brand p:last-child { font-size: .75rem; }
.site-footer__title { display: inline-block; margin-bottom: 1.1rem; padding-bottom: .45rem; border-bottom: 2px solid var(--color-gold); color: var(--color-bg-main); font-family: var(--font-body); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.footer-links li + li { margin-top: .55rem; }
.footer-links a, .site-footer address a { color: var(--color-bg-main); font-size: .82rem; font-style: normal; text-decoration: none; }
.footer-links a:hover, .site-footer address a:hover { color: var(--color-bg-main); text-decoration: underline; }
.site-footer address { display: flex; flex-direction: column; gap: .8rem; }
.site-footer__phones { display: grid; gap: .8rem; margin: 0; font-size: .82rem; font-style: normal; }
.site-footer__phones dt { font-weight: 700; }
.site-footer__phones dd { margin: .1rem 0 0; font-variant-numeric: tabular-nums; }
.site-footer .social-links { display: flex; flex-wrap: wrap; margin-top: 1.25rem; }
.site-footer .social-links a { color: var(--color-bg-main); font-size: .82rem; }
.site-footer__bottom { display: flex; flex-wrap: wrap; min-height: 4.5rem; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .7rem; }
.site-footer__documents { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; }
.site-footer__documents a { display: inline-flex; min-height: 24px; align-items: center; text-underline-offset: .2rem; }
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: inherit; }
.has-preview .site-footer { padding-bottom: 4.5rem; }

/* Headings within dark institutional panels retain AA contrast. */
.hero__title, .contact-cta h2, .page-hero h1 { color: var(--color-bg-main); }

@media (max-width: 1120px) {
    .main-nav__link { font-size: .71rem; padding-inline: .4rem; }
    .nav-shell__inner { gap: 1rem; }
}

@media (max-width: 1060px) {
    .utility-bar p { display: none; }
    .utility-bar__inner { justify-content: flex-end; }
    .nav-shell__inner { min-height: 4.9rem; }
    .nav-toggle { display: flex; width: 2.8rem; height: 2.8rem; flex: 0 0 2.8rem; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; border: 1px solid var(--color-border); background: var(--color-bg-main); cursor: pointer; }
    .nav-toggle > span:not(.sr-only) { width: 1.25rem; height: 2px; background: var(--color-primary); transition: transform 180ms ease, opacity 180ms ease; }
    .nav-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
    .main-nav { position: absolute; top: 100%; right: 0; left: 0; visibility: hidden; max-height: calc(100vh - 7rem); overflow-y: auto; padding: .75rem 1rem 1.5rem; background: var(--color-bg-main); box-shadow: var(--shadow); opacity: 0; transform: translateY(-.6rem); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; }
    .main-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
    .main-nav__list { display: block; }
    .main-nav__item { border-bottom: 1px solid var(--color-border); }
    .main-nav__link-row { justify-content: space-between; }
    .main-nav__link { flex: 1; padding: .95rem .25rem; color: var(--color-primary); font-size: .9rem; }
    .main-nav__link:hover, .main-nav__link[aria-current="page"] { color: var(--color-primary); box-shadow: inset 0 -2px 0 var(--color-primary); }
    .main-nav__link--featured { margin: .6rem 0; padding-inline: .8rem; color: var(--color-text-main); text-align: center; }
    .main-nav__link--featured:hover, .main-nav__link--featured[aria-current="page"] { color: var(--color-text-main); box-shadow: 0 0 0 2px var(--color-primary); }
    .submenu-toggle { width: 3rem; margin: 0; color: var(--color-primary); }
    .submenu, .mega-menu { position: static; display: none; visibility: visible; width: auto; min-width: 0; padding: 0 0 .8rem .8rem; background: transparent; box-shadow: none; opacity: 1; transform: none; }
    .submenu.is-open, .mega-menu.is-open { display: block; }
    .mega-menu__group + .mega-menu__group { margin-top: .75rem; }
    .mega-menu .mega-menu__title { font-size: 1.05rem; }
    .intro__grid, .pillars__grid { grid-template-columns: 1fr; }
    .intro__copy { padding-top: 0; }
    .facts { grid-template-columns: repeat(2, 1fr); }
    .facts div { padding: 1rem; }
    .facts div:nth-child(2) { border-right: 0; }
    .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
    .facts div:first-child { padding-left: 1rem; }
    .pillars__visual { min-height: 30rem; }
    .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
    .enrollment-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .container { width: min(calc(100% - 1.5rem), var(--container)); }
    .utility-bar { display: none; }
    .enrollment-strip__inner { min-height: 2.45rem; flex-wrap: nowrap; justify-content: space-between; gap: .4rem; padding-block: .25rem; }
    .enrollment-strip__inner > div { display: block; min-width: 0; }
    .enrollment-strip__inner > div > span { display: none; }
    .enrollment-strip strong { display: block; font-size: clamp(.68rem, 2.7vw, .76rem); letter-spacing: 0; white-space: nowrap; }
    .enrollment-strip__button { min-height: 1.75rem; flex: 0 0 auto; gap: .2rem; padding: .15rem .45rem; font-size: .69rem; }
    .enrollment-strip__button-full { display: none; }
    .enrollment-strip__button-short { display: inline; }
    .enrollment-hero h1 { font-size: var(--type-h1); }
    .enrollment-layout { grid-template-columns: minmax(0, 1fr); }
    .brand img { width: 13.5rem; }
    .nav-shell__inner { gap: .5rem; }
    /* Keep both identities in one row, with the Institute clearly dominant.
       Only the narrowest phones need a small reduction of its original size. */
    .site-brands { display: flex; flex: 1 1 auto; min-width: 0; gap: .25rem; padding-block: .35rem; }
    .site-brands .brand img { width: clamp(11.5rem, 56vw, 13.5rem); }
    .site-brands .brand-society { flex: 1 1 0; min-width: 0; min-height: 2.8rem; justify-content: center; }
    .brand-society img { width: 82%; max-width: 5.75rem; }
    .hero__content { padding-block: 3rem 5.5rem; }
    .hero__scrim { background: linear-gradient(90deg, rgb(8 32 67 / 74%) 0%, rgb(8 32 67 / 48%) 60%, rgb(8 32 67 / 16%) 100%), linear-gradient(0deg, rgb(8 32 67 / 45%), transparent 38%); }
    .page-hero--photo::before { background: linear-gradient(90deg, rgb(8 32 67 / 73%) 0%, rgb(8 32 67 / 43%) 100%), linear-gradient(0deg, rgb(8 32 67 / 24%), transparent 50%); }
    .page-hero__pattern { --pattern-x: 115%; }
    .hero__title { font-size: var(--type-h1); }
    .hero__text { font-size: 1rem; }
    .section-heading { display: block; }
    .section-heading > p, .section-heading > .text-link { margin-top: 1.5rem; }
    .level-grid, .news-grid { grid-template-columns: 1fr; gap: .8rem; }
    .level-card { min-height: 30rem; border-right: 0; border-bottom: 1px solid var(--color-border); border-radius: .2rem !important; }
    .level-card__media { height: 12rem; }
    .pillars__visual { min-height: 25rem; }
    .pillars blockquote { right: 2rem; bottom: 2.5rem; left: 2rem; }
    .button-row { flex-direction: column; align-items: stretch; }
    .page-content__grid { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
    .site-footer__brand, .site-footer__contact { grid-column: 1 / -1; }
    .site-footer__brand { justify-content: center; }
    .site-footer__brand > div { flex: 0 0 100%; min-width: 0; text-align: center; }
    .site-footer__name { font-size: clamp(.8rem, 4.3vw, 1.35rem); white-space: nowrap; }
    .site-footer__society { flex-basis: 100%; justify-content: center; margin-left: 0; }
    .site-footer__links { text-align: center; }
    .site-footer__contact { text-align: center; }
    .site-footer__contact address { align-items: center; }
    .site-footer__contact .social-links { justify-content: center; }
    .site-footer__bottom { padding-block: 1.25rem; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
    .content-block-grid, .symbol-visual, .music-grid, .pastoral-secondary, .step-grid, .interview-fields__grid { grid-template-columns: 1fr; }
    .music-direction { text-align: left; }
    .interview-sheet__actions { align-items: flex-start; flex-direction: column; }
    .interview-sheet__heading { align-items: flex-start; }
    .interview-sheet__heading h1 { overflow-wrap: anywhere; font-size: var(--type-h2); }
}

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

@media print {
    .site-header, .site-footer, .preview-control, .breadcrumbs, .no-print, .page-aside, .page-gallery, .gallery-modal { display: none !important; }
    body, .page-content, .interview-sheet { background: #fff !important; color: #000 !important; }
    .page-hero { padding: .5rem 0 1rem; background: #fff !important; color: #000 !important; }
    .page-hero__image, .page-hero__pattern, .page-hero::before { display: none !important; }
    .page-hero h1, .page-hero p { color: #000 !important; }
    .document-section, .interview-sheet__paper { box-shadow: none; }
    .interview-fields fieldset { break-inside: avoid-page; }
    .document-table { min-width: 0; font-size: .58rem; }
    .document-section__text, .interview-sheet__paper { padding: .5rem 0; }
    .interview-fields input:not([type="checkbox"]):not([type="radio"]), .interview-fields select, .interview-fields textarea { border: 0; border-bottom: 1px solid #555; }
    .motion-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
}
