/* === HOTFIX Mobile/Brand/Layout — v0904d === */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Playfair+Display:wght@400;600;700;800;900&display=swap');

/* Brand fonts */
html, body{ font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important; }
h1,h2,h3,h4,h5,h6, .h1,.h2,.h3{ font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important; }

/* Hero portrait sizing (only the big portrait) */
img[src*="foto-1200"]{
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 900px){
  img[src*="foto-1200"]{ max-width: 68vw; margin: 0 auto; }
}

/* Hide hamburger everywhere */
.hamburger{ display: none !important; }

/* CTA "Umów wizytę" — ensure readable text (usually on ZnanyLekarz link) */
a[href*="znanylekarz"], .btn-primary, .btn-visit{
  color: #fff !important;
  text-decoration: none;
}

/* Info grid (DBT / 3-10-30) responsive */
.infogrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 720px){
  .infogrid{ grid-template-columns: 1fr; }
}

/* One-card carousel on mobile */
@media (max-width: 900px){
  .toc .carousel-track, .cycle-carousel .carousel-track, .cycle-carousel .cycle-track, .toc .toc-track, .toc > ul, .toc > ol{
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 2px;
  }
  .toc .carousel-track > li,
  .cycle-carousel .carousel-track > li,
  .cycle-carousel .cycle-track > li,
  .toc .toc-track > li,
  .toc > ul > li, .toc > ol > li{
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
}

/* Floating round arrows */
.toc, .cycle-carousel{ position: relative; }
.toc .toc-nav, .cycle-carousel .toc-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: inline-flex; align-items:center; justify-content:center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.08);
  line-height: 1; font-size: 22px;
  cursor: pointer; user-select: none;
}
.toc .toc-nav.prev, .cycle-carousel .toc-nav.prev{ left: 6px; }
.toc .toc-nav.next, .cycle-carousel .toc-nav.next{ right: 6px; }

/* Remove any accidental "czytaj..." pseudo content */
.card h3::after, .toc-link .title::after { content: unset !important; }

/* v0904e — homepage hero portrait exact sizing */
.blog-hero .bh-photo img,
img[src*="piotr-hero-bw"]{
  max-width: 420px !important;
  width: 100% !important;
  height: auto !important;
  display: block;
}
@media (max-width: 900px){
  .blog-hero .bh-photo img,
  img[src*="piotr-hero-bw"]{
    max-width: 68vw !important;
    margin-left: auto;
    margin-right: auto;
  }
}

/* === v0904f — tighten spacing above ToC on homepage === */
.infogrid{ margin-bottom: 16px !important; }
.section-toc, .toc-section, .toc-wrapper{ margin-top: 12px !important; padding-top: 0 !important; }
.toc{ margin-top: 12px !important; }

/* === v0904g — 20% smaller hero portrait + tighter spacing above ToC === */

/* Hero portrait: ~20% smaller vs v0904e (420px -> 336px; 68vw -> 54vw) */
.blog-hero .bh-photo img,
img[src*="piotr-hero-bw"]{
  max-width: 336px !important;
  width: 100% !important;
  height: auto !important;
}
@media (max-width: 900px){
  .blog-hero .bh-photo img,
  img[src*="piotr-hero-bw"]{
    max-width: 54vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Tighter spacing above ToC */
.infogrid{ margin-bottom: 6px !important; }
.section-toc, .toc-section, .toc-wrapper{ margin-top: 6px !important; padding-top: 0 !important; }
.toc{ margin-top: 6px !important; }

/* === v0904h — tighter ToC spacing + slightly smaller portrait === */

/* Portrait a bit smaller */
.blog-hero .bh-photo img,
img[src*="piotr-hero-bw"]{
  max-width: 320px !important;  /* was 336px */
}
@media (max-width: 900px){
  .blog-hero .bh-photo img,
  img[src*="piotr-hero-bw"]{
    max-width: 52vw !important; /* was 54vw */
  }
}

/* Slam the vertical gap between infogrid and ToC */
.infogrid{ margin-bottom: 0 !important; }
.infogrid + *{ margin-top: 8px !important; }                 /* any next block */
.infogrid + section, .infogrid + div{ margin-top: 8px !important; } /* common wrappers */
.section-toc, .toc-section, .toc-wrapper, .toc{ 
  margin-top: 0 !important; 
  padding-top: 0 !important;
}
/* If ToC is inside a card/panel wrapper */
.infogrid + .card, .infogrid + .panel, .infogrid + .box{ margin-top: 8px !important; }
