/* =========================================================
   Wdrozenia AI — custom tweaks (v10) 
   - masonry columns for expandable tiles
   - inline icon + title row in cards
   - accordion behavior: one open per section (handled in JS)
   ========================================================= */

/* Prevent equal-height stretching in classic grids (fallback) */
.grid,
.pricing{ align-items: start; }
.grid > *,
.pricing > *{ align-self: start; }

/* --- Masonry layout (independent columns) --- */
.masonry{
  /* default; overridden by data-cols + media queries */
  --masonry-cols: 3;
  display:flex;
  gap: 16px;
  align-items:flex-start;
}
.masonry[data-cols="2"]{ --masonry-cols: 2; }
.masonry[data-cols="3"]{ --masonry-cols: 3; }
.masonry[data-cols="4"]{ --masonry-cols: 4; }

/* Responsive column count (JS reads --masonry-cols and rebuilds columns) */
@media (max-width: 980px){
  .masonry[data-cols="3"],
  .masonry[data-cols="4"]{ --masonry-cols: 2; }
}
@media (max-width: 720px){
  .masonry{ --masonry-cols: 1; }
}

.masonry-col{
  flex: 1 1 0;
  min-width: 0;
  display:flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Card header row (icon inline with title) --- */
.card-head,
.plan-head{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* smaller badge for inline headers */
.icon-badge.inline{
  width: 34px;
  height: 34px;
  border-radius: 14px;
}
.icon-badge.inline .icon{ width: 18px; height: 18px; }

.card-head strong,
.plan-head strong,
.plan-head h3{
  margin: 0;
}

/* The default .card strong has margin-top:8px; remove inside header */
.card .card-head strong{ margin-top: 0; display:inline; }

/* Helper text under header */
.card-subtitle{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* tighter spacing for icon lists used inside expandable content */
.card-more .icon-list{ margin-top: 10px; }
.card-more .note{ margin-top: 12px; }

/* Make expandable button more consistent across cards/plans */
.expand-toggle{
  font-weight: 600;
}

/* Optional: make "Czytaj więcej" sit on its own line on narrow screens */
@media (max-width: 420px){
  .expand-toggle{ left: 14px; right: auto; }
}

/* --- Section anchors offset for sticky header --- */
:target{ scroll-margin-top: 90px; }


/* --- Expand hotspot (icon + title row is clickable) --- */
.expandable .card-head.expand-hotspot,
.expandable .plan-head.expand-hotspot{
  cursor: pointer;
}

/* When collapsed, the whole tile behaves like a clickable surface */
.expandable:not(.is-open){
  cursor: pointer;
}
.expandable .card-head.expand-hotspot:focus-visible,
.expandable .plan-head.expand-hotspot:focus-visible{
  outline: 2px solid rgba(17,24,39,0.3);
  outline-offset: 4px;
  border-radius: 14px;
}

/* --- Icon bullets for generic lists (.bullets) --- */
.bullets{
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.bullets li{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}

.bullets li::before{
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-color: var(--theme-icon, var(--icon-accent));
  -webkit-mask: url('../icons/check.svg') no-repeat center / contain;
  mask: url('../icons/check.svg') no-repeat center / contain;
  opacity: 0.9;
  margin-top: 1px;
}
