/*
 * Hero of the td_news single ([td_news_hero], inc/news-hero.php), from
 * NewsSplitHero.tsx (option 2, split hero). The Elementor section around it
 * (`td-ns-hero` on template 13288) is only a dark wrapper. Every rule starts
 * with `.td-nh` so Hello Elementor's and the kit's button/heading/link
 * styles (0,2,0 at most) lose.
 */

/* section: relative overflow-hidden bg-dark pt-28 pb-12 md:pt-36 md:pb-16 */
.td-nh {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #111111;
  padding: 7rem 0 3rem;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.5;
}

.td-nh,
.td-nh *,
.td-nh-lightbox,
.td-nh-lightbox * {
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .td-nh {
    padding: 9rem 0 4rem;
  }
}

/* Glows: h-[32rem] purple/20 at -right-40 -top-40; h-[28rem] pink/15 at -bottom-40 -left-40; blur-3xl */
.td-nh .td-nh-glow {
  position: absolute;
  z-index: -1;
  border-radius: 9999px;
  filter: blur(64px);
  pointer-events: none;
}

.td-nh .td-nh-glow--purple {
  top: -10rem;
  right: -10rem;
  width: 32rem;
  height: 32rem;
  background-color: rgba(139, 47, 201, 0.2);
}

.td-nh .td-nh-glow--pink {
  bottom: -10rem;
  left: -10rem;
  width: 28rem;
  height: 28rem;
  background-color: rgba(232, 36, 124, 0.15);
}

/* mx-auto grid max-w-7xl items-center gap-10 px-6 md:px-10 lg:grid-cols-[1fr_36rem] lg:gap-16 */
.td-nh .td-nh-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .td-nh .td-nh-grid {
    padding: 0 2.5rem;
  }
}

@media (min-width: 1024px) {
  .td-nh .td-nh-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
    gap: 4rem;
  }
}

/* Text column: order-2 lg:order-1 (photo first on mobile). */
.td-nh .td-nh-text {
  order: 2;
  min-width: 0;
}

.td-nh .td-nh-media {
  order: 1;
  min-width: 0;
}

@media (min-width: 1024px) {
  .td-nh .td-nh-text {
    order: 1;
  }

  .td-nh .td-nh-media {
    order: 2;
  }
}

/* Back link: text-sm font-light uppercase tracking-wider text-white/70 hover:text-white.
   Desktop copy above the date (mb-8), mobile copy above the photo (mb-6). */
.td-nh .td-nh-back {
  display: inline-block;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s ease;
}

.td-nh .td-nh-back:hover,
.td-nh .td-nh-back:focus-visible {
  color: #ffffff;
}

.td-nh .td-nh-back--text {
  display: none;
  margin-bottom: 2rem;
}

.td-nh .td-nh-back--media {
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .td-nh .td-nh-back--text {
    display: inline-block;
  }

  .td-nh .td-nh-back--media {
    display: none;
  }
}

/* No photo at all: the text column alone, back link on every width. */
.td-nh.td-nh--text-only .td-nh-back--text {
  display: inline-block;
}

@media (min-width: 1024px) {
  .td-nh.td-nh--text-only .td-nh-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Date pill: mb-5 bg-pink px-3 py-1 text-xs font-bold uppercase tracking-widest */
.td-nh .td-nh-date {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.25rem 0.75rem;
  background-color: #e8247c;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
}

/* font-display text-3xl uppercase leading-[0.95] md:text-5xl xl:text-6xl */
.td-nh .td-nh-title {
  margin: 0;
  padding: 0;
  font-family: var(--font-display, "Play", sans-serif);
  font-size: 1.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: normal;
  text-transform: uppercase;
  color: #ffffff;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .td-nh .td-nh-title {
    font-size: 3rem;
  }
}

@media (min-width: 1280px) {
  .td-nh .td-nh-title {
    font-size: 3.75rem;
  }
}

/* mt-8 h-1 w-24 bg-gradient-signature */
.td-nh .td-nh-bar {
  width: 6rem;
  height: 4px;
  margin-top: 2rem;
  background: linear-gradient(135deg, #e8247c, #8b2fc9);
}

/* Photo frame: aspect-[4/3] w-full cursor-zoom-in overflow-hidden bg-white/5 */
.td-nh .td-nh-stage {
  position: relative;
}

.td-nh .td-nh-frame,
.td-nh .td-nh-frame:hover,
.td-nh .td-nh-frame:focus {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: zoom-in;
}

.td-nh .td-nh-slide {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Neighbours are laid out (so their lazy image loads) but invisible. */
.td-nh .td-nh-slide.is-near {
  display: block;
  visibility: hidden;
}

.td-nh .td-nh-slide.is-active {
  display: block;
  visibility: visible;
}

.td-nh .td-nh-frame:hover .td-nh-slide.is-active {
  transform: scale(1.03);
}

.td-nh .td-nh-frame-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 4px;
  background: linear-gradient(135deg, #e8247c, #8b2fc9);
}

/* right-3 top-3 bg-dark/70 px-2 py-1 text-xs font-bold tracking-widest */
.td-nh .td-nh-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  padding: 0.25rem 0.5rem;
  background-color: rgba(17, 17, 17, 0.7);
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  letter-spacing: 0.1em;
  color: #ffffff;
}

/* Arrows: absolute top-1/2 h-11 w-11 bg-dark/40 text-white/80 backdrop-blur-sm hover:bg-pink */
.td-nh .td-nh-arrow,
.td-nh .td-nh-arrow:focus {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: rgba(17, 17, 17, 0.4);
  color: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.td-nh .td-nh-arrow:hover {
  background-color: #e8247c;
  color: #ffffff;
}

.td-nh .td-nh-arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

.td-nh .td-nh-arrow--prev {
  left: 0.5rem;
}

.td-nh .td-nh-arrow--next {
  right: 0.5rem;
}

/* Thumbnails: mt-3 flex gap-2 overflow-x-auto; h-16 w-20 md:h-20 md:w-24;
   active opacity-100 ring-2 ring-pink, others opacity-50 hover:opacity-90.
   2px padding keeps the ring inside the scroll box. */
.td-nh .td-nh-thumbs {
  display: flex;
  gap: 0.5rem;
  margin: calc(0.75rem - 2px) 0 -2px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.td-nh .td-nh-thumb,
.td-nh .td-nh-thumb:hover,
.td-nh .td-nh-thumb:focus {
  position: relative;
  flex: none;
  width: 5rem;
  height: 4rem;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.td-nh .td-nh-thumb {
  opacity: 0.5;
}

.td-nh .td-nh-thumb:hover {
  opacity: 0.9;
}

.td-nh .td-nh-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #e8247c;
}

@media (min-width: 768px) {
  .td-nh .td-nh-thumb,
  .td-nh .td-nh-thumb:hover,
  .td-nh .td-nh-thumb:focus {
    width: 6rem;
    height: 5rem;
  }
}

.td-nh .td-nh-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Lightbox (ImageLightbox.tsx): fixed inset-0 z-[200] bg-dark/95. */
.td-nh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(17, 17, 17, 0.95);
  animation: td-nh-fade 0.2s ease;
}

.td-nh-lightbox[hidden] {
  display: none;
}

/* Natural size, never upscaled: no CSS width, only max bounds. */
.td-nh-lightbox .td-nh-lb-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  animation: td-nh-zoom 0.2s ease;
}

.td-nh-lightbox .td-nh-lb-close,
.td-nh-lightbox .td-nh-lb-arrow,
.td-nh-lightbox .td-nh-lb-close:focus,
.td-nh-lightbox .td-nh-lb-arrow:focus {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.15s ease;
}

.td-nh-lightbox .td-nh-lb-close:hover,
.td-nh-lightbox .td-nh-lb-arrow:hover {
  background: transparent;
  color: #ffffff;
}

.td-nh-lightbox .td-nh-lb-close {
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem;
}

.td-nh-lightbox .td-nh-lb-arrow {
  top: 50%;
  padding: 0.75rem;
  transform: translateY(-50%);
}

.td-nh-lightbox .td-nh-lb-arrow--prev {
  left: 1rem;
}

.td-nh-lightbox .td-nh-lb-arrow--next {
  right: 1rem;
}

.td-nh-lightbox svg {
  width: 2rem;
  height: 2rem;
}

.td-nh-lightbox .td-nh-lb-count {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
}

@keyframes td-nh-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes td-nh-zoom {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .td-nh .td-nh-slide,
  .td-nh-lightbox,
  .td-nh-lightbox .td-nh-lb-img {
    transition: none;
    animation: none;
  }

  .td-nh .td-nh-frame:hover .td-nh-slide.is-active {
    transform: none;
  }
}
