/* =============================================
   GRYIP — Hero Institutional Redesign CSS
   ============================================= */

/* =============================================
   HERO — CINEMATIC CAMPUS SHOWCASE
   ============================================= */

.hero-bg,
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* Background Immersive Blur Layer — fills the full hero area with rich ambient tone */
.hero-slide-blur {
  position: absolute;
  inset: -25px;
  /* extends beyond bounds to prevent blur edge clipping */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(32px) brightness(0.42) saturate(1.25);
  transform: scale(1.08);
  will-change: transform;
}

/* Foreground Sharp Layer — Full-width presentation showing complete photo */
.hero-slide-sharp {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  will-change: transform;
  transition: transform 7s cubic-bezier(0.1, 0, 0.2, 1);
  transform: scale(1.0);
}

.hero-slide.active .hero-slide-sharp {
  transform: scale(1.025);
}

/* Slide 1: Aerial Campus Photo — covers full viewport with focus on building */
.hero-slide-aerial {
  background-size: cover;
  background-position: center 90%;
}

/* Slides 2-9: Full-width presentation — shows entire panoramic photo without cropping */
.hero-slide-fullwidth {
  background-size: contain;
  background-position: center center;
}

/* =============================================
   HERO SLIDER INDICATORS & TINY PROGRESS BAR
   ============================================= */
.hero-slider-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  z-index: 10;
  position: relative;
}

.hero-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: scale(1.2);
}

.hero-dot.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  width: 22px;
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(230, 168, 23, 0.5);
}

.hero-progress-track {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.hero-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), #FFD54F);
  border-radius: 99px;
  will-change: width;
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* No padding-top: hero extends behind the transparent navbar */
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}

/* Overlay: very light at top (let campus show), builds at bottom for text readability */
.hero-overlay {
  background: linear-gradient(180deg,
      rgba(5, 25, 32, 0.18) 0%,
      rgba(5, 25, 32, 0.05) 30%,
      transparent 50%,
      rgba(5, 25, 32, 0.30) 72%,
      rgba(5, 25, 32, 0.62) 100%);
}

/* Main layout wrapper — pushes badges/CTA to bottom, top space is visible campus image */
.hero-institution {
  text-align: center;
  width: 100%;
  /* Top padding = navbar + topbar height so badges don't overlap the transparent nav */
  padding-top: calc(var(--topbar-h) + var(--navbar-h) + 1rem);
  padding-bottom: 0;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* Badges — float freely on the image, pushed to bottom */
.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0 1rem 0.35rem;
  position: relative;
  z-index: 2;
}

.hero-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(5, 25, 32, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
  transition: var(--transition-fast);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-badge-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-badge-gold {
  background: rgba(230, 168, 23, 0.25);
  border-color: rgba(230, 168, 23, 0.5);
  color: var(--color-accent-light);
}

.hero-badge-gold svg {
  stroke: var(--color-accent-light);
}

/* ---- BOTTOM STRIP: Tagline + CTAs — true glassmorphism, image shows through ---- */
.hero-ctas-wrapper {
  width: 100%;
  padding: 1rem 0;
  background: rgba(5, 25, 32, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 2;
}

/* Stack tagline on top, CTAs below */
.hero-ctas-wrapper .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Hero tagline — full width */
.hero-tagline {
  font-size: clamp(0.82rem, 1.2vw, 0.95rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
  margin: 0;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 720px;
}

/* CTAs row */
.hero-institution .hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Stats bar anchored at the bottom of hero */
.hero-stats-bar {
  background: rgba(5, 25, 32, 0.8);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.65rem 0;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-stats-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 2.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-stat-item svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

.hero-stat-item .val {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-stat-item .lbl {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

/* =============================================
   MILESTONE / ACHIEVEMENT BANNER
   (replaces the annoying popup)
   ============================================= */

.milestone-banner {
  background: linear-gradient(135deg, #0D5C6E 0%, #09404D 60%, #0a3340 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.milestone-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(230, 168, 23, 0.06);
}

.milestone-banner::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.milestone-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 2rem 0;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

/* Left: text */
.milestone-text {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex: 1;
  min-width: 280px;
}

.milestone-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: rgba(230, 168, 23, 0.2);
  border: 1px solid rgba(230, 168, 23, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent-light);
}

.milestone-headline {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent-light);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.milestone-detail {
  font-size: 0.925rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.milestone-detail strong {
  color: #ffffff;
}

/* Centre: logos */
.milestone-logos {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-shrink: 0;
}

.milestone-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.milestone-logo-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
}

.milestone-logo-item span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  max-width: 80px;
  line-height: 1.3;
}

/* Right: persons */
.milestone-persons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.milestone-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.milestone-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid rgba(230, 168, 23, 0.5);
  flex-shrink: 0;
}

.milestone-person-info strong {
  display: block;
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.milestone-person-info span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

/* =============================================
   RESPONSIVE — HERO + MILESTONE
   ============================================= */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  /* Swap to mobile portrait-cropped photo: NO sky, college building is prominent; resilient fallback to dji */
  .hero-bg,
  .hero-slide-aerial {
    background-image: url('../assets/images/gallery/optimized/hero-mobile.webp'), url('../assets/images/gallery/optimized/dji_20260716171606_0147_d.webp') !important;
    background-position: center top, center 85% !important;
    background-size: cover, cover !important;
  }

  /* Carousel Slides 2-9 on Mobile: Confine sharp photo to the upper stage showcase area */
  .hero-slide-sharp.hero-slide-fullwidth {
    top: calc(var(--navbar-h) + 0.25rem);
    height: clamp(140px, 22vh, 180px);
    bottom: auto;
    background-size: contain;
    background-position: center center;
  }

  /* Lift everything up: natural viewport height without stretching 100svh */
  .hero-institution {
    padding-top: calc(var(--navbar-h) + 0.5rem);
    min-height: clamp(420px, 58vh, 490px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* Compact accreditation badges — micro-pills taking minimal vertical space */
  .hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.22rem 0.32rem;
    padding: 0 0.5rem;
    margin-top: auto;
    margin-bottom: 0.35rem;
  }

  .hero-slider-nav {
    margin-bottom: 0.35rem;
    gap: 0.3rem;
  }

  .hero-dot {
    width: 6px;
    height: 6px;
  }

  .hero-dot.active {
    width: 16px;
  }

  .hero-progress-track {
    width: 90px;
    height: 2px;
  }

  .hero-badge-item {
    font-size: 9.5px;
    padding: 0.18rem 0.45rem;
    gap: 3px;
    border-radius: 999px;
  }

  .hero-badge-item svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
  }

  .hero-ctas-wrapper {
    padding: 0.65rem 0.75rem;
    background: rgba(5, 25, 32, 0.48);
  }

  .hero-tagline {
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
  }

  /* 2-column button layout: 2 buttons in row 1, 1 button in row 2 */
  .hero-institution .hero-ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  /* Row 1: Explore Programs & Visit Campus */
  .hero-institution .hero-ctas> :nth-child(2) {
    grid-column: 1;
    grid-row: 1;
    font-size: 11.5px;
    padding: 0.45rem 0.4rem;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
  }

  .hero-institution .hero-ctas> :nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    font-size: 11.5px;
    padding: 0.45rem 0.4rem;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
  }

  /* Row 2: Full-width Apply CTA */
  .hero-institution .hero-ctas> :nth-child(1) {
    grid-column: span 2;
    grid-row: 2;
    font-size: 12px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    justify-content: center;
  }

  /* Full-width single-row strip — each stat fills equally */
  .hero-stats-bar {
    padding: 0;
  }

  .hero-stats-bar .container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    max-width: 100%;
    margin: 0;
  }

  .hero-stat-item {
    flex: 1;
    flex-direction: column;
    padding: 0.85rem 0.2rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 0;
    gap: 0.2rem;
  }

  .hero-stat-divider {
    display: block;
    width: 1px;
    height: auto;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
  }

  .hero-stat-item .val {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
  }

  .hero-stat-item .lbl {
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  .hero-stat-item>svg {
    display: none;
  }

  .milestone-inner {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0;
  }

  .milestone-logos {
    justify-content: center;
  }

  .milestone-persons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-badges {
    gap: 0.2rem 0.25rem;
  }

  .hero-badge-item {
    font-size: 9px;
    padding: 0.16rem 0.4rem;
  }

  .hero-stat-item .val {
    font-size: 1.05rem;
  }

  .hero-stat-item .lbl {
    font-size: 8.5px;
  }

  .hero-stat-item {
    padding: 0.7rem 0.15rem;
  }
}