/* Foldable / tablet band for the HOME page (PC index.html: css/style.css + css/body.css + js/main.js).
   Separate from css/foldable.css on purpose: only rules checked against the home markup. Linked LAST in <head>.
   Every rule sits inside a 640–1100 media query, so 390 (phones) and 1440 (desktop) render exactly as before.
   Safari-safe: grid/flex, transforms, clip-path inset(); no :has(), no color-mix(). main.js is not touched. */

/* ---------- A: 640–768 (phone layout is active here → widen it) ---------- */
@media (min-width:640px) and (max-width:768px){
  .wrap{width:calc(100% - 56px)}
  /* hero: the two CTAs side by side instead of two 640px-wide bars */
  .hero-v3 .hero-actions{flex-direction:row;flex-wrap:wrap}
  .hero-v3 .hero-actions .btn{width:auto;flex:0 0 auto;min-width:210px;padding-left:28px;padding-right:28px}
  /* "Jak działa": back to the 3-in-a-row track (vertical list left the right half empty) */
  .sl-track{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
  .sl-track::before{left:28px;right:28px;top:27px;bottom:auto;width:auto;height:2px;background:linear-gradient(90deg,#13B8EE,#68E2B4,#FFA04F)}
  .sl-track li{display:block}
  .sl-track li .sl-dot{margin:0 0 18px}
  .sl-track h3{margin-top:0}
  /* Zalety (9) + Baza wiedzy (9): 2 columns, the 9th tile centred instead of pinned left */
  .zt-grid,.ft-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .zt-grid > .zt,.ft-grid > .ft{grid-column:span 2}
  .zt-grid > .zt:nth-child(odd):last-child,.ft-grid > .ft:nth-child(odd):last-child{grid-column:2/span 2}
  /* CTA band: buttons inline */
  .cc-actions{flex-direction:row;justify-content:center;align-items:center}
  .cc-actions .btn{min-width:210px}
  /* app section: centred block under the devices */
  .as-copy{text-align:center;max-width:600px;margin:0 auto}
  .as-copy .kicker{justify-content:center}
  .as-copy .store-badges{justify-content:center}
  /* footer bottom row on one line again */
  .b-fbottom{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between}
}

/* ---------- whole band 640–1100 ---------- */
@media (min-width:640px) and (max-width:1100px){
  /* "O serwisie" 01–04: four full-width bars with one short line each (stair offsets at 769+) → 2×2 grid of cards */
  .sp-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .sp-list li,.sp-list li:nth-child(2),.sp-list li:nth-child(3),.sp-list li:nth-child(4){margin-left:0}
  .sp-list li{padding:22px 22px}
}

/* ---------- B: 769–1100 (desktop layout is active here → un-squeeze) ---------- */
@media (min-width:769px) and (max-width:1100px){
  /* Zalety + Baza wiedzy: 9 tiles in 2 columns left an orphan → 3×3 */
  .zt-grid,.ft-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* Produkty 769–900: a 240px label column left one narrow column of tools (a long single list) → label on top, tools 2-up like 640–768 */
@media (min-width:769px) and (max-width:900px){
  .ti-row{grid-template-columns:minmax(0,1fr);gap:14px}
  .ti-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:769px) and (max-width:1023px){
  .ct-meta a{min-height:44px;display:inline-flex;align-items:center}
}
/* landscape fold (short and wide, e.g. 920×700): keep the hero mockup from towering over the fold */
@media (min-width:769px) and (max-width:1100px) and (max-height:780px) and (orientation:landscape){
  .hero-v3 .hero-visual{max-width:680px;margin-left:auto;margin-right:auto}
}

/* ---------- Menu 640–900 (burger range): right side sheet instead of a full-screen list ----------
   Same as css/foldable.css on the inner pages (the home uses the same #mn markup; main.js opens it via html.mn-open).
   460px glass sheet from the right, page dimmed + blurred behind it (tap it to close: tiny script #mia-foldable-js),
   the clip-path reveal and the brand prism sweep are confined to the sheet. */
@media (min-width:640px) and (max-width:900px){
  .mn-bg{background:rgba(3,10,15,.5);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);cursor:pointer}
  .mn-prism,.mn-sheet{left:auto;right:0;width:min(460px,100%)}
  /* the brand-colour sweep travels far past its box: clip it to the sheet so it never spills over the page */
  .mn-prism{overflow:hidden;-webkit-clip-path:inset(0);clip-path:inset(0)}
  .mn-sheet{background:radial-gradient(420px 360px at 100% 0%,rgba(19,184,238,.26),transparent 65%),radial-gradient(380px 320px at 0% 100%,rgba(255,160,79,.16),transparent 65%),
      linear-gradient(180deg,#071722 0%,#06121A 60%,#050F16 100%);
    box-shadow:-24px 0 60px rgba(0,0,0,.45),inset 1px 0 0 rgba(255,255,255,.08)}
  .mn-scroll{padding-left:24px;padding-right:24px;text-align:left}
  .mn-link{font-size:34px;justify-content:flex-start;align-items:center;gap:12px}
  .mn-link .mn-num{margin-left:auto;transform:none}
  .mn-link::after{transform-origin:0 50%;background:linear-gradient(90deg,#13B8EE,#68E2B4 55%,#FFA04F)}
  .mn-link .mn-label{order:1}.mn-link .mn-plus{order:2;margin:0 0 0 2px}.mn-link .mn-num{order:3}
  .mn-acc-inner{display:flex;flex-direction:column;gap:6px}
  .mn-acc.open .mn-acc-inner{padding-bottom:6px}
  .mn-ph{margin:14px 2px 2px}
  .mn-pi{flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:14px;min-height:56px;padding:9px 12px;border-radius:16px;text-align:left;
    background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.015));box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);transition:background .2s,box-shadow .2s}
  .mn-pi:hover,.mn-pi:active{background:rgba(19,184,238,.1);box-shadow:inset 0 0 0 1px rgba(19,184,238,.35)}
  .mn-pi.is-current{box-shadow:inset 0 0 0 1.5px rgba(19,184,238,.55);background:rgba(19,184,238,.07)}
  .mn-pt{align-items:flex-start}
  .mn-pt b{font-size:15.5px;line-height:1.25}
  .mn-pt small{font-size:12.5px;line-height:1.3}
  .mn-all{min-height:44px;align-items:center;margin:6px 2px 4px}
  .mn-all span{display:inline-block;transform:scaleX(-1)}
  .mn-card{text-align:left;background:radial-gradient(120% 100% at 0% 0%,rgba(19,184,238,.28),transparent 60%),radial-gradient(90% 90% at 100% 100%,rgba(255,160,79,.20),transparent 60%),#0C2130}
  .mn-apps,.mn-acts,.mn-langs{justify-content:flex-start}
}
