/* ============================================================
   SAITM Theme — Inner pages, navigation dropdowns, blocks, forms
   Uses the design tokens defined in saitm-main.css.
   ============================================================ */

/* ── Accessibility helpers ─────────────────────────────────── */
.saitm-skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--blue-dark); color: var(--white); padding: .6rem 1rem; border-radius: var(--r);
  font-weight: 600; font-size: 14px;
}
.saitm-skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.saitm-page-hero :focus-visible, .saitm-footer :focus-visible, .saitm-cta :focus-visible { outline-color: #fff; }

/* ============================================================
   NAVIGATION — dropdown submenus
   ============================================================ */
.saitm-nav__links > li { position: relative; display: flex; align-items: center; }
.saitm-nav__links .sub-menu {
  list-style: none; position: absolute; top: calc(100% + 18px); left: -1rem; min-width: 240px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 18px 40px -18px rgba(0, 32, 104, .35); padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s; z-index: 110;
}
/* Invisible bridge so the menu doesn't close while the pointer crosses the gap */
.saitm-nav__links .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.saitm-nav__links > li:hover > .sub-menu,
.saitm-nav__links > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.saitm-nav__links .sub-menu a {
  display: block; padding: .6rem .8rem; border-radius: var(--r); border: 0 !important;
  font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text);
}
.saitm-nav__links .sub-menu a:hover,
.saitm-nav__links .sub-menu .current-menu-item > a { background: var(--surface-lo); color: var(--blue); }
.saitm-subnav-toggle {
  background: none; border: 0; padding: 2px; margin-left: 2px; cursor: pointer; color: var(--text-muted);
  display: inline-flex; align-items: center; border-radius: var(--r);
}
.saitm-subnav-toggle .material-symbols-outlined { font-size: 18px; transition: transform .15s; }
.saitm-subnav-toggle[aria-expanded="true"] .material-symbols-outlined { transform: rotate(180deg); }
.saitm-nav__links > li:hover > .saitm-subnav-toggle { color: var(--blue); }

/* Placeholder items (menu URL "#"): text only, no link. */
.saitm-menu-placeholder { display: block; padding: .6rem .8rem; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: default; }

/* Mega menu (menu item class "saitm-mega"), after apiit.lk: a full-width panel under
   the header with one column per faculty. Column title (level 1), uppercase group
   heading (level 2, items with children) and programmes with an arrow (level 3). */
.saitm-mega > .sub-menu > li { display: block; }
/* inherit, not visible: a visible child of the hidden panel would still catch the pointer and open it */
.saitm-nav__links .saitm-mega .sub-menu .sub-menu {
  position: static; opacity: 1; visibility: inherit; transform: none;
  min-width: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
}
.saitm-nav__links .saitm-mega .sub-menu .sub-menu::before { display: none; }
.saitm-nav__links .saitm-mega .sub-menu a:hover,
.saitm-nav__links .saitm-mega .sub-menu .current-menu-item > a { background: none; }

.saitm-nav__links .saitm-mega > .sub-menu > li > a,
.saitm-mega > .sub-menu > li > .saitm-menu-placeholder {
  padding: 0 0 .6rem; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--blue);
}
.saitm-nav__links .saitm-mega > .sub-menu > li > a:hover { color: var(--blue-dark); }

.saitm-nav__links .saitm-mega > .sub-menu > li > .sub-menu > .menu-item-has-children > a,
.saitm-mega > .sub-menu > li > .sub-menu > .menu-item-has-children > .saitm-menu-placeholder {
  padding: .7rem 0 .25rem; font-size: 12px; font-weight: 700; line-height: 1.35;
  letter-spacing: .06em; text-transform: uppercase; color: var(--blue-dark);
}

.saitm-nav__links .saitm-mega .sub-menu .sub-menu .sub-menu a,
.saitm-mega .sub-menu .sub-menu .sub-menu .saitm-menu-placeholder {
  position: relative; padding: .35rem 0 .35rem 1.5rem; font-size: 13.5px; font-weight: 400; line-height: 1.35; color: var(--text);
}
.saitm-mega .sub-menu .sub-menu .sub-menu a::before,
.saitm-mega .sub-menu .sub-menu .sub-menu .saitm-menu-placeholder::before {
  content: ""; position: absolute; left: 0; top: .5rem; width: 15px; height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234193ff' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 8h12M9.5 4l4 4-4 4'/%3E%3C/svg%3E") no-repeat center / contain;
}
.saitm-nav__links .saitm-mega .sub-menu .sub-menu .sub-menu a:hover { color: var(--blue); }

@media (min-width: 769px) {
  .saitm-nav__links > li.saitm-mega { position: static; }
  /* Keeps the panel open while the pointer moves from the link down to it. */
  .saitm-nav__links > li.saitm-mega > a { position: relative; }
  .saitm-nav__links > li.saitm-mega > a::after { content: ""; position: absolute; left: -1rem; right: -1.75rem; top: 100%; height: 34px; }
  .saitm-nav__links > li.saitm-mega > .sub-menu {
    top: 100%; left: 0; right: 0; width: auto; min-width: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.75rem 2.25rem;
    padding: 2rem max(var(--px-desktop), calc((100% - var(--max-w)) / 2)) 2.25rem;
    border: 0; border-top: 1px solid var(--border); border-radius: 0;
    box-shadow: 0 24px 40px -24px rgba(0, 32, 104, .35);
    max-height: calc(100vh - 72px); overflow-y: auto; overscroll-behavior: contain;
  }
  .saitm-nav__links > li.saitm-mega > .sub-menu::before { display: none; }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .saitm-nav { padding: 0 24px; }
  .saitm-nav__links { gap: 1.1rem; }
  .saitm-nav__links a { font-size: 13px; letter-spacing: .02em; }
}

@media (max-width: 768px) {
  .saitm-nav__links { max-height: calc(100vh - 60px); overflow-y: auto; overscroll-behavior: contain; }
  .saitm-nav__links > li { flex-wrap: wrap; width: 100%; border-bottom: 1px solid var(--surface-hi); }
  .saitm-nav__links > li > a { flex: 1; padding: .9rem 0; }
  .saitm-subnav-toggle { padding: .6rem; }
  .saitm-nav__links .sub-menu {
    position: static; display: none; opacity: 1; visibility: visible; transform: none;
    width: 100%; box-shadow: none; border: 0; padding: 0 0 .6rem .75rem; min-width: 0;
  }
  .saitm-nav__links .sub-menu::before { display: none; }
  .saitm-nav__links > li.is-open > .sub-menu { display: block; }
  .saitm-nav__links > li:hover > .sub-menu { opacity: 1; }
  .saitm-mega > .sub-menu > li { padding: .5rem 0 .75rem; }
  .saitm-mega > .sub-menu > li + li { border-top: 1px solid var(--surface-hi); }
  .saitm-nav__links .saitm-mega .sub-menu .sub-menu { display: block; }
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.saitm-page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 72px;
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(2.5rem, 2rem + 3vw, 4.5rem);
  background: var(--blue-dark);
  color: rgba(255, 255, 255, .86);
}
@media (max-width: 768px) { .saitm-page-hero { margin-top: 60px; } }
.saitm-page-hero__media { position: absolute; inset: 0; z-index: -2; }
.saitm-page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.saitm-page-hero--image::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0, 32, 104, .94) 0%, rgba(0, 32, 104, .82) 48%, rgba(0, 51, 153, .40) 100%);
}
.saitm-page-hero__title {
  font-family: var(--font-serif); font-weight: 600; color: var(--white);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); line-height: 1.12; letter-spacing: -.01em;
  max-width: 20em; margin-bottom: .5rem; text-wrap: balance;
}
.saitm-page-hero__lead { font-size: clamp(1rem, .95rem + .3vw, 1.2rem); line-height: 1.55; max-width: 40em; }

.saitm-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0 0 1.25rem; font-size: 13px; }
.saitm-crumbs li + li::before { content: "/"; margin: 0 .55em; opacity: .55; }
.saitm-crumbs a { color: rgba(255, 255, 255, .8); }
.saitm-crumbs a:hover { color: var(--white); text-decoration: underline; }
.saitm-crumbs [aria-current] { color: var(--white); }

/* ============================================================
   PAGE CONTENT & BLOCKS
   ============================================================ */
.saitm-page { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 clamp(3rem, 2rem + 4vw, 6rem); }
.saitm-page__content { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--px-desktop); }
@media (max-width: 768px) { .saitm-page__content { padding-inline: var(--px-mobile); } }

/* Default content column; wide and full alignments break out of it. */
.saitm-prose > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.saitm-prose > .alignwide, .saitm-prose > .wp-block-columns, .saitm-prose > .wp-block-table,
.saitm-prose > .wp-block-shortcode, .saitm-prose > .saitm-wide, .saitm-prose > .wp-block-gallery,
.saitm-prose > .saitm-depts, .saitm-prose > .saitm-curriculum, .saitm-prose > .saitm-partner-list,
.saitm-prose > .saitm-news-grid, .saitm-prose > .saitm-form-panel { max-width: 1072px; }
.saitm-prose > .alignfull {
  max-width: none; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}

.saitm-prose { color: var(--text-muted); font-size: 16.5px; line-height: 1.75; }
.saitm-prose > * + * { margin-top: 1.1em; }
.saitm-prose h2, .saitm-prose h3, .saitm-prose h4 {
  font-family: var(--font-serif); color: var(--blue-dark); line-height: 1.25; font-weight: 600; text-wrap: balance;
}
.saitm-prose h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-top: 2.2em; }
.saitm-prose h3 { font-size: 1.3rem; margin-top: 1.8em; }
.saitm-prose h4 { font-size: 1.05rem; margin-top: 1.5em; }
.saitm-prose > :first-child, .saitm-prose .wp-block-group__inner-container > :first-child,
.saitm-prose .wp-block-column > :first-child { margin-top: 0; }
.saitm-prose p.has-large-font-size, .saitm-prose .saitm-lead { font-size: 1.2rem; line-height: 1.6; color: var(--text); }
.saitm-prose a:not(.wp-block-button__link):not(.btn-primary):not(.saitm-text-link) {
  color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
}
.saitm-prose a:not(.wp-block-button__link):hover { text-decoration-thickness: 2px; }
.saitm-prose ul, .saitm-prose ol { padding-left: 1.25em; }
.saitm-prose li + li { margin-top: .4em; }
.saitm-prose strong { color: var(--text); }
.saitm-prose img { border-radius: var(--r-lg); }
.saitm-prose figcaption { font-size: 13px; color: var(--outline); margin-top: .5rem; text-align: left; }
.saitm-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem auto; }

/* Headings with a short blue rule (block style) */
.saitm-prose .is-style-saitm-rule::after { content: ""; display: block; width: 48px; height: 3px; background: var(--blue); margin-top: .7rem; }

/* Buttons */
.saitm-prose .wp-block-buttons { gap: .75rem; }
.saitm-prose .wp-block-button__link {
  background: var(--blue); color: var(--white); border-radius: var(--r);
  padding: .85rem 1.4rem; font-size: 14px; font-weight: 700; letter-spacing: .03em; text-decoration: none;
  transition: opacity .2s, box-shadow .2s;
}
.saitm-prose .wp-block-button__link:hover { opacity: .9; box-shadow: 0 6px 18px var(--glow-blue-soft); }
.saitm-prose .is-style-saitm-outline .wp-block-button__link, .saitm-prose .is-style-outline .wp-block-button__link { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.is-style-saitm-navy .is-style-saitm-outline .wp-block-button__link { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }

/* Light band and blue band (Group block styles) */
.saitm-prose > .is-style-saitm-band, .saitm-prose > .is-style-saitm-navy {
  max-width: none; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) max(var(--px-desktop), calc((100vw - 1072px) / 2));
}
.saitm-prose > .is-style-saitm-band + *, .saitm-prose > .is-style-saitm-navy + * { margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
* + .saitm-prose > .is-style-saitm-band { margin-top: 3rem; }
.saitm-prose > .is-style-saitm-band { background: var(--surface-lo); }
.saitm-prose > .is-style-saitm-navy { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: rgba(255, 255, 255, .86); }
.saitm-prose > .is-style-saitm-navy h2, .saitm-prose > .is-style-saitm-navy h3, .saitm-prose > .is-style-saitm-navy strong { color: var(--white); }
.saitm-prose > .is-style-saitm-navy a:not(.wp-block-button__link) { color: #bcd2ff; }
.saitm-prose > .is-style-saitm-navy .wp-block-button__link { background: var(--white); color: var(--blue); }
@media (max-width: 768px) {
  .saitm-prose > .is-style-saitm-band, .saitm-prose > .is-style-saitm-navy { padding-inline: var(--px-mobile); }
}
.is-style-saitm-band > *, .is-style-saitm-navy > * { max-width: 1072px; margin-left: auto; margin-right: auto; }
.is-style-saitm-band > * + *, .is-style-saitm-navy > * + * { margin-top: 1.1em; }

/* Card and notice (Group block styles) */
.saitm-prose .is-style-saitm-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(1.25rem, 1rem + 2vw, 2.25rem);
}
.saitm-prose .is-style-saitm-card > * + * { margin-top: .9em; }
.saitm-prose .is-style-saitm-notice {
  background: var(--surface-lo); border-left: 4px solid var(--blue); border-radius: var(--r-lg);
  padding: 1.1rem 1.4rem; color: var(--text);
}
.saitm-prose .is-style-saitm-notice > * { margin: 0; }
.saitm-prose .is-style-saitm-notice > * + * { margin-top: .5em; }

/* Checklist (List block style) */
.saitm-prose .is-style-saitm-checklist { list-style: none; padding-left: 0; }
.saitm-prose .is-style-saitm-checklist li { position: relative; padding-left: 1.9rem; }
.saitm-prose .is-style-saitm-checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px;
  background: var(--green); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Key facts row (Columns block style) */
.saitm-prose .is-style-saitm-facts { gap: 0 !important; border-top: 2px solid var(--blue); }
.saitm-prose .is-style-saitm-facts > .wp-block-column { padding: 1.1rem 1.25rem 1.1rem 0; border-bottom: 1px solid var(--border); }
.saitm-prose .is-style-saitm-facts > .wp-block-column + .wp-block-column { padding-left: 1.25rem; border-left: 1px solid var(--border); }
.saitm-prose .is-style-saitm-facts p { margin: 0; }
.saitm-prose .is-style-saitm-facts p:first-child { font-size: 12.5px; font-weight: 600; color: var(--outline); letter-spacing: .02em; }
.saitm-prose .is-style-saitm-facts p + p { font-family: var(--font-serif); font-size: 1.15rem; color: var(--blue-dark); line-height: 1.35; margin-top: .25rem; }
.is-style-saitm-navy .is-style-saitm-facts { border-top-color: rgba(255,255,255,.5); }
.is-style-saitm-navy .is-style-saitm-facts > .wp-block-column { border-color: rgba(255,255,255,.18); }
.is-style-saitm-navy .is-style-saitm-facts p:first-child { color: rgba(255,255,255,.75); }
.is-style-saitm-navy .is-style-saitm-facts p + p { color: var(--white); }
@media (max-width: 781px) {
  .saitm-prose .is-style-saitm-facts > .wp-block-column + .wp-block-column { padding-left: 0; border-left: 0; }
}

/* Columns spacing */
.saitm-prose .wp-block-columns { gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); }
.saitm-prose .wp-block-column > * + * { margin-top: 1em; }
.saitm-prose .wp-block-columns.are-vertically-aligned-center { align-items: center; }

/* Pull quote (Quote block style) */
.saitm-prose .is-style-saitm-pull {
  border-left: 3px solid var(--green); padding: .2rem 0 .2rem 1.5rem; margin-left: auto;
  font-family: var(--font-serif); font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); line-height: 1.4; color: var(--blue-dark);
}
.saitm-prose .is-style-saitm-pull cite { display: block; font-family: var(--font-sans); font-size: 14px; font-style: normal; color: var(--outline); margin-top: .8rem; }
.is-style-saitm-navy .is-style-saitm-pull { color: var(--white); border-left-color: var(--green-light); }

/* Tables */
.saitm-prose .wp-block-table { overflow-x: auto; }
.saitm-prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; background: var(--white); }
.saitm-prose .wp-block-table.is-style-saitm-table, .saitm-prose .is-style-saitm-table table { border: 1px solid var(--border); border-radius: var(--r-lg); }
.saitm-prose th, .saitm-prose td { text-align: left; padding: .8rem 1rem; border: 0; border-bottom: 1px solid var(--surface-hi); vertical-align: top; }
.saitm-prose thead th { background: var(--surface-lo); color: var(--blue-dark); font-weight: 600; border-bottom: 1px solid var(--border); }
.saitm-prose tbody tr:last-child td { border-bottom: 0; }
.saitm-prose tbody td:first-child { color: var(--text); font-weight: 600; }
.saitm-prose .wp-block-table figcaption { font-size: 13px; }

/* Images */
.saitm-prose .is-style-saitm-rounded img { border-radius: var(--r-xl); }
.saitm-prose .wp-block-image img { width: 100%; height: auto; }
.saitm-prose .wp-block-media-text { gap: 2rem; }

/* File downloads */
.saitm-prose .wp-block-file {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white);
}
.saitm-prose .wp-block-file + .wp-block-file { margin-top: .6rem; }
.saitm-prose .wp-block-file a:first-child { font-weight: 600; color: var(--blue-dark); text-decoration: none; }
.saitm-prose .wp-block-file a:first-child::before {
  content: ""; display: inline-block; width: 22px; height: 22px; vertical-align: -5px; margin-right: .5rem;
  background: var(--blue); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V9h5.5L13 3.5ZM8 13v5h1.4v-1.6h.8c1.1 0 1.8-.6 1.8-1.7S11.3 13 10.2 13H8Zm1.4 1.1h.7c.4 0 .6.2.6.6s-.2.6-.6.6h-.7v-1.2Zm3.2-1.1v5h1.7c1.5 0 2.3-.9 2.3-2.5s-.8-2.5-2.3-2.5h-1.7Zm1.4 1.1h.3c.7 0 1 .5 1 1.4s-.3 1.4-1 1.4H14v-2.8Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V9h5.5L13 3.5ZM8 13v5h1.4v-1.6h.8c1.1 0 1.8-.6 1.8-1.7S11.3 13 10.2 13H8Zm1.4 1.1h.7c.4 0 .6.2.6.6s-.2.6-.6.6h-.7v-1.2Zm3.2-1.1v5h1.7c1.5 0 2.3-.9 2.3-2.5s-.8-2.5-2.3-2.5h-1.7Zm1.4 1.1h.3c.7 0 1 .5 1 1.4s-.3 1.4-1 1.4H14v-2.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.saitm-prose .wp-block-file .wp-block-file__button {
  background: var(--surface-lo); color: var(--blue); border-radius: var(--r); padding: .45rem .9rem; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}

/* Gallery (core gallery with lightbox) */
.saitm-prose .wp-block-gallery { gap: .75rem; }
.saitm-prose .wp-block-gallery img { border-radius: var(--r-lg); }

/* ============================================================
   GALLERY PAGE — an index of albums by year, then each album as one
   sideways row of mixed modules: a tall photograph, a stacked pair,
   a wide photograph … The row starts on the text column and runs off
   the right edge; drag, swipe, scroll or use the arrow keys.
   ============================================================ */
.saitm-gallery-page .saitm-prose > .saitm-album,
.saitm-gallery-page .saitm-prose > .saitm-album-index { max-width: 1072px; }

.saitm-album-index { margin-bottom: clamp(4rem, 8vw, 7rem); }
.saitm-prose .saitm-album-index__title { margin: 0 0 1.5rem; font-size: clamp(26px, 2.4vw, 34px); }
.saitm-album-index__years { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.75rem 2.5rem; }
.saitm-prose .saitm-album-index__year h3 { margin: 0 0 .5rem; font-family: var(--font-serif); font-size: 24px; color: var(--blue-dark); }
.saitm-album-index__year ul { list-style: none; margin: 0; padding: 0; }
.saitm-prose .saitm-album-index__year li { margin: 0; }
.saitm-prose .saitm-album-index .saitm-album-index__year a:not(.wp-block-button__link) {
  display: block; padding: .3rem 0; font-size: 16px; line-height: 1.4; color: var(--text); text-decoration: none;
}
.saitm-prose .saitm-album-index .saitm-album-index__year a:not(.wp-block-button__link):hover { color: var(--blue); text-decoration: underline; }

.saitm-prose > .saitm-album + .saitm-album { margin-top: clamp(4rem, 8vw, 7rem); }
.saitm-album { scroll-margin-top: 96px; }
.saitm-album__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 2rem; margin-bottom: 1.5rem; }
.saitm-prose .saitm-album__head h2 { margin: 0; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; scroll-margin-top: 96px; }
.saitm-prose .saitm-album__head .is-style-saitm-rule::after { display: none; }
.saitm-prose .saitm-album__meta { display: flex; gap: 1.25rem; margin: 0; font-size: 16px; color: var(--text-muted); }

/* The row: full bleed, first module on the text column's left edge. */
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images {
  /* Inset = the text column's left edge (page margin, or centred 1072px column). */
  --row-h: clamp(320px, 66svh, 620px); --gap: 12px; --inset: max(var(--px-desktop), calc((100vw - 1072px) / 2));
  display: grid; grid-auto-flow: column; grid-auto-columns: max-content;
  grid-template-rows: repeat(2, calc((var(--row-h) - var(--gap)) / 2));
  gap: var(--gap); flex-wrap: nowrap;
  width: 100vw; max-width: none; margin: 0 0 0 calc(-1 * var(--inset));
  padding: 0 var(--inset) 0 0; scroll-padding-inline: var(--inset);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab;
}
.saitm-gallery-page .saitm-album .wp-block-gallery::-webkit-scrollbar { display: none; }
/* A slanted brand-colour block fills the space before the first photograph; it scrolls away with the row. */
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images::before {
  content: ""; grid-row: 1 / span 2; width: calc(var(--inset) - var(--gap)); height: 100%;
  background: var(--blue); clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%);
}
.saitm-gallery-page .saitm-album:nth-of-type(3n+2) .wp-block-gallery.has-nested-images::before { background: var(--green); clip-path: polygon(0 0, 58% 0, 100% 100%, 0 100%); }
.saitm-gallery-page .saitm-album:nth-of-type(3n) .wp-block-gallery.has-nested-images::before { background: var(--blue-dark); }
.saitm-gallery-page .saitm-album .wp-block-gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.saitm-gallery-page .saitm-album .wp-block-gallery:focus-visible { outline-offset: -3px; }

.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:not(#saitm-row) {
  display: block; position: relative; overflow: hidden; margin: 0; max-width: none; height: 100%;
  width: calc((var(--row-h) - var(--gap)) / 2 * 4 / 3); /* stacked pair: two 4:3 photographs */
  scroll-snap-align: start; border-radius: 0;
}
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n+1):not(#saitm-row),
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n+7):not(#saitm-row) {
  grid-row: span 2; width: calc(var(--row-h) * 3 / 4); /* tall 3:4 */
}
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n+4):not(#saitm-row),
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n):not(#saitm-row) {
  grid-row: span 2; width: calc(var(--row-h) * 1.6); /* wide 16:10 */
}
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:not(#saitm-row) img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1); -webkit-user-drag: none; user-select: none;
}
.saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:not(#saitm-row):hover img { transform: scale(1.03); }

@media (max-width: 768px) {
  .saitm-album__head { margin-bottom: 1rem; }
  .saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images { --row-h: clamp(300px, 60svh, 520px); --gap: 8px; --inset: var(--px-mobile); }
  .saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:not(#saitm-row) { width: 64vw; }
  .saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n+1):not(#saitm-row),
  .saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n+7):not(#saitm-row) { width: 72vw; }
  .saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n+4):not(#saitm-row),
  .saitm-gallery-page .saitm-album .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(8n):not(#saitm-row) {
    width: 88vw; height: 55vw; align-self: center;
  }
  .saitm-album-index__years { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
}
@media (max-width: 600px) {
  .saitm-album__head { flex-direction: column; gap: .35rem; }
}

/* Small helpers */
.saitm-text-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; color: var(--blue); }
.saitm-text-link:hover { text-decoration: underline; }
.saitm-text-link .material-symbols-outlined { font-size: 18px; }

/* ============================================================
   DEPARTMENTS EXPLORER
   ============================================================ */
.saitm-depts__filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.saitm-chip {
  font: 600 14px/1 var(--font-sans); padding: .7rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white); color: var(--blue-dark); cursor: pointer;
}
.saitm-chip span { font-weight: 400; opacity: .7; margin-left: .2em; }
.saitm-chip:hover { border-color: var(--blue); }
.saitm-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.saitm-depts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 1rem; }
.saitm-dept { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); transition: border-color .15s; }
.saitm-dept[hidden] { display: none; }
.saitm-dept:hover { border-color: var(--outline); }
.saitm-dept[open] { grid-column: 1 / -1; border-color: var(--blue); box-shadow: 0 10px 30px -18px rgba(0, 32, 104, .35); }
.saitm-dept summary { list-style: none; cursor: pointer; display: grid; gap: .3rem; padding: 1.15rem 1.25rem; }
.saitm-dept summary::-webkit-details-marker { display: none; }
.saitm-dept__phase { font-size: 12.5px; color: var(--outline); }
.saitm-prose .saitm-dept__name, .saitm-dept__name { font-family: var(--font-serif); font-size: 1.12rem; font-weight: 600; color: var(--blue-dark); line-height: 1.3; margin: 0; }
.saitm-dept__head { font-size: 14px; color: var(--text-muted); line-height: 1.45; }
.saitm-dept__more { display: inline-flex; align-items: center; gap: .15rem; font-size: 14px; font-weight: 600; color: var(--blue); margin-top: .25rem; }
.saitm-dept__more .material-symbols-outlined { font-size: 20px; transition: transform .15s; }
.saitm-dept[open] .saitm-dept__more .material-symbols-outlined { transform: rotate(180deg); }
.saitm-dept__body {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem;
  border-top: 1px solid var(--surface-hi); padding: 1.25rem 1.25rem 1.5rem;
}
.saitm-dept__content { font-size: 15px; }
.saitm-dept__content > * { max-width: none; }
.saitm-dept__content h4, .saitm-dept__staff h4 { font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: .03em; color: var(--outline); margin: 1.4em 0 .5em; }
.saitm-dept__staff h4 { margin-top: 0; }
@media (max-width: 760px) { .saitm-dept__body { grid-template-columns: 1fr; } }

/* People */
.saitm-people { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.4rem 1.5rem; }
.saitm-people--compact { grid-template-columns: 1fr; gap: .9rem; }
.saitm-person { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: .85rem; align-items: center; margin: 0 !important; }
.saitm-person__photo, .saitm-person__initials { width: 3.25rem; height: 3.25rem; border-radius: 50% !important; object-fit: cover; object-position: top; }
.saitm-person__initials { display: grid; place-items: center; background: var(--surface-lo); color: var(--blue); font-family: var(--font-serif); font-weight: 600; }
.saitm-person strong { display: block; color: var(--text); font-size: 15px; line-height: 1.3; }
.saitm-person span { display: block; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }

/* ============================================================
   MBBS CURRICULUM MATRIX
   ============================================================ */
.saitm-curriculum { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white); }
.saitm-curriculum table { min-width: 760px; font-size: 14px; }
.saitm-curriculum th[scope="row"] { font-weight: 500; color: var(--text); white-space: nowrap; }
.saitm-curriculum__sem { text-align: center !important; width: 3.1rem; }
.saitm-curriculum__sem abbr { text-decoration: none; }
.saitm-curriculum__years td { background: var(--surface-lo); font-size: 12px; color: var(--outline); text-align: center !important; padding: .35rem !important; border-left: 1px solid var(--border) !important; font-weight: 400 !important; }
.saitm-curriculum__group th { background: var(--surface); font-family: var(--font-serif); font-size: 1.05rem; color: var(--blue-dark); padding-top: 1rem !important; }
.saitm-curriculum__cell { padding: .3rem !important; position: relative; border-left: 1px solid var(--surface-hi) !important; }
.saitm-curriculum__cell.is-on::before { content: ""; position: absolute; inset: .55rem 0; background: var(--blue); }
.saitm-curriculum__cell.is-on:last-child::before { right: 4px; border-radius: 0 3px 3px 0; }

/* ============================================================
   NEWS
   ============================================================ */
.saitm-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.75rem; }
@media (max-width: 960px) { .saitm-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .saitm-news-grid { grid-template-columns: 1fr; } }
.saitm-news-card { display: flex; flex-direction: column; }
.saitm-news-card__media { display: block; border-radius: var(--r-lg); overflow: hidden; margin-bottom: .9rem; background: var(--surface-lo); }
.saitm-news-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s; border-radius: 0 !important; }
.saitm-news-card:hover .saitm-news-card__media img { transform: scale(1.03); }
.saitm-news-card__meta { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; font-size: 12.5px; color: var(--outline); margin-bottom: .35rem; }
.saitm-news-card__tag { font-weight: 700; color: var(--green); }
.saitm-prose .saitm-news-card__title, .saitm-news-card__title { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.35; font-weight: 600; margin: 0 0 .4rem; }
.saitm-news-card__title a { color: var(--blue-dark) !important; text-decoration: none !important; }
.saitm-news-card__title a:hover { color: var(--blue) !important; text-decoration: underline !important; }
.saitm-news-card__excerpt { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0; }
.saitm-news-archive { max-width: var(--max-w); }
/* News page: the latest story leads, then a year-by-year list of rows in
   alternating tones, with year tabs in a sticky column on the left. */

.saitm-news-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
.saitm-news-lead__media { grid-column: 1 / -1; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.saitm-news-lead__media { display: block; overflow: hidden; border-radius: var(--r); background: var(--surface-lo); }
.saitm-news-lead__media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.saitm-news-lead:hover .saitm-news-lead__media img { transform: scale(1.03); }
.saitm-news-lead__meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: 1rem; font-size: 16px; color: var(--text-muted); }
.saitm-news-lead__meta span { font-weight: 600; color: var(--blue-dark); }
.saitm-news-lead__title { margin: 0; font-family: var(--font-serif); font-size: clamp(28px, 2.8vw, 42px); line-height: 1.15; letter-spacing: -.015em; font-weight: 600; }
.saitm-news-lead__title a { color: var(--blue-dark); }
.saitm-news-lead__title a:hover { color: var(--blue); }
.saitm-news-lead__excerpt { font-size: 18px; line-height: 1.55; color: var(--text); }
.saitm-news-lead__more { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: 1rem; font-weight: 600; color: var(--blue); }
.saitm-news-lead__more span { transition: transform .2s ease; }
.saitm-news-lead:hover .saitm-news-lead__more span { transform: translateX(4px); }

.saitm-news-ledger { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 2.5rem; margin-top: clamp(4rem, 8vw, 7rem); scroll-margin-top: 96px; }
.saitm-news-years { position: sticky; top: 96px; align-self: start; display: grid; gap: 6px; }
.saitm-news-year {
  display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: .5rem 1rem;
  background: var(--surface-lo); color: var(--blue-dark); border-radius: var(--r);
  transition: background .2s, color .2s;
}
.saitm-news-year:hover { background: var(--surface-hi); }
.saitm-news-year[aria-current="true"] { background: var(--blue-dark); color: var(--white); }
.saitm-news-year__label { font-family: var(--font-serif); font-size: 20px; font-weight: 600; line-height: 1.2; }
.saitm-news-year__count { font-size: 14px; opacity: .85; }

.saitm-news-group + .saitm-news-group { margin-top: 3.5rem; }
.saitm-news-group[hidden] { display: none; }
.saitm-news-group__year { margin: 0 0 1rem; font-family: var(--font-serif); font-size: 32px; font-weight: 600; line-height: 1.1; color: var(--blue-dark); scroll-margin-top: 96px; }
.saitm-news-bands { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.saitm-news-band {
  position: relative; display: grid; align-items: center; gap: .5rem 1.5rem;
  grid-template-columns: 76px minmax(0, 1fr) 140px 176px;
  min-height: 96px; padding: 12px 12px 12px 20px; border-radius: var(--r);
  background: var(--white); transition: background .2s;
}
.saitm-news-bands > li:nth-child(even) .saitm-news-band { background: var(--surface-lo); }
.saitm-news-band:hover { background: var(--blue-fixed) !important; }
.saitm-news-band__meta { display: contents; }
.saitm-news-band__date { grid-column: 1; grid-row: 1; font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--blue-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.saitm-news-band__tag { grid-column: 3; grid-row: 1; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.saitm-news-band__text { grid-column: 2; grid-row: 1; }
.saitm-news-band__title { font-family: var(--font-sans); font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0; }
.saitm-news-band__title a { color: var(--text); }
.saitm-news-band__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.saitm-news-band:hover .saitm-news-band__title a { color: var(--blue); }
.saitm-news-band__title a:focus-visible { outline: none; }
.saitm-news-band:focus-within { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.saitm-news-band__excerpt {
  margin: .25rem 0 0; font-size: 16px; line-height: 1.5; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.saitm-news-band__thumb { grid-column: 4; grid-row: 1; width: 176px; height: 117px; object-fit: cover; border-radius: var(--r); }

@media (max-width: 960px) {
  .saitm-news-lead { grid-template-columns: 1fr; }
  .saitm-news-lead__media img { aspect-ratio: 3 / 2; }
  .saitm-news-lead__text { margin-top: 1rem; }
  .saitm-news-band { grid-template-columns: 76px minmax(0, 1fr) 176px; }
  .saitm-news-band__tag { grid-column: 2; grid-row: 2; }
  .saitm-news-band__thumb { grid-column: 3; grid-row: 1 / 3; }
}

/* Phone: tabs become a sticky sideways row; each row stacks date, headline and summary, with the photo top right. */
@media (max-width: 768px) {
  .saitm-news-ledger { display: block; scroll-margin-top: 60px; }
  .saitm-news-years {
    top: 60px; z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--px-mobile)) 1.5rem; padding: 10px var(--px-mobile); background: var(--surface);
  }
  .saitm-news-years::-webkit-scrollbar { display: none; }
  .saitm-news-year { flex: 0 0 auto; min-height: 56px; padding: .4rem .9rem; }
  .saitm-news-year__label { font-size: 18px; }
  .saitm-news-group__year { font-size: 26px; scroll-margin-top: 140px; }
  .saitm-news-band { grid-template-columns: minmax(0, 1fr) 88px; align-items: start; gap: .35rem 1rem; padding: 16px; }
  .saitm-news-band__text { display: contents; }
  .saitm-news-band__title { grid-column: 1; grid-row: 2; }
  .saitm-news-band__excerpt { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
  .saitm-news-band__meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; grid-column: 1; grid-row: 1; }
  .saitm-news-band__date { font-size: 17px; }
  .saitm-news-band__title { font-size: 17px; }
  .saitm-news-band__excerpt { -webkit-line-clamp: 2; }
  .saitm-news-band__thumb { grid-column: 2; grid-row: 1 / 3; width: 88px; height: 64px; }
  .saitm-news-band:not(:has(.saitm-news-band__thumb)) .saitm-news-band__title { grid-column: 1 / -1; }
}
.saitm-pagination { margin-top: 3rem; }
.saitm-pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.saitm-pagination .page-numbers { padding: .55rem .9rem; border: 1px solid var(--border); border-radius: var(--r); color: var(--blue-dark); font-weight: 600; font-size: 14px; }
.saitm-pagination .page-numbers.current { background: var(--blue); border-color: var(--blue); color: var(--white); }
.saitm-post__meta { display: flex; gap: .75rem; align-items: center; font-size: 14px; color: var(--outline); }
.saitm-post__image img { width: 100%; border-radius: var(--r-xl); }
.saitm-post__back { margin-top: 3rem !important; }

/* ============================================================
   PARTNERS LIST
   ============================================================ */
.saitm-partner-list { border-top: 1px solid var(--border); }
.saitm-partner-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.75rem; padding: 1.75rem 0; border-bottom: 1px solid var(--border); margin: 0 !important; }
.saitm-partner-row__logo { width: 8rem; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: .6rem; overflow: hidden; }
.saitm-partner-row__logo img { max-height: 100%; width: auto; object-fit: contain; border-radius: 0 !important; }
.saitm-partner-row__logo span { font-family: var(--font-serif); font-weight: 700; color: var(--blue); font-size: 1.3rem; }
.saitm-partner-row h3 { margin: 0 0 .2rem !important; font-size: 1.2rem !important; }
.saitm-partner-row__loc { font-size: 14px; color: var(--outline); margin: 0 0 .6rem !important; }
.saitm-partner-row .saitm-prose > * { max-width: none; }
@media (max-width: 560px) { .saitm-partner-row { grid-template-columns: 1fr; } }

/* ============================================================
   FORMS
   ============================================================ */
.saitm-form-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); scroll-margin-top: 96px; }
.saitm-form { display: grid; gap: 1.15rem; }
.saitm-form__note { font-size: 13px; color: var(--outline); margin: 0 !important; }
.saitm-form__row { display: grid; gap: 1.15rem; margin: 0 !important; }
.saitm-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
@media (max-width: 640px) { .saitm-form__row--2 { grid-template-columns: 1fr; } }
.saitm-field { display: grid; gap: .35rem; align-content: start; }
.saitm-field label { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--blue-dark); }
.saitm-field__hint { font-size: 12.5px; color: var(--outline); line-height: 1.4; }
.saitm-field input, .saitm-field select, .saitm-field textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface-subtle);
  border: 1px solid var(--border); border-radius: var(--r); padding: .75rem .85rem; width: 100%;
}
.saitm-field textarea { min-height: 8rem; resize: vertical; }
.saitm-field input:focus-visible, .saitm-field select:focus-visible, .saitm-field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); background: var(--white); }
.saitm-field--invalid input, .saitm-field--invalid select, .saitm-field--invalid textarea { border-color: var(--error); }
.saitm-field__error { font-size: 12.5px; font-weight: 700; color: var(--error); }
.saitm-req { color: var(--error); }
.saitm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.saitm-form__submit { display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; }
.saitm-form__submit .material-symbols-outlined { font-size: 20px; }
.saitm-form__submit[aria-busy="true"] { opacity: .7; cursor: progress; }
.saitm-form-status { padding: 1rem 1.2rem; border-radius: var(--r-lg); font-weight: 600; margin-bottom: 1.15rem; }
.saitm-form-status--ok { background: #e2f5ea; color: #145c39; margin-bottom: 0; }
.saitm-form-status--error { background: #fdecea; color: #8a1c13; }

/* ============================================================
   404
   ============================================================ */
.saitm-404 { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (prefers-reduced-motion: reduce) {
  .saitm-news-card__media img, .saitm-nav__links .sub-menu, .saitm-dept__more .material-symbols-outlined { transition: none; }
}

/* Leadership row on the Faculty of Medicine page */
.saitm-prose .is-style-saitm-avatar img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; }
.saitm-prose .saitm-person-card { font-size: 14px; line-height: 1.5; margin-top: .75rem; }
.saitm-prose .saitm-person-card strong { font-size: 15px; }

/* WP Social appends a share box to every page; with no networks enabled it is
   an empty list that still takes up space. Hide it until a network is enabled. */
.xs_social_share_widget:not(:has(li)) { display: none !important; }

/* When a page ends with a full-width band, let it meet the footer (as on the homepage).
   The (hidden) share box is ignored when deciding what the last block is. */
.saitm-page:has(> .saitm-page__content > .is-style-saitm-navy:nth-last-child(1 of :not(.xs_social_share_widget))),
.saitm-page:has(> .saitm-page__content > .is-style-saitm-band:nth-last-child(1 of :not(.xs_social_share_widget))) { padding-bottom: 0; }

/* Footer menus: WordPress outputs <li> items here, so remove list bullets. */
.saitm-footer__col li { list-style: none; margin: 0; padding: 0; }
.saitm-footer__col .sub-menu { display: none; }
/* Email in the contact column matches the phone row, not the menu links. */
.saitm-footer__contact-row a { display: inline; font-size: inherit; margin: 0; }

/* Material Symbols: until the icon font has loaded, browsers show the icon's
   name as text ("expand_more"). Keep each icon one glyph wide and invisible
   until the font is ready (html.saitm-icons-ready is set by saitm-pages.js). */
.material-symbols-outlined { display: inline-block; width: 1em; overflow: hidden; white-space: nowrap; }
html.saitm-js:not(.saitm-icons-ready) .material-symbols-outlined { color: transparent !important; }

/* Compact forms */
.saitm-form-panel { padding: clamp(1.1rem, .9rem + 1.5vw, 1.75rem); }
.saitm-form, .saitm-form__row { gap: .9rem; }
.saitm-field input, .saitm-field select, .saitm-field textarea { padding: .6rem .75rem; font-size: 14.5px; }
.saitm-field textarea { min-height: 5.5rem; }
.saitm-field label { font-size: 12.5px; }
.saitm-field input, .saitm-field select { height: 2.75rem; line-height: 1.2; }

/* Button arrows: take no space until hover, so buttons are evenly padded. */
.btn-primary__arrow { max-width: 0; overflow: hidden; transition: opacity .25s ease, transform .25s ease, margin-left .25s ease, max-width .25s ease; }
.btn-primary:hover .btn-primary__arrow { max-width: 1.5em; }

/* Homepage contact form: a normal-sized button instead of a full-width bar. */
.saitm-contact__submit { width: auto; align-self: flex-start; justify-self: start; padding: 14px 32px; }
@media (max-width: 480px) { .saitm-contact__submit { width: 100%; } }

/* ============================================================
   FOOTER (v2)
   ============================================================ */
.saitm-footer--v2 { position: relative; overflow: hidden; isolation: isolate; padding: 0 0 1.75rem; background: #172231; }
.saitm-footer--v2::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 55%, var(--green) 100%);
}
.saitm-footer__rings { position: absolute; z-index: -1; width: 540px; right: -5px; bottom: -190px; color: #fff; opacity: .04; pointer-events: none; }
@media (max-width: 640px) { .saitm-footer__rings { width: 360px; right: -4px; bottom: -120px; } }

.saitm-footer__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  padding: 2.75rem 0 2.25rem; border-bottom: 1px solid rgba(255, 255, 255, .09); margin-bottom: 2.75rem;
}
.saitm-footer__identity { display: flex; align-items: center; gap: 1rem; color: var(--white); }
.saitm-footer__crest { flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.saitm-footer__crest img { width: 100%; height: 100%; border-radius: 50%; }
.saitm-footer__name { display: block; font-family: var(--font-serif); font-size: clamp(1.05rem, .95rem + .5vw, 1.35rem); font-weight: 600; line-height: 1.25; }
.saitm-footer__motto { display: block; font-family: var(--font-serif); font-style: italic; font-size: 14px; color: var(--green-light); margin-top: .2rem; }

.saitm-footer__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.saitm-footer__action {
  display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.15rem; border-radius: var(--r-lg);
  font-size: 14px; font-weight: 600; color: var(--white); border: 1px solid rgba(255, 255, 255, .28);
  transition: background .2s, border-color .2s, transform .2s;
}
.saitm-footer__action .material-symbols-outlined { font-size: 19px; }
.saitm-footer__action:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .55); color: var(--white); transform: translateY(-1px); }
.saitm-footer__action--primary { background: var(--white); color: var(--blue-dark); border-color: var(--white); }
.saitm-footer__action--primary:hover { background: var(--surface-lo); color: var(--blue-dark); }

.saitm-footer--v2 .saitm-footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 2.5rem; margin-bottom: 2.75rem; }
.saitm-footer--v2 .saitm-footer__heading { font-family: var(--font-sans); line-height: 1.3; color: var(--white); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1.1rem; }
.saitm-footer--v2 .saitm-footer__brand p { font-size: 13.5px; line-height: 1.7; color: #9da9bd; opacity: 1; max-width: 30em; }

.saitm-footer__links { list-style: none; display: grid; gap: .6rem; }
.saitm-footer--v2 .saitm-footer__col .saitm-footer__links a {
  display: inline; margin: 0; font-size: 14.5px; color: #b4bfd0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color .2s, background-size .25s ease;
}
.saitm-footer--v2 .saitm-footer__col .saitm-footer__links a:hover { color: var(--white); background-size: 100% 1px; }

.saitm-footer__contact-list { list-style: none; display: grid; gap: .8rem; }
.saitm-footer__contact-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: .65rem; align-items: start; font-size: 13.5px; line-height: 1.55; color: #b4bfd0; }
.saitm-footer__contact-list .material-symbols-outlined { font-size: 19px; color: var(--blue-light); margin-top: 1px; }
.saitm-footer--v2 .saitm-footer__contact-list a { display: inline; margin: 0; font-size: inherit; color: #b4bfd0; }
.saitm-footer--v2 .saitm-footer__contact-list a:hover { color: var(--white); text-decoration: underline; }

.saitm-footer__social { list-style: none; display: flex; gap: .5rem; margin-top: 1.25rem; }
.saitm-footer__social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .07); color: #c9d2e0; transition: background .2s, color .2s; }
.saitm-footer__social a:hover { background: var(--blue); color: var(--white); }
.saitm-footer__social svg { width: 18px; height: 18px; fill: currentColor; }

.saitm-footer--v2 .saitm-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .09); padding-top: 1.5rem; font-size: 12.5px; color: #8a96aa; }
.saitm-footer--v2 .saitm-footer__bottom-links { align-items: center; }
.saitm-footer__top-link { display: inline-flex; align-items: center; gap: .3rem; padding-left: 1.5rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.saitm-footer__top-link .material-symbols-outlined { font-size: 16px; transition: transform .2s; }
.saitm-footer__top-link:hover .material-symbols-outlined { transform: translateY(-2px); }

@media (max-width: 1024px) { .saitm-footer--v2 .saitm-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .saitm-footer--v2 .saitm-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .saitm-footer--v2 .saitm-footer__brand, .saitm-footer--v2 .saitm-footer__contact { grid-column: 1 / -1; }
  .saitm-footer__actions { width: 100%; }
  .saitm-footer__action { flex: 1; justify-content: center; }
  .saitm-footer--v2 .saitm-footer__bottom-links { flex-wrap: wrap; justify-content: center; }
  .saitm-footer__top-link { border-left: 0; padding-left: 0; }
}

/* ============================================================
   MOTION (only with html.saitm-anim: JS on, reduced motion off)
   ============================================================ */
/* Page hero: one short entrance. */
.saitm-anim .saitm-page-hero__inner > * { animation: saitm-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.saitm-anim .saitm-page-hero__inner > :nth-child(2) { animation-delay: .08s; }
.saitm-anim .saitm-page-hero__inner > :nth-child(3) { animation-delay: .16s; }
@keyframes saitm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Scroll reveal: small fade-up, slight stagger inside grids. */
.saitm-anim .saitm-reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--saitm-delay, 0ms); }
.saitm-anim .saitm-reveal.is-in { opacity: 1; transform: none; }

/* Curriculum bars grow across the semesters. */
.saitm-anim .saitm-bars .saitm-curriculum__cell.is-on::before { transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.saitm-anim .saitm-bars.is-in .saitm-curriculum__cell.is-on::before { transform: scaleX(1); }
.saitm-anim .saitm-bars.is-in td:nth-child(3)::before { transition-delay: .05s; }
.saitm-anim .saitm-bars.is-in td:nth-child(4)::before { transition-delay: .1s; }
.saitm-anim .saitm-bars.is-in td:nth-child(5)::before { transition-delay: .15s; }
.saitm-anim .saitm-bars.is-in td:nth-child(6)::before { transition-delay: .2s; }
.saitm-anim .saitm-bars.is-in td:nth-child(7)::before { transition-delay: .25s; }
.saitm-anim .saitm-bars.is-in td:nth-child(8)::before { transition-delay: .3s; }
.saitm-anim .saitm-bars.is-in td:nth-child(9)::before { transition-delay: .35s; }
.saitm-anim .saitm-bars.is-in td:nth-child(10)::before { transition-delay: .4s; }
.saitm-anim .saitm-bars.is-in td:nth-child(11)::before { transition-delay: .45s; }

/* Gentle hover feedback on cards. */
.saitm-news-card, .saitm-dept { transition: transform .2s ease, border-color .15s, box-shadow .2s; }
.saitm-news-card:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .saitm-anim .saitm-reveal { opacity: 1 !important; transform: none !important; }
  .saitm-news-card:hover { transform: none; }
}
.saitm-footer__ring-word { font-family: var(--font-sans); font-weight: 500; }

/* ============================================================
   CHAIRMAN'S LETTER (page-letter.php)
   A sticky sidebar (portrait, quotation, PDF) beside the letter. On phones
   the portrait comes first, then the letter, then the quotation and PDF.
   ============================================================ */
.saitm-letter-page .saitm-page-hero--image { background: var(--blue-dark); }
.saitm-letter-page .saitm-page-hero__media img { object-position: 60% 45%; }
.saitm-letter-page .saitm-page-hero--image::before {
  background: linear-gradient(90deg, rgba(0, 32, 104, .95) 0%, rgba(0, 32, 104, .82) 38%, rgba(0, 32, 104, .35) 75%, rgba(0, 32, 104, .2) 100%);
}
.saitm-letter-page .saitm-page-hero__title { max-width: 16em; }
.saitm-letter-page .saitm-page-hero__title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 1.25rem; background: var(--blue-light); }
@media (max-width: 768px) {
  .saitm-letter-page .saitm-page-hero__media img { object-position: 62% 50%; }
  .saitm-letter-page .saitm-page-hero--image::before { background: rgba(0, 32, 104, .8); }
}
.saitm-letter { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 clamp(3.5rem, 2rem + 5vw, 7rem); }
.saitm-letter__grid {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start;
}
.saitm-letter__aside {
  display: grid; gap: 1.25rem;
  padding: 1.25rem; background: var(--white); border-radius: var(--r-xl);
  box-shadow: 0 10px 30px -18px rgba(0, 32, 104, .35);
}
/* The card stays in view while the letter scrolls only where the screen is tall enough to show all of it. */
@media (min-height: 860px) { .saitm-letter__aside { position: sticky; top: 96px; } }
.saitm-letter__portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--r-lg); }
.saitm-letter__name { margin: 1rem 0 .4rem; font-family: var(--font-sans); font-size: 20px; font-weight: 700; color: var(--blue-dark); }
.saitm-letter__role { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-muted); }


.saitm-letter__pdf { display: grid; gap: .75rem; padding: 1.25rem; background: var(--surface-lo); border-radius: var(--r-xl); }
.saitm-letter__pdf-head { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: .25rem; }
.saitm-letter__pdf-head svg { width: 36px; height: 36px; flex: none; color: var(--blue); }
.saitm-letter__pdf-head h2 { margin: 0 0 .2rem; font-family: var(--font-sans); font-size: 16px; font-weight: 700; color: var(--blue-dark); }
.saitm-letter__pdf-head p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.saitm-letter__btn {
  display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: 0 1rem;
  border: 1.5px solid var(--blue); border-radius: var(--r); background: var(--white); color: var(--blue);
  font-size: 15px; font-weight: 600; transition: background .2s, color .2s, transform .15s;
}
.saitm-letter__btn svg { width: 18px; height: 18px; }
.saitm-letter__btn:hover { background: var(--blue-fixed); color: var(--blue-dark); }
.saitm-letter__btn--fill { background: var(--blue); color: var(--white); }
.saitm-letter__btn--fill:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.saitm-letter__btn:active { transform: scale(.98); }

.saitm-letter__salutation {
  display: flex; align-items: center; gap: .6rem; margin: 0 0 1.75rem; padding-bottom: 1rem; position: relative;
  font-family: var(--font-sans); font-size: clamp(22px, 2vw, 26px); font-weight: 700; color: var(--blue);
}
.saitm-letter__salutation svg { width: 22px; height: 22px; flex: none; }
.saitm-letter__salutation::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: var(--blue); }

.saitm-letter__text { max-width: 760px; font-size: 16.5px; line-height: 1.8; color: var(--text); }
.saitm-letter__text .e-con, .saitm-letter__text .e-con-inner { --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; padding: 0; }
.saitm-letter__text p, .saitm-letter__text .elementor-widget-text-editor p { margin: 0 0 1.1em; font-family: var(--font-sans); font-size: inherit; line-height: inherit; color: inherit; }
.saitm-letter__text .elementor-widget-button:has(a[href$=".pdf"]) { display: none; }
.saitm-letter__text .saitm-letter__subhead { margin: 2.2em 0 .8em; font-family: var(--font-serif); font-size: 21px; font-weight: 600; color: var(--blue-dark); }
.saitm-letter__text .saitm-letter__callout {
  position: relative; margin: 2em 0; padding: 1.5rem 1.75rem 1.5rem 4.5rem;
  background: var(--surface-lo); border-left: 4px solid var(--blue); border-radius: var(--r-xl);
  font-weight: 500; color: var(--blue-dark);
}
.saitm-letter__callout::before {
  content: ""; position: absolute; left: 1.5rem; top: 1.55rem; width: 30px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003399' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10Z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.saitm-letter__text .saitm-letter__sign { margin-top: 2em; padding-left: 1.1rem; border-left: 3px solid var(--blue); line-height: 1.7; }
.saitm-letter__sign strong:first-child { font-size: 18px; letter-spacing: .02em; color: var(--blue); }

@media (max-width: 960px) {
  .saitm-letter__grid { grid-template-columns: 1fr; }
  .saitm-letter__aside { display: contents; }
  .saitm-letter__profile {
    display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: center;
    padding: 1rem; background: var(--white); border-radius: var(--r-xl); box-shadow: 0 10px 30px -18px rgba(0, 32, 104, .35);
  }
  .saitm-letter__portrait { height: auto; aspect-ratio: 1; border-radius: 50%; }
  .saitm-letter__name { margin-top: 0; font-size: 18px; }
  .saitm-letter__role { font-size: 14px; }
  .saitm-letter__body { order: 1; }
  .saitm-letter__pdf { order: 2; }
  .saitm-letter__text .saitm-letter__callout { padding: 1.25rem 1.25rem 1.25rem 3.75rem; }
  .saitm-letter__callout::before { left: 1.1rem; top: 1.35rem; width: 26px; height: 26px; }
}

/* ============================================================
   HERO TYPEWRITER — centred, line by line
   Line breaks are measured from a hidden copy of the full phrase, then each
   line types from the centre. The caret takes no width.
   ============================================================ */
.saitm-hero__content { max-width: 940px; }
.saitm-hero__title { position: relative; }
.saitm-hero__title-type { display: block; width: 100%; }
.saitm-hero__line { display: block; text-align: center; }
.saitm-hero__measure {
  position: absolute; left: 0; right: 0; top: 0; visibility: hidden; pointer-events: none;
  text-align: center; text-wrap: balance;
}
.saitm-hero__caret { margin: 0 -3px 0 0; position: relative; left: 1px; }
.saitm-hero__desc { max-width: 720px; margin-left: auto; margin-right: auto; }
