/* ==========================================================================
   YT Digital Power — Homepage
   Hero, What's New, Products and Solutions, News & Events and Quick links.
   Only homepage blocks live here; shared primitives come from tokens/base/
   components/layout.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.yt-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  max-height: 900px;
  overflow: hidden;
  background: #0a0a0a;
  color: var(--yt-white);
}

.yt-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a0a0a;
}

.yt-hero__poster,
.yt-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-hero__poster {
  z-index: 0;
}

.yt-hero__poster--mobile {
  display: none;
}

.yt-hero__video {
  z-index: 1;
}

.yt-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.14) 34%,
      rgba(0, 0, 0, 0.22) 66%,
      rgba(0, 0, 0, 0.8) 100%
    ),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 55%);
  pointer-events: none;
}

.yt-hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: calc(var(--yt-header-h) + 24px) var(--yt-gutter) 28px;
  text-align: center;
}

.yt-hero__titles {
  display: grid;
  width: 100%;
  max-width: 1200px;
  margin-top: clamp(24px, 5vh, 52px);
}

.yt-hero__title {
  grid-area: 1 / 1;
  max-width: 100%;
  margin: 0;
  color: var(--yt-white);
  font-size: 40px;
  font-weight: var(--yt-fw-bold);
  line-height: 48px;
  text-wrap: balance;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 800ms var(--yt-ease),
    visibility 800ms var(--yt-ease);
}

.yt-hero__title.is-active {
  opacity: 1;
  visibility: visible;
}

.yt-hero__play {
  min-width: 100px;
  padding-inline: 20px;
  margin-top: 28px;
}

.yt-hero__play:focus-visible,
.yt-hero__dot:focus-visible {
  outline-color: var(--yt-white);
}

.yt-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1280px;
  margin-top: auto;
  padding-top: 40px;
  text-align: left;
}

.yt-hero__stat {
  min-width: 0;
}

.yt-hero__stat-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25em;
  color: var(--yt-white);
}

.yt-hero__stat-value,
.yt-hero__stat-suffix {
  font-size: 20px;
  font-weight: var(--yt-fw-bold);
  line-height: 30px;
}

.yt-hero__stat-value {
  font-variant-numeric: tabular-nums;
}

.yt-hero__stat-label {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  line-height: 21px;
}

.yt-hero__dots {
  display: none;
}

html.is-reduced-motion .yt-hero__video {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .yt-hero__video {
    display: none;
  }

  .yt-hero__title {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   What's New
   -------------------------------------------------------------------------- */
.yt-whatsnew {
  position: relative;
  background: var(--yt-white);
}

.yt-whatsnew__head {
  text-align: center;
}

.yt-whatsnew__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.yt-whatsnew__card {
  position: relative;
  display: block;
  height: 586px;
  overflow: hidden;
  background: var(--yt-bg-soft);
  color: var(--yt-black);
  isolation: isolate;
}

.yt-whatsnew__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--yt-dur-slow) var(--yt-ease);
  will-change: transform;
}

.yt-whatsnew__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.74) 0%,
    rgba(255, 255, 255, 0.3) 30%,
    rgba(255, 255, 255, 0) 66%
  );
  pointer-events: none;
}

.yt-whatsnew__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px clamp(24px, 4vw, 72px) 32px;
  text-align: center;
}

.yt-whatsnew__title {
  max-width: 620px;
  margin: 0;
  color: inherit;
  font-size: 32px;
  font-weight: var(--yt-fw-bold);
  line-height: 38.4px;
  text-wrap: balance;
}

.yt-whatsnew__desc {
  max-width: 560px;
  margin-top: 12px;
  color: var(--yt-gray-60);
  font-size: 16px;
  line-height: 24px;
}

.yt-whatsnew__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: inherit;
  font-size: 14px;
  line-height: 21px;
}

.yt-whatsnew__card--dark {
  color: var(--yt-white);
}

.yt-whatsnew__card--dark::before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.56) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0) 70%
  );
}

.yt-whatsnew__card--dark .yt-whatsnew__desc {
  color: rgba(255, 255, 255, 0.8);
}

.yt-whatsnew__card:hover .yt-whatsnew__bg,
.yt-whatsnew__card:focus-visible .yt-whatsnew__bg {
  transform: scale(1.03);
}

.yt-whatsnew__card:hover .yt-whatsnew__link .yt-arrow,
.yt-whatsnew__card:focus-visible .yt-whatsnew__link .yt-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Products and Solutions
   -------------------------------------------------------------------------- */
.yt-showcase {
  padding: 0 0 var(--yt-section-space);
  background: var(--yt-white);
}

.yt-showcase__head {
  margin-bottom: var(--yt-heading-gap);
  text-align: center;
}

/* Keep the section rhythm when What's New is switched off in ACF. */
.yt-home > .yt-hero + .yt-showcase,
.yt-home > .yt-hero + .yt-news--home {
  padding-top: var(--yt-section-space);
}

.yt-showcase__stage {
  position: relative;
  width: 100%;
  height: 720px;
  overflow: hidden;
  background: #0a0a0a;
  touch-action: pan-y;
}

.yt-showcase__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--yt-dur-slow) var(--yt-ease),
    visibility var(--yt-dur-slow) var(--yt-ease);
}

.yt-showcase__slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.yt-showcase__bg,
.yt-showcase__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-showcase__bg {
  z-index: 0;
}

.yt-showcase__video {
  z-index: 1;
}

@keyframes yt-showcase-kenburns {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.06);
  }
}

.yt-showcase__slide.is-active .yt-showcase__bg {
  animation: yt-showcase-kenburns 12s var(--yt-ease) both;
}

.yt-showcase__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.68) 0%,
      rgba(0, 0, 0, 0.4) 42%,
      rgba(0, 0, 0, 0.12) 72%,
      rgba(0, 0, 0, 0.04) 100%
    ),
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.66) 0%,
      rgba(0, 0, 0, 0.05) 34%,
      rgba(0, 0, 0, 0) 60%
    );
  pointer-events: none;
}

.yt-showcase__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 780px;
  margin-left: 120px;
  padding-right: 24px;
  color: var(--yt-white);
}

.yt-showcase__eyebrow {
  margin: 0 0 8px;
  color: var(--yt-white);
  font-size: 20px;
  font-weight: var(--yt-fw-bold);
  line-height: 30px;
}

.yt-showcase__title {
  margin: 0;
  color: var(--yt-white);
  font-size: 40px;
  font-weight: var(--yt-fw-regular);
  line-height: 48px;
  text-wrap: balance;
}

.yt-showcase__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 22px;
}

.yt-showcase__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 21px;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-showcase__link:hover {
  color: var(--yt-white);
}

.yt-showcase__link-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.9;
}

.yt-showcase__link .yt-icon {
  width: 24px;
  height: 24px;
}

.yt-showcase__actions {
  margin-top: 32px;
}

.yt-showcase__learn {
  min-width: 112px;
}

.yt-showcase__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: var(--yt-white);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    background-color var(--yt-dur-fast) var(--yt-ease);
}

.yt-showcase__arrow--prev {
  left: 32px;
}

.yt-showcase__arrow--next {
  right: 32px;
}

.yt-showcase__stage:hover .yt-showcase__arrow,
.yt-showcase__stage:focus-within .yt-showcase__arrow,
.yt-showcase__arrow:focus-visible {
  background: rgba(0, 0, 0, 0.48);
  opacity: 1;
  pointer-events: auto;
}

.yt-showcase__tabs {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  width: min(calc(100% - 48px), 1200px);
  transform: translateX(-50%);
}

.yt-showcase__tab {
  position: relative;
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 0 0 22px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 16px;
  font-weight: var(--yt-fw-bold);
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-showcase__tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.yt-showcase__tab:hover,
.yt-showcase__tab.is-active {
  color: var(--yt-white);
}

.yt-showcase__tab:focus-visible,
.yt-showcase__arrow:focus-visible {
  outline-color: var(--yt-white);
}

.yt-showcase__tab-label {
  display: block;
}

.yt-showcase__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 2px;
  background: var(--yt-white);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   News & Events
   -------------------------------------------------------------------------- */
.yt-news--home {
  padding: 0 0 var(--yt-section-space);
  background: var(--yt-white);
}

.yt-news--home .yt-news__title-head {
  margin-bottom: 40px;
  text-align: center;
}

.yt-news--home .yt-news__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.yt-news--home .yt-news__arrows {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
}

.yt-news--home .yt-news__panels {
  position: relative;
}

.yt-news--home .yt-news__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 72px) / 4);
  gap: 24px;
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.yt-news--home .yt-news__track::-webkit-scrollbar {
  display: none;
}

.yt-news--home .yt-news__track[hidden] {
  display: none;
}

.yt-news--home .yt-news__card {
  min-width: 0;
  scroll-snap-align: start;
}

.yt-news--home .yt-news__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.yt-news--home .yt-news__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--yt-bg-soft);
}

.yt-news--home .yt-news__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--yt-dur-slow) var(--yt-ease);
}

.yt-news--home .yt-news__card:hover .yt-news__img {
  transform: scale(1.03);
}

.yt-news--home .yt-news__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 20px;
}

.yt-news--home .yt-news__title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--yt-ink);
  font-size: 20px;
  font-weight: var(--yt-fw-regular);
  line-height: 30px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-news--home .yt-news__card:hover .yt-news__title {
  color: var(--yt-red);
}

.yt-news--home .yt-news__date {
  display: block;
  margin-top: 12px;
  color: var(--yt-gray-60);
  font-size: 14px;
  line-height: 21px;
}

.yt-news--home .yt-news__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

/* --------------------------------------------------------------------------
   Quick links
   -------------------------------------------------------------------------- */
.yt-quick {
  background: var(--yt-white);
}

.yt-quick__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.yt-quick__item {
  min-width: 0;
}

.yt-quick__anchor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 24px;
  color: var(--yt-ink);
  text-align: center;
}

.yt-quick__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.yt-quick__icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.68;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease);
}

.yt-quick__icon .yt-icon {
  width: 48px;
  height: 48px;
  opacity: 0.68;
}

.yt-quick__title {
  font-size: 20px;
  font-weight: var(--yt-fw-bold);
  line-height: 30px;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-quick__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--yt-ink);
  font-size: 14px;
  line-height: 21px;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-quick__anchor:hover .yt-quick__icon-img {
  opacity: 1;
  transform: translateY(-2px);
}

.yt-quick__anchor:hover .yt-quick__icon .yt-icon {
  opacity: 1;
}

.yt-quick__anchor:hover .yt-quick__title,
.yt-quick__anchor:hover .yt-quick__link {
  color: var(--yt-red);
}

.yt-quick__anchor:hover .yt-quick__link .yt-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .yt-hero__title {
    font-size: 32px;
    line-height: 40px;
  }

  .yt-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
    max-width: 760px;
  }
}

@media (max-width: 1023px) {
  .yt-showcase__stage {
    height: 640px;
  }

  .yt-showcase__content {
    margin-left: 64px;
  }

  .yt-showcase__title {
    font-size: 34px;
    line-height: 42px;
  }

  .yt-showcase__tabs {
    display: flex;
    gap: 12px;
    width: calc(100% - 48px);
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .yt-showcase__tabs::-webkit-scrollbar {
    display: none;
  }

  .yt-showcase__tab {
    flex: 1 0 140px;
    font-size: 14px;
    line-height: 21px;
    text-align: left;
  }

  .yt-whatsnew__card {
    height: 470px;
  }

  .yt-whatsnew__content {
    padding-top: 32px;
  }

  .yt-whatsnew__title {
    font-size: 24px;
    line-height: 30px;
  }

  .yt-whatsnew__desc {
    font-size: 15px;
    line-height: 22px;
  }

  .yt-news--home .yt-news__track {
    grid-auto-columns: calc((100% - 24px) / 2);
  }

  .yt-quick__grid {
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .yt-hero {
    min-height: 640px;
    max-height: none;
  }

  .yt-hero__poster {
    display: none;
  }

  .yt-hero__poster--mobile {
    display: block;
  }

  .yt-hero__video {
    display: none;
  }

  .yt-hero__inner {
    padding: calc(var(--yt-header-h) + 16px) var(--yt-gutter) 20px;
  }

  .yt-hero__titles {
    margin-top: clamp(18px, 7vh, 48px);
  }

  .yt-hero__title {
    max-width: 300px;
    margin-inline: auto;
    font-size: 24px;
    line-height: 32px;
  }

  .yt-hero__play {
    width: auto;
    height: 36px;
    min-width: 0;
    min-height: 36px;
    padding: 0 14px;
    margin-top: 24px;
    font-size: 13px;
    line-height: 34px;
  }

  .yt-hero__stats {
    display: block;
    max-width: 440px;
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
  }

  .yt-hero__stat {
    display: none;
  }

  .yt-hero__stat.is-active {
    display: block;
  }

  .yt-hero__stat-figure {
    justify-content: center;
  }

  .yt-hero__dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
  }

  .yt-hero__dot {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .yt-hero__dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background-color var(--yt-dur-fast) var(--yt-ease);
  }

  .yt-hero__dot.is-active::after {
    background: var(--yt-white);
  }

  .yt-whatsnew__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yt-whatsnew__card {
    height: 420px;
  }

  .yt-whatsnew__content {
    padding: 28px var(--yt-gutter) 24px;
  }

  .yt-whatsnew__title {
    font-size: 24px;
    line-height: 30px;
  }

  .yt-whatsnew__desc {
    margin-top: 8px;
    font-size: 14px;
    line-height: 21px;
  }

  .yt-showcase {
    padding-bottom: var(--yt-section-space);
  }

  .yt-showcase__head {
    margin-bottom: var(--yt-heading-gap);
  }

  .yt-showcase__stage {
    height: 560px;
  }

  .yt-showcase__content {
    max-width: 100%;
    margin-left: 0;
    padding: 0 24px 88px;
  }

  .yt-showcase__eyebrow {
    font-size: 16px;
    line-height: 24px;
  }

  .yt-showcase__title {
    font-size: 28px;
    line-height: 36px;
  }

  .yt-showcase__links {
    gap: 12px 20px;
    margin-top: 16px;
  }

  .yt-showcase__actions {
    margin-top: 24px;
  }

  .yt-showcase__arrow {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .yt-showcase__arrow--prev {
    left: 8px;
  }

  .yt-showcase__arrow--next {
    right: 8px;
  }

  .yt-showcase__arrow,
  .yt-showcase__stage:hover .yt-showcase__arrow,
  .yt-showcase__stage:focus-within .yt-showcase__arrow {
    display: none;
  }

  .yt-showcase__tabs {
    bottom: 12px;
    display: flex;
    gap: 8px;
    width: calc(100% - 32px);
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .yt-showcase__tabs::-webkit-scrollbar {
    display: none;
  }

  .yt-showcase__tab {
    flex: 0 0 140px;
    min-height: 56px;
    padding-bottom: 18px;
    font-size: 13px;
    line-height: 19px;
    text-align: left;
  }

  .yt-news--home .yt-news__title-head {
    margin-bottom: 24px;
  }

  .yt-news--home .yt-news__head {
    margin-bottom: 24px;
  }

  .yt-news--home .yt-news__track {
    grid-auto-columns: 85%;
    gap: 16px;
  }

  .yt-news--home .yt-news__title {
    font-size: 18px;
    line-height: 27px;
  }

  .yt-news--home .yt-news__actions {
    margin-top: 32px;
  }

  .yt-quick__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .yt-quick__item {
    border-bottom: 1px solid var(--yt-line);
  }

  .yt-quick__item:first-child {
    border-top: 1px solid var(--yt-line);
  }

  .yt-quick__anchor {
    flex-direction: row;
    gap: 16px;
    padding: 20px 0;
    text-align: left;
  }

  .yt-quick__icon {
    display: none;
  }

  .yt-quick__title {
    flex: 1;
    font-size: 16px;
    line-height: 24px;
  }

  .yt-quick__link {
    gap: 0;
    margin-top: 0;
    font-size: 0;
    line-height: 0;
  }

  .yt-quick__link .yt-arrow {
    width: 20px;
    height: 20px;
  }
}

html.is-reduced-motion .yt-showcase__slide.is-active .yt-showcase__bg {
  animation: none;
}

html.is-reduced-motion .yt-whatsnew__bg,
html.is-reduced-motion .yt-news__img {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .yt-showcase__slide.is-active .yt-showcase__bg {
    animation: none;
  }

  .yt-whatsnew__bg,
  .yt-news--home .yt-news__img {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Fidelity fixes (target homepage measurements)
   News cards are 390px wide and the fourth is cut by the viewport; the
   What's New grid goes edge-to-edge on phones; the active news tab is text
   only, with no red underline.
   -------------------------------------------------------------------------- */
.yt-news--home .yt-news__panels {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.yt-news--home .yt-news__track {
  display: flex;
  gap: 14px;
  padding-inline: max(var(--yt-gutter), calc((100vw - var(--yt-container)) / 2));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.yt-news--home .yt-news__card {
  flex: 0 0 390px;
}

.yt-news--home .yt-news__track::-webkit-scrollbar {
  display: none;
}

@media (max-width: 767px) {
  .yt-whatsnew > .yt-container--wide {
    padding-inline: 0;
  }

  .yt-whatsnew__head {
    padding-inline: var(--yt-gutter);
  }

  .yt-whatsnew__grid {
    gap: 8px;
  }

  .yt-whatsnew__card {
    height: 480px;
  }

  .yt-news--home .yt-news__track {
    gap: 14px;
    padding-inline: var(--yt-gutter);
  }

  .yt-news--home .yt-news__card {
    flex-basis: 85vw;
  }
}

@media (max-width: 767px) {
  /* Keep the target's bright field hero on phones; the desktop overlay is too
     heavy over the vertical crop. */
  .yt-hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.28) 0%,
      rgba(0, 0, 0, 0) 36%,
      rgba(0, 0, 0, 0.04) 70%,
      rgba(0, 0, 0, 0.62) 100%
    );
  }

  .yt-whatsnew__card::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.1) 34%,
      rgba(255, 255, 255, 0) 68%
    );
  }
}

.yt-news--home .yt-news__track {
  scroll-padding-inline: max(var(--yt-gutter), calc((100vw - var(--yt-container)) / 2));
}

@media (max-width: 767px) {
  .yt-news--home .yt-news__track {
    scroll-padding-inline: var(--yt-gutter);
  }
}

@media (min-width: 768px) {
  .yt-whatsnew__grid {
    gap: 12px;
  }
}
