/* ==========================================================================
   ASMT Institute of Nursing — site stylesheet
   Design language modelled on nursing.dpu.edu.in (maroon + gold, university
   style): utility bar, crested masthead, sticky maroon nav, hero carousel,
   marquee notice, diagonal admissions callout, section cards, maroon footer.
   ========================================================================== */

:root {
  --maroon: #9a2827;
  --maroon-dark: #7c1f1e;
  --maroon-deep: #5d1716;
  --gold: #b79652;
  --gold-dark: #7e5a1a;
  --gold-soft: #f0e4c8;

  --ink: #17181a;
  --body: #3f444b;
  --muted: #6b7178;
  --line: #e4e0d8;
  --line-soft: #efece6;

  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --bg-tint: #ffe8e8;
  --bg-cream: #fdfbf7;

  --shadow-sm: 0 1px 3px rgba(23, 24, 26, .08);
  --shadow: 0 4px 18px rgba(23, 24, 26, .09);
  --shadow-lg: 0 14px 40px rgba(23, 24, 26, .14);

  --radius: 8px;
  --radius-lg: 14px;

  --header-h: 52px; /* sticky nav height, kept in sync by JS scroll offset */
  --wrap: 1200px;
}

/* --------------------------------------------------------------- base ---- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: "Roboto Slab", Roboto, Georgia, serif;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 600;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

a { color: var(--maroon); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

strong, b { color: var(--ink); font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--maroon); color: #fff; padding: 10px 18px;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------ layout ----- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

.section { padding: 58px 0; }
.section--soft { background: var(--bg-soft); }
.section--cream { background: var(--bg-cream); }
.section--tight { padding: 38px 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Centred section heading with the gold rule DPU uses under its titles. */
.section-title { text-align: center; margin-bottom: 34px; }
.section-title .eyebrow {
  display: inline-block;
  font-family: Roboto, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: .5rem;
}
.section-title h2 { font-size: 1.75rem; margin-bottom: .55rem; }
.section-title p { color: var(--muted); max-width: 720px; margin: 0 auto; }
.section-title::after {
  content: "";
  display: block;
  width: 62px; height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
  border-radius: 3px;
}
.section-title--left { text-align: left; }
.section-title--left::after { margin-left: 0; }

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: Roboto, sans-serif;
  font-size: .93rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-dark); color: #fff; box-shadow: var(--shadow); }

.btn-gold { background: var(--gold); color: #2c2410; }
.btn-gold:hover { background: #a9873f; color: #2c2410; }

.btn-outline { border-color: var(--maroon); color: var(--maroon); background: transparent; }
.btn-outline:hover { background: var(--maroon); color: #fff; }

.btn-ghost { border-color: rgba(255, 255, 255, .75); color: #fff; background: rgba(255, 255, 255, .08); }
.btn-ghost:hover { background: #fff; color: var(--maroon); }

.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* Text link with arrow — DPU's "knowmoreBtn". */
.link-more {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 700; color: var(--gold-dark);
}
.link-more::after { content: "\2192"; transition: transform .2s; }
.link-more:hover::after { transform: translateX(4px); }

/* -------------------------------------------------------- utility bar ---- */

.utilbar {
  background: var(--maroon-deep);
  color: rgba(255, 255, 255, .88);
  font-size: .82rem;
}
.utilbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 38px; flex-wrap: wrap;
}
.utilbar a { color: rgba(255, 255, 255, .88); }
.utilbar a:hover { color: var(--gold); }
.utilbar__contact { display: flex; gap: 20px; flex-wrap: wrap; }
.utilbar__contact i { color: var(--gold); margin-right: 6px; }
.utilbar__right { display: flex; align-items: center; gap: 14px; }
.utilbar__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  margin-left: 4px;
}
.utilbar__social a:hover { background: var(--gold); color: var(--maroon-deep); }

/* ---------------------------------------------------------- masthead ----- */

.masthead { background: #fff; border-bottom: 1px solid var(--line-soft); }
.masthead .wrap {
  display: flex; align-items: center; gap: 18px;
  padding-top: 14px; padding-bottom: 14px;
}
.masthead__logo { flex: 0 0 auto; }
.masthead__logo img { width: 78px; height: 78px; object-fit: contain; }
.masthead__id { flex: 1 1 auto; min-width: 0; }
.masthead__trust {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-dark); margin: 0 0 2px;
}
.masthead__name {
  font-family: "Roboto Slab", serif;
  font-size: 1.55rem; font-weight: 700; color: var(--maroon);
  margin: 0 0 3px; line-height: 1.2;
}
.masthead__sub { font-size: .88rem; color: var(--muted); margin: 0; }
.masthead__accred {
  display: inline-block; margin-top: 6px;
  font-size: .78rem; color: var(--ink);
  background: var(--gold-soft); border-left: 3px solid var(--gold);
  padding: 3px 10px; border-radius: 0 3px 3px 0;
}
.masthead__cta { flex: 0 0 auto; text-align: right; }
.masthead__cta .badge-open {
  display: block; font-size: .78rem; font-weight: 700;
  color: var(--maroon); margin-bottom: 8px; letter-spacing: .04em;
}

/* --------------------------------------------------------------- nav ----- */

.nav {
  background: var(--maroon);
  position: relative;
  z-index: 900;
}
.nav.is-stuck {
  position: fixed; top: 0; left: 0; right: 0;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .25);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }

.nav__brand {
  display: none; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: .95rem;
}
.nav__brand img { width: 30px; height: 30px; }
.nav.is-stuck .nav__brand { display: flex; }

.nav__toggle {
  display: none;
  background: transparent; border: 1px solid rgba(255, 255, 255, .5);
  color: #fff; border-radius: 4px; padding: 7px 12px;
  font-size: 1rem; cursor: pointer;
}

.nav__list {
  display: flex; align-items: stretch; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
}
.nav__list > li { position: relative; margin: 0; }
.nav__list > li > a {
  display: flex; align-items: center; gap: 6px;
  padding: 0 15px; height: var(--header-h);
  color: #fff; font-size: .9rem; font-weight: 500;
  border-bottom: 3px solid transparent;
}
.nav__list > li > a:hover,
.nav__list > li.is-open > a { background: var(--maroon-dark); color: #fff; }
.nav__list > li.is-active > a { border-bottom-color: var(--gold); color: #fff; }
.nav__list > li > a .caret { font-size: .62rem; opacity: .85; }

.nav__cta {
  margin-left: 10px;
  align-self: center;
}
.nav__cta .btn { padding: 8px 16px; font-size: .85rem; }

/* Dropdown */
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
  list-style: none; margin: 0; padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__list > li:hover > .dropdown,
.nav__list > li.is-open > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li { margin: 0; }
.dropdown a {
  display: block; padding: 9px 18px;
  font-size: .88rem; color: var(--body);
  border-left: 3px solid transparent;
}
.dropdown a:hover {
  background: var(--bg-soft); color: var(--maroon);
  border-left-color: var(--maroon);
}
.dropdown li.is-active > a {
  background: var(--bg-soft); color: var(--maroon);
  border-left-color: var(--gold); font-weight: 600;
}

/* ------------------------------------------------------------- hero ------ */

.hero { position: relative; background: #2a2a2a; overflow: hidden; }
.hero__track { position: relative; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .8s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; position: relative; }
.hero__slide img {
  width: 100%; height: 480px; object-fit: cover;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(60, 12, 12, .88) 0%, rgba(60, 12, 12, .62) 45%, rgba(60, 12, 12, .18) 100%);
  display: flex; align-items: center;
}
.hero__content { max-width: 640px; color: #fff; }
.hero__content h1, .hero__content h2 {
  color: #fff; font-size: 2.5rem; margin-bottom: .5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.hero__content p {
  font-size: 1.05rem; color: rgba(255, 255, 255, .92);
  margin-bottom: 1.4rem;
}
.hero__pill {
  display: inline-block; margin-bottom: 14px;
  background: var(--gold); color: #33270c;
  padding: 6px 16px; border-radius: 25px;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45);
  color: #fff; font-size: 1.1rem; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.hero__arrow:hover { background: var(--maroon); border-color: var(--maroon); }
.hero__arrow--prev { left: 18px; }
.hero__arrow--next { right: 18px; }

.hero__dots {
  position: absolute; bottom: 18px; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: center; gap: 9px;
}
.hero__dots button {
  width: 11px; height: 11px; border-radius: 50%; padding: 0;
  border: 1px solid #fff; background: transparent; cursor: pointer;
}
.hero__dots button.is-active { background: var(--gold); border-color: var(--gold); }

/* ----------------------------------------------------------- marquee ----- */

.noticebar {
  background: #f2f0eb;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; overflow: hidden;
}
.noticebar__label {
  flex: 0 0 auto; background: var(--maroon); color: #fff;
  padding: 11px 18px; font-size: .84rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.noticebar__label i { margin-right: 7px; color: var(--gold); }
.noticebar__viewport { flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.noticebar__track {
  display: inline-block; padding-left: 100%;
  animation: marquee 26s linear infinite;
}
.noticebar:hover .noticebar__track { animation-play-state: paused; }
.noticebar__track a { color: var(--maroon); font-weight: 600; font-size: .92rem; }
.noticebar__track .sep { color: var(--gold); margin: 0 18px; }
.noticebar__viewport { padding: 10px 0; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* --------------------------------------------------- admissions band ----- */

.admissions {
  background: linear-gradient(132deg, var(--bg-soft) 45%, var(--bg-tint) 45%);
  padding: 52px 0;
}
.admissions__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center;
}
.admissions__pill {
  display: inline-block; margin-bottom: 15px;
  background: var(--maroon); color: #fff;
  padding: 8px 18px; border-radius: 25px;
  font-size: .9rem; font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}
.admissions h2 { font-size: 2rem; margin-bottom: .5rem; }
.admissions__lead { color: var(--body); max-width: 460px; }

.notice { display: flex; gap: 16px; margin-bottom: 26px; }
.notice:last-child { margin-bottom: 0; }
.notice__icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  background: var(--maroon); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.notice__body h4 { font-size: 1.08rem; margin-bottom: .3rem; color: var(--ink); }
.notice__body p { margin-bottom: .5rem; color: var(--body); font-size: .95rem; }
.notice__links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------- quick links ----- */

.quicklinks { background: var(--maroon-dark); padding: 0; }
.quicklinks .grid { gap: 0; }
.quicklinks a {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px; color: #fff; font-size: .95rem; font-weight: 500;
  border-right: 1px solid rgba(255, 255, 255, .14);
  transition: background .25s;
}
.quicklinks .grid > :last-child a { border-right: 0; }
.quicklinks a:hover { background: var(--maroon); color: #fff; }
.quicklinks i { font-size: 1.5rem; color: var(--gold); flex: 0 0 auto; }

/* -------------------------------------------------------------- about ---- */

.about__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
}
.about__media { position: relative; }
.about__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.about__media::after {
  content: ""; position: absolute; right: -14px; bottom: -14px;
  width: 130px; height: 130px; border: 4px solid var(--gold);
  border-radius: var(--radius-lg); z-index: -1;
}
.about__badge {
  position: absolute; left: -16px; bottom: 22px;
  background: var(--maroon); color: #fff;
  padding: 14px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); text-align: center;
}
.about__badge strong { display: block; font-size: 1.7rem; color: #fff; line-height: 1; }
.about__badge span { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }

/* ------------------------------------------------------------- stats ----- */

.stats {
  background: var(--maroon);
  background-image: linear-gradient(rgba(93, 23, 22, .92), rgba(93, 23, 22, .92));
  color: #fff; padding: 46px 0;
}
.stat { text-align: center; padding: 6px 10px; }
.stat i { font-size: 1.7rem; color: var(--gold); margin-bottom: 10px; display: block; }
.stat__num {
  font-family: "Roboto Slab", serif; font-size: 2.2rem; font-weight: 700;
  color: #fff; line-height: 1; margin-bottom: 6px;
}
.stat__label { font-size: .88rem; color: rgba(255, 255, 255, .85); letter-spacing: .03em; }

/* ------------------------------------------------------------- cards ----- */

.card {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }
.card__media { position: relative; background: var(--bg-soft); }
.card__media img { width: 100%; height: 195px; object-fit: cover; }
.card__tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--maroon); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  padding: 4px 11px; border-radius: 3px; text-transform: uppercase;
}
.card__body { padding: 20px; flex: 1 1 auto; display: flex; flex-direction: column; }
.card__body h3 { font-size: 1.14rem; margin-bottom: .45rem; }
.card__body p { font-size: .93rem; color: var(--body); }
.card__meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: .82rem; color: var(--muted); margin-bottom: .8rem;
}
.card__meta i { color: var(--gold-dark); margin-right: 5px; }
.card__foot { margin-top: auto; padding-top: 12px; }

/* Course card with a maroon rail, echoing DPU's specialization pills. */
.course-card { border-left: 4px solid var(--maroon); }
.course-card .course-card__head {
  display: flex; align-items: center; gap: 14px;
  padding: 20px; border-bottom: 1px solid var(--line-soft);
  background: var(--bg-cream);
}
.course-card__icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--maroon); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex: 0 0 auto;
}
.course-card__head h3 { margin: 0; font-size: 1.2rem; }
.course-card__head span { font-size: .84rem; color: var(--muted); }
.course-card ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.course-card ul li { position: relative; padding-left: 24px; font-size: .93rem; }
.course-card ul li::before {
  content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900;
  position: absolute; left: 0; top: 1px; color: var(--gold-dark); font-size: .82rem;
}

/* Feature / icon tile */
.feature {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; height: 100%;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.feature__icon {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(140deg, var(--maroon), var(--maroon-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.feature h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.feature p { font-size: .9rem; margin: 0; color: var(--body); }

/* Person card */
.person { text-align: center; }
.person__photo {
  width: 150px; height: 150px; margin: 0 auto 16px;
  border-radius: 50%; overflow: hidden;
  border: 4px solid #fff; box-shadow: 0 0 0 3px var(--gold), var(--shadow);
  background: var(--bg-soft);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
/* Stand-in for people whose photograph we don't have yet. */
.person__photo--initials {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--maroon), var(--maroon-deep));
  color: #fff; font-family: "Roboto Slab", serif; font-size: 2.4rem; font-weight: 600;
  letter-spacing: .04em;
}
.person h3 { font-size: 1.08rem; margin-bottom: .2rem; }
.person span { display: block; font-size: .87rem; color: var(--gold-dark); font-weight: 600; }

/* Notice / update list */
.updates { list-style: none; padding: 0; margin: 0; }
.updates li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px dashed var(--line);
}
.updates li:last-child { border-bottom: 0; }
.updates__date {
  flex: 0 0 auto; width: 54px; text-align: center;
  background: var(--maroon); color: #fff; border-radius: 4px; padding: 6px 0;
  line-height: 1.15;
}
.updates__date strong { display: block; font-size: 1.15rem; color: #fff; }
.updates__date span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.updates__text { flex: 1 1 auto; }
.updates__text a { font-weight: 600; color: var(--ink); font-size: .96rem; }
.updates__text a:hover { color: var(--maroon); }
.updates__text small { display: block; color: var(--muted); font-size: .82rem; }

.badge-new {
  display: inline-block; background: var(--gold); color: #33270c;
  font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  padding: 1px 7px; border-radius: 3px; text-transform: uppercase;
  margin-left: 6px; vertical-align: middle;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Panel — bordered content block used on inner pages */
.panel {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.panel--accent { border-top: 4px solid var(--maroon); }
.panel h3 { color: var(--maroon); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: .6rem; }
.checklist li::before {
  content: "\f058"; font-family: "Font Awesome 5 Free"; font-weight: 900;
  position: absolute; left: 0; top: 2px; color: var(--maroon);
}

/* Numbered ordered list with maroon markers */
.numlist { list-style: none; padding: 0; counter-reset: n; margin: 0; }
.numlist > li {
  position: relative; padding-left: 44px; margin-bottom: 1rem; counter-increment: n;
}
.numlist > li::before {
  content: counter(n);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--maroon); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 700;
}
.numlist > li h3, .numlist > li h4 { margin-bottom: .3rem; }

/* --------------------------------------------------------- page head ----- */

.pagehead {
  position: relative;
  background: var(--maroon-deep) center/cover no-repeat;
  color: #fff; padding: 58px 0;
}
.pagehead::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(93, 23, 22, .93), rgba(93, 23, 22, .72));
}
.pagehead .wrap { position: relative; }
.pagehead h1 { color: #fff; margin-bottom: .4rem; font-size: 2.1rem; }
.breadcrumb { font-size: .88rem; color: rgba(255, 255, 255, .85); }
.breadcrumb a { color: var(--gold); }
.breadcrumb span { margin: 0 8px; opacity: .6; }

/* ------------------------------------------------------------- table ----- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.4rem; }
table.data {
  width: 100%; border-collapse: collapse; min-width: 520px;
  background: #fff; font-size: .93rem;
}
table.data caption {
  caption-side: top; text-align: left; padding: 0 0 10px;
  font-weight: 600; color: var(--maroon); font-family: "Roboto Slab", serif;
}
table.data th, table.data td {
  border: 1px solid var(--line); padding: 10px 13px; vertical-align: top;
}
table.data thead th {
  background: var(--maroon); color: #fff; font-weight: 600;
  text-align: left; border-color: var(--maroon-dark);
}
table.data tbody tr:nth-child(even) { background: var(--bg-soft); }
table.data tbody tr:hover { background: var(--gold-soft); }
table.data td.num, table.data th.num { text-align: center; }
table.data tfoot td, table.data tr.total td {
  background: var(--gold-soft); font-weight: 700; color: var(--ink);
}

/* ----------------------------------------------------------- gallery ----- */

/* Collection tabs — the top tier: campus, clinical training, yearly activities */
.gallery-collections {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  border-bottom: 2px solid var(--line); margin-bottom: 26px;
}
.gallery-collection {
  font-family: inherit; font-size: .96rem; font-weight: 700;
  color: var(--muted); background: transparent;
  border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 12px 20px; cursor: pointer;
  transition: color .25s, border-color .25s;
}
.gallery-collection span {
  display: inline-block; margin-left: 6px;
  font-size: .74rem; font-weight: 700; color: var(--gold-dark);
}
.gallery-collection:hover { color: var(--maroon); }
.gallery-collection.is-active {
  color: var(--maroon-deep); border-bottom-color: var(--maroon);
}

.collection[hidden] { display: none; }
.collection__intro {
  max-width: 760px; margin: 0 auto 26px; text-align: center; color: var(--muted);
}

/* Album filter chips */
.gallery-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-bottom: 34px;
}
.gallery-filter {
  font-family: inherit; font-size: .88rem; font-weight: 600;
  color: var(--maroon); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.gallery-filter span {
  display: inline-block; margin-left: 6px;
  font-size: .75rem; font-weight: 700; color: var(--gold-dark);
}
.gallery-filter:hover { border-color: var(--gold); background: var(--gold-soft); }
.gallery-filter.is-active {
  background: var(--maroon); border-color: var(--maroon); color: #fff;
}
.gallery-filter.is-active span { color: var(--gold-soft); }

/* One album per activity, named as it appears in the activity chart */
.album { margin-bottom: 40px; }
.album[hidden] { display: none; }
.album:last-child { margin-bottom: 0; }
.album__head {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.album__head h3 { font-size: 1.15rem; margin: 0; color: var(--maroon-deep); }
.album__count {
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}

.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.gallery-grid a {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-soft);
}
.gallery-grid img {
  width: 100%; height: 210px; object-fit: cover;
  transition: transform .45s;
}
.gallery-grid a:hover img { transform: scale(1.07); }
.gallery-grid a::after {
  content: "\f00e"; font-family: "Font Awesome 5 Free"; font-weight: 900;
  position: absolute; inset: 0; color: #fff; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(93, 23, 22, .55); opacity: 0; transition: opacity .3s;
}
.gallery-grid a:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(10, 6, 6, .92);
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  background: transparent; border: 0; color: #fff; font-size: 2rem; cursor: pointer;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, .15); border: 0; color: #fff;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
}
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* ---------------------------------------------------------- cta band ----- */

.ctaband {
  background: linear-gradient(120deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: #fff; padding: 46px 0;
}
.ctaband .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
}
.ctaband h2 { color: #fff; margin-bottom: .3rem; font-size: 1.7rem; }
.ctaband p { color: rgba(255, 255, 255, .88); margin: 0; }
.ctaband__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------ footer ----- */

.footer { background: var(--maroon-deep); color: rgba(255, 255, 255, .82); padding: 50px 0 0; font-size: .92rem; }
.footer h4 {
  color: #fff; font-size: 1.02rem; margin-bottom: 1rem;
  padding-bottom: 9px; border-bottom: 2px solid var(--gold); display: inline-block;
}
.footer a { color: rgba(255, 255, 255, .82); }
.footer a:hover { color: var(--gold); }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; }
.footer__brand { display: flex; gap: 14px; margin-bottom: 14px; }
.footer__brand img { width: 62px; height: 62px; object-fit: contain; background: #fff; border-radius: 8px; padding: 5px; }
.footer__brand strong { color: #fff; display: block; font-size: 1.05rem; font-family: "Roboto Slab", serif; }
.footer__brand span { font-size: .82rem; }
.footer ul.links { list-style: none; padding: 0; margin: 0; }
.footer ul.links li { margin-bottom: .5rem; }
.footer ul.links a { display: inline-flex; gap: 8px; align-items: baseline; }
.footer ul.links a::before { content: "\203A"; color: var(--gold); }
.footer__contact li { display: flex; gap: 11px; margin-bottom: .8rem; list-style: none; }
.footer__contact { padding: 0; margin: 0; }
.footer__contact i { color: var(--gold); width: 16px; flex: 0 0 auto; margin-top: 5px; }
.footer__social { margin-top: 16px; display: flex; gap: 9px; }
.footer__social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.footer__social a:hover { background: var(--gold); color: var(--maroon-deep); }
.footer__map iframe, .footer__map img { width: 100%; height: 150px; border: 0; border-radius: var(--radius); }
.footer__bottom {
  margin-top: 40px; border-top: 1px solid rgba(255, 255, 255, .14);
  padding: 16px 0; font-size: .84rem;
}
.footer__bottom .wrap {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ------------------------------------------------------------ floats ----- */

.floaters {
  position: fixed; right: 18px; bottom: 18px; z-index: 950;
  display: flex; flex-direction: column; gap: 10px;
}
.floaters a, .floaters button {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff; box-shadow: var(--shadow);
  transition: transform .2s;
}
.floaters a:hover, .floaters button:hover { transform: scale(1.08); color: #fff; }
.float-wa { background: #25d366; }
.float-call { background: var(--gold-dark); }
.float-top { background: var(--maroon); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, transform .2s; }
.float-top.is-visible { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------- modal ----- */

.modal {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15, 8, 8, .6);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.is-open { display: flex; }
.modal__box {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal__head {
  background: var(--maroon); color: #fff; padding: 16px 22px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal__head h3 { color: #fff; margin: 0; font-size: 1.15rem; }
.modal__close { background: transparent; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal__body { padding: 22px; }

/* -------------------------------------------------------------- form ----- */

.field { margin-bottom: 15px; }
.field label {
  display: block; font-size: .86rem; font-weight: 600;
  color: var(--ink); margin-bottom: 5px;
}
.field label .req { color: var(--maroon); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 4px;
  font-family: inherit; font-size: .93rem; color: var(--ink); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(154, 40, 39, .12);
}
.field textarea { min-height: 96px; resize: vertical; }
.field .error { display: none; color: #c0392b; font-size: .8rem; margin-top: 4px; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #c0392b; }
.field.is-invalid .error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-note { font-size: .8rem; color: var(--muted); }
.form-status {
  display: none; margin-top: 12px; padding: 11px 14px; border-radius: 4px;
  font-size: .9rem; background: #eef8f0; border: 1px solid #b7e0c0; color: #1e6b32;
}
.form-status.is-shown { display: block; }

/* --------------------------------------------------------- utilities ----- */

/* Only hide pre-animation content when scripting is available to bring it
   back — otherwise these sections would stay invisible for good. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5rem; color: var(--maroon); }
.prose > :first-child { margin-top: 0; }

.lead { font-size: 1.06rem; color: var(--body); }

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin: 0; }
.sidebar-nav a {
  display: block; padding: 11px 16px; border: 1px solid var(--line-soft);
  border-bottom: 0; color: var(--body); font-size: .92rem; background: #fff;
}
.sidebar-nav li:last-child a { border-bottom: 1px solid var(--line-soft); }
.sidebar-nav a:hover { background: var(--bg-soft); color: var(--maroon); }
.sidebar-nav a.is-active {
  background: var(--maroon); color: #fff; border-color: var(--maroon); font-weight: 600;
}

.layout-sidebar { display: grid; grid-template-columns: 270px 1fr; gap: 34px; align-items: start; }

/* --------------------------------------------------------- responsive --- */

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .layout-sidebar { grid-template-columns: 1fr; }
  .quicklinks .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav .wrap { padding-top: 8px; padding-bottom: 8px; }
  .nav__brand { display: flex; }
  .nav__list {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--maroon-dark);
    max-height: 74vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  }
  .nav__list.is-open { display: flex; }
  .nav__list > li > a { height: auto; padding: 13px 18px; justify-content: space-between; }
  .nav__list > li.is-active > a { border-bottom: 0; background: var(--maroon); }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; box-shadow: none; border-top: 0;
    background: rgba(0, 0, 0, .18); padding: 0;
  }
  .nav__list > li.is-open > .dropdown { display: block; }
  .nav__list > li:hover > .dropdown { opacity: 1; }
  .dropdown a { color: rgba(255, 255, 255, .88); padding-left: 34px; border-left: 0; }
  .dropdown a:hover { background: rgba(0, 0, 0, .25); color: #fff; }
  .nav__cta { display: none; }

  .about__grid, .admissions__grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__content h1, .hero__content h2 { font-size: 1.9rem; }
  .hero__slide img { height: 400px; }
  .hero__overlay { background: linear-gradient(90deg, rgba(60, 12, 12, .9) 20%, rgba(60, 12, 12, .6) 100%); }
}

@media (max-width: 700px) {
  body { font-size: 15.5px; }
  .section { padding: 40px 0; }
  .masthead .wrap { flex-wrap: wrap; text-align: center; justify-content: center; }
  .masthead__id { text-align: center; flex-basis: 100%; }
  .masthead__cta { flex-basis: 100%; text-align: center; }
  .masthead__name { font-size: 1.25rem; }
  .utilbar .wrap { justify-content: center; text-align: center; }
  .utilbar__contact { gap: 12px; justify-content: center; font-size: .78rem; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .quicklinks .grid-4 { grid-template-columns: 1fr; }
  .quicklinks a { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img { height: 150px; }
  .gallery-collections { gap: 2px; }
  .gallery-collection { padding: 10px 12px; font-size: .84rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero__slide img { height: 340px; }
  .hero__content h1, .hero__content h2 { font-size: 1.5rem; }
  /* Arrows would sit on top of the headline at this width — dots and swipe
     are enough on touch devices. */
  .hero__arrow { display: none; }
  .ctaband .wrap { flex-direction: column; text-align: center; }
  .ctaband__actions { justify-content: center; }
  .about__media::after { display: none; }
  .about__badge { left: 10px; }
  .noticebar__label { padding: 10px 12px; font-size: .74rem; }
  .pagehead { padding: 40px 0; }
  .pagehead h1 { font-size: 1.55rem; }
  .panel { padding: 20px; }
}

@media print {
  .utilbar, .nav, .floaters, .hero__arrow, .hero__dots, .noticebar, .ctaband, .modal { display: none !important; }
  body { color: #000; }
  a { color: #000; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

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

/* ==========================================================================
   Events, news and the bulletin board.
   Added when these sections became database-driven (admin panel → app/render.php).
   ========================================================================== */

.wrap--reading { max-width: 900px; }
.pagehead--slim { padding: 40px 0; }

.empty-note {
  background: var(--bg-soft); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted);
}

/* ------------------------------------------------- home: events + board ---- */

.events-more { margin: 18px 0 0; text-align: right; }

/* --------------------------------------------------------------- cards ---- */

.event-card { overflow: hidden; }
.event-card__media { position: relative; display: block; background: var(--maroon-deep); }
.event-card__media img { width: 100%; height: 190px; object-fit: cover; display: block; transition: transform .4s; }
.event-card:hover .event-card__media img { transform: scale(1.05); }
.event-card__placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 190px; color: rgba(255, 255, 255, .35); font-size: 2.4rem;
  background: linear-gradient(135deg, var(--maroon-deep), var(--maroon));
}
.event-card .card__body h3 { font-size: 1.1rem; }
.event-card .card__body h3 a { color: var(--ink); }
.event-card .card__body h3 a:hover { color: var(--maroon); }

/* The date block that sits on the corner of every event image. */
.event-date {
  position: absolute; left: 14px; bottom: 14px;
  display: flex; flex-direction: column; align-items: center;
  min-width: 62px; padding: 8px 6px 6px;
  background: var(--maroon); color: #fff; border-radius: 6px;
  border-bottom: 3px solid var(--gold); box-shadow: var(--shadow);
  line-height: 1.1; font-style: normal;
}
.event-date b { font-size: 1.35rem; font-weight: 700; }
.event-date i { font-style: normal; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.event-date u { text-decoration: none; font-size: .68rem; opacity: .8; }

.events-grid { align-items: stretch; }
.events-grid .card { height: 100%; }

/* ------------------------------------------------------------ carousel ---- */
/* Scroll-snap rather than a slider library: it works without JavaScript and
   the buttons only nudge the scroll position. */

.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, calc(33.333% - 16px));
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 8px; scrollbar-width: thin;
}
.carousel__slide { scroll-snap-align: start; display: flex; }
.carousel__slide > .card { width: 100%; }
.carousel__nav {
  position: absolute; top: 95px; z-index: 2;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: var(--maroon);
  box-shadow: var(--shadow); cursor: pointer;
}
.carousel__nav:hover { background: var(--maroon); color: #fff; }
.carousel__nav[hidden] { display: none; }
.carousel__nav--prev { left: -14px; }
.carousel__nav--next { right: -14px; }

/* ------------------------------------------------------- bulletin board ---- */

.panel--bulletin { padding: 22px 24px; border-top: 4px solid var(--gold); }
.panel__head {
  display: flex; align-items: center; gap: 9px;
  font-family: "Roboto Slab", Roboto, Georgia, serif; font-size: 1.1rem;
  color: var(--maroon); margin: 0 0 14px;
}
.panel__head i { color: var(--gold-dark); }
.panel__foot { margin: 14px 0 0; }

.bulletin-list { list-style: none; margin: 0; padding: 0; }
.bulletin {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.bulletin:last-child { border-bottom: 0; }
.bulletin > i { color: var(--maroon); margin-top: 3px; }
.bulletin__body { flex: 1 1 auto; min-width: 0; }
.bulletin__body a, .bulletin__body span:first-child { font-weight: 600; font-size: .95rem; }
.bulletin__date { display: block; font-size: .8rem; color: var(--muted); }
.bulletin__get { flex: 0 0 auto; color: var(--gold-dark); padding: 2px 4px; }
.bulletin__get:hover { color: var(--maroon); }

/* --------------------------------------------------------- notice board ---- */

.noticeboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.noticeboard__cat {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold-dark); margin: 20px 0 4px;
}
.noticeboard__cat:first-of-type { margin-top: 0; }

.newslist { list-style: none; margin: 0; padding: 0; }
.newslist__item {
  padding: 12px 0 12px 16px; border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.newslist__item::before {
  content: ""; position: absolute; left: 0; top: 20px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.newslist__item:last-child { border-bottom: 0; }
.newslist__date { display: block; font-size: .8rem; color: var(--muted); }
.newslist__item a { font-weight: 600; }
.newslist__text { font-weight: 600; color: var(--ink); }

/* -------------------------------------------------------- event detail ---- */

.event-detail__meta {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: .9rem; color: var(--muted); margin-bottom: .4rem;
}
.event-detail__meta i { color: var(--gold-dark); margin-right: 6px; }
.event-detail h2 { font-size: 1.8rem; }
.event-detail__cover {
  width: 100%; max-height: 460px; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow); margin: 8px 0 22px;
}
.event-detail .lead { font-size: 1.05rem; color: var(--ink); }
.event-detail h3 { margin-top: 32px; }

.event-pager {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line);
}
.event-pager__link { font-weight: 600; font-size: .92rem; max-width: 46%; }
.event-pager__link--next { margin-left: auto; text-align: right; }

/* -------------------------------------------------------------- narrow ---- */

@media (max-width: 1024px) {
  .carousel__track { grid-auto-columns: minmax(0, calc(50% - 12px)); }
  .carousel__nav--prev { left: 4px; }
  .carousel__nav--next { right: 4px; }
}

@media (max-width: 780px) {
  .noticeboard { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 700px) {
  .carousel__track { grid-auto-columns: minmax(0, 86%); }
  .event-card__media img, .event-card__placeholder { height: 165px; }
  .event-detail h2 { font-size: 1.4rem; }
  .event-pager__link { max-width: 100%; }
}

/* ------------------------------------------------------ organisation ----- */
/* The organisation chart on organization-chart.html. It used to be a flat PNG,
   which meant pinch-zooming on a phone and nothing at all for a screen reader.
   It is now four ordered lists — one per branch — with the connecting lines
   drawn in CSS, so it reads as a real hierarchy and scales to any width.
   Each branch sets --org-c; every rule below takes its colour from that. */

.orgchart { --org-line: #ded8cc; margin: 26px 0 6px; }

/* Managing Director and Principal, centred above the four branches. */
.orgchart__lead { display: grid; justify-items: center; gap: 30px; }
.orgchart__lead .org-node { min-width: min(320px, 100%); }

.org-node {
  position: relative; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--org-c, var(--maroon));
  border-radius: var(--radius); padding: 12px 20px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.org-node:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.org-node__role {
  display: block; font-family: "Roboto Slab", serif; font-weight: 700;
  font-size: .95rem; color: var(--ink); line-height: 1.35;
}
.org-node__desc {
  display: block; font-size: .76rem; color: var(--muted); margin-top: 3px;
}

/* The two leadership boxes are filled rather than outlined — the eye should
   land on them first and then follow the lines down. */
.org-node--lead {
  border: 0; padding: 16px 26px;
  background: linear-gradient(140deg, var(--maroon), var(--maroon-dark));
  box-shadow: var(--shadow);
}
.org-node--lead .org-node__role { color: #fff; font-size: 1.1rem; letter-spacing: .3px; }
.org-node--lead .org-node__desc { color: rgba(255, 255, 255, .8); }
.org-node--head {
  background: linear-gradient(140deg, var(--maroon-deep), var(--maroon));
}

/* Connector: a line up to whatever sits above, tipped with a chevron. Used
   between the two leadership boxes and between every link in a chain. */
.orgchart__lead .org-node + .org-node::before,
.org-chain li::before {
  content: ''; position: absolute; top: -30px; left: 50%;
  width: 2px; height: 30px; margin-left: -1px;
  background: var(--org-c, var(--org-line));
  opacity: .55;
}
.orgchart__lead .org-node + .org-node::after,
.org-chain li::after {
  content: ''; position: absolute; top: -10px; left: 50%;
  width: 7px; height: 7px; transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid var(--org-c, var(--org-line));
  border-bottom: 2px solid var(--org-c, var(--org-line));
  opacity: .75;
}
.orgchart__lead .org-node + .org-node::before,
.orgchart__lead .org-node + .org-node::after { --org-c: var(--maroon); }

/* The four branches, hung off a horizontal rail below the Principal. The rail
   stops at the centre of the first and last column, so it reads as one bus
   with four drops rather than a rule across the page. */
.orgchart__branches {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px;
  position: relative; margin-top: 30px; padding-top: 34px;
}
/* The rail has to stop at the centre of the outer columns, and a column centre
   is not 12.5% of the width once the 20px gaps are taken out — hence the
   correction. Four columns, three gaps: centre = W/8 - 7.5px. */
.orgchart__branches::before {
  content: ''; position: absolute; top: 0;
  left: calc(12.5% - 7.5px); right: calc(12.5% - 7.5px);
  height: 2px; background: var(--org-line);
}
/* Trunk: Principal down to the rail. */
.orgchart__branches::after {
  content: ''; position: absolute; top: -30px; left: 50%;
  width: 2px; height: 30px; margin-left: -1px; background: var(--org-line);
}
.org-branch { position: relative; }
.org-branch::before {
  content: ''; position: absolute; top: -34px; left: 50%;
  width: 2px; height: 34px; margin-left: -1px; background: var(--org-line);
}

/* Branch heading — the one place each branch shows its colour as a fill. */
.org-branch__head {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--org-c); color: #fff;
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 30px;
  font-family: "Roboto Slab", serif; font-weight: 600; font-size: .9rem;
  text-align: center; box-shadow: var(--shadow-sm);
}
.org-branch__head i { font-size: .95rem; opacity: .9; }

.org-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.org-chain li { position: relative; }

/* The last link in the academic chain is who the whole structure exists for.
   Only the three thin sides go dashed — the 4px colour edge stays solid. */
.org-node--terminal {
  border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed;
  background: var(--bg-cream);
}

.org-branch--admin   { --org-c: #7e5a1a; }
.org-branch--academic{ --org-c: #9a2827; }
.org-branch--hostel  { --org-c: #44605d; }
.org-branch--library { --org-c: #4f6b35; }

.orgchart__key {
  margin: 22px 0 0; font-size: .82rem; color: var(--muted); text-align: center;
}

@media (max-width: 1024px) {
  /* Two columns, two rows. Same correction as above: two columns, one gap,
     so a column centre sits at W/4 - 5px. */
  .orgchart__branches { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
  .orgchart__branches::before { left: calc(25% - 5px); right: calc(25% - 5px); }
  /* Row two hangs off nothing, so it gets no drop stub. */
  .org-branch:nth-child(n+3)::before { display: none; }
}

@media (max-width: 640px) {
  /* One column: a rail across four columns has nothing left to span, so the
     chart becomes a plain stack. The chevrons still carry the direction, and
     the trunk drops straight into the first branch. */
  .orgchart__branches { grid-template-columns: 1fr; gap: 34px; padding-top: 30px; }
  .orgchart__branches::before {
    left: 50%; right: auto; width: 2px; height: 30px; margin-left: -1px;
  }
  .org-branch::before { display: none; }
  .org-node { padding: 11px 14px; }
  .org-chain, .orgchart__lead { gap: 26px; }
  .org-chain li::before,
  .orgchart__lead .org-node + .org-node::before { top: -26px; height: 26px; }
  .org-chain li::after,
  .orgchart__lead .org-node + .org-node::after { top: -8px; }
}

@media print {
  .orgchart { break-inside: avoid; }
  .org-node, .org-branch__head { box-shadow: none; }
  .org-node--lead, .org-branch__head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Honeypot: a field only a bot fills in. Kept out of sight and out of the tab
   order rather than display:none, which the better bots look for. */
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;
    overflow:hidden;opacity:0}
