/* /assets/css/hero.css
   HERO gallery – final override (nadpisuje style.css)
*/

/* --- HERO layout (bezpieczne) --- */
section.hero{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px){
  section.hero{
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ============================================================
   PRAWA KOLUMNA HERO: separator bez psucia szerokości obrazka
   ============================================================ */

section.hero > .hero-photo.hero-media{
  position: relative !important;

  /* usuń „kartowe” wrażenie wynikające z padding/border */
  border-left: none !important;
  padding-left: 0 !important;

  display: flex !important;
  align-items: stretch !important;
  min-height: 0 !important;
}

/* separator jako pseudo-element */
@media (min-width: 901px){
  section.hero > .hero-photo.hero-media::before{
    content: "" !important;
    position: absolute !important;
    left: -24px !important;      /* odległość separatora od galerii */
    top: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    background: #e0e0e0 !important;
  }
}

/* Desktop: hero ma być kwadratem */
@media (min-width: 901px){
  section.hero > .hero-photo.hero-media{
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
  }
}

/* Mobile: 16:10 i bez separatora */
@media (max-width: 900px){
  section.hero > .hero-photo.hero-media{
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
  }
  section.hero > .hero-photo.hero-media::before{
    content: none !important;
  }
}

/* ============================================================
   WNĘTRZE: card-media w hero ma być „czystą ramką”
   ============================================================ */

section.hero > .hero-photo.hero-media > .card-media{
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto !important;

  /* zabij styl kart */
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  /* hero look */
  border-radius: 24px !important;
  overflow: hidden !important;
  position: relative !important;
}

/* obraz MA WYPEŁNIAĆ cały obszar */
section.hero > .hero-photo.hero-media > .card-media > img.card-main-img{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;

  /* zabij ratio z kart/galerii */
  aspect-ratio: auto !important;
  max-width: none !important;
}

/* overlay */
section.hero > .hero-photo.hero-media .gal-overlay{
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
}

/* dots */
section.hero > .hero-photo.hero-media .gal-dots{
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 14px !important;
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

/* buttons (spójnie, ale nie agresywnie) */
section.hero > .hero-photo.hero-media .gal-btn{
  z-index: 6 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,.45) !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  -webkit-tap-highlight-color: transparent !important;
}
/* --- HERO polish --- */

/* subtelny cień jak w designie kart */
section.hero > .hero-photo.hero-media > .card-media{
  box-shadow: 0 14px 36px rgba(0,0,0,.10) !important;
  background: #f3f3f3 !important;
}

/* popraw kadrowanie – zwykle lepiej wygląda „center top” */
section.hero > .hero-photo.hero-media > .card-media > img.card-main-img{
  object-position: 50% 20% !important; /* zmień na 50% 30% jeśli trzeba */
}

/* desktop: pokaż strzałki dopiero na hover */
@media (hover: hover) and (pointer: fine){
  section.hero > .hero-photo.hero-media .gal-btn{
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity .15s ease !important;
  }
  section.hero > .hero-photo.hero-media > .card-media:hover .gal-btn{
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
@media (min-width: 901px){
  section.hero{
    gap: 40px !important;
  }
  section.hero > .hero-photo.hero-media{
    max-width: 520px !important; /* opcjonalnie ogranicza prawą kolumnę */
    justify-self: end !important;
  }
}
