/* ==========================================================================
   Page hero — shared subpage header

   Backs <x-layout.page-hero>. These rules mirror the .ul-page-hero block in
   college.css so the component renders correctly on pages that do not link
   college.css; the values are identical, so wherever both load the cascade is
   a no-op. The component pushes this file itself (once per page), which is
   what makes it droppable into any subpage without extra wiring.
   ========================================================================== */

.ul-page-hero {
  background: linear-gradient(135deg, var(--ul-primary, #0b254e) 0%, #123a78 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.ul-page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/3bg.png') center/cover;
  opacity: 0.05;
}

.ul-page-hero-content {
  position: relative;
  z-index: 1;
}

.ul-page-hero-title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ul-page-hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.hero-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 12px);
  margin-bottom: clamp(20px, 3vw, 30px);
  font-size: clamp(14px, 0.9vw, 16px);
  color: rgba(255, 255, 255, 0.8);
}

.hero-breadcrumb a {
  color: var(--ul-c3, #febe35);
  text-decoration: none;
  transition: color 0.3s ease;
}

.hero-breadcrumb a:hover {
  color: var(--white, #fff);
}

.hero-breadcrumb .separator {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 8px;
}

/* --------------------------------------------------------------------------
   Meta pill — small counter/label under the subtitle. Needs an explicit light
   colour: the hero is dark, and inheriting would give it the dark body text.
   -------------------------------------------------------------------------- */
.ul-page-hero-meta {
  display: inline-block;
  margin-top: 16px;
  margin-bottom: 0;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(12px, 0.8vw, 14px);
  font-weight: 700;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Responsive — the desktop sizes above are unchanged; these only scale down.
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .ul-page-hero {
    padding: 80px 0 60px;
  }

  .ul-page-hero-title {
    font-size: 32px;
  }

  .ul-page-hero-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 575px) {
  .ul-page-hero {
    padding: 70px 0 45px;
  }

  .ul-page-hero-title {
    font-size: 25px;
    margin-bottom: 14px;
  }

  .ul-page-hero-subtitle {
    font-size: 14px;
  }
}

/* --------------------------------------------------------------------------
   With a photograph

   The gradient stays as a scrim over the picture rather than being replaced by
   it, so white type and the gold breadcrumb keep their contrast whatever the
   photograph happens to be. The drawn motif is dropped — it only ever stood in
   for an image.
   -------------------------------------------------------------------------- */
.ul-page-hero.has-photo {
  background-image:
    linear-gradient(135deg, rgba(11, 37, 78, 0.88) 0%, rgba(18, 58, 120, 0.80) 100%),
    var(--ul-page-hero-photo);
  background-position: center, var(--ul-page-hero-focus, center);
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}

.ul-page-hero.has-photo::before {
  display: none;
}

/* --------------------------------------------------------------------------
   A long title steps down

   .is-long / .is-xlong are set by the component from the title's length —
   see components/layout/page-hero.blade.php. A section name keeps the full
   size; a news headline, which is a sentence, takes a smaller one so it sits
   on one or two lines instead of filling the band.
   -------------------------------------------------------------------------- */
.ul-page-hero.is-long .ul-page-hero-title {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.45;
}

.ul-page-hero.is-xlong .ul-page-hero-title {
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.4;
}

/* The title has to stay narrower than the band or it wraps raggedly whatever
   its size. Centred, because this hero is. */
.ul-page-hero-title {
  max-width: 28ch;
  margin-inline: auto;
  text-wrap: balance;
}

.ul-page-hero.is-long .ul-page-hero-title,
.ul-page-hero.is-xlong .ul-page-hero-title {
  max-width: 40ch;
}
