/* ==========================================================================
   NEBODANCE · theme-2026.css
   Единый визуальный язык главной: тёмная и светлая палитры.
   Переключается существующей кнопкой темы (data-theme на <html>).

   Тёмная  — графит + янтарь.
   Светлая — бумага + фирменная бирюза школы.
   ========================================================================== */

:root{
  --t-r-xs: 10px;
  --t-r-sm: 14px;
  --t-r-md: 20px;
  --t-r-lg: 28px;

  --t-ease: cubic-bezier(.22,1,.36,1);
  --t-fast: .18s var(--t-ease);
  --t-med: .32s var(--t-ease);

  --t-gutter: clamp(16px, 4vw, 40px);
  --t-section: clamp(64px, 9vw, 132px);

  --t-font: 'Onest', 'Onest', -apple-system, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   1. ПАЛИТРЫ
   ========================================================================== */

html[data-theme="dark"]{
  --t-bg: #08080a;
  --t-surface: #101013;
  --t-surface-2: #17171c;
  --t-line: rgba(255,255,255,.09);
  --t-line-strong: rgba(255,255,255,.26);
  --t-text: #f4f4f5;
  --t-muted: #9a9aa3;
  --t-accent: #ffb63c;
  --t-accent-ink: #1a1200;
  --t-accent-text: #ffb63c;
  --t-accent-display: #ffb63c;

  --bg-deep: #08080a;
  --bg-deep-secondary: #0c0c10;
  --bg-glass: rgba(255,255,255,.045);
  --primary: #ffb63c;
  --primary-light: #ffcf85;
  --primary-dark: #d99524;
  --text-primary: #f4f4f5;
  --text-secondary: #9a9aa3;
  --border-glass: rgba(255,255,255,.09);
  --bg-surface: #101013;
  --primary-soft: rgba(255,182,60,.14);
  --border-header: rgba(255,255,255,.09);
  --t-ghost-bg: rgba(255,255,255,.08);
  --t-ghost-border: rgba(255,255,255,.3);
}

html[data-theme="light"]{
  --t-bg: #f6f5f1;
  --t-surface: #ffffff;
  --t-surface-2: #eeede6;
  --t-line: rgba(17,17,19,.11);
  --t-line-strong: rgba(17,17,19,.3);
  --t-text: #111113;
  --t-muted: #5c5c64;
  /* фирменная бирюза школы: заливка / текст на светлом / крупный акцент */
  --t-accent: #12b3d6;
  --t-accent-ink: #04222a;
  --t-accent-text: #0a7f9c;
  --t-accent-display: #0f9dc4;

  --bg-deep: #f6f5f1;
  --bg-deep-secondary: #eeede6;
  --bg-glass: rgba(17,17,19,.035);
  --primary: #12b3d6;
  --primary-light: #5fd6ea;
  --primary-dark: #0a8ba6;
  --text-primary: #111113;
  --text-secondary: #5c5c64;
  --border-glass: rgba(17,17,19,.11);
  --bg-surface: #eeede6;
  --primary-soft: rgba(18,179,214,.14);
  --border-header: rgba(17,17,19,.12);
  --t-ghost-bg: rgba(17,17,19,.045);
  --t-ghost-border: rgba(17,17,19,.28);
}

/* ==========================================================================
   2. БАЗА
   ========================================================================== */

html{ font-size: 16px; }

body{
  font-family: var(--t-font) !important;
  background: var(--t-bg) !important;
  color: var(--t-text) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-med), color var(--t-med);
}
.site-header, .site-footer, .hero-card, .teacher-tab, .role-card{
  transition: background-color var(--t-med), border-color var(--t-med), color var(--t-med);
}

.container{ max-width: 1280px; padding-inline: var(--t-gutter); }
.landing-main > section{ padding-block: var(--t-section); }

::selection{ background: var(--t-accent); color: var(--t-accent-ink); }

/* ==========================================================================
   3. ТИПОГРАФИКА
   ========================================================================== */

h1, h2, h3, h4{ font-family: var(--t-font); }

.hero-title{
  font-size: clamp(2.6rem, 7.4vw, 6.1rem) !important;
  line-height: .95 !important;
  letter-spacing: -.055em !important;
  font-weight: 800 !important;
  margin-bottom: clamp(18px, 2.4vw, 32px);
}
.hero-title-line{ display: block; }
.hero-title--gradient{
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--t-accent-display) !important;
}

.hero-subtitle{
  font-size: clamp(1rem, 1.6vw, 1.2rem) !important;
  line-height: 1.55 !important;
  color: var(--t-muted) !important;
  max-width: 46ch;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.section-header{ text-align: left !important; margin-bottom: clamp(28px, 4vw, 56px); }

.section-tag{
  display: inline-block;
  padding: 0 !important;
  margin-bottom: 14px;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: .72rem !important;
  font-weight: 600 !important;
  letter-spacing: .2em !important;
  text-transform: uppercase;
  color: var(--t-accent-text) !important;
}

.section-title{
  font-size: clamp(1.9rem, 4.4vw, 3.4rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -.045em !important;
  font-weight: 700 !important;
  margin-bottom: 14px;
}
.section-title--gradient{
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--t-text) !important;
  opacity: .45;
}

.section-subtitle{
  font-size: clamp(.95rem, 1.4vw, 1.08rem) !important;
  color: var(--t-muted) !important;
  max-width: 56ch;
  margin: 0 !important;
}

/* ==========================================================================
   4. КНОПКИ
   ========================================================================== */

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 26px !important;
  border-radius: var(--t-r-sm) !important;
  border: 1px solid transparent;
  font-family: var(--t-font) !important;
  font-size: .95rem !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: transform var(--t-fast), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  box-shadow: none !important;
}
.btn i{ font-size: .9em; opacity: .85; }

.btn--primary{
  background: var(--t-accent) !important;
  background-image: none !important;
  color: var(--t-accent-ink) !important;
  border-color: var(--t-accent) !important;
}
.btn--glass,
.btn:not(.btn--primary){
  background: var(--t-ghost-bg) !important;
  border-color: var(--t-ghost-border) !important;
  color: var(--t-text) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
@media (hover:hover) and (pointer:fine){
  .btn:hover{ transform: translateY(-2px); }
  .btn--primary:hover{ filter: brightness(1.06); }
  .btn--glass:hover, .btn:not(.btn--primary):hover{ border-color: var(--t-text) !important; }
}
.btn:active{ transform: scale(.985); }

/* Крупный вариант: возвращаем размеры, которые перебил базовый .btn */
.btn--large{
  min-height: 56px;
  padding: 0 30px !important;
  font-size: 1rem !important;
}
.btn--large i{ font-size: 1rem; opacity: 1; }

/* Мобильные CTA героя: колонка, крупный шрифт, читаемый контур */
@media (max-width: 640px){
  .hero-actions{
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 28px;
  }
  .hero-actions .btn{
    width: 100% !important;
    min-height: 56px;
    padding: 0 20px !important;
    font-size: 1.0625rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
  }
  .hero-actions .btn i{ font-size: 1.05rem; opacity: 1; }
  .hero-actions .btn--primary{ box-shadow: none !important; }
}

/* Нижний док: чуть крупнее подписи и иконки */
.nx-dock__item{ font-size: .72rem !important; }
.nx-dock__item i{ font-size: 1.08rem !important; }


/* ==========================================================================
   5. HERO
   ========================================================================== */

.hero-section{ padding-block: clamp(48px, 7vw, 104px) clamp(56px, 8vw, 120px) !important; }

@media (min-width: 900px){
  .hero-container{
    display: grid !important;
    grid-template-columns: 1.12fr .88fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
  }
}

.hero-actions{ margin-bottom: clamp(28px, 3.4vw, 44px); }

.hero-stats{
  display: flex; gap: 0; flex-wrap: wrap;
  border-top: 1px solid var(--t-line);
  padding-top: 20px;
}
.hero-stat-item{
  display: flex; flex-direction: column; gap: 4px;
  padding-right: clamp(20px, 3vw, 40px);
  margin-right: clamp(20px, 3vw, 40px);
  border-right: 1px solid var(--t-line);
}
.hero-stat-item:last-child{ border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stat-number{
  font-size: clamp(1.5rem, 2.4vw, 2rem) !important;
  font-weight: 700 !important;
  letter-spacing: -.04em !important;
  line-height: 1 !important;
  color: var(--t-text) !important;
}
.hero-stat-label{
  font-size: .78rem !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--t-muted) !important;
}

.hero-card{
  border-radius: var(--t-r-lg) !important;
  border: 1px solid var(--t-line) !important;
  background: var(--t-surface) !important;
  box-shadow: none !important;
  overflow: hidden;
}
.hero-card-media img{
  width: 100%; height: auto; display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0 !important;
}

/* ==========================================================================
   6. КАРТОЧКИ
   ========================================================================== */

.teachers-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
@media (max-width: 1023px){ .teachers-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px){ .teachers-grid{ grid-template-columns: 1fr !important; } }

.teacher-tab{
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-r-md) !important;
  background: var(--t-surface) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}
.teacher-tab-avatar img{
  width: 56px !important; height: 56px !important;
  border-radius: var(--t-r-sm) !important;
  object-fit: cover;
  border: 1px solid var(--t-line);
}
.teacher-tab-name{ font-size: 1rem !important; font-weight: 600 !important; letter-spacing: -.02em; margin: 0 !important; }
.teacher-tab-role{ font-size: .78rem !important; color: var(--t-muted) !important; letter-spacing: .02em; }
.teacher-tab.active{
  border-color: var(--t-accent) !important;
  background: var(--t-surface-2) !important;
}
@media (hover:hover) and (pointer:fine){
  .teacher-tab:hover{ border-color: var(--t-line-strong); transform: translateY(-2px); }
}

.role-card{
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-r-md) !important;
  background: var(--t-surface) !important;
  box-shadow: none !important;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
@media (hover:hover) and (pointer:fine){
  .role-card:hover{ border-color: var(--t-accent); transform: translateY(-3px); }
}
.role-card__title{ font-weight: 600 !important; letter-spacing: -.02em; }

.gallery-bento{ gap: 10px !important; }
.bento-item{
  border-radius: var(--t-r-md) !important;
  border: 1px solid var(--t-line);
  overflow: hidden;
  box-shadow: none !important;
}
.bento-item img{ width: 100%; height: 100%; object-fit: cover; }

.group-card{
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-r-md) !important;
  background: var(--t-surface) !important;
  box-shadow: none !important;
}

.vk-news-card, .news-card, .class-card{
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-r-md) !important;
  background: var(--t-surface) !important;
  box-shadow: none !important;
}
.stat-block, .contact-item{
  border-radius: var(--t-r-sm) !important;
  border: 1px solid var(--t-line) !important;
  background: transparent !important;
}

/* ==========================================================================
   7. СЛАЙДЕР АРЕНДЫ
   ========================================================================== */

.rental-content, .rental-slider{ box-shadow: none !important; }
.slider-slide img{ border-radius: var(--t-r-md) !important; }
.slide-caption{
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.1) 60%, transparent) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.slider-dot{ background: var(--t-line-strong) !important; }
.slider-dot.active{ background: var(--t-accent) !important; }
.slider-btn{
  border-radius: var(--t-r-sm) !important;
  border: 1px solid var(--t-line-strong) !important;
  background: var(--t-surface) !important;
  color: var(--t-text) !important;
  box-shadow: none !important;
}

/* ==========================================================================
   8. ОТКЛЮЧАЕМ УСТАРЕВШЕЕ
   ========================================================================== */

.weather-widget,
.weather-overlay,
.sun-glow,
.cloud-overlay,
.yandex-badge-section,
.floating-accent,
.noise{ display: none !important; }

.hero-card, .btn, .main-nav, .teacher-tab, .role-card,
.vk-news-card, .news-card, .rental-content, .slider-btn, .login-card{
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.hero-section, .schedule-section, .teachers-gallery-section, .about-section,
.rental-section, .login-section, .vk-news-section{
  background-image: none !important;
}

/* ==========================================================================
   9. ШАПКА И ФУТЕР (по темам)
   ========================================================================== */

html[data-theme="dark"] .site-header{
  background: rgba(8,8,10,.92) !important;
  border-bottom: 1px solid var(--t-line);
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
}
html[data-theme="dark"] .site-footer{ background: #050506 !important; border-top: 1px solid var(--t-line); }

html[data-theme="light"] .site-header{
  background: rgba(246,245,241,.9) !important;
  border-bottom: 1px solid var(--t-line);
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
}
/* светлая тема: футер в тон бумаге, акценты — бирюза школы */
html[data-theme="light"] .site-footer{
  background: var(--t-surface-2) !important;
  border-top: 1px solid var(--t-line) !important;
  color: var(--t-muted) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-theme="light"] .footer-title{ color: var(--t-text) !important; }
html[data-theme="light"] .footer-logo-text{
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--t-text) !important;
}
html[data-theme="light"] .social-link{
  background: rgba(18,179,214,.1) !important;
  border-color: var(--t-line) !important;
  color: var(--t-accent-text) !important;
}
html[data-theme="light"] .footer-bottom{ border-top-color: var(--t-line) !important; }
html[data-theme="light"] .footer-credits,
html[data-theme="light"] .footer-legal-info,
html[data-theme="light"] .footer-description{ color: var(--t-muted) !important; }
html[data-theme="dark"] .site-footer{
  background: #050506 !important;
  border-top: 1px solid var(--t-line) !important;
}
html[data-theme="light"] .teacher-tab,
html[data-theme="light"] .role-card,
html[data-theme="light"] .vk-news-card,
html[data-theme="light"] .news-card,
html[data-theme="light"] .group-card,
html[data-theme="light"] .hero-card,
html[data-theme="light"] .bento-item{
  box-shadow: 0 1px 2px rgba(17,17,19,.05), 0 8px 24px rgba(17,17,19,.04) !important;
}

/* ==========================================================================
   10. ДОСТУПНОСТЬ
   ========================================================================== */

:where(a, button, [tabindex]):focus-visible{
  outline: 2px solid var(--t-accent);
  outline-offset: 3px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce){
  body, .site-header, .site-footer, .hero-card, .teacher-tab, .role-card{
    transition-duration: .001ms !important;
  }
}

/* ==========================================================================
   11. МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ (по результатам замеров на 390px)
   ========================================================================== */

/* 11.1 Cookie-баннер: поднят над доком и не перекрывает его */
@media (max-width: 899px){
  /* тонкая полоса у нижнего края, над доком — контент не перекрывает */
  body .cookie-banner{
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    top: auto !important;
    bottom: calc(58px + env(safe-area-inset-bottom)) !important;
    padding: 8px 12px !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }
  body .cookie-banner__content{
    gap: 8px !important;
    align-items: center !important;
  }
  body .cookie-banner__text{
    font-size: 11.5px !important;
    line-height: 1.3 !important;
    gap: 6px !important;
  }
  body .cookie-banner__text i{ font-size: 13px !important; }
  body .cookie-banner__actions{ gap: 6px !important; flex: 0 0 auto; }
  body .cookie-btn{
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: .74rem !important;
    border-radius: 8px !important;
  }
}

/* 11.2 Шапка прижата к верхнему краю (был зазор 10px) */
@media (max-width: 899px){
  body .site-header{
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    border-top: 0 !important;
  }
  body .header-container{ height: 64px !important; padding-inline: 14px !important; }
  body{ padding-top: 64px !important; }
}

/* 11.3 Hero: фото попадает в первый экран */
@media (max-width: 899px){
  body .hero-container{ display: flex !important; flex-direction: column; gap: 16px; }
  body .hero-visual{ order: -1; width: 100%; }
  body .hero-card-media img{ aspect-ratio: 16 / 10 !important; max-height: 220px; object-fit: cover; }
  body .hero-section{ padding-top: 14px !important; }
}

/* 11.4 Галерея: 2 колонки вместо одной (было 2965px) */
@media (max-width: 899px){
  body .gallery-bento{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body .gallery-bento > *{ height: 116px !important; }
  body .gallery-bento img{ width: 100% !important; height: 100% !important; object-fit: cover; }
  body .teacher-info-card{ padding: 14px !important; }
  body .teacher-info-description{ font-size: .9rem !important; line-height: 1.45 !important; }
}

/* 11.5 Новости и отзывы: горизонтальная лента со снапом */
@media (max-width: 899px){
  body .vk-news-grid,
  body .reviews-grid{
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }
  body .vk-news-card{ flex: 0 0 78% !important; scroll-snap-align: start; }
  body .review-card{ flex: 0 0 82% !important; scroll-snap-align: start; }
}

/* 11.6 Расписание: компактные карточки */
@media (max-width: 899px){
  body .schedule-grid{ gap: 10px !important; }
  body .class-card{ border-radius: 16px !important; }
  body .class-card .card-header{ padding: 10px 14px !important; }
  body .class-card .card-body{ padding: 12px 14px !important; }
  body .class-card .card-title{ font-size: 1.02rem !important; line-height: 1.25 !important; }
  body .class-card .card-details{ font-size: .86rem !important; gap: 4px !important; }
  body .class-card .card-footer{ padding: 10px 14px !important; }
}

/* 11.7 Футер компактнее */
@media (max-width: 899px){
  body .site-footer{ padding: 28px 0 20px !important; margin-top: 24px !important; }
  body .footer-container{ gap: 20px !important; }
  body .footer-docs{ column-count: 2; column-gap: 14px; }
  body .footer-bottom{ padding-top: 14px; }
}
/* 11.8 Расписание: снимаем жёсткую высоту карточки (было 360px) */
@media (max-width: 899px){
  body .class-card{
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column;
  }
  body .class-card .card-body{ padding: 10px 14px !important; }
  body .class-card .card-title{ margin: 6px 0 10px !important; }
  body .class-card .card-details{ margin: 0 !important; }
  body .class-card .card-footer{ margin-top: auto !important; }
  body .schedule-grid{ gap: 8px !important; }
}

/* 11.9 Футер: ещё компактнее */
@media (max-width: 899px){
  body .site-footer{ padding: 22px 0 16px !important; }
  body .footer-container{ gap: 16px !important; }
  body .footer-brand{ margin-bottom: 4px; }
  body .footer-social{ margin-bottom: 6px; }
  body .footer-map-block{ margin-top: 6px; }
  body .reviews-fullwidth{ margin-top: 18px; padding-top: 0; }
  body .reviews-title{ margin-bottom: 10px; }
  body .footer-platforms{ margin-top: 8px; gap: 6px; }
  body .footer-bottom{ margin-top: 12px; }
}

/* ==========================================================================
   12. МОБИЛЬНЫЕ ПРАВКИ (перенесено из превью)
   Только <=899px: новости по одной, вертикальный список педагогов,
   карточка и галерея по клику, свёрнутые группы, расписание
   «сейчас + 2 часа», галерея без стрелок, кнопки чата/темы подняты.
   ========================================================================== */
@media (max-width: 899px){

@media (max-width: 899px){

  /* ---------- 1. Новости: ровно одна карточка на экран ---------- */
  body .vk-news-grid{
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    padding-inline: 0 !important;
    gap: 0 !important;
  }
  body .vk-news-card{
    flex: 0 0 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: center;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  /* ---------- 2. Педагоги: вертикальный список ---------- */
  body .teachers-grid{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    overflow: visible !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    padding-bottom: 0 !important;
    scroll-snap-type: none;
  }
  body .teacher-tab{
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    padding: 12px 14px !important;
    gap: 12px !important;
    min-width: 0 !important;
  }
  body .teacher-tab-avatar img{
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
  }
  body .teacher-tab-name{
    font-size: .95rem !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
  body .teacher-tab-role{ font-size: .76rem !important; }

  /* ---------- 3. До выбора педагога скрыты био и галерея ---------- */
  html.nx-teach-hide .bento-item--info,
  html.nx-teach-hide .bento-item--gallery{ display: none !important; }

  body .bento-grid{
    display: flex !important;
    flex-direction: column;
    gap: 14px !important;
  }
  body .bento-item--info{ order: -1; }
  body .teacher-info-card{ padding: 14px !important; }
  body .teacher-info-description{
    font-size: .9rem !important;
    line-height: 1.45 !important;
  }

  /* группы внутри карточки — свёрнуты */
  body .pv-groups-collapsed .groups-list{ display: none !important; }
}

/* ==========================================================================
   Превью-элементы (вне медиазапроса)
   ========================================================================== */

/* скрытие карточек расписания: специфичность важна,
   иначе проигрывает body .class-card{display:flex !important} */
body .class-card.pv-card-hidden{ display: none !important; }

/* стрелки галереи не нужны: листать нечего, все фото на экране */
body .gallery-nav{ display: none !important; }

.pv-more-btn,
.pv-groups-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--t-line-strong, rgba(255,255,255,.25));
  background: transparent;
  color: var(--t-text, #f4f4f5);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.pv-more-btn:active,
.pv-groups-btn:active{ transform: scale(.99); }
@media (hover:hover) and (pointer:fine){
  .pv-more-btn:hover,
  .pv-groups-btn:hover{ background: rgba(255,255,255,.06); }
}

.pv-note{
  margin: 0 0 12px;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--t-muted, #8a8a93);
}

/* ==========================================================================
   Галерея групп: раскладка зависит от количества фото (data-count ставит JS)
   ========================================================================== */

/* 1 фото — крупно на всю ширину */
body .gallery-bento[data-count="1"]{
  display: block !important;
  grid-template-columns: none !important;
}
body .gallery-bento[data-count="1"] > *{
  height: auto !important;
  min-height: 220px;
  max-height: 320px;
}
body .gallery-bento[data-count="1"] img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* 2 фото — две колонки одинаковой высоты */
body .gallery-bento[data-count="2"]{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
body .gallery-bento[data-count="2"] > *{ height: 160px !important; }

/* 3 фото — одно крупное + два поменьше */
body .gallery-bento[data-count="3"]{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 120px;
  gap: 8px !important;
}
body .gallery-bento[data-count="3"] > *:first-child{
  grid-column: 1 / -1;
  height: 180px !important;
}
body .gallery-bento[data-count="3"] > *:not(:first-child){ height: 120px !important; }

/* 4 фото — сетка 2×2 */
body .gallery-bento[data-count="4"]{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
body .gallery-bento[data-count="4"] > *{ height: 130px !important; }

/* 5-6 и больше — 2 колонки, компактные ячейки */
body .gallery-bento[data-count="5"],
body .gallery-bento[data-count="6"],
body .gallery-bento[data-count="7"],
body .gallery-bento[data-count="8"]{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
body .gallery-bento[data-count="5"] > *,
body .gallery-bento[data-count="6"] > *,
body .gallery-bento[data-count="7"] > *,
body .gallery-bento[data-count="8"] > *{ height: 116px !important; }

/* общее для всех картинок галереи */
body .gallery-bento img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* ---------- 4. Плавающие кнопки чата и темы: подняты над доком ---------- */
@media (max-width: 899px){
  body .contact-fab{
    right: 12px !important;
    bottom: calc(58px + env(safe-area-inset-bottom) + 122px) !important;
  }
  body .theme-toggle-mobile{
    right: 14px !important;
    bottom: calc(58px + env(safe-area-inset-bottom) + 190px) !important;
  }
}

}

/* ==========================================================================
   РАСПИСАНИЕ НА НЕДЕЛЮ + ФИКСИРОВАННЫЙ CTA
   ========================================================================== */

.week-grid{ display: none; }

@media (min-width: 900px){
  /* на десктопе вместо сегодняшних карточек — недельная сетка */
  #schedule .schedule-grid{ display: none !important; }

  .week-grid{
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 4px;
  }

  .week-col{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 10px 8px 12px;
    background: var(--t-surface);
    border: 1px solid var(--t-line);
    border-radius: 16px;
    transition: border-color .2s;
  }
  .week-col--today{
    border-color: var(--t-accent-text);
    box-shadow: inset 0 0 0 1px var(--t-accent-text);
  }

  .week-col__head{
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 2px 8px;
    border-bottom: 1px solid var(--t-line);
  }
  .week-col__day{
    font-family: 'Unbounded', 'Onest', sans-serif;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--t-text);
  }
  .week-col__date{
    font-size: .68rem;
    color: var(--t-muted);
    font-variant-numeric: tabular-nums;
  }

  .week-item{
    display: block;
    padding: 7px 8px;
    border: 1px solid var(--t-line);
    border-radius: 10px;
    background: var(--t-surface-2);
    color: inherit;
    text-decoration: none;
    transition: border-color .2s, transform .2s;
  }
  .week-item:hover{
    border-color: var(--t-accent-text);
    transform: translateY(-1px);
  }
  .week-item__time{
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .7rem;
    font-weight: 650;
    color: var(--t-accent-text);
    font-variant-numeric: tabular-nums;
  }
  .week-item__trial{
    font-style: normal;
    font-size: .56rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--t-ghost-bg);
    color: var(--t-muted);
  }
  .week-item__name{
    display: block;
    margin-top: 3px;
    font-size: .73rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .week-item__meta{
    display: block;
    margin-top: 2px;
    font-size: .64rem;
    color: var(--t-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .week-empty{
    font-size: .7rem;
    color: var(--t-muted);
    text-align: center;
    padding: 6px 0;
  }
}

/* ---------- фиксированная кнопка «Записаться» (только десктоп) ---------- */

.desk-cta{ display: none; }

@media (min-width: 900px){
  .desk-cta{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    padding: 13px 21px;
    border-radius: 999px;
    background: var(--t-accent-display);
    color: var(--t-accent-ink);
    font-family: 'Onest', sans-serif;
    font-size: .93rem;
    font-weight: 650;
    letter-spacing: -.01em;
    text-decoration: none;
    box-shadow: 0 16px 36px -16px rgba(15,157,196,.7);
    transition: transform .2s var(--t-ease), filter .2s var(--t-ease);
  }
  .desk-cta:hover{
    transform: translateY(-2px);
    filter: brightness(1.05);
  }
  .desk-cta:active{ transform: translateY(0); }
  .desk-cta i{ font-size: .85rem; }
}

@media (min-width: 900px) and (prefers-reduced-motion: reduce){
  .desk-cta,
  .week-item{ transition: none; }
}

/* ---------- отзывы на главной (подняты из футера) ---------- */

.home-reviews{ padding-top: var(--t-section); }

.home-reviews .reviews-fullwidth{
  margin: 0 auto;
  padding: 0 var(--t-gutter);
  border-top: 0;
  max-width: 1400px;
}
.home-reviews .reviews-title{
  justify-content: flex-start;
  font-family: 'Unbounded', 'Onest', sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.home-reviews .reviews-grid{ gap: 14px; }
@media (max-width: 720px){
  .home-reviews .reviews-grid{ grid-template-columns: 1fr; }
}
