
/* =========================================================
   Courses Page — Upgraded Styles (v1)
   - modern cards, gradient accents, lively hovers
   - tab syncing visuals, subtle animations
   - per-course accent colors
   Paste this after your base theme styles.
========================================================= */

/* Tabs: мобільний свайп/прокрутка + прихований скролбар */
.tabs-pill {
  position: relative;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;            /* важливо: в один ряд */
}

@media (max-width: 820px) {
  .tabs-pill {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;    /* плавне "прилипання" кнопок */
    padding: 8px 12px 12px;
    margin: 12px -12px 22px;          /* повний край на мобі */
    scrollbar-width: none;            /* Firefox */
  }
  .tabs-pill::-webkit-scrollbar { display: none; } /* Chrome/Safari */

  .tabs-pill .pill {
    flex: 0 0 auto;                   /* не переносити */
    scroll-snap-align: center;
  }

  /* Лівий/правий «фейд», підказує що можна скролити */
  .tabs-pill::before,
  .tabs-pill::after{
    content:"";
    position:absolute; top:0; bottom:0; width:28px; pointer-events:none;
    z-index:2;
  }
  .tabs-pill::before{
    left:0;
    background: linear-gradient(90deg, rgba(11,18,32,1), rgba(11,18,32,0));
  }
  .tabs-pill::after{
    right:0;
    background: linear-gradient(270deg, rgba(11,18,32,1), rgba(11,18,32,0));
  }
}

/* ---------- Palette tokens ---------- */
:root{
  --ink:#0b1220;            /* page bg */
  --text:#e6efff;           /* main text */
  --muted:#ffffff;          /* secondary text */
  --cta:#22d3ee;            /* primary accent */
  --g1:#22d3ee;             /* gradient start */
  --g2:#7c3aed;             /* gradient end */
  --chip:#0f172a;           /* chip bg */
  --chip-b:#22314d;         /* chip border */
  --ok:#22c55e;             /* checklist tick */
}

/* ---------- Hero ---------- */
.section.courses-hero{ padding:64px 0 28px; }
.section.courses-hero .title.center{
  font-weight:900; letter-spacing:.2px;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.section.courses-hero .subtitle.center{
  color:var(--muted); max-width:820px; margin:8px auto 0;
}

/* ---------- Grid ---------- */
.courses-grid-modern .course-grid{
  display:grid; gap:22px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}

/* ---------- Course Card ---------- */
.course-card{
  position:relative; display:flex; flex-direction:column;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10); border-radius:18px;
  padding:18px; color:var(--text);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  overflow:hidden;
}
/* Gradient stroke */
.course-card::after{
  content:""; position:absolute; inset:0; border-radius:inherit;
  padding:1px; background:linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; opacity:.22; pointer-events:none;
}
.course-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(0,0,0,.28);
  border-color:transparent;
  background:linear-gradient(180deg, rgba(124,58,237,.12), rgba(34,211,238,.06));
}
.course-header{ display:flex; justify-content:space-between; align-items:center; gap:16px; }
.course-logo{ width:56px; height:56px; object-fit:cover; border-radius:12px; box-shadow:0 8px 18px rgba(0,0,0,.25); }
.course-price{ text-align:right; }
.course-price .num{
  font-weight:900;
  background: linear-gradient(90deg,#f5f9f9,#e9e8ec);
  -webkit-background-clip: text; background-clip:text;
  -webkit-text-fill-color: transparent;
}
.course-price .mini{ color:var(--muted); }

.course-title{ margin:12px 0 6px; font-size:20px; font-weight:800; color:#ffffff;}
.course-card .muted{ color:var(--muted); }

/* meta list */
.course-meta{
  display:grid; grid-template-columns:1fr 1fr; gap:8px 14px;
  margin:12px 0 10px; padding:0; list-style:none;
}
.course-meta li{
  position:relative; font-size:14px; color:#cbd5e1;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
  border-radius: 999px; padding:6px 12px 6px 20px;
}
.course-meta li::before{
  content:""; width:8px; height:8px; border-radius:50%;
  background:linear-gradient(90deg,var(--g1),var(--g2));
  position:absolute; left:8px; top:50%; transform:translateY(-50%);
  box-shadow:0 0 8px rgba(124,58,237,.5);
}

/* tags */
.course-tags{ display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 14px; }
.chip{
  background:var(--chip); border:1px solid var(--chip-b);
  padding:6px 10px; border-radius:999px; font-size:12px; color:#dbe4ff;
}

/* buttons */
.btn-row{ display:flex; gap:10px; margin-top:auto; }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-radius:12px; font-weight:800; text-decoration:none;
  background:var(--cta); color:#05222b; transition:.2s ease;
}
.btn:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(34,211,238,.25); }
.btn.outline{ background:transparent; color:var(--text);
  border:2px solid rgba(255,255,255,.22); }
.btn.outline:hover{ background:#fff; color:#0b1220; }

/* ---------- Tabs ---------- */
.tabs-pill{ display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 22px; }
.tabs-pill .pill{
  appearance:none; border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.04); color:#e8eeff;
  border-radius:999px; padding:8px 14px; font-weight:700; cursor:pointer;
  transition:.2s ease;
}
.tabs-pill .pill:hover{ transform:translateY(-1px); }
.tabs-pill .pill.active{
  border-color:transparent; color:#08101e;
  background:linear-gradient(90deg,var(--g1),var(--g2));
  box-shadow:0 10px 22px rgba(124,58,237,.25);
}

/* Panels animation */
.program-panel, .side-panels{ animation: fadeIn .4s ease; }
@keyframes fadeIn{ from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

/* ---------- Program & Side cards ---------- */
.program-grid{ display:grid; gap:22px; grid-template-columns:1.5fr .9fr; }
@media (max-width: 900px){ .program-grid{ grid-template-columns:1fr; } }

.program-card, .side-card{
  color: #fff;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10); border-radius:16px; padding:18px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.program-card:hover, .side-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.program-head{ font-weight:800; margin-bottom:10px; display:flex; align-items:center; gap:8px; }
.program-list{ margin:0; padding-left:22px; }
.program-list li{ margin:.3em 0; }

/* side */
.side-head{ font-weight:900; margin-bottom:8px; }
.checklist, .starlist{ list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.checklist li, .starlist li{ position:relative; padding-left:22px; color:#cbd5e1; }
.checklist li::before{ content:'✔'; color:var(--ok); position:absolute; left:0; font-weight:700; }
.starlist li::before{ content:'★'; color:#facc15; position:absolute; left:0; text-shadow:0 0 6px rgba(253,224,71,.7); }

/* ---------- Per-course accent colors ---------- */
.course-card[data-key="lego"]   { --g1:#f59e0b; --g2:#ef4444; }
.course-card[data-key="arduino"]{ --g1:#38bdf8; --g2:#2563eb; }
.course-card[data-key="iot"]    { --g1:#22d3ee; --g2:#7c3aed; }
.course-card[data-key="wedo"]   { --g1:#34d399; --g2:#06b6d4; }

/* ---------- Small utilities ---------- */
.center{ text-align:center; }
.muted{ color:var(--muted); }

/* базово */
.tabs-pill {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;      /* усі кнопки в один ряд */
}

/* мобільний вигляд */
@media (max-width: 820px) {
  .tabs-pill {
    overflow-x: auto;                /* горизонтальний скрол */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;   /* "прилипання" */
    padding: 8px 12px 12px;
    margin: 12px -12px 22px;
    scrollbar-width: none;           /* Firefox */
  }
  .tabs-pill::-webkit-scrollbar { display: none; } /* Chrome/Safari */

  .tabs-pill .pill {
    flex: 0 0 auto;                  /* не стискається */
    scroll-snap-align: center;       /* прилипає до центру */
  }

  /* декоративні тіні зліва/справа (щоб видно, що можна скролити) */
  .tabs-pill { position: relative; }
  .tabs-pill::before,
  .tabs-pill::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 2;
  }
  .tabs-pill::before {
    left: 0;
    background: linear-gradient(90deg, #0b1220, rgba(11,18,32,0));
  }
  .tabs-pill::after {
    right: 0;
    background: linear-gradient(270deg, #0b1220, rgba(11,18,32,0));
  }
}

/* ===========================
   Program section – NeoCards (no hover)
=========================== */

/* Заголовок секції */
.section.program-wrap .center{
  font-weight: 900;
  letter-spacing: .2px;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  margin-bottom: 14px;
}

/* Таби */
#program .tabs-pill{
  gap: 10px; flex-wrap: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-bottom: 10px;
}
#program .tabs-pill .pill{
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: #e8eeff; font-weight: 800;
  transition: .18s ease;
}
#program .tabs-pill .pill.active{
  border-color: transparent; color: #0a1120;
  background: linear-gradient(90deg,#22d3ee,#7c3aed);
  box-shadow: 0 10px 22px rgba(124,58,237,.25);
}

/* Грід */
.program-grid{ gap: 24px; }
@media (max-width: 900px){ .program-grid{ gap: 16px; } }

/* Основні картки програми */
.program-card{
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  overflow: hidden;
}
.program-card::before{
  content:""; position:absolute; inset:0 0 auto 0; height:6px;
  background: linear-gradient(90deg,#22d3ee,#7c3aed);
  opacity:.7;
}

/* Заголовок карти */
.program-head{
  font-weight: 900; display: flex; align-items: center; gap: 10px;
  padding-bottom: 6px; border-bottom: 1px dashed rgba(255,255,255,.08);
}

/* Нумерований список */
.program-list{ counter-reset: step; margin: 12px 0 0; padding-left: 0; list-style: none; }
.program-list li{
  counter-increment: step;
  position: relative; padding: 10px 10px 10px 42px;
  color: #dbe4ff; border-radius: 12px;
}
.program-list li + li{ margin-top: 6px; }
.program-list li::before{
  content: counter(step);
  position: absolute; left: 10px; top: 8px;
  width: 24px; height: 24px; line-height: 24px; text-align: center;
  font-weight: 900; font-size: 12px; color: #08101e;
  background: linear-gradient(90deg,#22d3ee,#7c3aed);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(124,58,237,.45);
}

/* Сайдбар */
.side-card{
  padding-bottom: 20px;
  margin-bottom: 20px;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
}
.side-card .side-head{
  font-weight: 900; margin-bottom: 20px;
  display:flex; align-items:center; gap:8px;
}
.side-card .side-head::after{
  content:""; flex:1; height:1px; margin-left:8px;
  background: linear-gradient(90deg, rgba(255,255,255,.12), transparent);
}

/* Чекліст/зірочки */
.checklist li{ color:#cfe3ff; }
.starlist  li{ color:#e8eeff; }

/* Мобільні дрібниці */
@media (max-width: 600px){
  .program-head{ font-size: 1rem; }
  .program-list li{ padding-left: 38px; }
}

/* Таби скролювальні */
@media (max-width: 820px){
  #program .tabs-pill{
    overflow-x:auto; -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity; padding:8px 12px 12px; margin:12px -12px 18px;
    scrollbar-width:none;
  }
  #program .tabs-pill::-webkit-scrollbar{ display:none; }
  #program .tabs-pill .pill{ flex:0 0 auto; scroll-snap-align:center; }
}


