/*
Theme Name: Beacon Hill 2027
Description: A clear, accessible native block theme for Beacon Hill Islamic Academy and its separate editable school pages.
Author: Beacon Hill Islamic Academy
Version: 1.2.1
Requires at least: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beacon-hill-2027
Tags: education, full-site-editing, custom-logo, editor-style, wide-blocks, accessibility-ready
*/

:root {
  --bh-navy: #102d43;
  --bh-navy-deep: #092233;
  --bh-gold: #bf913c;
  --bh-gold-light: #ead5a8;
  --bh-cream: #f7f4eb;
  --bh-ink: #263b49;
  --bh-muted: #556571;
  --bh-line: #dce1df;
  --bh-serif: Georgia, 'Times New Roman', serif;
  --bh-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bh-width: 1160px;
  --bh-gutter: clamp(22px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; color: var(--bh-ink); background: #fff; font: 400 1rem/1.65 var(--bh-sans); }
.wp-site-blocks { padding: 0; overflow-wrap: break-word; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks :is(h1, h2, h3, h4), .bh-page :is(h1, h2, h3, h4) { font-family: var(--bh-sans); color: var(--bh-navy); font-weight: 600; line-height: 1.22; letter-spacing: -.025em; text-wrap: balance; }
.bh-page h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 0 0 18px; }
.bh-page h2 { font-size: clamp(1.7rem, 2.8vw, 2rem); margin: 0 0 18px; }
.bh-page h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin: 0 0 12px; }
.bh-page h4 { font-size: 1.1rem; margin: 0 0 10px; }
.bh-page p { margin: 0 0 1.1em; }
.bh-page p:last-child, .bh-page ul:last-child, .bh-page ol:last-child { margin-bottom: 0; }
.bh-page a { color: var(--bh-navy); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bh-page a:hover { color: #76551b; }
.bh-page img, .bh-site-header img { max-width: 100%; height: auto; }
.bh-page ul, .bh-page ol { padding-left: 1.3em; }
.bh-page li + li { margin-top: 7px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #8e641a; outline-offset: 5px; }
.bh-site-footer :where(a, button):focus-visible, .bh-footer :where(a, button):focus-visible, :is(.bh-home-cover, .bh-inner-cover) :where(a, button):focus-visible { outline-color: #f5d58a; }
.bh-skip-link { position: absolute; z-index: 100000; left: 16px; top: -100px; padding: 12px 18px; background: #fff; color: var(--bh-navy); font-weight: 700; }
.bh-skip-link:focus { top: 12px; }
.bh-main, .bh-main > .wp-block-post-content, .bh-page { margin: 0 !important; padding: 0; max-width: none; width: 100%; }
.bh-main > .wp-block-post-content > .bh-page { max-width: none; }

/* Shared school identity and native WordPress navigation. */
.bh-site-header, .bh-header { position: relative; z-index: 20; margin: 0; background: #fff; border-bottom: 1px solid var(--bh-line); }
.bh-utility { padding: 7px var(--bh-gutter); background: var(--bh-cream); color: var(--bh-navy); border-bottom: 1px solid #e9e6dd; font-size: .75rem; line-height: 1.5; }
.bh-utility-inner { width: min(100%, var(--bh-width)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bh-utility p { margin: 0; }
.bh-utility a { color: inherit; text-decoration: none; }
.bh-utility a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bh-header-inner { width: min(calc(100% - var(--bh-gutter) * 2), var(--bh-width)); min-height: 96px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 14px 0; }
.bh-brand { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; margin: 0; text-decoration: none; color: var(--bh-navy); }
.bh-brand > * { margin: 0; }
.bh-brand .wp-block-image { margin: 0; width: 62px; flex: 0 0 62px; }
.bh-brand img, img.bh-brand-logo { width: 62px; height: 62px; object-fit: contain; display: block; }
.bh-brand-name, .bh-header .bh-brand > span { font-family: var(--bh-serif); color: var(--bh-navy); font-size: 1.3rem; font-weight: 400; line-height: 1.12; letter-spacing: -.02em; }
.bh-brand-name a { color: inherit; text-decoration: none; }
.bh-brand-name span, .bh-header .bh-brand small { display: block; margin-top: 5px; font-family: var(--bh-sans); font-weight: 500; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.bh-navigation { margin: 0; font-family: var(--bh-sans); color: var(--bh-navy); font-size: .79rem; font-weight: 600; }
.bh-navigation .wp-block-navigation__container, .bh-preview-nav, .bh-desktop-nav { gap: 18px; align-items: center; }
.bh-navigation .wp-block-navigation-item__content, .bh-preview-nav a, .bh-desktop-nav a { color: inherit; text-decoration: none; }
.bh-navigation .wp-block-navigation-item__content:hover, .bh-preview-nav a:hover, .bh-desktop-nav a:hover { color: #76551b; }
.bh-navigation .current-menu-item > .wp-block-navigation-item__content, .bh-desktop-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--bh-gold); text-underline-offset: 6px; }
.bh-navigation .bh-nav-apply > .wp-block-navigation-item__content, .bh-preview-nav .bh-nav-apply { padding: 10px 15px; background: var(--bh-navy); color: #fff; border: 1px solid var(--bh-navy); }
.bh-navigation .bh-nav-apply > .wp-block-navigation-item__content:hover, .bh-preview-nav .bh-nav-apply:hover { background: #23495e; color: #fff; }
.bh-preview-nav { display: flex; list-style: none; padding: 0; margin: 0; }
.bh-preview-nav a { display: block; }
.bh-desktop-nav { display: flex; flex-wrap: nowrap; }
.bh-desktop-nav a { color: var(--bh-navy); font-size: .79rem; font-weight: 600; white-space: nowrap; }
.bh-mobile-nav { display: none; }

/* Native Cover block: the supplied illustration fills the entire home hero. */
:is(.bh-home-cover, .bh-inner-cover).wp-block-cover, :is(.bh-home-cover, .bh-inner-cover) { position: relative; display: flex; align-items: center; width: 100%; max-width: none; min-height: 560px; margin: 0; padding: 64px max(var(--bh-gutter), calc((100% - var(--bh-width)) / 2)); background: var(--bh-navy); color: #fff; isolation: isolate; }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-cover__image-background { position: absolute; z-index: 0; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 62%; }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-cover__background { position: absolute; z-index: 1; inset: 0; opacity: 1; background: linear-gradient(90deg, rgba(9, 34, 51, .9) 0%, rgba(9, 34, 51, .55) 55%, rgba(9, 34, 51, .12) 100%); }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100%; max-width: var(--bh-width); margin: 0 auto; }
:is(.bh-home-cover, .bh-inner-cover) .bh-cover-content { width: 100%; max-width: 700px !important; margin: 0 !important; text-align: left; }
:is(.bh-home-cover, .bh-inner-cover) .bh-cover-content h1 { color: #fff; font: 600 clamp(2.5rem, 4.6vw, 3.8rem)/1.09 var(--bh-sans); letter-spacing: -.035em; margin: 0 0 20px; }
:is(.bh-home-cover, .bh-inner-cover) .bh-cover-content h2 { color: #fff; }
:is(.bh-home-cover, .bh-inner-cover) .bh-cover-content p { color: #fff; max-width: 630px; }
:is(.bh-home-cover, .bh-inner-cover) .bh-cover-content .bh-lead { color: #f3f5f6; font-size: clamp(1.04rem, 1.7vw, 1.18rem); line-height: 1.7; }
:is(.bh-home-cover, .bh-inner-cover) .bh-cover-content :is(.bh-eyebrow, .bh-kicker) { color: #f2e9d5; text-transform: none; font-size: .88rem; font-weight: 500; letter-spacing: .02em; margin: 0 0 18px !important; }
:is(.bh-home-cover, .bh-inner-cover) .bh-actions { margin-top: 28px; }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-button__link, :is(.bh-home-cover, .bh-inner-cover) a.bh-button { background: #fff; border-color: #fff; color: var(--bh-navy); }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-button__link:hover, :is(.bh-home-cover, .bh-inner-cover) a.bh-button:hover { background: #f3ead7; border-color: #f3ead7; color: var(--bh-navy); }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-button.is-outline > .wp-block-button__link, :is(.bh-home-cover, .bh-inner-cover) .wp-block-button.is-style-outline > .wp-block-button__link, :is(.bh-home-cover, .bh-inner-cover) a.bh-button.is-outline { background: transparent; color: #fff; border-color: #fff; }
:is(.bh-home-cover, .bh-inner-cover) .wp-block-button.is-outline > .wp-block-button__link:hover, :is(.bh-home-cover, .bh-inner-cover) .wp-block-button.is-style-outline > .wp-block-button__link:hover, :is(.bh-home-cover, .bh-inner-cover) a.bh-button.is-outline:hover { background: #ffffff1f; color: #fff; }

/* Inner pages share the native background-image cover with compact titles. */
.bh-inner-cover.wp-block-cover { min-height: 380px; padding-top: 48px; padding-bottom: 48px; }
.bh-inner-cover .bh-cover-content h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -.025em; }
.bh-cover-location { font-size: .94rem; line-height: 1.5; margin-bottom: 18px !important; }
.bh-cover-motto { font-size: 1.2rem; line-height: 1.5; margin-bottom: 18px !important; }
.bh-navigation .bh-nav-home > .wp-block-navigation-item__content { padding: 9px 13px; border: 1px solid var(--bh-line); border-radius: 3px; }
.bh-navigation .bh-nav-home > .wp-block-navigation-item__content:hover { border-color: var(--bh-navy); color: var(--bh-navy); background: var(--bh-cream); }
.bh-grade-label, .bh-file-type { font-size: .82rem; font-weight: 600; color: var(--bh-muted); margin-bottom: 10px !important; }
.bh-admissions-steps { max-width: 850px; padding-left: 1.5rem !important; }
.bh-admissions-steps li { padding-left: 8px; margin-bottom: 22px; }
.bh-admissions-steps strong { color: var(--bh-navy); }

/* Cover actions stay readable above the background image. */
.bh-page :is(.bh-home-cover, .bh-inner-cover).wp-block-cover .wp-block-button__link { background: #fff; border-color: #fff; color: var(--bh-navy); }
.bh-page :is(.bh-home-cover, .bh-inner-cover).wp-block-cover .wp-block-button__link:hover { background: #f3ead7; border-color: #f3ead7; color: var(--bh-navy); }
.bh-page :is(.bh-home-cover, .bh-inner-cover).wp-block-cover .wp-block-button.is-outline > .wp-block-button__link { background: transparent; border-color: #fff; color: #fff; }
.bh-page :is(.bh-home-cover, .bh-inner-cover).wp-block-cover .wp-block-button.is-outline > .wp-block-button__link:hover { background: #ffffff1f; border-color: #fff; color: #fff; }

/* Compact page introductions, retained for editing and other theme contexts. */
.bh-hero, .bh-hero.bh-section { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); align-items: start; gap: 52px; margin: 0; width: 100%; max-width: none; padding: 44px max(var(--bh-gutter), calc((100% - var(--bh-width)) / 2)); background: #fff; border-bottom: 1px solid var(--bh-line); }
.bh-inner-hero:not(:has(.bh-page-summary, .bh-hero-panel)) { grid-template-columns: minmax(0, 1fr); }
.bh-hero > * { min-width: 0; margin: 0; width: 100%; max-width: none !important; }
.bh-hero-copy { padding: 0; }
.bh-inner-hero .bh-hero-copy { max-width: 830px !important; }
.bh-inner-hero h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.bh-eyebrow, .bh-kicker { display: block; font-family: var(--bh-sans); font-size: .78rem; line-height: 1.6; font-weight: 600; letter-spacing: .02em; color: #76551b; margin: 0 0 14px !important; }
.bh-lead { color: #425664; font-size: clamp(1rem, 1.4vw, 1.08rem); line-height: 1.75; max-width: 800px; }
.bh-page-summary, .bh-hero-panel { min-height: 0; padding: 22px 24px; border: 0; border-left: 3px solid var(--bh-gold); background: var(--bh-cream); color: var(--bh-ink); text-align: left; }
.bh-page-summary h2, .bh-page-summary h3, .bh-hero-panel h2, .bh-hero-panel h3 { font-size: 1.15rem; color: var(--bh-navy); margin: 0 0 12px; }
.bh-page-summary p, .bh-hero-panel p { color: var(--bh-ink); font-size: .92rem; line-height: 1.7; }
.bh-page-summary .bh-kicker, .bh-hero-panel .bh-kicker { color: #76551b; }
.bh-seal, .bh-hero-panel .wp-block-image { display: block; width: 120px; height: auto; margin: 0 auto 16px; }
.bh-seal img, img.bh-seal, .bh-hero-panel .wp-block-image img { width: 120px; height: auto; display: block; object-fit: contain; }

/* Page rhythm, ordinary content and restrained functional information. */
.bh-section { width: min(calc(100% - var(--bh-gutter) * 2), var(--bh-width)); max-width: var(--bh-width); margin: 0 auto; padding: 42px 0; }
.bh-section + .bh-section { border-top: 1px solid var(--bh-line); }
.bh-section-heading { max-width: 820px; margin: 0 0 22px; }
.bh-section-heading h2 { margin-bottom: 12px; }
.bh-section-heading p { color: var(--bh-muted); }
.bh-grid, .bh-grid.wp-block-columns { display: grid; gap: 28px; margin: 0; align-items: stretch; }
.bh-grid > *, .bh-grid.wp-block-columns > .wp-block-column { min-width: 0; margin: 0; flex-basis: auto; }
.bh-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bh-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bh-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bh-card { position: relative; padding: 0; border: 0; background: transparent; }
.bh-card p, .bh-card li { font-size: .94rem; }
.bh-card p { color: var(--bh-muted); }
.bh-card a:not(.bh-button) { color: var(--bh-navy); font-weight: 600; }
.bh-card .bh-button { margin-top: 6px; }
.bh-page .bh-number { display: block; color: #76551b; font: 600 .83rem/1.6 var(--bh-sans); letter-spacing: .01em; margin-bottom: 12px; }
.bh-home-intro p, .bh-welcome p { max-width: 900px; }
.bh-welcome .bh-lead { max-width: 900px; }
.bh-programmes .bh-card + .bh-card { padding-left: 28px; border-left: 1px solid var(--bh-line); }
.bh-school-year .bh-grid { padding: 24px; gap: 24px; background: var(--bh-cream); }
.bh-school-year .bh-card + .bh-card { padding-left: 24px; border-left: 1px solid #d7dacf; }
.bh-school-year .bh-card p { color: var(--bh-ink); }
.bh-band { margin: 0; padding: 36px max(var(--bh-gutter), calc((100% - var(--bh-width)) / 2)); background: var(--bh-navy); color: #fff; }
.bh-band h2, .bh-band h3 { color: #fff; }
.bh-band p { color: #e5edf1; }
.bh-band .bh-kicker { color: var(--bh-gold-light); }
.bh-band > .bh-section { width: 100%; max-width: var(--bh-width); padding: 0; margin: 0 auto; border: 0; }
.bh-band .bh-grid { align-items: center; }
.bh-band .bh-actions { margin-top: 22px; }

/* Native buttons and simple static preview equivalents. */
.bh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; margin-bottom: 0; }
.bh-button, .bh-page .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; background: var(--bh-navy); color: #fff; border: 1px solid var(--bh-navy); border-radius: 2px; font: 600 .86rem/1.5 var(--bh-sans); text-decoration: none; text-align: center; }
.bh-button:hover, .bh-page .wp-block-button__link:hover { color: #fff; background: #23495e; border-color: #23495e; }
.bh-button.is-outline, .bh-page .wp-block-button.is-outline > .wp-block-button__link, .bh-page .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--bh-navy); border: 1px solid #8899a4; }
.bh-button.is-outline:hover, .bh-page .wp-block-button.is-outline > .wp-block-button__link:hover, .bh-page .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--bh-cream); border-color: var(--bh-navy); }
.bh-page .wp-block-button { margin: 0; }
.bh-page .wp-block-buttons { gap: 12px; }
.bh-page .wp-block-button.bh-button, .bh-page .wp-block-button.bh-button:hover { display: block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.bh-band .wp-block-button__link, .bh-band a.bh-button { background: #fff; border-color: #fff; color: var(--bh-navy); }
.bh-band .wp-block-button__link:hover, .bh-band a.bh-button:hover { background: #f3ead7; border-color: #f3ead7; color: var(--bh-navy); }
.bh-band .wp-block-button.is-outline > .wp-block-button__link, .bh-band .wp-block-button.is-style-outline > .wp-block-button__link, .bh-band a.bh-button.is-outline { background: transparent; border-color: #b8c5ce; color: #fff; }
.bh-band .wp-block-button.is-outline > .wp-block-button__link:hover, .bh-band .wp-block-button.is-style-outline > .wp-block-button__link:hover, .bh-band a.bh-button.is-outline:hover { background: #23495e; color: #fff; }

/* Tables retain their own scroll area on narrow screens. */
.bh-table-wrap, .bh-page .wp-block-table { max-width: 100%; overflow-x: auto; margin: 22px 0; border: 1px solid var(--bh-line); }
.bh-table, .bh-page table { width: 100%; margin: 0; border-collapse: collapse; font-size: .92rem; line-height: 1.6; text-align: left; }
.bh-page .has-fixed-layout { table-layout: auto; }
.bh-page .wp-block-table table { min-width: 480px; }
.bh-table caption, .bh-page table caption { padding: 13px 18px; font-weight: 600; color: var(--bh-navy); text-align: left; background: var(--bh-cream); }
.bh-table th, .bh-page table th { background: var(--bh-navy); color: #fff; font-weight: 600; text-align: left; }
.bh-table th, .bh-table td, .bh-page table th, .bh-page table td { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--bh-line); vertical-align: top; }
.bh-table tr:nth-child(even) td, .bh-page table tr:nth-child(even) td { background: #f9f9f6; }
.bh-table tbody tr:last-child td, .bh-page table tbody tr:last-child td { border-bottom: 0; }
.bh-table strong, .bh-page table strong { color: var(--bh-navy); }
.bh-table th:first-child { min-width: 150px; }
.bh-page .wp-element-caption { padding: 12px 18px; font-size: .78rem; line-height: 1.6; color: var(--bh-muted); background: var(--bh-cream); text-align: left; }
.bh-note { padding: 18px 22px; margin: 22px 0; border-left: 3px solid var(--bh-gold); background: var(--bh-cream); color: #4e5e67; font-size: .92rem; }
.bh-note p { margin: 0 0 12px; }
.bh-note p:last-child { margin-bottom: 0; }
.bh-checklist { list-style: none; padding: 0 !important; margin: 18px 0; }
.bh-checklist li { position: relative; padding-left: 26px; }
.bh-checklist li::before { content: '\2713'; position: absolute; left: 0; color: #76551b; font-weight: 700; }
.bh-steps { counter-reset: bh-step; list-style: none; padding: 0 !important; margin: 0; }
.bh-steps > li { position: relative; padding: 0 0 22px 42px; counter-increment: bh-step; margin: 0; }
.bh-steps > li::before { content: counter(bh-step) '.'; position: absolute; left: 0; top: 0; color: var(--bh-navy); font: 600 1.1rem/1.5 var(--bh-sans); }
.bh-steps > li + li { padding-top: 22px; border-top: 1px solid var(--bh-line); }
.bh-steps > li + li::before { top: 22px; }
.bh-steps h3 { margin-bottom: 10px; }
.bh-contact-list { list-style: none; padding: 0 !important; margin: 0; }
.bh-contact-list li { padding: 16px 0; border-bottom: 1px solid var(--bh-line); margin: 0; }
.bh-contact-list li:first-child { padding-top: 0; }
.bh-contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.bh-contact-list strong { display: block; color: var(--bh-navy); font-size: .83rem; font-weight: 600; margin-bottom: 5px; }
.bh-contact-list a { font-size: 1rem; color: var(--bh-navy); }
.bh-contact-list address { font-style: normal; }
.bh-download { padding: 22px 0; margin: 0; border: 0; border-bottom: 1px solid var(--bh-line); background: #fff; }
.bh-download h3 { margin-bottom: 8px; }
.bh-download p { color: var(--bh-muted); font-size: .94rem; }
.bh-download .bh-actions { margin-top: 16px; }
.bh-resources { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--bh-line); }
.bh-resources > .bh-download { padding: 24px; }
.bh-resources > .bh-download:nth-child(even) { background: var(--bh-cream); }
.bh-term { padding: 18px 0; border: 0; border-top: 2px solid var(--bh-gold); background: transparent; }
.bh-term p { color: var(--bh-muted); font-size: .94rem; }
.bh-term strong { color: var(--bh-navy); }
.bh-page details { border-bottom: 1px solid var(--bh-line); padding: 18px 0; }
.bh-page details summary { cursor: pointer; color: var(--bh-navy); font-weight: 600; font-size: 1rem; }
.bh-page details[open] summary { margin-bottom: 14px; }
.bh-page details > :last-child { margin-bottom: 0; }
.bh-page blockquote { border-left: 3px solid var(--bh-gold); padding: 4px 0 4px 22px; margin: 22px 0; font-size: 1.15rem; color: var(--bh-navy); line-height: 1.65; }
.bh-page hr { border: 0; border-top: 1px solid var(--bh-line); margin: 28px 0; }
.bh-page .wp-block-columns:last-child { margin-bottom: 0; }
.bh-card a, .bh-download a, .bh-contact-list a { overflow-wrap: anywhere; }

/* Shared footer. */
.bh-site-footer, .bh-footer { background: var(--bh-navy-deep); color: #d7e0e6; margin: 0; }
.bh-footer-main, .bh-footer-inner { width: min(calc(100% - var(--bh-gutter) * 2), var(--bh-width)); margin: 0 auto; padding: 38px 0 30px; display: grid; grid-template-columns: 1.3fr .8fr 1.1fr; gap: 48px; }
.bh-footer-main > *, .bh-footer-inner > * { min-width: 0; margin: 0; }
.bh-footer-brand { font-family: var(--bh-serif); color: #fff; font-size: 1.65rem; font-weight: 400; line-height: 1.15; margin: 0 0 14px; }
.bh-footer-main h2, .bh-footer-main h3, .bh-footer-inner h3 { color: #fff; font-family: var(--bh-sans); font-size: .94rem; font-weight: 600; line-height: 1.5; margin: 0 0 14px; letter-spacing: 0; }
.bh-footer-main p, .bh-footer-inner p { font-size: .86rem; line-height: 1.8; margin: 0 0 12px; }
.bh-footer-main ul { list-style: none; padding: 0; margin: 0; }
.bh-footer-main li, .bh-footer-inner nav a { font-size: .86rem; line-height: 1.8; margin: 0 0 6px; }
.bh-footer-inner nav a { display: block; }
.bh-site-footer a, .bh-footer a { color: #e0e8ec; text-decoration: none; overflow-wrap: anywhere; }
.bh-site-footer a:hover, .bh-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.bh-footer-bottom { width: min(calc(100% - var(--bh-gutter) * 2), var(--bh-width)); margin: 0 auto; padding: 16px 0; display: flex; justify-content: space-between; gap: 18px; align-items: center; border-top: 1px solid #345063; color: #b3c3ce; font-size: .74rem; line-height: 1.6; }
.bh-footer-bottom p { margin: 0; font-size: .74rem; line-height: 1.6; color: #b3c3ce; }
.bh-footer-bottom a { color: #c9d5dd; }
.bh-footer-inner h2 { color: #fff; font: 600 1.6rem/1.25 var(--bh-sans); margin: 0 0 14px; }
.bh-footer-inner .bh-eyebrow { color: var(--bh-gold-light); }
.bh-footer .bh-footer-bottom { display: block; }
.bh-404 { min-height: 50vh; }
.bh-review-bar { padding: 8px 20px; background: var(--bh-navy); color: #fff; text-align: center; font-size: .7rem; line-height: 1.5; }

/* Native navigation switches to the accessible WordPress overlay on tablets. */
@media (max-width: 1140px) {
  .bh-preview-nav, .bh-desktop-nav { display: none; }
  .bh-mobile-nav { display: block; position: relative; font-size: .85rem; font-weight: 600; color: var(--bh-navy); }
  .bh-mobile-nav summary { cursor: pointer; padding: 10px 14px; border: 1px solid var(--bh-line); }
  .bh-mobile-nav > div, .bh-mobile-nav > nav { position: absolute; top: 50px; right: 0; width: min(300px, 80vw); padding: 14px 24px; background: #fff; border: 1px solid var(--bh-line); }
  .bh-mobile-nav a { display: block; padding: 10px 0; color: var(--bh-navy); text-decoration: none; }
  .bh-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .bh-header-inner { min-height: 84px; padding: 11px 0; gap: 16px; }
  .bh-utility-inner { justify-content: center; flex-wrap: wrap; gap: 3px 14px; text-align: center; }
  :is(.bh-home-cover, .bh-inner-cover).wp-block-cover, :is(.bh-home-cover, .bh-inner-cover) { min-height: 540px; padding-top: 48px; padding-bottom: 48px; }
  :is(.bh-home-cover, .bh-inner-cover) .wp-block-cover__background { background: linear-gradient(90deg, rgba(9, 34, 51, .92) 0%, rgba(9, 34, 51, .72) 60%, rgba(9, 34, 51, .35) 100%); }
  :is(.bh-home-cover, .bh-inner-cover) .bh-cover-content { max-width: 620px !important; }
  .bh-hero, .bh-hero.bh-section { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 32px; padding-bottom: 32px; }
  .bh-grid-2, .bh-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .bh-grid { gap: 22px; }
  .bh-section { padding-top: 32px; padding-bottom: 32px; }
  .bh-programmes .bh-card + .bh-card, .bh-school-year .bh-card + .bh-card { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--bh-line); }
  .bh-school-year .bh-grid { padding: 22px; gap: 20px; }
  .bh-footer-main, .bh-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 32px; }
  .bh-footer-main > :first-child, .bh-footer-inner > :first-child { grid-column: 1 / -1; }
  .bh-footer-bottom { display: block; }
  .bh-footer-bottom p + p { margin-top: 8px; }
}
@media (max-width: 440px) {
  .bh-inner-cover.wp-block-cover { min-height: 420px !important; padding-top: 38px; padding-bottom: 38px; }
  .bh-inner-cover .bh-cover-content h1 { font-size: 2rem !important; }
  .bh-utility-inner > p:first-child { display: none; }
  .bh-brand-name, .bh-header .bh-brand > span { font-size: 1.15rem; }
  .bh-brand-name span, .bh-header .bh-brand small { font-size: .53rem; letter-spacing: .07em; }
  .bh-brand img, img.bh-brand-logo, .bh-brand .wp-block-image { width: 52px; height: 52px; flex-basis: 52px; }
  .bh-brand { gap: 10px; }
  .bh-utility { font-size: .68rem; }
  .bh-grid-4 { grid-template-columns: minmax(0, 1fr); }
  :is(.bh-home-cover, .bh-inner-cover).wp-block-cover, :is(.bh-home-cover, .bh-inner-cover) { min-height: 560px; }
  :is(.bh-home-cover, .bh-inner-cover) .bh-cover-content h1 { font-size: 2.55rem; }
  .bh-actions .wp-block-button, .bh-actions .wp-block-button__link, .bh-actions a.bh-button { width: 100%; }
  .bh-table th, .bh-table td, .bh-page table th, .bh-page table td { padding: 12px 14px; }
  .bh-footer-main, .bh-footer-inner { grid-template-columns: minmax(0, 1fr); }
  .bh-footer-main > :first-child, .bh-footer-inner > :first-child { grid-column: auto; }
  .bh-page-summary, .bh-hero-panel { padding: 18px 20px; }
  .bh-resources > .bh-download { padding: 20px; }
}
/* Labelled controls and scrollable native WordPress mobile navigation. */
@media (max-width: 1140px) {
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-open:not(.always-shown),
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-close {
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 48px;
    min-width: 80px;
    padding: 10px 12px;
    border: 1px solid #b8c5cb;
    border-radius: 4px;
    color: var(--bh-navy);
    background: #fff;
    font: 600 .82rem/1.2 var(--bh-sans);
    cursor: pointer;
  }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex !important;
  }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-open::after { content: 'Menu'; }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-close::after { content: 'Close'; }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-close { display: flex; }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-open:hover,
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-close:hover {
    background: var(--bh-cream);
    border-color: var(--bh-navy);
  }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-open svg,
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-close svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
  }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container.is-menu-open {
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    color: var(--bh-navy) !important;
    background-color: var(--bh-cream) !important;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .admin-bar .bh-site-header .bh-navigation .wp-block-navigation__responsive-container.is-menu-open {
    padding-top: calc(max(20px, env(safe-area-inset-top)) + var(--wp-admin--admin-bar--height, 46px));
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation__responsive-close {
    width: 100%;
    max-width: 580px;
    margin-inline: auto;
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation__responsive-dialog {
    width: 100%;
    margin: 0;
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation__responsive-dialog::before {
    content: 'Beacon Hill';
    display: block;
    min-height: 66px;
    padding: 10px 98px 20px 0;
    border-bottom: 1px solid #cbd3d2;
    color: var(--bh-navy);
    font: 400 1.5rem/1.2 var(--bh-serif);
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation__responsive-container-content {
    align-items: stretch;
    padding-top: 18px;
    padding-bottom: 8px;
    overflow: visible;
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation__container {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation-item {
    align-items: stretch;
    width: 100%;
    margin: 0;
    border-bottom: 1px solid #d4dcda;
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation-item > .wp-block-navigation-item__content {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 12px 14px !important;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    color: var(--bh-navy);
    background: transparent;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
  }
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation-item > .wp-block-navigation-item__content:hover {
    color: var(--bh-navy);
    background: #e8eeeb;
  }
  .bh-site-header .bh-navigation .is-menu-open .current-menu-item > .wp-block-navigation-item__content,
  .bh-site-header .bh-navigation .is-menu-open .wp-block-navigation-item__content[aria-current='page'] {
    border-left-color: #8e641a;
    color: var(--bh-navy);
    background: #e4ece8;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #8e641a;
    text-underline-offset: 4px;
  }
  .bh-site-header .bh-navigation .is-menu-open .bh-nav-apply { margin-top: 18px; border-bottom: 0; }
  .bh-site-header .bh-navigation .is-menu-open .bh-nav-apply > .wp-block-navigation-item__content {
    justify-content: center;
    min-height: 54px;
    border: 1px solid var(--bh-navy);
    border-radius: 4px;
    color: #fff;
    background: var(--bh-navy);
    text-align: center;
    text-decoration: none;
  }
  .bh-site-header .bh-navigation .is-menu-open .bh-nav-apply > .wp-block-navigation-item__content:hover {
    background: #23495e;
    color: #fff;
  }
  .bh-site-header .bh-navigation .is-menu-open :where(a, button):focus-visible {
    outline: 3px solid #8e641a;
    outline-offset: 3px;
  }
}

/* The labelled menu control and crest fit together at 320px. */
@media (max-width: 440px) {
  .bh-header-inner { width: calc(100% - 32px); gap: 10px; }
  .bh-site-header .bh-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
@media print {
  .bh-site-header, .bh-site-footer, .bh-header, .bh-footer, .bh-review-bar, .bh-actions, .bh-skip-link { display: none !important; }
  .bh-page { color: #000; }
  :is(.bh-home-cover, .bh-inner-cover).wp-block-cover, :is(.bh-home-cover, .bh-inner-cover) { display: block; min-height: 0; padding: 20px 0; color: #000; background: #fff; }
  :is(.bh-home-cover, .bh-inner-cover) .wp-block-cover__image-background, :is(.bh-home-cover, .bh-inner-cover) .wp-block-cover__background { display: none; }
  :is(.bh-home-cover, .bh-inner-cover) .bh-cover-content h1, :is(.bh-home-cover, .bh-inner-cover) .bh-cover-content p { color: #000; }
  .bh-hero, .bh-hero.bh-section { display: block; padding: 20px 0; background: #fff; }
  .bh-page-summary, .bh-hero-panel { margin-top: 20px; }
  .bh-section { width: 100%; padding: 20px 0; }
  .bh-band { padding: 20px 0; color: #000; background: #fff; }
  .bh-band h2, .bh-band h3, .bh-band p { color: #000; }
  .bh-card, .bh-term, .bh-download { break-inside: avoid; }
  .bh-table th, .bh-page table th { color: #000; background: #eee; }
}
