/* =====================================================================
   Mandarin Language Centre (MLC) — Website Stylesheet
   Palette: Imperial Red, Gold, Deep Ink Navy, Warm Cream
   Hand-editable: all colours live in :root below.
   ===================================================================== */

:root {
  --red: #b4182d;
  --red-dark: #8c0f20;
  --red-soft: #d6332f;
  --gold: #c89b3c;
  --gold-light: #e2c173;
  --ink: #1f2430;
  --ink-soft: #3a4154;
  --cream: #fbf6ee;
  --cream-2: #f4ece0;
  --paper: #ffffff;
  --muted: #6b7280;
  --line: #e7ddcc;
  --shadow: 0 10px 30px rgba(31, 36, 48, 0.10);
  --shadow-lg: 0 20px 55px rgba(31, 36, 48, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: Georgia, "Noto Serif SC", "Songti SC", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- Topbar */
.topbar {
  background: var(--ink);
  color: #d8dbe4;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; min-height: 40px; flex-wrap: wrap;
}
.topbar a:hover { color: var(--gold-light); }
.topbar .tb-group { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }

.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 6px;
  display: block; object-fit: contain; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(180, 24, 45, 0.28);
}
.brand-text strong {
  display: block; font-size: 1.02rem; letter-spacing: 0.04em;
  color: var(--red-dark); line-height: 1.2;
}
.brand-text span {
  display: block; font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}

.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.main-nav a {
  display: block; padding: 10px 14px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
  transition: all 0.2s ease; white-space: nowrap;
}
.main-nav a:hover { background: var(--cream-2); color: var(--red); }
.main-nav a.active { background: var(--red); color: #fff; }

.has-drop { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all 0.2s ease;
}
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.main-nav .dropdown { display: block; }
.dropdown a { border-radius: 8px; padding: 10px 14px; white-space: normal; }
.dropdown a small { display: block; font-weight: 400; color: var(--muted); font-size: 0.76rem; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
  width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 28px; border-radius: 999px; font-weight: 700;
  font-size: 0.93rem; letter-spacing: 0.02em; cursor: pointer;
  border: 2px solid transparent; transition: all 0.22s ease; text-align: center;
}
.btn-primary {
  background: linear-gradient(140deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff; box-shadow: 0 8px 22px rgba(180, 24, 45, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(180, 24, 45, 0.36); }
.btn-gold {
  background: linear-gradient(140deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #4a3406; box-shadow: 0 8px 22px rgba(200, 155, 60, 0.32);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(200, 155, 60, 0.42); }
.btn-outline { border-color: rgba(255,255,255,0.7); color: #fff; background: rgba(255,255,255,0.06); }
.btn-outline:hover { background: #fff; color: var(--red-dark); border-color: #fff; }
.btn-ghost { border-color: var(--red); color: var(--red); background: transparent; }
.btn-ghost:hover { background: var(--red); color: #fff; }

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(115deg, #2a1020 0%, var(--red-dark) 45%, #6d0c1c 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 22%, rgba(226,193,115,0.20), transparent 52%),
              radial-gradient(circle at 12% 88%, rgba(226,193,115,0.13), transparent 46%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px;
  align-items: center; padding: 92px 0 104px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(226,193,115,0.16); border: 1px solid rgba(226,193,115,0.45);
  color: var(--gold-light); padding: 7px 18px; border-radius: 999px;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  line-height: 1.14; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.01em;
}
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero-sub {
  font-size: 1.06rem; color: rgba(255,255,255,0.88); max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-motto {
  margin-top: 34px; padding-left: 18px; border-left: 3px solid var(--gold);
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  color: var(--gold-light);
}

.hero-art {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 3px solid rgba(226,193,115,0.55);
  box-shadow: 0 30px 70px rgba(0,0,0,0.42);
  aspect-ratio: 4 / 3;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* Stats strip */
.stats {
  position: relative; z-index: 3;
  background: var(--ink); color: #fff;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,0.10);
}
.stat {
  background: var(--ink); padding: 28px 22px; text-align: center;
}
.stat b {
  display: block; font-family: var(--serif); font-size: 2rem;
  color: var(--gold-light); line-height: 1.1;
}
.stat span { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: #b9bece; }

/* ---------------------------------------------------------------- Sections */
section { padding: 84px 0; }
.section-alt { background: var(--paper); }
.section-cream { background: var(--cream-2); }

.section-head { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.kicker {
  display: inline-block; font-size: 0.76rem; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--serif); font-size: clamp(1.7rem, 3.1vw, 2.4rem);
  line-height: 1.22; margin-bottom: 14px; color: var(--ink);
}
.section-head p { color: var(--muted); font-size: 1.02rem; }

.rule {
  width: 68px; height: 3px; margin: 16px auto 0;
  background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 3px;
}
.section-head.left .rule { margin-left: 0; }

/* ---------------------------------------------------------------- About */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.about-copy h2 {
  font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.22; margin-bottom: 18px;
}
.about-copy p { color: var(--ink-soft); margin-bottom: 16px; }
.about-media {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 6px solid #fff;
  aspect-ratio: 4 / 3;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.provide-list { list-style: none; display: grid; gap: 12px; margin-top: 26px; }
.provide-list li {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: var(--radius-sm); padding: 14px 18px;
  box-shadow: 0 4px 14px rgba(31,36,48,0.05);
}
.provide-list .ic {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  background: var(--cream-2); color: var(--red);
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem;
}
.provide-list strong { display: block; font-size: 0.97rem; }
.provide-list small { color: var(--muted); font-size: 0.85rem; }

/* ---------------------------------------------------------------- Cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.program-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 20px rgba(31,36,48,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.program-card .pc-top {
  padding: 24px 24px 18px;
  background: linear-gradient(140deg, var(--ink) 0%, #2f3646 100%);
  color: #fff; position: relative;
}
.program-card .pc-num {
  position: absolute; top: 18px; right: 20px;
  font-family: var(--serif); font-size: 2.6rem; font-weight: 700;
  color: rgba(226,193,115,0.30); line-height: 1;
}
.program-card .pc-top h3 { font-size: 1.14rem; margin-bottom: 6px; position: relative; z-index: 2; }
.program-card .pc-top p { font-size: 0.85rem; color: rgba(255,255,255,0.74); position: relative; z-index: 2; }
.program-card .pc-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.program-card .pc-body ul { list-style: none; display: grid; gap: 10px; margin-bottom: 20px; }
.program-card .pc-body li {
  position: relative; padding-left: 22px; font-size: 0.89rem; color: var(--ink-soft);
}
.program-card .pc-body li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(135deg, var(--red), var(--gold));
}
.program-card .pc-foot { margin-top: auto; }

.focus-tag {
  display: inline-block; background: var(--cream-2); color: var(--red-dark);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.76rem; font-weight: 700; padding: 5px 13px; margin: 0 6px 6px 0;
}

/* ---------------------------------------------------------------- HSK band */
.hsk-band {
  background: linear-gradient(120deg, var(--ink) 0%, #2b1b26 60%, var(--red-dark) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hsk-band::after {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,193,115,0.18), transparent 68%);
}
.hsk-band .container { position: relative; z-index: 2; }
.exam-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 44px; }
.exam-card {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(226,193,115,0.34);
  border-radius: var(--radius); padding: 30px 28px; backdrop-filter: blur(6px);
}
.exam-card h3 {
  font-family: var(--serif); font-size: 1.5rem; color: var(--gold-light); margin-bottom: 4px;
}
.exam-card .ec-level {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.62); margin-bottom: 14px; display: block;
}
.exam-card p { color: rgba(255,255,255,0.85); font-size: 0.93rem; margin-bottom: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(226,193,115,0.16); border: 1px solid rgba(226,193,115,0.42);
  color: var(--gold-light); border-radius: 999px; padding: 6px 15px;
  font-size: 0.8rem; font-weight: 600;
}

.check-list { list-style: none; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 13px; align-items: flex-start; font-size: 0.95rem; }
.check-list .ck {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: #3d2a04; display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 800; margin-top: 1px;
}
.hsk-band .check-list li { color: rgba(255,255,255,0.9); }

/* ---------------------------------------------------------------- Culture */
.culture-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.culture-tile {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3 / 4; box-shadow: var(--shadow);
}
.culture-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.culture-tile:hover img { transform: scale(1.07); }
.culture-tile .ct-label {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 18px;
  background: linear-gradient(to top, rgba(20,10,14,0.92), transparent);
  color: #fff; font-weight: 700; font-size: 0.92rem; letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------- Info cards */
.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: 0 6px 20px rgba(31,36,48,0.06);
  display: flex; flex-direction: column; gap: 12px;
}
.info-card .ico {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(140deg, var(--red), var(--red-dark)); color: var(--gold-light);
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 700;
  box-shadow: 0 8px 18px rgba(180,24,45,0.25);
}
.info-card h3 { font-size: 1.08rem; }
.info-card p { font-size: 0.92rem; color: var(--muted); }

/* ---------------------------------------------------------------- Page hero (sub pages) */
.page-hero {
  background: linear-gradient(115deg, var(--ink) 0%, var(--red-dark) 100%);
  color: #fff; padding: 66px 0 62px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 88% 15%, rgba(226,193,115,0.20), transparent 55%);
}
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb {
  font-size: 0.82rem; color: rgba(255,255,255,0.66); margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { color: var(--gold-light); }
.page-hero h1 {
  font-family: var(--serif); font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.18; margin-bottom: 12px;
}
.page-hero p { color: rgba(255,255,255,0.85); max-width: 720px; font-size: 1.02rem; }

/* ---------------------------------------------------------------- Detail blocks */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }
.prose h2 {
  font-family: var(--serif); font-size: 1.55rem; margin: 34px 0 14px; color: var(--ink);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 24px 0 10px; color: var(--red-dark); }
.prose p { color: var(--ink-soft); margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 0; list-style: none; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 24px; color: var(--ink-soft); font-size: 0.95rem; }
.prose ul li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(135deg, var(--red), var(--gold));
}

.side-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
  position: sticky; top: 100px;
}
.side-card h3 {
  font-size: 1.05rem; margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 2px solid var(--cream-2);
}
.spec-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.88rem;
}
.spec-row:last-of-type { border-bottom: none; }
.spec-row dt { color: var(--muted); flex-shrink: 0; }
.spec-row dd { font-weight: 600; text-align: right; color: var(--ink); }
.side-card .btn { width: 100%; margin-top: 18px; }

/* Program nav pills */
.pill-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.pill-nav a {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 20px; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft);
  transition: all 0.2s ease;
}
.pill-nav a:hover { border-color: var(--red); color: var(--red); }
.pill-nav a.active { background: var(--red); border-color: var(--red); color: #fff; }

/* Level scale */
.level-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 22px 0; }
.level-cell {
  text-align: center; padding: 16px 8px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--line);
}
.level-cell b { display: block; font-family: var(--serif); font-size: 1.05rem; color: var(--red-dark); }
.level-cell span { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.05em; }
.level-cell.hl { background: linear-gradient(140deg, var(--red), var(--red-dark)); border-color: var(--red-dark); }
.level-cell.hl b, .level-cell.hl span { color: #fff; }

/* ---------------------------------------------------------------- Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.contact-item {
  display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.contact-item:last-child { border-bottom: none; }
.contact-item .ci-ic {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  background: var(--cream-2); color: var(--red); display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem;
}
.contact-item h4 { font-size: 0.98rem; margin-bottom: 3px; }
.contact-item p, .contact-item a { font-size: 0.92rem; color: var(--muted); }
.contact-item a:hover { color: var(--red); }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 32px; box-shadow: var(--shadow-lg);
}
.form-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.form-card > p { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.84rem; font-weight: 700;
  margin-bottom: 7px; color: var(--ink-soft);
}
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 15px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 0.93rem;
  background: var(--cream); color: var(--ink); transition: all 0.2s ease;
}
.field textarea { resize: vertical; min-height: 118px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); background: #fff;
  box-shadow: 0 0 0 3px rgba(180,24,45,0.12);
}
.field.error input, .field.error select, .field.error textarea {
  border-color: var(--red); background: #fff5f6;
}
.field .err-msg { display: none; color: var(--red); font-size: 0.78rem; margin-top: 5px; }
.field.error .err-msg { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 0.78rem; color: var(--muted); margin-top: 14px; }
.form-success {
  display: none; background: #eefaf1; border: 1px solid #b6e5c3; color: #1c6b34;
  border-radius: var(--radius-sm); padding: 16px 18px; font-size: 0.9rem; margin-top: 18px;
}
.form-success.show { display: block; }

.map-frame {
  border-radius: var(--radius); overflow: hidden; border: 6px solid #fff;
  box-shadow: var(--shadow-lg); margin-top: 34px; min-height: 380px;
}
.map-frame iframe { width: 100%; height: 400px; border: 0; display: block; }

/* ---------------------------------------------------------------- Accordion */
.acc-group { display: grid; gap: 14px; }
.acc-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; transition: box-shadow 0.2s ease;
}
.acc-item.open { box-shadow: var(--shadow); border-color: var(--gold); }
.acc-head {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--ink);
  padding: 18px 22px; display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.acc-ic {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--cream-2); color: var(--red); display: grid; place-items: center;
  font-size: 1.1rem; font-weight: 700; transition: transform 0.25s ease;
}
.acc-item.open .acc-ic { transform: rotate(45deg); background: var(--red); color: #fff; }
.acc-body {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.acc-item.open .acc-body { max-height: 360px; }
.acc-body p { padding: 0 22px 20px; color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

/* ---------------------------------------------------------------- CTA */
.cta-band {
  background: linear-gradient(120deg, var(--red-dark) 0%, var(--red) 55%, #d1442f 100%);
  color: #fff; text-align: center; padding: 74px 0; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(226,193,115,0.24), transparent 60%);
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 {
  font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 14px;
}
.cta-band p { color: rgba(255,255,255,0.9); max-width: 620px; margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--ink); color: #a9b0c1; padding: 62px 0 0; font-size: 0.9rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px;
  padding-bottom: 44px;
}
.site-footer h4 {
  color: #fff; font-size: 0.94rem; margin-bottom: 18px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.site-footer p { line-height: 1.75; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--gold-light); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand-mark { width: 48px; height: 48px; box-shadow: none; }
.footer-brand strong { color: #fff; display: block; font-size: 0.98rem; }
.footer-brand span { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10); padding: 22px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: #868ea4;
}

/* ---------------------------------------------------------------- Reveal anim */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Back to top */
.to-top {
  position: fixed; right: 26px; bottom: 26px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--red); color: #fff; border: none;
  display: grid; place-items: center; cursor: pointer; font-size: 1.15rem;
  box-shadow: 0 10px 26px rgba(180,24,45,0.36); z-index: 300;
  opacity: 0; visibility: hidden; transform: translateY(14px); transition: all 0.3s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ---------------------------------------------------------------- Responsive */
/* Menu switches to the slide-out panel when the six Malay menu items no longer fit */
@media (max-width: 1180px) {
  /* the header's blur effect traps the slide-out menu, so drop it on small screens */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw);
    background: #fff; padding: 92px 22px 34px; overflow-y: auto;
    transform: translateX(105%); transition: transform 0.32s ease;
    box-shadow: -16px 0 44px rgba(0,0,0,0.18); z-index: 210;
  }
  .main-nav.open { transform: none; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { padding: 13px 16px; border-radius: 10px; font-size: 0.96rem; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-left: 2px solid var(--line);
    border-radius: 0; margin: 4px 0 8px 14px; padding: 0;
  }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(20,14,18,0.5);
    opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 190;
  }
  .nav-scrim.show { opacity: 1; visibility: visible; }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; padding: 66px 0 76px; }
  .hero-art { max-width: 620px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .culture-tiles { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
}

@media (max-width: 900px) {
  section { padding: 62px 0; }
  .about-grid, .contact-grid, .grid-3, .grid-2, .exam-cards { grid-template-columns: 1fr; }
  .level-scale { grid-template-columns: repeat(3, 1fr); }


}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .grid-4, .culture-tiles { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .topbar .tb-contact { display: none; }
  .form-card { padding: 26px 20px; }
  .hero-actions .btn { width: 100%; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- Organisation chart */
.team-group + .team-group { margin-top: 72px; }
.team-head { text-align: center; margin-bottom: 34px; }
.team-head h2 { font-family: var(--serif); font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.25; margin-top: 6px; }
.team-head .rule { margin: 14px auto 0; }
.team-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.team-card {
  width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 6px 20px rgba(31,36,48,0.06);
  display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.team-photo { background: #fff; aspect-ratio: 3 / 4; overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.team-body {
  flex: 1; padding: 18px 18px 20px; text-align: center; border-top: 4px solid var(--red);
  display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
}
.team-body strong { font-size: 0.92rem; letter-spacing: 0.03em; line-height: 1.35; color: var(--ink); }
.team-role { font-size: 0.86rem; font-weight: 700; color: var(--red); line-height: 1.4; }
.team-org { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
@media (max-width: 640px) {
  .team-grid { gap: 16px; }
  .team-card { width: calc(50% - 8px); }
  .team-body { padding: 14px 10px 16px; }
  .team-body strong { font-size: 0.8rem; }
  .team-role { font-size: 0.78rem; }
  .team-org { font-size: 0.72rem; }
}

/* ---------------------------------------------------------------- Event gallery */
.gallery-filters[hidden] { display: none; }
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.gallery-filters button {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); transition: all 0.2s ease;
}
.gallery-filters button:hover { border-color: var(--red); color: var(--red); }
.gallery-filters button.active { background: var(--red); border-color: var(--red); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event-card {
  font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 6px 20px rgba(31,36,48,0.06);
  display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.event-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-2); }
.event-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.event-card:hover .event-media img { transform: scale(1.05); }
.event-count {
  position: absolute; right: 12px; bottom: 12px; background: rgba(20,10,14,0.78); color: #fff;
  font-size: 0.76rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
}
.event-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.78rem; }
.event-cat {
  background: var(--cream-2); color: var(--red-dark); font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em;
}
.event-date { color: var(--muted); }
.event-body h3 { font-size: 1.06rem; line-height: 1.35; color: var(--ink); }
.event-body p {
  font-size: 0.9rem; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery-empty { text-align: center; color: var(--muted); padding: 30px 0; }

.lightbox {
  position: fixed; inset: 0; z-index: 400; background: rgba(14,10,12,0.94);
  display: flex; align-items: center; justify-content: center; padding: 64px 76px 40px;
}
.lightbox[hidden] { display: none; }
.lb-body { width: 100%; max-width: 1040px; max-height: 100%; display: flex; flex-direction: column; overflow-y: auto; }
.lb-body img { max-width: 100%; max-height: 66vh; margin: 0 auto; border-radius: 10px; object-fit: contain; }
.lb-info { color: #fff; max-width: 760px; margin: 18px auto 0; text-align: center; }
.lb-meta { display: flex; justify-content: center; gap: 14px; font-size: 0.84rem; color: var(--gold-light); }
.lb-info h2 { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0 8px; }
.lb-desc { color: rgba(255,255,255,0.82); font-size: 0.95rem; line-height: 1.6; white-space: pre-line; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: none;
  width: 50px; height: 50px; border-radius: 50%; font-size: 2rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: background 0.2s ease;
}
.lightbox button[hidden] { display: none; }
.lightbox button:hover { background: var(--red); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 40%; }
.lb-next { right: 14px; top: 40%; }

@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .lightbox { padding: 72px 14px 84px; }
  .lb-body img { max-height: 52vh; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; }
  .lb-prev { left: calc(50% - 62px); }
  .lb-next { right: calc(50% - 62px); }
}

/* Tagline (kept in English, italic) */
.hero-eyebrow, .tagline { font-style: italic; }
.site-footer .tagline { color: var(--gold-light); font-size: 1rem; display: block; margin-bottom: 6px; }
.hero-eyebrow { text-transform: none; letter-spacing: 0.03em; font-size: 0.95rem; font-weight: 600; }

/* Gallery: event whose photos are in a Google Drive folder (no helper script) */
a.event-card { text-decoration: none; }
.event-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 80% 15%, rgba(226,193,115,0.28), transparent 55%), linear-gradient(135deg, var(--ink) 0%, var(--red-dark) 100%);
  color: #fff; font-weight: 600; font-size: 0.92rem; letter-spacing: 0.03em;
}
.event-cover img { width: 72px; height: 72px; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.3); transition: none; }
.event-card:hover .event-cover img { transform: none; }

/* Gallery grouped by year */
.gallery-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.gallery-jump a {
  font-size: 0.9rem; font-weight: 700; padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft); transition: all 0.2s ease;
}
.gallery-jump a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.gallery-year { scroll-margin-top: 100px; padding: 0; }
.gallery-year + .gallery-year { margin-top: 56px; }
.gallery-year-title {
  font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--red-dark);
  display: flex; align-items: center; gap: 18px; margin-bottom: 24px;
}
.gallery-year-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------------------------------------------------------- Supported by (above footer) */
.supporters { background: #fff; border-top: 1px solid var(--line); padding: 44px 0 48px; text-align: center; }
.supporters h2 {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.85rem); color: var(--ink);
  margin-bottom: 26px;
}
.supporters-logos {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 24px 64px; margin: 0 auto; padding: 0;
}
.supporters-logos img { display: block; height: 72px; width: auto; max-width: 200px; object-fit: contain; transition: transform 0.2s ease; }
.supporters-logos a:hover img { transform: scale(1.04); }
@media (max-width: 640px) {
  .supporters { padding: 36px 0 40px; }
  .supporters-logos { gap: 22px 36px; }
  .supporters-logos img { height: 64px; max-width: 180px; }
}

/* hide the slide-out menu shadow while the menu is closed */
@media (max-width: 1180px) { .main-nav:not(.open) { box-shadow: none; } }

/* ---------------------------------------------------------------- Language switch */
.topbar .tb-contact { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.18); }
.lang-switch i { font-style: normal; color: rgba(255,255,255,0.35); padding: 0 2px; }
.lang-switch button {
  font: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; cursor: pointer;
  background: none; border: none; color: #d8dbe4; padding: 4px 6px; border-radius: 6px;
}
.lang-switch button:hover { color: var(--gold-light); }
.lang-switch button.active { color: var(--ink); background: var(--gold-light); }
@media (max-width: 640px) {
  .topbar .tb-contact { display: none; }
  .lang-switch { border-left: none; padding-left: 0; margin-left: 0; }
}

/* Hide Google Translate's own bar, pop-ups and highlights */
#google_translate_element, .goog-te-banner-frame, iframe.skiptranslate, .VIpgJd-ZVi9od-ORHb-OEVmcd,
#goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight, font[style] { background: none !important; box-shadow: none !important; }

/* Hide the page briefly while switching to BM, to avoid a flash of English */
html.lang-loading body { visibility: hidden; }

/* ---------------------------------------------------------------- Joomla additions */
.main-nav li.is-current > a:not(.active) { color: var(--red); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.supporters-logos img { height: 72px; width: auto; }
@media (max-width: 640px) { .supporters-logos img { height: 64px; } }

.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Home page: MLC Latest Events ---------- */
.latest-events[hidden] { display: none; }
.latest-events .gallery-empty { padding: 10px 0 0; }
.latest-more { text-align: center; margin-top: 40px; }
