/* ============================================================
   GRAEM — «Открытый лёд»: список тренировок + детальная
   Светлая тема «Дерби». Дополняет graem.css
   ============================================================ */

/* ---------- Шапка страницы списка ---------- */
.train-top { padding: 40px 0 28px; }
.train-top .h1 { margin: 14px 0 10px; }
.train-count { color: var(--muted); font-size: 16px; }
.train-count b { color: var(--ink); font-weight: 700; }

/* Селектор города */
.city-select {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--card); border: 1.5px solid var(--line-hi);
  font-family: var(--body); font-weight: 700; font-size: 17px; color: var(--ink);
  cursor: pointer; transition: border-color .15s;
}
.city-select:hover { border-color: var(--bordo); }
.city-select .pin { width: 18px; height: 18px; color: var(--bordo); }
.city-select .chev { width: 16px; height: 16px; color: var(--muted); }

/* ---------- Фильтры ---------- */
.filters {
  position: sticky; top: 72px; z-index: 40;
  background: rgba(251,250,249,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.filters .row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters .row::-webkit-scrollbar { display: none; }
.chip-f {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--card); border: 1.5px solid var(--line-hi);
  font-family: var(--body); font-weight: 600; font-size: 14.5px; color: var(--text);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.chip-f:hover { border-color: var(--bordo); color: var(--bordo); }
.chip-f .chev { width: 14px; height: 14px; color: var(--faint); }
.chip-f.on { background: var(--bordo); border-color: var(--bordo); color: #fff; }
.chip-f.on .chev { color: rgba(255,255,255,.8); }
.chip-f.on .count { background: rgba(255,255,255,.25); color:#fff; }
.chip-f .count { background: var(--bordo-soft); color: var(--bordo); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 7px; }
.filters .reset { margin-left: auto; align-self: center; font-size: 14px; color: var(--muted); background: none; border: none; cursor: pointer; white-space: nowrap; padding-left: 12px; }
.filters .reset:hover { color: var(--bordo); }

/* ---------- Группа по дате ---------- */
.date-group { margin-top: 40px; }
.date-group:first-child { margin-top: 32px; }
.date-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.date-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.date-head .dow { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }

/* ---------- Список карточек ---------- */
.train-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.tcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--bordo);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.tcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tcard.goalie { border-left-color: var(--steel); }
.tcard.full { border-left-color: var(--faint); opacity: .96; }

.tcard-in { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.tcard-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tcard-main { min-width: 0; }
.tcard-title { font-family: var(--body); font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.01em; }
.tcard-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tcard-rows { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.tcard-rows .r { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; min-width: 0; }
.tcard-rows .r svg { width: 16px; height: 16px; flex: none; color: var(--faint); }
.tcard-rows .r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-rows .r.arena span { white-space: normal; } /* длинные названия арен переносим */

/* Правый блок даты/времени */
.tcard-when { text-align: right; flex: none; }
.tcard-when .d { font-family: var(--body); font-weight: 700; font-size: 14px; color: var(--bordo); white-space: nowrap; }
.tcard-when .t { font-family: var(--disp); font-weight: 700; font-size: 26px; color: var(--ink); line-height: 1.05; letter-spacing: -.02em; }
.tcard-when .local { font-size: 12.5px; color: var(--faint); margin-top: 3px; white-space: nowrap; }

/* Подвал карточки */
.tcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; border-top: 1px solid var(--line); background: #FCFBFA;
}
.tcard-facts { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tcard-facts .line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tcard-facts .meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.tcard-facts .meta svg { width: 15px; height: 15px; color: var(--faint); }
.tcard-facts .meta.warn { color: var(--warn); font-weight: 700; }
.tcard-facts .meta.soon { color: var(--bordo); font-weight: 700; }
.tcard-price { font-family: var(--disp); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -.01em; }
.tcard-price small { font-family: var(--body); font-weight: 500; font-size: 13px; color: var(--muted); }

.tcard .btn { flex: none; }
.tcard.full .btn { background: transparent; color: var(--faint); border: 1.5px solid var(--line-hi); cursor: not-allowed; box-shadow: none; }
.tcard.full .btn:hover { transform: none; }

/* Иконка «места» с прогрессом */
.seats { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.seats b { color: var(--ink); font-weight: 700; }
.seats svg { width: 15px; height: 15px; color: var(--faint); }
.seats .g { color: var(--steel); font-weight: 700; } /* вратари */

/* Пустое состояние */
.empty { text-align: center; max-width: 460px; margin: 40px auto; padding: 44px 28px; border: 1px dashed var(--line-hi); border-radius: var(--r-lg); }
.empty h3 { margin-bottom: 10px; }
.empty p { color: var(--muted); margin-bottom: 22px; }

/* ============================================================
   ДЕТАЛЬНАЯ ТРЕНИРОВКИ
   ============================================================ */
.td-top { padding: 32px 0 12px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--bordo); }
.back-link svg { width: 16px; height: 16px; }

.td-head { padding: 8px 0 28px; }
.td-head .h1 { margin: 14px 0 8px; }
.td-head .team { font-size: 18px; color: var(--steel); font-weight: 600; }
.td-head .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.td-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; padding-bottom: 80px; }
.td-main { display: flex; flex-direction: column; gap: 18px; }

.info-card { padding: 24px; display: flex; gap: 18px; align-items: flex-start; }
.info-card .cal {
  flex: none; width: 72px; height: 76px; border-radius: var(--r-md);
  background: var(--bordo-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--bordo);
}
.info-card .cal .mo { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.info-card .cal .dd { font-family: var(--disp); font-weight: 800; font-size: 30px; line-height: 1; }
.info-card .cal .dw { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--bordo); opacity: .8; }
.info-card .icon-box {
  flex: none; width: 56px; height: 56px; border-radius: var(--r-md);
  background: var(--steel-soft); color: var(--steel); display: grid; place-items: center;
}
.info-card .icon-box svg { width: 26px; height: 26px; }
.info-card .body { min-width: 0; }
.info-card .big { font-family: var(--disp); font-weight: 700; font-size: 26px; color: var(--ink); letter-spacing: -.02em; }
.info-card .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.info-card .title { font-family: var(--body); font-weight: 800; font-size: 19px; color: var(--ink); }
.info-card .addr { color: var(--muted); font-size: 15px; margin-top: 4px; }
.info-card .metro { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 14px; color: var(--text); }
.info-card .metro .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex: none; }

/* карта-плейсхолдер */
.map-ph {
  height: 180px; border-radius: 0 0 var(--r-lg) var(--r-lg); margin: 0 -1px -1px;
  background-image:
    repeating-linear-gradient(45deg, #EFE9E6 0 12px, #F6F1EF 12px 24px);
  border-top: 1px solid var(--line);
  display: grid; place-items: center;
}
.map-ph span { font-family: var(--mono); font-size: 12px; color: var(--faint); background: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 8px; }

/* Персона (тренер / организатор) */
.person { display: flex; align-items: center; gap: 14px; }
.person .av { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--disp); font-weight: 700; font-size: 16px; }
.person .nm { font-family: var(--body); font-weight: 800; font-size: 17px; color: var(--ink); }
.person .rl { font-size: 14px; color: var(--muted); margin-top: 2px; }
.person-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text); font-size: 15.5px; }

/* Сводка мест / прогресс */
.progress-card { padding: 24px; }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.progress-head .lead-num { font-family: var(--disp); font-weight: 800; font-size: 22px; color: var(--ink); }
.progress-head .lead-num span { color: var(--muted); font-size: 16px; font-weight: 700; }
.progress-head .g { color: var(--steel); font-weight: 700; font-size: 15px; }
.bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; display: flex; }
.bar .fill { background: var(--bordo); }
.bar .fill.g { background: var(--steel); }
.progress-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.progress-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.progress-legend .lg .sw { width: 10px; height: 10px; border-radius: 3px; }
.progress-legend .free { margin-left: auto; color: var(--ink); font-weight: 700; }

/* Правый сайдбар (sticky) */
.td-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.book-card { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.book-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.book-price .p { font-family: var(--disp); font-weight: 800; font-size: 36px; color: var(--ink); letter-spacing: -.02em; }
.book-price .p small { font-family: var(--body); font-weight: 500; font-size: 14px; color: var(--muted); }
.book-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.book-stat { padding: 16px; border-radius: var(--r-md); background: var(--bg-warm); }
.book-stat .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.book-stat .k svg { width: 14px; height: 14px; }
.book-stat .v { font-family: var(--disp); font-weight: 800; font-size: 24px; color: var(--ink); margin-top: 8px; }
.book-stat .v span { color: var(--muted); font-size: 15px; }
.book-card .btn { width: 100%; }
.claim-note {
  display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--steel-soft); color: var(--steel); font-size: 13.5px; line-height: 1.5;
}
.claim-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.claim-note b { color: var(--steel); }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .td-grid { grid-template-columns: 1fr 340px; gap: 24px; }
}
@media (max-width: 860px) {
  .train-list { grid-template-columns: 1fr; }
  .filters { top: 64px; }
  .td-grid { grid-template-columns: 1fr; }
  .td-side { position: static; }
}
@media (max-width: 460px) {
  .tcard-when .t { font-size: 22px; }
  .tcard-in { padding: 20px; }
  .tcard-foot { flex-direction: column; align-items: stretch; gap: 14px; }
  .tcard-foot .btn { width: 100%; }
  .book-stats { grid-template-columns: 1fr; }
}

/* ============================================================
   Веб-адаптация: дропдауны фильтров/города, интро, SEO-блок, FAQ
   (design использовал JS-попперы; на сайте — нативные details/summary)
   ============================================================ */

/* Меню фильтра absolute внутри overflow-x:auto клипается — переносим чипы */
.filters .row { flex-wrap: wrap; overflow: visible; }

.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 200px; max-height: 320px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line-hi); border-radius: var(--r-md);
  box-shadow: var(--sh-2); padding: 6px;
}
.city-dd .dd-menu { min-width: 220px; }
.dd-menu a {
  display: block; padding: 9px 12px; border-radius: 8px;
  font-family: var(--body); font-size: 14.5px; color: var(--text); white-space: nowrap;
}
.dd-menu a:hover { background: var(--bg-warm); color: var(--bordo); }
.dd-menu a.active { color: var(--bordo); font-weight: 700; background: var(--bordo-soft); }

.train-intro { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 760px; margin-top: 10px; }

.seo-block { padding: 48px 0 64px; border-top: 1px solid var(--line); margin-top: 48px; }
.seo-block h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 18px; }
.seo-block p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 820px; margin-bottom: 14px; }
.faq { margin-top: 26px; max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary {
  list-style: none; cursor: pointer; padding: 16px 0;
  font-family: var(--body); font-weight: 700; font-size: 17px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--faint); font-size: 22px; font-weight: 400; }
.faq-item[open] > summary::after { content: "\2013"; }
.faq-item p { color: var(--muted); font-size: 15.5px; line-height: 1.65; padding: 0 0 18px; margin: 0; }
