/* Small refinements to the original homepage; no section or colour changes. */
body:has(.homepage) .campus-gallery-strip {
  flex-direction: row;
  align-items: stretch;
}
body:has(.homepage) .campus-gallery-item,
body:has(.homepage) .campus-gallery-item.large {
  flex: 0 0 min(78vw, 420px);
  width: min(78vw, 420px);
  height: 260px;
}
body:has(.homepage) .campus-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body:has(.homepage) .campus-gallery-item:hover {
  transform: none;
}
body:has(.homepage) .graduate-pathway-card p,
body:has(.homepage) .graduate-pathway-card small {
  font-size: .8rem !important;
  line-height: 1.45 !important;
}
body:has(.homepage) .principal-note > p {
  line-height: 1.7 !important;
}
@media (max-width: 620px) {
  body:has(.homepage) .campus-gallery-item,
  body:has(.homepage) .campus-gallery-item.large {
    height: 210px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:has(.homepage) .campus-gallery-item,
  body:has(.homepage) .campus-gallery-item img {
    transition: none;
    transform: none;
  }
}

/* Phone refinements preserve the original homepage and desktop layout. */
@media (max-width: 620px) {
  body:has(.homepage) .homepage.compact-home {
    width: calc(100% - 20px) !important;
    margin-inline: auto !important;
    gap: 14px !important;
  }
  body:has(.homepage) .navbar {
    position: static !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    overflow: visible !important;
  }
  body:has(.homepage) .navbar a,
  body:has(.homepage) .navbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px !important;
    padding: 9px 12px !important;
    font-size: .8125rem !important;
    line-height: 1.3 !important;
  }
  body:has(.homepage) .header-whatsapp-link {
    min-width: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0;
  }
  body:has(.homepage) .brand-home-link { min-width: 0; }
  body:has(.homepage) .brand-copy { min-width: 0; }
  body:has(.homepage) .brand-copy h1 { line-height: 1.2 !important; }
  body:has(.homepage) .hero-core h1 {
    font-size: clamp(1.7rem, 7.2vw, 2.15rem) !important;
    line-height: 1.12 !important;
    overflow-wrap: break-word;
  }
  body:has(.homepage) .hero-core > p:not(.fresh-label) {
    font-size: .9375rem !important;
    line-height: 1.55 !important;
  }
  body:has(.homepage) .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  body:has(.homepage) .hero-metrics div {
    min-width: 0;
    min-height: 82px !important;
    padding: 12px !important;
  }
  body:has(.homepage) .hero-metrics span {
    font-size: .75rem !important;
    line-height: 1.35 !important;
  }
  body:has(.homepage) .hero-metrics strong { font-size: 1.8rem !important; }
  body:has(.homepage) .btn,
  body:has(.homepage) .faculty-download-btn {
    min-height: 44px !important;
    padding-block: 11px !important;
  }
  body:has(.homepage) .principal-seal img {
    object-fit: contain !important;
  }
  body:has(.homepage) .principal-note > p {
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }
  body:has(.homepage) .academic-programs-lanes {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body:has(.homepage) .graduate-pathway-card {
    min-width: 0;
    min-height: 76px !important;
    padding: 12px !important;
  }
  body:has(.homepage) .graduate-pathway-card h3 {
    font-size: .9375rem !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
  }
  body:has(.homepage) .graduate-pathway-card p,
  body:has(.homepage) .graduate-pathway-card small {
    font-size: .8125rem !important;
    line-height: 1.45 !important;
  }
  body:has(.homepage) .program-lane-head {
    flex-wrap: wrap !important;
    gap: 8px;
  }
  body:has(.homepage) .program-lane-head strong { white-space: normal !important; }
  body:has(.homepage) #facultyBox {
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }
  body:has(.homepage) .home-faculty-profile-card { scroll-snap-align: start; }
  body:has(.homepage) .home-faculty-profile-body h3 {
    font-size: 1rem !important;
    line-height: 1.35 !important;
  }
  body:has(.homepage) .home-faculty-profile-body p,
  body:has(.homepage) .home-faculty-profile-body small {
    font-size: .8125rem !important;
    line-height: 1.5 !important;
  }
  body:has(.homepage) .faculty-profile-overlay {
    padding: 12px !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
  }
  body:has(.homepage) .faculty-profile-card {
    width: 100% !important;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  body:has(.homepage) .faculty-profile-close {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  body:has(.homepage) .campus-gallery-strip {
    scroll-padding-inline: 12px;
    overscroll-behavior-x: contain;
  }
  body:has(.homepage) .compact-final-bar { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 620px) and (hover: none) {
  body:has(.homepage) .campus-gallery-item img { transform: none !important; }
}

/* Prominent student entry beside Home, in the college gold accent. */
body:has(.homepage) .navbar a[href="student-portal.html"] {
  background: #f1c453 !important;
  border-color: #f1c453 !important;
  color: #173b32 !important;
  font-weight: 800 !important;
}
body:has(.homepage) .navbar a[href="student-portal.html"]:hover,
body:has(.homepage) .navbar a[href="student-portal.html"]:focus-visible {
  background: #ffdb7c !important;
  border-color: #ffdb7c !important;
  color: #173b32 !important;
}
