/* downholesafetyvalves.com: home page hero slider (added 2026-11-16).
   Extends the .hero block in style.css. Without JavaScript only the first slide is shown. */
.hero__slides { position: relative; flex: 1; display: grid; }
.hero__slide { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; min-width: 0; }
.hero__slide .hero__body { flex: 1; }

.js .hero__slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s var(--ease), visibility 0s linear .7s;
}
.js .hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .7s var(--ease);
}
.no-js .hero__slide:not(:first-child) { display: none; }

/* Product slides: render on the right, fading into the navy hero */
.hero__slide--product .hero__media {
  background:
    radial-gradient(120% 90% at 78% 40%, #1A3D6B 0%, var(--navy) 62%, var(--navy-900) 100%);
}
.hero__slide--product .hero__media img {
  position: absolute;
  top: 0;
  right: 0;
  width: 68%;
  height: 100%;
  object-fit: cover;
  object-position: 32% 55%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%);
  mask-image: linear-gradient(90deg, transparent 0, #000 34%);
}
.hero__slide--product .hero__media::after {
  background:
    linear-gradient(0deg, rgba(11, 31, 58, .6) 0%, rgba(11, 31, 58, 0) 30%),
    linear-gradient(180deg, rgba(11, 31, 58, .35) 0%, rgba(11, 31, 58, 0) 24%);
}
.hero__slide--product .hero__title { font-size: 54px; line-height: 60px; max-width: 11em; }
.hero__slide--product .hero__lead { max-width: 540px; }
.hero__flag {
  display: inline-block;
  margin-left: var(--s1);
  padding: 3px 8px;
  border: 1px solid var(--orange);
  border-radius: 2px;
  color: var(--orange);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Controls */
.hero__controls { position: absolute; left: 0; right: 0; bottom: var(--s2); z-index: 2; pointer-events: none; }
.hero__controls-in { display: flex; align-items: center; gap: var(--s1); }
.hero__controls button { pointer-events: auto; }
.hero__ctl {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--on-dark-rule);
  border-radius: 50%;
  background: rgba(7, 22, 41, .55);
  color: var(--white);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.hero__ctl:hover { background: rgba(7, 22, 41, .85); border-color: var(--white); }
.hero__ctl:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.hero__ctl svg { width: 16px; height: 16px; }
.hero__dots { display: flex; align-items: center; gap: 4px; pointer-events: auto; }
.hero__dot {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hero__dot::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 28px; height: 4px;
  margin: -2px 0 0 -14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  transition: background .2s var(--ease);
}
.hero__dot:hover::before { background: rgba(255, 255, 255, .7); }
.hero__dot[aria-current="true"]::before { background: var(--orange); }
.hero__dot:focus-visible { outline: 2px solid var(--white); outline-offset: 0; border-radius: 2px; }
.no-js .hero__controls { display: none; }

@media (max-width: 1023px) {
  .hero__slide--product .hero__title { font-size: 44px; line-height: 50px; }
}
@media (max-width: 767px) {
  .hero__slide--product .hero__media img {
    width: 100%;
    object-position: 66% 50%;
    -webkit-mask-image: none;
    mask-image: none;
    opacity: .85;
  }
  .hero__slide--product .hero__media::after {
    background: linear-gradient(0deg, rgba(11, 31, 58, .95) 0%, rgba(11, 31, 58, .55) 45%, rgba(11, 31, 58, .05) 75%);
  }
  .hero__slide--product .hero__title { font-size: 34px; line-height: 40px; }
  .hero__slide .hero__body { padding-block: var(--s6) 80px; }
  .hero__controls { bottom: var(--s1); }
}
@media (prefers-reduced-motion: reduce) {
  .js .hero__slide, .js .hero__slide.is-active { transition: none; }
}

.hero__ctl .ico-play { display: none; }
.hero__ctl.is-paused .ico-pause { display: none; }
.hero__ctl.is-paused .ico-play { display: block; }
