/* Directorate of ICT — dark blue refinements on the shared SLUK interface */

.ph {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: var(--color-accent-soft);
  border: 1px dashed #e0b15a;
  border-radius: 999px;
  padding: 0.12rem 0.55rem 0.12rem 0.45rem;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
}

.ph::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.portrait-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(160deg, var(--color-navy) 0%, var(--color-primary) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.12em;
}

.portrait-ph span {
  position: relative;
  z-index: 1;
}

.officer-card .portrait-ph--card {
  width: 7.25rem;
  height: 7.25rem;
  aspect-ratio: 1;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.officer-card__photo {
  width: 7.25rem;
  height: 7.25rem;
  aspect-ratio: 1;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

#mainNav .nav-list > li > a.active,
#topNav .nav-list > li > a.active {
  color: #fff;
  background: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

#mainNav .dropdown a.active,
#topNav .dropdown a.active,
#mobileNav a.active {
  color: var(--color-primary-dark);
  background: rgba(12, 61, 110, 0.12);
  font-weight: 700;
}

.sidebar-card a.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.page-content {
  overflow-x: visible;
}

.page-content--solo {
  width: 100%;
}

/* Gap after the last block is margin, so it stays outside any background.
   Padding on a navy band (the home call to action) would be the same colour
   as the footer and would not read as space. */
main > :last-child {
  margin-bottom: 4.5rem;
}

main > .section:last-child {
  padding-bottom: 4.5rem;
}

main > .section.cta-band:last-child {
  padding-bottom: 3.5rem;
  margin-bottom: 4.5rem;
}

.page-content > :last-child {
  margin-bottom: 0.5rem;
}

@media (max-width: 1024px) {
  main > :last-child {
    margin-bottom: 3.25rem;
  }

  main > .section:last-child {
    padding-bottom: 3.25rem;
  }

  main > .section.cta-band:last-child {
    padding-bottom: 2.75rem;
    margin-bottom: 3.25rem;
  }
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: var(--color-surface-2);
  color: var(--color-navy);
  font-weight: 700;
}

.data-table tbody th {
  width: 34%;
  background: #fff;
  font-weight: 600;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table--records {
  width: 100%;
}

.data-table--records td {
  overflow-wrap: anywhere;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.pill--now {
  background: #e7f0fa;
  color: var(--color-primary-dark);
}

.pill--next {
  background: var(--color-accent-soft);
  color: #7a5410;
}

.pill--past {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.info-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  height: 100%;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0.35rem 0 0.55rem;
}

.info-card p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.9375rem;
}

.info-card a {
  color: inherit;
  text-decoration: none;
}

.info-card a:hover {
  color: var(--color-primary);
}

.org {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
}

.org__director {
  background: linear-gradient(135deg, var(--color-navy), var(--color-primary));
  color: #fff;
  text-align: center;
  padding: 1.1rem 1rem;
  border-radius: var(--radius-md);
  max-width: 22rem;
  margin: 0 auto 0.35rem;
}

.org__director strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.org__director span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  opacity: 0.85;
}

.org__units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.org__unit {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.8rem;
  text-align: center;
}

.org__unit strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.org__unit span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.75rem;
}

.toc a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-primary-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.toc a:hover {
  background: #e7f0fa;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-navy);
}

.faq-item p {
  margin: 0.75rem 0 0.25rem;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  margin: 2rem 0 0.75rem;
}

.page-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

.page-content > :first-child,
.page-content h2:first-child {
  margin-top: 0;
}

.staff-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}

.staff-filter label {
  font-weight: 600;
  font-size: 0.875rem;
}

.staff-filter select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font: inherit;
  background: #fff;
}

.service-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.service-index a {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.service-index a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.service-index strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--color-navy);
}

.service-index span {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.form-status--info {
  background: #e7f0fa;
  color: var(--color-primary-dark);
}

.page-content p,
.page-content li,
.page-content h2,
.page-content h3,
.info-card h3,
.info-card p {
  overflow-wrap: break-word;
}

.ph {
  white-space: normal;
}

.footer__bottom {
  align-items: flex-start;
}

.footer__credit {
  flex: 1 1 16rem;
  min-width: 0;
  line-height: 1.5;
}

.campus-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 720px) {
  .page-content {
    padding: 1.35rem 1.15rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.7rem 0.85rem;
  }
}

/* Home hero: fill the viewport under announcement, utility and header */
.hero.hero--news {
  --ict-announcement-h: 2.75rem;
  --ict-utility-h: 2.45rem;
  --ict-top-chrome: calc(
    var(--ict-announcement-h) + var(--ict-utility-h) + var(--header-height)
  );
  /* Reserve the dock band so slide copy centers in the space above it */
  --ict-hero-toolbar-h: 3.85rem;
  min-height: 0;
  height: calc(100dvh - var(--ict-top-chrome));
  max-height: calc(100dvh - var(--ict-top-chrome));
}

.hero.hero--news .hero__headline {
  max-width: 22ch;
}

/* Center headline, subtitle and links in the band above the carousel toolbar */
.hero.hero--news .hero__slide {
  align-items: center;
  box-sizing: border-box;
  padding-bottom: var(--ict-hero-toolbar-h);
}

/* Restore horizontal inset — base .hero__slide-content zeros left/right padding */
.hero.hero--news .hero__slide-content {
  padding: 1.25rem 1.5rem;
}

@media (max-width: 1024px) {
  .hero.hero--news {
    --ict-utility-h: 0px;
    /* Stacked dock + controls */
    --ict-hero-toolbar-h: 6.75rem;
  }
}

@media (max-width: 640px) {
  .hero.hero--news {
    --ict-announcement-h: 3.5rem;
    --ict-hero-toolbar-h: calc(7.5rem + env(safe-area-inset-bottom, 0px));
    min-height: 0;
    height: calc(100dvh - var(--ict-top-chrome));
    max-height: calc(100dvh - var(--ict-top-chrome));
  }

  .hero.hero--news .hero__slide-content {
    /* Extra horizontal inset so copy clears phone edges (base rule zeros L/R) */
    padding: 1.25rem 1.75rem;
  }

  .hero.hero--news .hero__toolbar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .hero.hero--news .hero__controls-group {
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  .hero.hero--news .hero__dock {
    padding-bottom: 0.5rem;
  }
}

.hero__nav-btn {
  padding: 0;
  line-height: 0;
}

.hero__nav-btn svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
}

.vc-welcome {
  align-items: start;
}

.vc-welcome__portrait {
  position: sticky;
  top: calc(var(--header-height, 4.5rem) + 0.75rem);
  align-self: start;
}

.director-more {
  display: inline-flex;
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.director-more:hover,
.director-more:focus-visible {
  color: var(--color-primary-dark, #082848);
  text-decoration: underline;
}

[data-director-rest] p:first-child {
  margin-top: 0.85rem;
}
