/* Place the active nav on the sides of the card list */
#blog .columns{ position:relative !important; }/* Banner-like thumbs: consistent visual rhythm */
#blog .toc-link .thumb{
  height:160px !important;
  border-radius:16px !important;
  overflow:hidden !important;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
}#blog .toc-link .thumb img{
  width:100% !important; height:100% !important;
  object-fit:cover !important; display:block !important;
}@media (max-width:900px){
  #blog .toc-link .thumb{ height:150px !important; }}

/* ============================================================
   POMOC (Help carousel)
============================================================ */

/* Ensure the carousel is a positioned context for floating arrows */
#helpWrap{ position:relative !important; }/* Remove the teal overlay from covering the image */
#helpWrap .card-bg .bg{ z-index:1 !important; }#helpWrap .card-bg .wrap{ position:relative !important; z-index:2 !important; }/* Make sure the banner is above overlay and visible */
#helpCarousel .help-card .help-banner{
  position:relative !important;
  z-index:2 !important;
  height:160px !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:transparent !important;
}#helpCarousel .help-card .help-banner img{
  width:100% !important; height:100% !important;
  object-fit:cover !important; display:block !important;
}@media (max-width:900px){
  #helpCarousel .help-card .help-banner{ height:150px !important; }
}

/* ============================================================
   DO NOT TOUCH OPINIE (left intentionally empty)
============================================================ */

/* === Adjust spacing after "O mnie" section === */
.about-section{
  margin-bottom: 1.8rem; /* was larger, now tightened */
}

/* === Section spacing tweak around "O mnie" === */
.about-section{
  margin-bottom: 1.25rem; /* was visually too large */
  padding-bottom: 0.25rem;
}

/* reduce top margin of the immediate next section and its first heading */
.about-section + section,
.about-section + div,
.about-section + article{
  margin-top: 0.25rem;
  padding-top: 0;
}
.about-section + section h2:first-child,
.about-section + div h2:first-child,
.about-section + article h2:first-child{
  margin-top: 0.2em;
}

/* === Tighter section spacing tweak === */
.about-section{
  margin-bottom: 0.5rem !important;
  padding-bottom: 0 !important;
}

.about-section + section,
.about-section + div,
.about-section + article{
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.about-section + section h2:first-child,
.about-section + div h2:first-child,
.about-section + article h2:first-child{
  margin-top: 0.15em !important;
}

/* === Section spacing: tighter pass === */
.about-section{
  margin-bottom: 0.75rem;
  padding-bottom: 0.2rem;
}
.about-section p:last-of-type{
  margin-bottom: 0.3em;
}
/* Nuke top spacing on whatever comes right after */
.about-section + *{
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.about-section + * h2:first-child{
  margin-top: 0.1em !important;
}

/* === Global section spacing tightening === */
section, .section, article{
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}

/* Tighter headings inside sections */
section h2, .section h2, article h2{
  margin-top: 0.3em !important;
  margin-bottom: 0.4em !important;
}

/* O mnie photo wrap fix */
.about-section .about-photo{
  float: right !important;
  width: clamp(200px, 28%, 340px) !important;
  margin: 0 0 0.5rem 1rem !important;
  border-radius: 8px;
}
@media (max-width: 767px){
  .about-section .about-photo{
    float: none !important;
    display: block;
    margin: 0 auto 0.75rem !important;
    width: min(70%, 300px) !important;
  }
}

/* === Global section spacing tighten (conservative) === */
section{ 
  margin-top: 0.5rem;
  margin-bottom: 0.9rem;
}
section + section{
  margin-top: 0.5rem;
}

/* Headings rhythm (common for section headers) */
h2{
  margin-top: 0.25em;
  margin-bottom: 0.4em;
}

/* === Ensure text wraps the "O mnie" photo === */
.about-section{
  overflow: visible !important; /* prevent new BFC that blocks floats */
}
.about-section > *{
  overflow: visible !important;
}
.about-section .about-photo{
  float: right !important;
  shape-outside: inset(0 round 6px);
}
/* clearfix to avoid overlap with following section */
.about-section::after{
  content: "";
  display: block;
  clear: both;
}

/* === About section: proper wrap and spacing === */
.about-section .photo-placeholder{
  float: right;
  width: clamp(220px, 32%, 360px);
  margin: 0 0 0.75rem 1rem;
}
.about-section::after{ content:""; display:block; clear: both; }

/* fallback for browsers not wrapping due to nested elements */
.about-section .photo-placeholder img,
.about-section .photo-placeholder picture{
  display: block;
}

/* === Vertical rhythm: sections & titles === */
section.container{
  margin-top: 0.35rem;
  margin-bottom: 0.7rem;
}
section.container + section.container{
  margin-top: 0.4rem;
}
h2.section-title{
  margin-top: 0.2em;
  margin-bottom: 0.35em;
  padding-bottom: 0.2em;
}
/* Make the specific transition O-mnie -> next section tight */
#o-mnie.about-section{ margin-bottom: 0.5rem; }
#o-mnie.about-section + section{ margin-top: 0; }
#o-mnie.about-section + section h2.section-title{ margin-top: 0.1em; }

/* === Global tighter spacing between sections (safe) === */
main > section,
section.section-block{
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}
/* ensure consecutive sections don't add extra gap */
main > section + section,
section.section-block + section.section-block{
  margin-top: 0.35rem;
}

/* Headings: slightly tighter */
main > section h2:first-child,
section.section-block h2:first-child{
  margin-top: 0.1em;
  margin-bottom: 0.35em;
}

/* === Contain hero and opinions width === */
.hero-inner,
.opinions-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* If opinions has a full-width background, keep inner content aligned */
.opinions-inner > *{
  position: relative;
  z-index: 1;
}

/* Minor safeguard for wrap in O mnie already applied */
.about-section .photo-placeholder{ float:right; }
.about-section::after{ content:""; display:block; clear: both; }

/* === Tighter rhythm for subsequent sections === */
.section-tight{
  margin-top: 0.35rem;
  margin-bottom: 0.7rem;
}
.section-tight > h2:first-child{
  margin-top: 0.1em;
  margin-bottom: 0.35em;
}
.section-tight h3{
  margin-top: 0.6em;
  margin-bottom: 0.35em;
}
/* keep cards/boxes breathing slightly */
.section-tight .card, .section-tight .box{
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

/* === Aggressive tighten for sections after "Jak pracuję" === */
.section-tight{
  margin-top: 0.25rem !important;
  margin-bottom: 0.55rem !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.section-tight + .section-tight{
  margin-top: 0.28rem !important;
}
.section-tight > .container{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.section-tight h2:first-child{
  margin-top: 0.05em !important;
  margin-bottom: 0.3em !important;
}
.section-tight h3{
  margin-top: 0.5em !important;
  margin-bottom: 0.3em !important;
}
.section-tight p{
  margin-top: 0.32em !important;
  margin-bottom: 0.52em !important;
}
/* Specific compacting inside "Jak pracuję" */
#jak-pracuje p{
  margin-top: 0.28em !important;
  margin-bottom: 0.46em !important;
}
#jak-pracuje ul{
  margin-top: 0.35em !important;
  margin-bottom: 0.4em !important;
}
#jak-pracuje ul:last-of-type{
  margin-bottom: 0.25em !important;
}
/* Reduce extra whitespace before following section after lists/cards */
.section-tight .card:last-child,
.section-tight .box:last-child,
.section-tight ul:last-child,
.section-tight p:last-child{
  margin-bottom: 0.25em !important;
}

/* === Ultra-compact paragraph rhythm in 'Jak pracuję' === */
#jak-pracuje p{
  margin-top: 0.18em !important;
  margin-bottom: 0.32em !important;
  line-height: 1.5;
}
#jak-pracuje p + p{
  margin-top: 0.16em !important;
}
#jak-pracuje h3{
  margin-top: 0.45em !important;
  margin-bottom: 0.3em !important;
}
