/* CHOCO BONTÉ HERO V4 SAFE – portrait, Apollo-safe */
:root{
  --cbhg-primary:#c70342;
  --cbhg-gap:clamp(12px,1.15vw,18px);
  --cbhg-radius:clamp(18px,1.5vw,24px);
  --cbhg-content:1440px;
  --cbhg-side:max(16px, calc((100vw - var(--cbhg-content)) / 2));
}
.cb-hero-gallery{
  position:relative!important;
  display:block!important;
  width:100%!important;
  max-width:100vw!important;
  margin:0 0 clamp(28px,3vw,46px)!important;
  padding:clamp(14px,1.7vw,24px) 0 22px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:transparent!important;
  font-family:Montserrat,Arial,sans-serif!important;
}
.cb-hero-gallery *{box-sizing:border-box}
.cb-hero-gallery__inner,
.cb-hero-gallery__viewport{
  position:relative!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
.cb-hero-gallery__viewport{padding:8px 0 22px!important}
.cb-hero-gallery__track{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:stretch!important;
  gap:var(--cbhg-gap)!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0 var(--cbhg-side)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  list-style:none!important;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scroll-behavior:smooth;
}
.cb-hero-gallery__track::-webkit-scrollbar{display:none!important}

/* 4 celé + část páté. Výška reaguje na viewport, ale drží bezpečné minimum/maximum. */
.cb-hero-gallery__card{
  position:relative!important;
  flex:0 0 calc((min(100vw, var(--cbhg-content)) - 3.35 * var(--cbhg-gap)) / 4.35)!important;
  width:auto!important;
  min-width:235px!important;
  max-width:345px!important;
  height:clamp(430px,35vw,540px)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:var(--cbhg-radius)!important;
  background:#2b171b!important;
  box-shadow:0 14px 34px rgba(63,25,37,.14)!important;
  transform:none;
  isolation:isolate;
  transition:transform .32s ease,box-shadow .32s ease!important;
}
.cb-hero-gallery__card:hover{
  transform:translateY(-4px)!important;
  box-shadow:0 22px 48px rgba(63,25,37,.20)!important;
  opacity:1!important;
  filter:none!important;
}
.cb-hero-gallery__link{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  color:#fff!important;
  text-decoration:none!important;
}
.cb-hero-gallery__image{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  pointer-events:none!important;
  transform:scale(1.001)!important;
  filter:none!important;
  opacity:1!important;
  transition:transform .55s ease!important;
}
.cb-hero-gallery__card:hover .cb-hero-gallery__image{
  transform:scale(1.035)!important;
  filter:none!important;
  opacity:1!important;
}

/* Jednotný tmavý gradient pouze uvnitř karty – žádné zesvětlování sousedů. */
.cb-hero-gallery__link::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:1!important;
  pointer-events:none!important;
  background:linear-gradient(180deg,rgba(15,7,10,.08) 0%,rgba(15,7,10,.02) 36%,rgba(15,7,10,.22) 57%,rgba(12,5,8,.86) 100%)!important;
}
.cb-hero-gallery__content{
  position:absolute!important;
  z-index:3!important;
  left:clamp(18px,1.8vw,29px)!important;
  right:clamp(18px,1.8vw,29px)!important;
  bottom:clamp(20px,2vw,31px)!important;
  width:auto!important;
  max-width:none!important;
  color:#fff!important;
  transform:none!important;
}
.cb-hero-gallery__eyebrow{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  max-width:100%!important;
  min-height:28px!important;
  margin:0 0 12px!important;
  padding:7px 12px!important;
  border:1px solid rgba(255,255,255,.20)!important;
  border-radius:999px!important;
  background:rgba(199,3,66,.72)!important;
  color:#fff!important;
  box-shadow:0 5px 16px rgba(68,0,22,.12)!important;
  -webkit-backdrop-filter:blur(7px)!important;
  backdrop-filter:blur(7px)!important;
  font-size:clamp(9px,.68vw,11px)!important;
  line-height:1.2!important;
  font-weight:800!important;
  letter-spacing:.10em!important;
}
.cb-hero-gallery__title{
  margin:0 0 10px!important;
  color:#fff!important;
  font-size:clamp(26px,2.05vw,38px)!important;
  line-height:1.03!important;
  font-weight:800!important;
  letter-spacing:-.035em!important;
  text-shadow:0 2px 15px rgba(0,0,0,.25)!important;
}
.cb-hero-gallery__title .cb-pink{color:#ff7ba2!important}
.cb-hero-gallery__text{
  max-width:310px!important;
  margin:0 0 17px!important;
  color:rgba(255,255,255,.94)!important;
  font-size:clamp(11px,.78vw,13.5px)!important;
  line-height:1.45!important;
  font-weight:500!important;
  text-shadow:0 1px 9px rgba(0,0,0,.25)!important;
}
.cb-hero-gallery__cta{
  display:inline-flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:42px!important;
  padding:10px 15px!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--cbhg-primary)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.15)!important;
  font-size:clamp(10px,.72vw,12.5px)!important;
  font-weight:800!important;
  transform:none!important;
}
.cb-hero-gallery__cta::after{content:"→"!important;font-size:15px!important}

/* Navigace */
.cb-hero-gallery__nav{position:absolute!important;inset:0!important;z-index:8!important;pointer-events:none!important}
.cb-hero-gallery__button{
  position:absolute!important;top:48%!important;transform:translateY(-50%)!important;
  display:grid!important;place-items:center!important;width:50px!important;height:50px!important;
  padding:0!important;border:0!important;border-radius:50%!important;background:rgba(255,255,255,.96)!important;
  color:var(--cbhg-primary)!important;box-shadow:0 8px 24px rgba(63,25,37,.16)!important;
  cursor:pointer!important;pointer-events:auto!important;
}
.cb-hero-gallery__button--prev{left:max(8px,calc(var(--cbhg-side) - 24px))!important}.cb-hero-gallery__button--next{right:max(8px,calc(var(--cbhg-side) - 24px))!important}
.cb-hero-gallery__button:disabled{opacity:0!important;pointer-events:none!important}
.cb-hero-gallery__button svg{width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.2!important}
.cb-hero-gallery__progress{position:relative!important;width:112px!important;height:4px!important;margin:4px auto 0!important;overflow:hidden!important;border-radius:999px!important;background:#ece7e8!important}
.cb-hero-gallery__progress-bar{position:absolute!important;top:0!important;left:0!important;width:32%!important;height:100%!important;border-radius:inherit!important;background:var(--cbhg-primary)!important}

/* Větší monitory – stále 4+ a bez nekonečného růstu karet */
@media(min-width:1600px){
  .cb-hero-gallery__card{
    flex-basis:calc((var(--cbhg-content) - 3.35 * var(--cbhg-gap)) / 4.35)!important;
    max-width:345px!important;
    height:520px!important;
  }
}

/* Notebook/tablet landscape: 3+ karty, aby text nebyl namačkaný */
@media(min-width:800px) and (max-width:1199px){
  :root{--cbhg-gap:14px;--cbhg-side:24px}
  .cb-hero-gallery__card{
    flex-basis:calc((100vw - 48px - 2.25 * 14px) / 3.25)!important;
    min-width:225px!important;
    max-width:none!important;
    height:clamp(420px,48vw,510px)!important;
  }
  .cb-hero-gallery__title{font-size:clamp(26px,3vw,36px)!important}
}

/* Mobil: 1,5 karty */
@media(max-width:799px){
  :root{--cbhg-gap:12px;--cbhg-side:16px}
  .cb-hero-gallery{padding:10px 0 24px!important;margin-bottom:30px!important}
  .cb-hero-gallery__viewport{padding:6px 0 18px!important}
  .cb-hero-gallery__track{
    gap:12px!important;padding:0 16px!important;
    scroll-padding-left:16px!important;scroll-snap-type:x mandatory!important;
  }
  .cb-hero-gallery__card{
    flex:0 0 calc((100vw - 44px) / 1.5)!important;
    width:auto!important;min-width:0!important;max-width:none!important;
    height:clamp(390px,108vw,500px)!important;
    border-radius:22px!important;scroll-snap-align:start!important;
  }
  .cb-hero-gallery__card:hover{transform:none!important}
  .cb-hero-gallery__card:hover .cb-hero-gallery__image{transform:scale(1.001)!important}
  .cb-hero-gallery__content{left:18px!important;right:18px!important;bottom:19px!important}
  .cb-hero-gallery__eyebrow{min-height:26px!important;margin-bottom:10px!important;padding:6px 10px!important;font-size:9px!important}
  .cb-hero-gallery__title{font-size:clamp(25px,7.5vw,35px)!important}
  .cb-hero-gallery__text{font-size:11.5px!important;margin-bottom:14px!important}
  .cb-hero-gallery__cta{min-height:39px!important;padding:9px 13px!important;font-size:10px!important}
  .cb-hero-gallery__nav{display:none!important}
  .cb-hero-gallery__progress{width:90px!important}
}
@media(max-width:390px){
  .cb-hero-gallery__card{height:clamp(475px,142vw,570px)!important}
  .cb-hero-gallery__title{font-size:24px!important}
}
@media(prefers-reduced-motion:reduce){
  .cb-hero-gallery__card,.cb-hero-gallery__image,.cb-hero-gallery__content,.cb-hero-gallery__cta{transition:none!important}
}
