/* ===== Programs page: Sections 1–3 ===== */

/* Section 1: Hero with photo stack */
.prog-hero{
  background:
    radial-gradient(720px 320px at 6% -10%, rgba(127,255,212,.10), transparent 60%),
    radial-gradient(620px 260px at 100% 10%, rgba(75,211,255,.08), transparent 60%);
}
.prog-hero-grid{ display:grid; gap:28px; grid-template-columns: 1fr; }
.hero-copy h1{ margin:0 0 8px; font-size: var(--step-3); line-height:1.12; }
.hero-copy .lead{ color: var(--text); margin: 10px 0 8px; font-size: var(--step-0); }
.hero-copy p{ color: var(--muted); }
.hero-bullets{ margin:10px 0 0; padding:0 0 0 18px; }

.photo-stack{ position:relative; display:grid; gap:12px; justify-items:center; }
.stack-item{ margin:0; width:min(100%, 350px); }
.stack-item img{ box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
.stack-item figcaption{ text-align:center; color:var(--muted); font-size:var(--step--1); margin-top:6px; }

/* fan layout on medium+ screens */
@media (min-width: 820px){
  .prog-hero-grid{ grid-template-columns: 1.1fr .9fr; align-items:center; }
  .photo-stack{ height: 420px; }
  .stack-item{ position:absolute; left:50%; translate:-50% 0; }
  .stack-item.s1{ top:0; transform: rotate(-3deg); }
  .stack-item.s2{ top:70px; transform: rotate(3deg); }
  .stack-item.s3{ top:140px; transform: rotate(-2deg); }
  .photo-stack .stack-item:hover img{ transform: translateY(-4px) scale(1.02); filter:saturate(1.06); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
}

.block-calendar .intro{ color: var(--muted); margin: 8px 0 12px; }

.calendar-rail{
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap:12px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;

  /* ключ: внутренние поля + корректная маска */
  padding-inline: 24px;                 /* визуальный «бордюр» для контента */
  scroll-padding-inline: 24px;          /* чтобы снап не прятал начало под маску */

  /* маска начинается после 24px и за 24px до края */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);

  padding-block: 6px;
}

/* На узких — маску полностью убираем */
@media (max-width: 520px){
  .calendar-rail{
    -webkit-mask-image: none;
            mask-image: none;
    padding-inline: 16px;
    scroll-padding-inline: 16px;
  }
}



/* Section 3: Track Comparison Matrix */
.matrix{
  background:
    radial-gradient(640px 260px at 0% 0%, rgba(75,211,255,.07), transparent 60%);
}
.matrix .intro{ color: var(--muted); margin: 8px 0 16px; }

.matrix-grid{ display:grid; gap:16px; grid-template-columns:1fr; align-items:start; }
.table[role="table"]{ display:grid; border:1px solid rgba(255,255,255,.08); border-radius: var(--radius); overflow:hidden; }
.row{ display:grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.row.head{ background: rgba(255,255,255,.06); font-weight:600; }
.cell{ border-bottom:1px solid rgba(255,255,255,.06); padding:10px; }
.row:last-child .cell{ border-bottom:none; }

.matrix-side{ display:grid; gap:12px; }
.mpic{ margin:0; }
.mpic figcaption{ color:var(--muted); font-size:var(--step--1); margin-top:6px; }

@media (max-width: 680px){
  .row{ grid-template-columns: 1fr; }
  .row.head{ display:none; }
  .row .cell[role="rowheader"]{ background: rgba(255,255,255,.06); font-weight:600; }
}

@media (min-width: 900px){
  .matrix-grid{ grid-template-columns: 1.2fr .8fr; }
}
/* ===== Section 4: Load Progressions ===== */
.progressions{
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(127,255,212,.07), transparent 60%);
}
.progressions .intro{ color: var(--muted); margin: 8px 0 16px; }

.prog-grid{ display:grid; gap:16px; grid-template-columns: 1fr; align-items:start; }

.ladder{ background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding:12px; }
.bar-row{ display:grid; grid-template-columns: 120px 1fr; gap:10px; align-items:center; margin-bottom:8px; }
.label{ font-size: var(--step--1); color: var(--text); }
.bar{
  --w:0%;
  position:relative; height:12px; border-radius:999px; overflow:hidden;
  background: rgba(255,255,255,.06);
}
.bar .fill{
  position:absolute; inset:0 auto 0 0; width:var(--w);
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
.legend{ color: var(--muted); font-size: var(--step--1); margin:6px 0 0; }

.prog-pics{ display:grid; gap:12px; }
.ppic{ margin:0; }
.ppic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

@media (min-width: 860px){
  .prog-grid{ grid-template-columns: 1.1fr .9fr; }
}

/* ===== Section 5: Accessory Library (flip cards) ===== */
.accessories{
  background:
    radial-gradient(640px 260px at 0% 100%, rgba(75,211,255,.07), transparent 60%);
}
.accessories .intro{ color: var(--muted); margin: 8px 0 16px; }

.flip-grid{ display:grid; gap:14px; grid-template-columns: 1fr; }
.flip-card{
  perspective: 1000px;
}
.flip-inner{
  position:relative; transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
  border-radius: var(--radius);
}
.flip-card:hover .flip-inner,
.flip-card:focus-within .flip-inner{ transform: rotateY(180deg); }

.front, .back{
  backface-visibility: hidden;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding:12px;
  position:absolute; inset:0;
  display:block;
}
.front figure{ margin:0; }
.front figcaption{ margin-top:6px; color: var(--muted); font-size: var(--step--1); text-align:center; }

.back{ transform: rotateY(180deg); display:flex; flex-direction:column; gap:8px; }
.back h3{ margin:0; }
.back p{ color: var(--muted); margin:0; }
.bullets{ list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:8px; }
.bullets li{ padding:4px 8px; border-radius:999px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); font-size:var(--step--1); }

@media (min-width: 840px){
  .flip-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .front, .back{ position:relative; }
}

/* ===== Section 6: Engine Templates ===== */
.engine{
  background:
    radial-gradient(620px 280px at 50% -10%, rgba(127,255,212,.07), transparent 60%);
}
.engine .intro{ color: var(--muted); margin: 8px 0 16px; }

.engine-grid{ display:grid; gap:16px; grid-template-columns: 1fr; align-items:start; }
.engine-cards{ display:grid; gap:12px; grid-template-columns: 1fr; }
.engine-card{
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:12px; display:grid; grid-template-columns: 72px 1fr; gap:12px; align-items:center;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.engine-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.engine-card h3{ margin:0 0 4px; }
.engine-card p{ color: var(--muted); margin:0; }

/* effort dial */
.engine-dial{
  --p: 0;
  width:64px; height:64px; border-radius:50%;
  background: conic-gradient(var(--brand) calc(var(--p)*1%), rgba(255,255,255,.10) 0);
  position:relative;
  transition: background .6s cubic-bezier(.22,1,.36,1);
}
.engine-dial::after{
  content:""; position:absolute; inset:8px; border-radius:50%;
  background:#0e1217; border:1px solid rgba(255,255,255,.08);
}
.engine-dial span{
  position:absolute; inset:0; display:grid; place-items:center; font-weight:700; font-size: var(--step--1);
}

.engine-side{ display:grid; gap:12px; }
.epic{ margin:0; }
.epic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

@media (min-width: 900px){
  .engine-grid{ grid-template-columns: 1.1fr .9fr; }
  .engine-cards{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
/* ===== Section 7: Movement Standards ===== */
.standards{
  background:
    radial-gradient(640px 260px at 0% 100%, rgba(75,211,255,.07), transparent 60%);
}
.standards .intro{ color: var(--muted); margin: 8px 0 16px; }

.std-grid{ display:grid; gap:16px; grid-template-columns: 1fr; align-items:start; }
.std-card{
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:12px; transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.std-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.std-card .kicker{ margin:4px 0 8px; color: var(--muted); font-size: var(--step--1); }
.swap-std{
  position:relative; border-radius:12px; overflow:hidden; aspect-ratio:4/3; margin: 8px 0 8px;
}
.swap-std img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.swap-std .bottom{ opacity:0; transition: opacity .25s ease; }
.swap-std:hover .bottom{ opacity:1; }
.swap-std:hover .top{ opacity:0; }

.stdpic{ margin:8px 0 0; }
.stdpic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }
.std-card .note{ color: var(--muted); font-size: var(--step--1); margin: 4px 0 0; }

@media (min-width: 880px){
  .std-grid{ grid-template-columns: 1.2fr .8fr; }
}

/* ===== Section 8: Sample Weeks ===== */
.weeks{
  background:
    radial-gradient(620px 280px at 100% 0%, rgba(127,255,212,.07), transparent 60%);
}
.weeks .intro{ color: var(--muted); margin: 8px 0 16px; }

.weeks-grid{ display:grid; gap:16px; grid-template-columns: 1fr; align-items:start; }
.week-card{
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:12px; transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.week-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.week-card h3{ margin:0 0 8px; }
.lanes{ list-style:none; padding:0; margin:0; display:grid; gap:6px; }
.lanes li{ background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); border-radius:10px; padding:8px; }

.week-side{ display:grid; gap:12px; }
.wpic{ margin:0; }
.wpic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

@media (min-width: 900px){
  .weeks-grid{ grid-template-columns: 1.4fr .6fr; }
  .week-card{ display:block; }
}

/* ===== Section 9: Recovery Toolkit ===== */
.recovery{
  background:
    radial-gradient(520px 260px at 50% -10%, rgba(127,255,212,.06), transparent 60%);
}
.recovery .intro{ color: var(--muted); margin: 8px 0 16px; }

.recovery-grid{ display:grid; gap:16px; grid-template-columns: 1fr; }
.rec-card{
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:12px; transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.rec-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.rec-card h3{ margin:0 0 6px; }
.rec-card p{ color: var(--muted); margin:0 0 8px; }

.recpic{ margin:0; }
.recpic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

/* Ensure ALL content figures on programs page stay ≤350px wide */
.photo-stack img,
.timg img,
.spic img,
.calpic img,
.ppic img,
.flip-grid img,
.epic img,
.mpic img,
.stdpic img,
.swap-std img,
.wpic img,
.recpic img { max-width:350px; width:100%; height:auto; }
/* ===== Section 10: Testing Checkpoints ===== */
.checkpoints{
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(127,255,212,.07), transparent 60%);
}
.checkpoints .intro{ color: var(--muted); margin: 8px 0 16px; }

.cp-grid{ display:grid; gap:16px; grid-template-columns: 1fr; align-items:start; }
.cp-card{
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding:12px;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
  position:relative;
}
.cp-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.cp-head .tag{
  display:inline-block; padding:4px 8px; border-radius:999px; font-size:var(--step--1);
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); margin-bottom:6px;
}
.cp-head .kicker{ margin:4px 0 8px; color: var(--muted); font-size: var(--step--1); }
.cpic{ margin:8px 0 0; }
.cpic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }
.cp-bullets{ list-style:none; padding:0; margin:10px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.cp-bullets li{ padding:4px 8px; border-radius:999px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); font-size:var(--step--1); }

@media (min-width: 900px){
  .cp-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* ===== Section 11: Coach Roster ===== */
.coaches{
  background:
    radial-gradient(640px 260px at 0% 100%, rgba(75,211,255,.07), transparent 60%);
}
.coaches .intro{ color: var(--muted); margin: 8px 0 16px; }

.coach-grid{ display:grid; gap:14px; grid-template-columns: 1fr; }
.coach-card{
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:12px;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.coach-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }

.coachpic{ margin:0; position:relative; overflow:hidden; border-radius:12px; }
.coachpic img{ display:block; }
.coachpic figcaption{ color: var(--text); font-weight:600; margin-top:8px; }
.coach-overlay{
  position:absolute; inset:0; display:grid; place-items:center;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55));
  color:#fff; padding:12px; text-align:center; opacity:0;
  transition: opacity .25s ease;
}
.coachpic:hover .coach-overlay{ opacity:1; }

@media (min-width: 840px){
  .coach-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* ===== Section 12: Pricing ===== */
.pricing{
  background:
    radial-gradient(520px 260px at 50% -10%, rgba(127,255,212,.06), transparent 60%);
}
.pricing .intro{ color: var(--muted); margin: 8px 0 16px; }

.price-grid{ display:grid; gap:16px; grid-template-columns: 1fr; }
.price-card{
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding:12px;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.price-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.price-head .kicker{ margin:4px 0 10px; color: var(--muted); font-size: var(--step--1); }
.perk-list{ list-style:none; padding:0; margin:0 0 10px; display:grid; gap:6px; }
.perk-list li{ background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); border-radius:10px; padding:8px; }
.pricepic{ margin:8px 0 10px; }
.pricepic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

.fake-btn{
  display:inline-block; padding:8px 12px; border-radius:999px; text-decoration:none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color:#001018; font-weight:600;
}
.fake-btn:hover{ filter: brightness(1.05); }

@media (min-width: 820px){
  .price-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Ensure new section images also obey ≤350px rule */
.cpic img,
.coachpic img,
.pricepic img { max-width:350px; width:100%; height:auto; }
/* ===== Section 13: Facility Mini-Map ===== */
.facility-mini{
  background:
    radial-gradient(620px 280px at 0% 100%, rgba(75,211,255,.07), transparent 60%);
}
.facility-mini .intro{ color: var(--muted); margin: 8px 0 16px; }

.mini-grid{ display:grid; gap:16px; grid-template-columns: 1fr; }
.fmap-card{
  position:relative; margin:0;
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:10px;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.fmap-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.fmap-card figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

/* pings */
.ping{
  position:absolute; width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 0 rgba(127,255,212,.6);
  animation: ping 1.8s infinite;
}
@keyframes ping{
  0%{ box-shadow: 0 0 0 0 rgba(127,255,212,.45); }
  70%{ box-shadow: 0 0 0 16px rgba(127,255,212,0); }
  100%{ box-shadow: 0 0 0 0 rgba(127,255,212,0); }
}
/* first map positions */
.fmap-card .m1{ left: 20%; top: 42%; }
.fmap-card .m2{ left: 58%; top: 28%; }
.fmap-card .m3{ left: 82%; top: 66%; }
/* second map tweak via sibling selector */
.fmap-card + .fmap-card .m1{ left: 16%; top: 70%; }
.fmap-card + .fmap-card .m2{ left: 48%; top: 36%; }
.fmap-card + .fmap-card .m3{ left: 86%; top: 62%; }

@media (min-width: 860px){
  .mini-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ===== Section 14: Onboarding ===== */
.onboarding{
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(127,255,212,.07), transparent 60%);
}
.onboarding .intro{ color: var(--muted); margin: 8px 0 16px; }

.ob-grid{ display:grid; gap:16px; grid-template-columns: 1fr; align-items:start; }
.ob-steps{
  list-style:none; padding:0; margin:0; counter-reset: ob;
  display:grid; gap:12px;
}
.ob-steps li{
  counter-increment: ob;
  position:relative; padding:12px 12px 12px 44px;
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.ob-steps li:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.ob-steps li::before{
  content: counter(ob);
  position:absolute; left:10px; top:10px; width:26px; height:26px; border-radius:999px;
  display:grid; place-items:center; font-weight:700; font-size: var(--step--1);
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color:#001018;
}

.obpic{ margin:0; }
.obpic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

@media (min-width: 860px){
  .ob-grid{ grid-template-columns: 1.2fr .8fr; }
}

/* ===== Section 15: Block Planner ===== */
.planner{
  background:
    radial-gradient(520px 260px at 50% 120%, rgba(127,255,212,.06), transparent 60%);
}
.planner .intro{ color: var(--muted); margin: 8px 0 16px; }

.planner-wrap{ display:grid; gap:16px; }
.planner-card{
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding:12px;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.planner-card:hover{ transform: translateY(-2px); border-color: rgba(127,255,212,.35); background: rgba(255,255,255,.04); }
.planner-card h3{ margin:0 0 6px; }
.planner-card p{ color: var(--muted); margin:0 0 8px; }
.planpic{ margin:8px 0 0; }
.planpic figcaption{ color: var(--muted); font-size: var(--step--1); margin-top:6px; }

/* Ensure ≤350px width for new images */
.fmap-card img,
.obpic img,
.planpic img { max-width:350px; width:100%; height:auto; }
