/* ITM IDM — footer styles. From v1.2 shared/css/footer.css, unchanged. */
/* ============================================================
   ITM BBA Website — Footer Component Styles
   Styles the class-based markup in shared/footer/footer.html.
   Values are taken from the original footer's inline styles.
   ============================================================ */

/* ---- Shell ---- */
.itm-footer {
  position: relative;
  overflow: hidden;
  background: var(--surface-ink);
  color: var(--text-on-dark-mut);
  font-family: var(--font-body);
}
.itm-footer a { color: inherit; text-decoration: none; }
.itm-footer a:hover { color: #fff; }
.itm-footer-glow {
  position: absolute;
  top: -120px; right: -80px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(232,184,75,0.16), rgba(232,184,75,0) 60%);
  filter: blur(38px);
  pointer-events: none;
}

/* ---- Top: brand + social ---- */
.itm-footer-top {
  position: relative;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-16) var(--space-8) var(--space-10);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-10) var(--space-16);
  align-items: start;
}
.itm-footer-logo { display: block; height: 48px; width: auto; }
.itm-footer-tagline {
  font-weight: var(--fw-light);
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  margin: var(--space-5) 0 0;
  max-width: 42ch;
  text-wrap: pretty;
}
.itm-footer-address {
  font-style: normal;
  margin-top: var(--space-5);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: var(--fw-light);
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-on-dark-mut);
  max-width: 40ch;
}
.itm-footer-address-icon,
.itm-footer-campus-icon {
  flex: none;
  display: inline-flex;
  color: var(--crimson-light);
  margin-top: 3px;
}
.itm-footer-address-icon svg,
.itm-footer-campus-icon svg { width: 14px; height: 14px; }

.itm-footer-rule { width: 21px; height: 2px; background: var(--brand); margin-bottom: var(--space-3); }
.itm-footer-section-label {
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-3);
}
.itm-footer-social .itm-footer-section-label { color: #fff; margin-bottom: var(--space-5); }
.itm-footer-channels { display: flex; flex-direction: column; gap: var(--space-4); }
.itm-footer-channel-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: baseline;
}
.itm-footer-channel-label {
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.itm-footer-channel-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.itm-footer-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.82);
  transition: border-color 200ms, background 200ms, color 200ms;
}
.itm-footer-pill:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }

/* ---- Middle: accordions ---- */
.itm-footer-middle { position: relative; border-top: 1px solid rgba(255,255,255,0.12); }
.itm-footer-middle-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-10) var(--space-8) var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.itm-footer-accordion {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.itm-footer-acc-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 var(--space-5);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: #fff;
  text-align: left;
  transition: border-color 200ms, background 200ms;
}
.itm-footer-acc-btn:hover { border-color: rgba(255,255,255,0.45); }
.itm-footer-acc-btn[aria-expanded="true"] { border-color: var(--crimson-light); background: rgba(255,255,255,0.06); }
.itm-footer-acc-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.itm-footer-acc-chevron {
  display: inline-flex;
  flex: none;
  color: var(--crimson-light);
  transition: transform 200ms var(--ease-standard);
}
.itm-footer-acc-chevron svg { width: 16px; height: 16px; }
.itm-footer-acc-btn[aria-expanded="true"] .itm-footer-acc-chevron { transform: rotate(180deg); }

.itm-footer-acc-panel {
  grid-column: 1 / -1;
  background: #1A1924;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
}
.itm-footer-explore-panel { padding: var(--space-4); }
/* Desktop: panels always open below the row of buttons */
@media (min-width: 901px) { .itm-footer-acc-panel { order: 99 !important; } }

/* Campuses */
.itm-footer-campus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4) var(--space-8); }
.itm-footer-campus-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: var(--fw-light);
  font-size: var(--text-sm);
  line-height: var(--lh-snug);
}

/* Helplines + key contacts */
.itm-footer-helplines-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-6) var(--space-8); }
.itm-footer-contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-6) var(--space-8); }
.itm-footer-contact-item--full { grid-column: 1 / -1; }
.itm-footer-helpline-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: #fff;
  line-height: var(--lh-snug);
}
.itm-footer-helpline-number {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-on-dark-mut);
  margin-top: 5px;
}
.itm-footer-helpline-wa,
.itm-footer-helpline-email {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.62);
  margin-top: 4px;
}
.itm-footer-helpline-wa svg { color: #3DB069; flex: none; }
.itm-footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-on-dark-mut);
  margin-top: 5px;
}
.itm-footer-contact-icon { display: inline-flex; color: rgba(255,255,255,0.6); flex: none; }
.itm-footer-contact-icon svg { width: 14px; height: 14px; }
.itm-footer-contact-note {
  font-weight: var(--fw-light);
  font-size: var(--text-2xs);
  line-height: var(--lh-relaxed);
  color: var(--text-on-dark-mut);
  margin: 6px 0 0;
  text-wrap: pretty;
}

/* Explore */
.itm-footer-explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5) var(--space-6); }
.itm-footer-explore-heading {
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--crimson-light);
  padding: 0 var(--space-3) var(--space-2);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: var(--space-2);
}
.itm-footer-explore-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px var(--space-4);
}
.itm-footer-explore-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 40px;
  padding: 8px var(--space-3);
  border-radius: 4px;
  color: var(--text-on-dark-mut);
  font-size: var(--text-sm);
  line-height: var(--lh-snug);
}
.itm-footer-explore-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.itm-footer-explore-desc {
  font-weight: var(--fw-light);
  font-size: var(--text-2xs);
  line-height: var(--lh-snug);
  color: rgba(255,255,255,0.6);
}

/* ---- Bottom bar ---- */
.itm-footer-bottom { position: relative; border-top: 1px solid rgba(255,255,255,0.12); }
.itm-footer-bottom-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-5) var(--space-8) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
}
.itm-footer-bottom-links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }

/* ---- Responsive (breakpoints from the source) ---- */
@media (max-width: 960px) {
  .itm-footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .itm-footer-accordion { grid-template-columns: 1fr; }
}
@media (pointer: coarse), (max-width: 760px) {
  /* source: .ftr a { min-height: 40px; display: inline-flex; align-items: center } */
  .itm-footer a { min-height: 40px; display: inline-flex; align-items: center; }
}
@media (max-width: 760px) {
  .itm-footer-channel-row { grid-template-columns: 1fr; gap: var(--space-2); }
}
/* Mobile bottom bar (fixed) must not cover the last footer line */
@media (max-width: 760px) { .itm-footer { padding-bottom: 72px; } }   /* dark, continuous; replaces the page-body padding that showed a cream strip */

/* ============================================================
   CAMPUS MAP MODAL
   Opened from the "Our campus & centres" accordion. Markup lives at the
   bottom of shared/footer/footer.html; behaviour in shared/js/footer.js.
   ============================================================ */
.itm-footer-campus-item {
  /* the campus rows are now buttons; keep them looking like the approved text rows */
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 6px 0;
  min-height: 40px;
}
.itm-footer-campus-item:hover,
.itm-footer-campus-item:focus-visible {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.itm-footer-campus-item:focus-visible {
  outline: 2px solid var(--surface-brand);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.itm-map-modal[hidden] { display: none; }
.itm-map-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.itm-map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 13, 24, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.itm-map-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  /* min() of both units: on browsers where 100dvh is larger than the visible
     area (iOS Safari with the toolbars shown, and some Android browsers in
     landscape) dvh alone let the dialog run past the bottom of the screen. */
  max-height: min(calc(100vh - 32px), calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.itm-map-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.itm-map-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--text-strong);
}
.itm-map-modal__close {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.itm-map-modal__close:hover { color: var(--text-strong); }
.itm-map-modal__close:focus-visible { outline: 2px solid var(--surface-brand); outline-offset: 2px; }
.itm-map-modal__frame {
  flex: 1 1 auto;
  min-height: 0;          /* lets the map shrink instead of pushing the dialog */
  background: var(--surface-sunken);
}
.itm-map-modal__frame iframe {
  display: block;
  width: 100%;
  /* Fill whatever the header and footer leave, rather than claiming a fixed
     share of the viewport. A fixed vh height was what made the dialog taller
     than the screen in landscape. */
  height: 100%;
  min-height: 160px;
  border: 0;
}
.itm-map-modal__foot {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}
.itm-map-modal__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--surface-brand);
  text-decoration: none;
  min-height: 40px;
}
.itm-map-modal__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Mobile / responsive: the dialog is centred and fills the width comfortably. */
@media (max-width: 760px) {
  .itm-map-modal { padding: 12px; align-items: center; }
  .itm-map-modal__dialog {
    max-width: 100%;
    max-height: min(calc(100vh - 24px), calc(100dvh - 24px));
  }
  .itm-map-modal__head { padding: 16px 16px 12px; }
  .itm-map-modal__title { font-size: var(--text-md); }
  .itm-map-modal__foot { padding: 12px 16px 16px; }
}

/* Landscape phones: very little height, so trim the chrome and let the map
   take what is left. The dialog must never be taller than the screen. */
@media (max-height: 520px) {
  .itm-map-modal { padding: 8px; }
  .itm-map-modal__dialog {
    max-height: min(calc(100vh - 16px), calc(100dvh - 16px));
  }
  .itm-map-modal__head { padding: 10px 14px 8px; }
  .itm-map-modal__title { font-size: var(--text-sm); }
  .itm-map-modal__close { width: 32px; height: 32px; }
  .itm-map-modal__frame iframe { min-height: 120px; }
  .itm-map-modal__foot { padding: 8px 14px 10px; }
  .itm-map-modal__link { min-height: 32px; font-size: var(--text-xs); }
}
