/* Sambuild Group DC – herovideo. Läggs efter styles.css. */

/* Video-first hero. The existing .hero .bg::after-gradient remains above it. */
.hero .bg .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 1;
  pointer-events: none;
}

/* Paus-/spelaknapp (WCAG 2.2.2) */
.hero-video-toggle {
  position: absolute;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(4, 19, 26, .45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  padding: 0;
  opacity: 1;
}
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle:focus-visible { outline: 2px solid #7FF0D4; outline-offset: 3px; }
.hero-video-toggle .i-play { display: none; }
.hero-video-toggle.is-paused .i-play { display: block; }
.hero-video-toggle.is-paused .i-pause { display: none; }

/* "Se filmen"-knapp – samma utseende som .pill.ghost, men som <button>.
   Nollställer webbläsarens och sajtens generella button-stilar. */
.hero .film-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: auto;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  padding: 15px 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  line-height: inherit;
  opacity: 1;
  cursor: pointer;
}
.hero .film-open:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); }
.hero .film-open[hidden] { display: none; }
.film-open svg { flex: none; }

/* Filmdialog */
.film-dialog {
  position: fixed;
  inset: 0;
  margin: auto; /* sajten nollställer margin på alla element */
  height: fit-content;
  max-height: 92vh;
  width: min(1200px, 94vw);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #000;
  overflow: hidden;
}
.film-dialog::backdrop { background: rgba(2, 10, 14, .86); }
.film-dialog video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.film-dialog .film-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  opacity: 1;
  cursor: pointer;
}
.film-dialog .film-caption {
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  color: #9fb3ba;
  background: #04131a;
}

@media (prefers-reduced-motion: reduce) {
  .hero .bg .hero-video { display: none; }
  .hero-video-toggle { display: none; }
}
