/* NBHIS — design system
   Brand: maroon #941E30 · navy #003B7F · gold #C6A75C */

:root {
  --maroon: #941e30;
  --maroon-dark: #680e1c;
  --navy: #003b7f;
  --navy-dark: #012d5f;
  --gold: #c6a75c;
  --ink: #1c1c1e;
  --muted: #66686c;
  --line: #e8e5e0;
  --paper: #ffffff;
  --wash: #f7f5f2;
  --font: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "微软雅黑", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--ink); }
.kicker { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.section-title { font-size: clamp(26px, 3.6vw, 38px); margin: 8px 0 14px; }
.lede { color: var(--muted); max-width: 46em; }

/* ---------- top bar (charcoal, pill buttons, language right) ---------- */
.topbar { background: #2b2b2b; color: #eee; font-size: 13px; }
.topbar .wrap { position: relative; display: flex; align-items: center; justify-content: center; min-height: 58px; flex-wrap: wrap; gap: 10px; padding-top: 9px; padding-bottom: 9px; }
.topbar .pill { background: #46617a; color: #fff; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; padding: 9px 20px; border-radius: 999px; }
.topbar .pill:hover { background: #57748f; color: #fff; }
.topbar .lang { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; letter-spacing: .03em; }
.topbar .lang img { height: 13px; width: auto; border-radius: 2px; }
.topbar .lang:hover { color: var(--gold); }

/* ---------- header (matches original #masthead: maroon gradient, floating) ---------- */
.header { position: sticky; top: 0; z-index: 50; background: linear-gradient(to right, #941e30 0%, #680e1c 100%); box-shadow: 0 6px 24px rgba(20, 10, 12, .25); }
.header .wrap { display: flex; align-items: center; gap: 28px; min-height: 88px; }
.brand { display: flex; align-items: center; }
.brand img { height: 58px; width: auto; }
.brand span { display: none; } /* the school name is part of the white SVG logo */
.accred-inline { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 32px); margin-left: auto; margin-right: clamp(10px, 2vw, 26px); }
.accred-inline img { height: 40px; width: auto; display: block; }
.accred-inline a:hover img { opacity: .85; }
.nav { display: flex; align-items: center; gap: 10px; }
.nav > a { padding: 10px 13px; font-size: 15px; font-weight: 600; color: #fff; border-radius: 6px; }
.nav .cta, .nav .menu > a { display: inline-block; background: var(--gold); color: #2a1f08; padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.nav .cta:hover, .nav .menu > a:hover { background: #d8bd77; color: #2a1f08; }
.nav .huamao-menu { display: flex; align-items: center; gap: 10px; list-style: none; }
.nav .huamao-menu li { position: relative; }
.nav .huamao-menu > li > a { display: inline-block; padding: 10px 13px; color: #fff; font-size: 15px; font-weight: 600; border-radius: 6px; }
.nav .huamao-menu > li.menu-item-has-children > a { background: var(--gold); color: #2a1f08; padding: 10px 20px; border-radius: 999px; font-weight: 700; }
.nav .huamao-menu > li.menu-item-has-children > a::after { content: " ▾"; font-size: 11px; color: rgba(42, 31, 8, .7); }
.nav .huamao-menu .sub-menu { position: absolute; top: 100%; left: 0; z-index: 300; min-width: 250px; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(20,10,12,.12); display: none; }
.nav .huamao-menu li:hover > .sub-menu, .nav .huamao-menu li:focus-within > .sub-menu { display: block; }
.nav .huamao-menu .sub-menu a { display: block; padding: 9px 12px; color: var(--ink); font-size: 14.5px; border-radius: 7px; }
.nav .huamao-menu .sub-menu a:hover { background: var(--wash); color: var(--maroon); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 18px; cursor: pointer; }

/* dropdown */
.menu { position: relative; }
.menu > a::after { content: " ▾"; font-size: 11px; color: rgba(42, 31, 8, .7); }
.menu .drop { position: absolute; top: 100%; left: 0; z-index: 300; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(20,10,12,.12); padding: 8px; min-width: 250px; display: none; }
.menu:hover .drop, .menu:focus-within .drop { display: block; }
.drop a { display: block; padding: 9px 12px; border-radius: 7px; font-size: 14.5px; color: var(--ink); }
.drop a:hover { background: var(--wash); color: var(--maroon); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--maroon-dark); color: #fff; overflow: hidden; }
.hero video, .hero .hero-img { width: 100%; height: min(72vh, 640px); object-fit: cover; display: block; opacity: .62; }
.hero-inner { position: absolute; inset: 0; display: flex; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 54px); max-width: 13em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero p { margin: 14px 0 26px; font-size: clamp(15px, 1.8vw, 19px); color: #f3e9db; max-width: 36em; }
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.btn-gold { background: var(--gold); color: #2a1f08; }
.btn-gold:hover { background: #d8bd77; color: #2a1f08; }
.btn-ghost { border: 2px solid rgba(255,255,255,.75); color: #fff; margin-left: 12px; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- accreditation strip ---------- */
.accred { border-bottom: 1px solid var(--line); background: var(--paper); }
.accred .wrap { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 72px); padding: 22px 22px; flex-wrap: wrap; }
.accred img { height: 46px; width: auto; filter: grayscale(1); opacity: .75; transition: .2s; }
.accred img:hover { filter: none; opacity: 1; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 86px) 0; }
.section.wash { background: var(--wash); }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 34px; }
.pillar { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: .2s; }
.pillar:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,10,12,.10); }
.pillar img { height: 150px; width: 100%; object-fit: cover; }
.pillar .pad { padding: 18px 20px 22px; }
.pillar h3 { font-size: 19px; color: var(--maroon); margin-bottom: 6px; }
.pillar p { font-size: 14px; color: var(--muted); }

/* stats */
.stats { background: linear-gradient(120deg, var(--maroon-dark), var(--maroon) 55%, #a83247); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); text-align: center; }
.stat b { display: block; font-size: clamp(40px, 6vw, 64px); font-family: var(--serif); color: var(--gold); }
.stat span { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #f3e9db; }

/* cards (teams / news / links) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 34px; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: .2s; }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,10,12,.10); }
.card img { height: 160px; width: 100%; object-fit: cover; }
.card .pad { padding: 16px 18px 20px; }
.card h3 { font-size: 16.5px; margin-bottom: 6px; }
.card h3 a { color: var(--ink); }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:focus-visible::after { outline: 3px solid var(--gold); outline-offset: -3px; border-radius: 14px; }
.card h3 a:hover { color: var(--maroon); }
.card time { font-size: 12.5px; color: var(--gold); font-weight: 700; letter-spacing: .06em; }
.card p { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* contact form */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(26px, 4vw, 48px); align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 18px 44px rgba(20, 10, 12, .08); }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.form-field label em { color: var(--maroon); font-style: normal; }
.form-field input, .form-field textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--wash); outline: none; transition: .2s; }
.form-field input:focus, .form-field textarea:focus { background: #fff; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198, 167, 92, .18); }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-send { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15.5px; padding: 14px; border-radius: 999px; background: var(--maroon); color: #fff; transition: .2s; }
.form-send:hover { background: var(--maroon-dark); }
.form-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px; }
.form-ok { background: #eef7ee; border: 1px solid #bfe3bf; color: #22662a; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14.5px; }
.form-error { background: #fff1f0; border: 1px solid #efc2be; color: #8a1f17; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14.5px; }
.contact-info h3 { color: var(--maroon); font-size: 20px; margin: 0 0 10px; }
.contact-info h3:not(:first-child) { margin-top: 30px; }
.contact-info p { margin: 8px 0; }
.contact-info .qr { display: flex; gap: 18px; margin-top: 14px; }
.contact-info .qr img { width: 140px; border-radius: 12px; border: 1px solid var(--line); }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* previous / next article pager */
.post-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 864px; margin: 0 auto; padding: 0 22px clamp(40px, 5vw, 64px); }
.pager { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; background: #fff; transition: .2s; }
.pager:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 10, 12, .12); }
.pager span { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pager strong { display: block; margin-top: 6px; color: var(--ink); font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.pager:hover strong { color: var(--maroon); }
.pager.next { text-align: right; }
.pager.empty { visibility: hidden; }
@media (max-width: 700px) {
  .post-pager { grid-template-columns: 1fr; }
  .pager.empty { display: none; }
}

/* news browser (search + prev/next) */
.news-tools { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.news-search { flex: 1; min-width: 220px; max-width: 430px; padding: 11px 20px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 14.5px; outline: none; background: #fff; color: var(--ink); }
.news-search:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198, 167, 92, .18); }
.news-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.news-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--maroon); background: #fff; color: var(--maroon); font-size: 17px; cursor: pointer; transition: .2s; }
.news-btn:hover:not(:disabled) { background: var(--maroon); color: #fff; }
.news-btn:disabled { opacity: .3; cursor: default; }
.news-count { font-size: 13px; color: var(--muted); min-width: 46px; text-align: center; font-weight: 600; letter-spacing: .04em; }
.news-grid { margin-top: 24px; }
.news-empty { color: var(--muted); text-align: center; margin-top: 28px; }
.pop { animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* quick links */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.quick a { display: block; background: var(--navy); color: #fff; border-radius: 14px; padding: 26px 24px; transition: .2s; }
.quick a:nth-child(2) { background: var(--maroon); }
.quick a:nth-child(3) { background: var(--gold); color: #2a1f08; }
.quick a:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,10,12,.18); }
.quick h3 { color: inherit; font-size: 19px; margin-bottom: 6px; }
.quick p { font-size: 14px; opacity: .85; }

/* ---------- footer ---------- */
.footer { background: #24161a; color: #cbb9bd; font-size: 14px; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 40px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .04em; }
.footer a { color: #cbb9bd; display: block; padding: 3px 0; }
.footer a:hover { color: var(--gold); }
.footer .brandfoot img { height: 56px; margin-bottom: 14px; background: #fff; border-radius: 10px; padding: 6px; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- inner pages ---------- */
.page-hero { background: linear-gradient(120deg, var(--maroon-dark), var(--maroon)); color: #fff; padding: clamp(48px, 7vw, 88px) 0; text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.4vw, 48px); }
.page-hero h1::after { content: ""; display: block; width: 64px; height: 3px; background: var(--gold); margin: 18px auto 0; border-radius: 2px; }
.page-hero p { color: #f3e9db; margin: 16px auto 0; max-width: 42em; font-size: clamp(15px, 1.6vw, 18px); }
.prose { max-width: 820px; margin: 0 auto; font-size: 17px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 52px 0 16px; color: var(--maroon); text-align: center; }
.prose h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--gold); margin: 12px auto 0; border-radius: 2px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 21px; margin: 34px 0 10px; color: var(--navy); }
.prose p { margin: 16px 0; }
.prose ul { margin: 16px 0 16px 24px; }
.prose li { margin: 6px 0; }
.prose img { border-radius: 14px; margin: 30px auto; box-shadow: 0 18px 44px rgba(20, 10, 12, .14); }
.prose video { display: block; margin: 30px auto; }
.prose > p:first-of-type { font-size: 18.5px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .pillars, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .quick { grid-template-columns: 1fr 1fr; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .accred-inline { display: none; }
}
@media (max-width: 700px) {
  .topbar .lang { position: static; transform: none; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; }
  .nav.open { display: flex; }
  .nav .huamao-menu { display: flex; flex-direction: column; align-items: stretch; }
  .nav .huamao-menu > li > a { display: block; color: var(--ink); }
  .nav .huamao-menu .sub-menu { position: static; display: block; margin-top: 6px; }
  .nav > a { color: var(--ink); }
  .nav > a:hover { color: var(--maroon); background: var(--wash); }
  .menu > a::after { color: var(--muted); }
  .nav .cta { align-self: flex-start; }
  .menu .drop { position: static; display: block; border: 0; box-shadow: none; padding-left: 14px; }
  .nav-toggle { display: block; }
  .pillars, .grid-3, .grid-5, .quick, .footer .cols { grid-template-columns: 1fr; }
  .stats .wrap { grid-template-columns: 1fr; gap: 30px; }
  .btn-ghost { margin-left: 0; margin-top: 10px; }
}
