/* TAJ Global Page Hero System v1
   Shared internal-page hero. Standard + Detail variants.
   Contract: TAJ palette only; image first; no crop/zoom; single H1; mobile-specific rhythm. */

.taj-page-hero {
  --taj-ph-navy: var(--taj-navy, #003a5b);
  --taj-ph-accent: var(--taj-accent-navy, #0b4565);
  --taj-ph-orange: var(--taj-orange, #cc5501);
  --taj-ph-white: #ffffff;
  position: relative;
  width: 100%;
  background: var(--taj-ph-navy);
  overflow: clip;
}

.taj-page-hero__media,
.taj-page-hero__media picture,
.taj-page-hero__media img {
  display: block;
  width: 100%;
}

.taj-page-hero__media {
  position: relative;
  z-index: 1;
  background: var(--taj-ph-white);
}

.taj-page-hero__media img {
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
  scale: 1 !important;
}

.taj-page-hero__caption {
  position: relative;
  z-index: 3;
  margin-top: 0;
  padding: 22px 0 28px;
  background: linear-gradient(180deg, var(--taj-ph-accent) 0%, var(--taj-ph-navy) 100%);
  color: var(--taj-ph-white);
  isolation: isolate;
}

/* Transition layer: image remains visible, then fades/softens into the brand field. */
.taj-page-hero__caption::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70px;
  right: 0;
  left: 0;
  height: 72px;
  background: linear-gradient(180deg,
    rgba(0,58,91,0) 0%,
    rgba(0,58,91,.12) 30%,
    rgba(0,58,91,.58) 72%,
    rgba(11,69,101,.98) 100%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.taj-page-hero__caption-inner {
  position: relative;
  padding-top: 2px;
}

.taj-page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--taj-ph-white);
  font-size: 14px;
  font-weight: 750;
  opacity: .82;
}

.taj-page-hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: var(--taj-ph-orange);
}

.taj-page-hero__title {
  max-width: 980px;
  margin: 0;
  color: var(--taj-ph-white);
  font-size: clamp(38px, 4.4vw, 64px);
  font-weight: 850;
  line-height: 1.34;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(0,58,91,.18);
}

.taj-page-hero--detail .taj-page-hero__title {
  max-width: 820px;
  font-size: clamp(34px, 3.9vw, 56px);
}

.taj-page-hero__breadcrumbs {
  margin-top: 10px;
}

.taj-page-hero__breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
}

.taj-page-hero__breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.7;
}

.taj-page-hero__breadcrumbs li:not(:last-child)::after {
  content: "‹";
  color: rgba(255,255,255,.58);
  font-size: 16px;
}

.taj-page-hero__breadcrumbs a,
.taj-page-hero__breadcrumbs span {
  color: inherit;
  text-decoration: none;
}

.taj-page-hero__breadcrumbs a {
  transition: color .2s ease, opacity .2s ease;
}

.taj-page-hero__breadcrumbs a:hover,
.taj-page-hero__breadcrumbs a:focus-visible {
  color: var(--taj-ph-white);
  opacity: 1;
}

.taj-page-hero__breadcrumbs [aria-current="page"] {
  color: var(--taj-ph-white);
  font-weight: 700;
}

/* Caption only: LCP image stays immediately visible. */
@media (prefers-reduced-motion: no-preference) {
  .taj-page-hero__caption-inner {
    animation: tajPageHeroCaptionIn .52s cubic-bezier(.2,.72,.2,1) .08s both;
  }
}

@keyframes tajPageHeroCaptionIn {
  from { opacity: 0; transform: translate3d(0,12px,0); }
  to   { opacity: 1; transform: translate3d(0,0,0); }
}

@media (max-width: 767px) {
  /* =========================================================
     TAJ GLOBAL PAGE HERO ? MOBILE REFERENCE V3
     Reference: approved 390px Knowledge-style composition.

     Contract:
     - full image, never cropped or zoomed
     - image in its own rounded frame
     - white rounded caption card under image
     - subtle overlap only
     - no navy/gradient/blur panel on mobile
     - restrained brand shadow
  ========================================================= */

  .taj-page-hero {
    padding: 0 14px 22px;
    background: var(--taj-ph-white);
    overflow: visible;
  }

  .taj-page-hero__media {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--taj-ph-white);
    box-shadow: 0 8px 20px rgba(0,58,91,.045);
  }

  .taj-page-hero__media picture,
  .taj-page-hero__media img {
    display: block;
    width: 100%;
  }

  .taj-page-hero__media img {
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    scale: 1 !important;
  }

  .taj-page-hero__caption {
    position: relative;
    z-index: 1;
    width: calc(100% - 28px);
    margin: -10px auto 0;
    padding: 27px 0 18px;
    background: var(--taj-ph-white);
    color: var(--taj-ph-navy);
    border: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 14px 32px rgba(0,58,91,.075);
    isolation: auto;
  }

  .taj-page-hero__caption::before {
    content: none !important;
    display: none !important;
    background: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .taj-page-hero__caption-inner {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .taj-page-hero__eyebrow {
    margin: 0 0 6px;
    color: var(--taj-ph-navy);
    font-size: 12px;
    opacity: .72;
  }

  .taj-page-hero__title,
  .taj-page-hero--detail .taj-page-hero__title {
    max-width: 100%;
    margin: 0;
    color: var(--taj-ph-navy);
    font-size: clamp(25px, 7vw, 32px);
    font-weight: 850;
    line-height: 1.48;
    letter-spacing: -.015em;
    text-shadow: none;
    text-wrap: balance;
  }

  .taj-page-hero__breadcrumbs {
    margin-top: 7px;
  }

  .taj-page-hero__breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
  }

  .taj-page-hero__breadcrumbs li {
    gap: 6px;
    color: rgba(16,47,68,.63);
    font-size: 11.5px;
    line-height: 1.7;
  }

  .taj-page-hero__breadcrumbs li:not(:last-child)::after {
    color: rgba(0,58,91,.34);
  }

  .taj-page-hero__breadcrumbs a,
  .taj-page-hero__breadcrumbs span {
    color: inherit;
  }

  .taj-page-hero__breadcrumbs a:hover,
  .taj-page-hero__breadcrumbs a:focus-visible,
  .taj-page-hero__breadcrumbs [aria-current="page"] {
    color: var(--taj-ph-navy);
  }

  .taj-page-hero__breadcrumbs [aria-current="page"] {
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  .taj-page-hero__caption-inner { animation: none !important; }
}
