/* =========================
   CAROUSEL (masthead) – VIDEO + RESPONSIVE (CLEAN)
   desktop: cover | mobil: contain
   + fluid max-width (větší na velkých monitorech)
   ========================= */

header.masthead { width: 100%; }

/* zruš padding/boxy na wraperech – box dělá carousel */
header.masthead .media-wrapper,
header.masthead .media-inner{
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* Slidy */
header.masthead .carousel .slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

header.masthead .carousel .slide.active{
  opacity: 1;
  pointer-events: auto;
}

/* Video */
header.masthead .carousel .slide-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;       /* desktop: bez pruhů */
  object-position: center;

  background: #fff;
}

/* Overlay pro čitelnost (volitelné) */
header.masthead .carousel::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.00) 0%,
    rgba(0,0,0,0.08) 45%,
    rgba(0,0,0,0.22) 75%,
    rgba(0,0,0,0.35) 100%
  );
}

/* Obsah nad videem/overlayem */
header.masthead .carousel .slide-content{
  position:absolute;
  inset:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:16px;
  color:#fff;
}

/* Šipky */
header.masthead .carousel .carousel-arrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:44px;
  height:44px;
  border:0;
  border-radius:999px;
  cursor:pointer;
  z-index:10;

  display:grid;
  place-items:center;

  background: rgba(0,0,0,0.45);
  color:#fff;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  transition: background 200ms ease, transform 200ms ease;
}

header.masthead .carousel .carousel-arrow:hover{
  background: rgba(0,0,0,0.65);
  transform: translateY(-50%) scale(1.03);
}

header.masthead .carousel .carousel-arrow:active{
  transform: translateY(-50%) scale(0.97);
}

header.masthead .carousel .carousel-arrow:focus-visible{
  outline: 3px solid rgba(255,255,255,0.85);
  outline-offset: 2px;
}

header.masthead .carousel .carousel-arrow.prev{ left:12px; }
header.masthead .carousel .carousel-arrow.next{ right:12px; }

header.masthead .carousel .carousel-arrow span{
  font-size: 28px;
  line-height: 1;
}

/* Dots – kosoobdélníky */
header.masthead .carousel .carousel-controls{
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  gap: 10px;
  align-items: center;
}

header.masthead .carousel .carousel-controls .dot{
  width: 36px;
  height: 12px;
  border: 0;
  border-radius: 4px;
  background: rgba(255,255,255,0.55);
  cursor: pointer;

  transform: skewX(-25deg);
  transition: transform 200ms ease, background 200ms ease, opacity 200ms ease;
}

header.masthead .carousel .carousel-controls .dot:hover{
  background: rgba(255,255,255,0.75);
  transform: skewX(-25deg) scale(1.05);
}

header.masthead .carousel .carousel-controls .dot.active{
  background: #fff;
  opacity: 1;
  transform: skewX(-25deg) scale(1.10);
}

/* Mobil */
@media (max-width: 768px){
  header.masthead .carousel{
    width: 88%;
    max-width: 520px;
    margin: 18px auto;

    aspect-ratio: auto;
    height: clamp(260px, 40vh, 420px);

    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,.10);
  }

  header.masthead .carousel .slide-video{
    object-fit: contain; /* mobil: celé video */
  }

  header.masthead .carousel .carousel-arrow{
    width:38px;
    height:38px;
  }
  header.masthead .carousel .carousel-arrow.prev{ left:8px; }
  header.masthead .carousel .carousel-arrow.next{ right:8px; }

  header.masthead .carousel .carousel-controls{
    bottom: 10px;
    gap: 8px;
  }
  header.masthead .carousel .carousel-controls .dot{
    width: 24px;
    height: 9px;
    border-radius: 3px;
  }
  header.masthead .carousel .carousel-controls .dot.active{
    transform: skewX(-25deg) scale(1.08);
  }
}

/* Extra malé telefony */
@media (max-width: 380px){
  header.masthead .carousel{
    width: 92%;
    max-width: 360px;
    height: clamp(220px, 38vh, 360px);
  }
  header.masthead .carousel .carousel-controls .dot{
    width: 20px;
    height: 8px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  header.masthead .carousel .slide,
  header.masthead .carousel .carousel-arrow,
  header.masthead .carousel .carousel-controls .dot{
    transition: none;
  }
}

/* CAROUSEL BOX */
header.masthead .carousel{
  position: relative;
  overflow: hidden;

  width: 92%;
  /* ? hlavní změna: roste s monitorem, ale má rozumný strop */
  max-width: clamp(1300px, 92vw, 2400px);

  margin: 40px auto;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0,0,0,.12);

  aspect-ratio: 16 / 9;
  height: auto;

  background: #fff; /* barva pruhů při contain */
}

/* =========================
   JEDNOTNÝ BOX PRO VŠECHNO
   ========================= */

/* Šířka boxu – nastavíš jednou a platí všude */
:root{
  --box-w: 92%;
  --box-max: 1300px;
}

/* Každá media sekce má stejný “container” */
.media-section{
  width: 100%;
}

/* Tenhle wrapper je TEN JEDINÝ, co řídí šířku */
.media-wrapper{
  width: var(--box-w);
  max-width: var(--box-max);
}

/* Mobil – větší odsazení nahoře a dole */
@media (max-width: 768px){
  .media-wrapper{
    width: var(--box-w);
    max-width: var(--box-max);
    height: auto;
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

/* Vnitřek jen drží obsah, ať se chová konzistentně */
.media-inner{
  width: 100%;
}

/* Všechny media prvky se roztáhnou na šířku boxu */
.media-wrapper img,
.media-wrapper video{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;     /* pokud chceš – můžeš dát pryč */
}

/* Video v sekcích ať drží poměr a ořízne se hezky */
.media-wrapper video{
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Mobil – ať je celé video vidět (contain) */
@media (max-width: 768px){
  .media-wrapper video{
    object-fit: contain;
    background: #000;
  }
}

/* =========================
   TVŮJ HERO CAROUSEL – 100% boxu
   ========================= */

header.masthead{
  width: 100%;
}

/* DŮLEŽITÉ: carousel nesmí mít vlastní width/max-width!
   Šířku řídí .media-wrapper */
header.masthead .carousel{
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  border-radius: 14px;     /* sladění s ostatními */
}

/* Slide a video uvnitř */
header.masthead .carousel .slide{
  display: none;
  width: 100%;
}

header.masthead .carousel .slide.active{
  display: block;
}

header.masthead .carousel .slide-video{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Mobil – stejně jako ostatní videa */
@media (max-width: 768px){
  header.masthead .carousel .slide-video{
    object-fit: contain;
    background: #000;
  }
}

/* =========================
   Bootstrap carousel taky do boxu
   ========================= */
.media-carousel{
  margin-top: 20px;
}

.media-carousel .carousel,
.media-carousel .carousel-inner,
.media-carousel .carousel-item{
  width: 100%;
}

.media-carousel img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}