/* ==========================================================================
   Портал «Развивай РЕБЕНКА — Детские кружки и секции Подольска»
   Фирменный стиль: Leaf Green (#71BF44) & Sunny Amber (#FEBC10)
   ========================================================================== */

@font-face {
  font-family: "HiMelodyBrand";
  src: url("/static/fonts/hi-melody.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Фирменные цвета из брендбука / логотипа */
  --brand-green: #71bf44;
  --brand-green-hover: #5ca931;
  --brand-green-deep: #2e6d12;
  --brand-green-soft: #eef9e6;
  --brand-green-border: #cde8bc;

  --brand-amber: #febc10;
  --brand-amber-hover: #e7a700;
  --brand-amber-deep: #8c5d00;
  --brand-amber-soft: #fff8df;
  --brand-amber-border: #fae08c;

  /* Поверхности и текст */
  --bg-page: #fafcf8;
  --bg-surface: #ffffff;
  --bg-muted: #f2f6ef;
  --text-primary: #1c2819;
  --text-secondary: #53634f;
  --text-muted: #7b8b76;
  --border-subtle: #e3ece0;
  --border-strong: #cddbc7;

  /* Типографика */
  --font-heading: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hand: "HiMelodyBrand", cursive, sans-serif;

  /* Геометрия и тени */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --shadow-xs: 0 2px 6px rgba(34, 62, 22, 0.04);
  --shadow-sm: 0 6px 18px rgba(34, 62, 22, 0.06);
  --shadow-md: 0 14px 34px rgba(34, 62, 22, 0.09);
  --shadow-lg: 0 22px 50px rgba(34, 62, 22, 0.13);
  --shadow-promo: 0 12px 32px rgba(254, 188, 16, 0.22);

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --container-max: 1320px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--text-primary);
  background-color: var(--bg-page);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  margin: 0 0 0.5em;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Шапка сайта (Sticky Glass Header)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(205, 232, 188, 0.65);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  max-width: 1480px;
}

.brand-header-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo-horiz {
  height: 38px;
  width: auto;
  flex-shrink: 0;
}

.brand-city-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--brand-green-border);
  white-space: nowrap;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-link {
  padding: 8px 11px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s var(--ease-spring);
}

.nav-link:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.fav-header-btn {
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.fav-header-btn:hover {
  border-color: var(--brand-amber);
  background: var(--brand-amber-soft);
  color: var(--brand-amber-deep);
}

.fav-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--brand-amber);
  color: #1c2819;
  font-size: 11.5px;
  font-weight: 800;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

/* ==========================================================================
   Кнопки
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(113, 191, 68, 0.32);
}

.btn-primary:hover {
  background: var(--brand-green-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(113, 191, 68, 0.4);
}

.btn-amber {
  background: var(--brand-amber);
  color: #1c2819;
  box-shadow: 0 6px 18px rgba(254, 188, 16, 0.3);
}

.btn-amber:hover {
  background: var(--brand-amber-hover);
  color: #1c2819;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand-green);
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ==========================================================================
   Hero-секция с умным живым поиском
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 46px 0 42px;
  background:
    radial-gradient(circle at 12% 18%, rgba(113, 191, 68, 0.14), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(254, 188, 16, 0.2), transparent 40%),
    linear-gradient(180deg, #f4fbf0 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid var(--brand-green-border);
  color: var(--brand-green-deep);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}

.hero-title {
  font-size: clamp(29px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 14px;
}

.hero-title .highlight-green {
  color: var(--brand-green-hover);
}

.hero-title .highlight-amber {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.hero-title .highlight-amber::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 4px;
  height: 12px;
  background: rgba(254, 188, 16, 0.42);
  border-radius: 6px;
  z-index: -1;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin: 0 0 24px;
  max-width: 620px;
}

/* Живой поиск */
.search-box-wrap {
  position: relative;
  max-width: 680px;
}

.hero-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  background: #ffffff;
  border: 2px solid var(--brand-green-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search-form:focus-within {
  border-color: var(--brand-green);
  box-shadow: 0 14px 36px rgba(113, 191, 68, 0.22);
}

.hero-search-icon {
  color: var(--brand-green);
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: transparent;
  min-width: 0;
}

.hero-search-input::placeholder {
  color: var(--text-muted);
}

.live-suggest-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  z-index: 950;
  display: none;
}

.live-suggest-dropdown.open {
  display: block;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.suggest-item:hover {
  background: var(--brand-green-soft);
}

.suggest-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
}

.suggest-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.quick-chip-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-chip {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.quick-chip:hover {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
}

/* Правая карточка бренда в Hero */
.hero-visual-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid var(--brand-green-border);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-visual-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(254, 188, 16, 0.18);
}

.hero-brand-logo {
  width: 230px;
  margin: 0 auto 16px;
}

.hero-handwritten-note {
  font-family: var(--font-hand);
  font-size: 25px;
  line-height: 1.2;
  color: var(--brand-green-deep);
  margin-bottom: 18px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
}

.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: var(--brand-green-hover);
}

.hero-stat-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   Секции и заголовки
   ========================================================================== */

.section {
  padding: 48px 0;
}

.section-muted {
  background: var(--bg-muted);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(23px, 2.8vw, 32px);
  font-weight: 900;
  margin-bottom: 4px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

/* ==========================================================================
   Сетка групп кружков (Спорт, Рукоделие и прочие)
   ========================================================================== */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-green);
}

.category-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.category-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.category-count-pill {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 800;
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.category-card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.category-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Карточки кружков + Рекламные промо-тарифы (ТОП, Рекомендуем, Выделение)
   ========================================================================== */

.clubs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.club-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s ease, border-color 0.2s ease;
}

.club-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-green-border);
}

/* Промо-уровни (выбор пользователя A2) */
.club-card.promo-tier-top {
  border: 2px solid var(--brand-amber);
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 42%);
  box-shadow: var(--shadow-promo);
}

.club-card.promo-tier-recommended {
  border: 2px solid var(--brand-green);
  background: linear-gradient(180deg, #f6fcf1 0%, #ffffff 42%);
  box-shadow: 0 10px 28px rgba(113, 191, 68, 0.14);
}

.club-card.promo-tier-highlight {
  border: 1.5px solid var(--brand-amber-border);
  background: #fffdf6;
}

.club-card-media {
  position: relative;
  height: 168px;
  background: linear-gradient(135deg, #eef9e6 0%, #fff6da 100%);
  overflow: hidden;
}

.club-card-media img.club-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.club-card:hover .club-card-media img.club-cover-img {
  transform: scale(1.04);
}

.club-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
}

.club-cover-placeholder img {
  width: 68px;
  height: auto;
  opacity: 0.92;
}

.club-badges-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 50px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.badge-promo-top {
  background: var(--brand-amber);
  color: #1c2819;
  box-shadow: 0 4px 12px rgba(254, 188, 16, 0.45);
}

.badge-promo-rec {
  background: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(113, 191, 68, 0.4);
}

.badge-cat {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
}

.badge-free {
  background: #e3f8ef;
  color: #0e734a;
  border: 1px solid #b5ebd4;
}

.fav-card-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #9aa796;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.fav-card-btn:hover,
.fav-card-btn.active {
  color: #ef4444;
  transform: scale(1.08);
}

.club-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.club-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.club-district {
  color: var(--brand-green-deep);
  font-weight: 700;
  background: var(--brand-green-soft);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.club-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  color: #1c2819;
}

.club-rating .star {
  color: var(--brand-amber-hover);
}

.club-rating .rev-cnt {
  color: var(--text-muted);
  font-weight: 500;
}

.club-card-title {
  font-size: 18.5px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.26;
}

.club-card-title a:hover {
  color: var(--brand-green-hover);
}

.club-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.club-promo-offer-box {
  margin: 4px 0 12px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  background: var(--brand-amber-soft);
  border: 1px dashed var(--brand-amber-hover);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-amber-deep);
}

.club-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.club-info-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.club-info-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--brand-green);
}

.club-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.age-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-muted);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Интерактивная карта Подольска (Leaflet)
   ========================================================================== */

.map-card-shell {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.map-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.map-filter-chip {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.map-filter-chip.active,
.map-filter-chip:hover {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

.podolsk-map-canvas {
  width: 100%;
  height: 490px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 1;
}

/* ==========================================================================
   Фильтры каталога
   ========================================================================== */

.catalog-filter-panel {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-subtle);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 0.9fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(113, 191, 68, 0.18);
}

textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

.filter-toggles-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-pill input {
  accent-color: var(--brand-green);
  width: 16px;
  height: 16px;
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.page-btn.active {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

/* ==========================================================================
   Детальная страница кружка
   ========================================================================== */

.club-detail-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  align-items: start;
}

.detail-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-subtle);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 22px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tag-item {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.contact-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-row-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
}

.social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ==========================================================================
   Раздел Новости
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.news-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card-img {
  height: 190px;
  background: var(--brand-green-soft);
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.article-prose h3 {
  margin-top: 24px;
  font-size: 21px;
}

.article-prose p, .article-prose li {
  font-size: 16.5px;
  line-height: 1.7;
  color: #2b3828;
}

/* ==========================================================================
   Рекламные тарифы (/partners) и Промо-баннер
   ========================================================================== */

.promo-cta-banner {
  background: linear-gradient(125deg, #25590e 0%, #4da124 58%, #71bf44 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: var(--shadow-md);
}

.promo-cta-banner h2 {
  color: #ffffff;
  margin-bottom: 8px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.pricing-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-subtle);
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}

.pricing-card.featured {
  border: 2.5px solid var(--brand-amber);
  box-shadow: var(--shadow-promo);
  transform: translateY(-6px);
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  color: var(--brand-green-deep);
  margin: 12px 0 18px;
}

/* ==========================================================================
   Админ-панель
   ========================================================================== */

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}

.kpi-box {
  background: #ffffff;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.kpi-num {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-green-deep);
}

.admin-table-wrap {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.admin-table th {
  background: var(--bg-muted);
  font-weight: 800;
  color: var(--text-secondary);
}

/* ==========================================================================
   Модальное окно и уведомления
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 32, 16, 0.52);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-window h3 {
  padding-right: 40px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg-muted);
  cursor: pointer;
  font-size: 18px;
}

.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  background: #1c2819;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  display: none;
}

.toast-msg.show {
  display: block;
}

/* ==========================================================================
   Подвал (Footer)
   ========================================================================== */

.site-footer {
  background: #192616;
  color: #d9e5d5;
  padding: 36px 0 22px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.45fr 0.9fr 0.95fr;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-box {
  background: #ffffff;
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.footer-title {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 11px;
  letter-spacing: 0.01em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
  color: #c7d6c2;
}

.footer-links-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

.footer-links a:hover {
  color: var(--brand-amber);
}

.footer-bottom {
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 12.8px;
  color: #8fa389;
}

.footer-muted-link {
  color: #9fb399;
  text-decoration: none;
}

.footer-muted-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-dev-credit {
  font-size: 12.8px;
  color: #aebfa8;
}

.footer-dev-credit a {
  color: #ff523d;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-dev-credit a:hover {
  color: #ff7463;
  text-decoration: underline;
}

/* ==========================================================================
   Адаптивные сетки форм и карточек
   ========================================================================== */

.hero-grid > *,
.categories-grid > *,
.clubs-grid > *,
.news-grid > *,
.pricing-grid > *,
.filter-grid > *,
.club-detail-layout > *,
.footer-grid > *,
.admin-kpi-grid > * {
  min-width: 0;
}

.club-card-footer {
  flex-wrap: wrap;
}

.club-sidebar-card {
  position: sticky;
  top: 94px;
}

.nav-mobile-cta {
  display: none;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-row-4 {
  display: grid;
  grid-template-columns: 0.6fr 0.6fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row-address {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.contact-row-box a,
.contact-row-box div {
  overflow-wrap: anywhere;
}

.admin-table-wrap {
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  min-width: 860px;
}

.modal-window {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

/* ==========================================================================
   Адаптивность (Ноутбуки, Планшеты и Смартфоны)
   ========================================================================== */

@media (max-width: 700px) {
  .brand-city-pill {
    display: none;
  }
}

@media (min-width: 1301px) {
  .brand-logo-horiz {
    height: 36px;
  }
  .brand-city-pill {
    padding: 4px 9px;
    font-size: 11.5px;
  }
  .main-nav {
    gap: 2px;
  }
  .nav-link {
    padding: 7px 9.5px;
    font-size: 13.5px;
  }
  .header-actions {
    gap: 8px;
  }
}

@media (max-width: 1480px) and (min-width: 1301px) {
  .brand-header-group {
    gap: 8px;
  }
  .brand-logo-horiz {
    height: 34px;
  }
  .brand-city-pill .city-pill-suffix {
    display: none;
  }
  .main-nav {
    gap: 1px;
  }
  .nav-link {
    padding: 7px 7.5px;
    font-size: 13px;
  }
  .fav-header-btn {
    padding: 8px 11px;
    font-size: 13px;
  }
  .header-add-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 1300px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    z-index: 1005;
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav .nav-link {
    display: block;
    width: 100%;
    padding: 11px 14px;
    font-size: 15.5px;
    border-radius: var(--radius-sm);
  }
  .mobile-menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clubs-grid,
  .news-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pricing-card.featured {
    transform: none;
  }
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-grid,
  .club-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .club-sidebar-card {
    position: static;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 16px;
  }
  .header-inner {
    min-height: 64px;
    gap: 8px;
  }
  .brand-logo-horiz {
    height: 32px;
  }
  .header-actions {
    gap: 6px;
  }
  .fav-header-btn {
    padding: 8px 11px;
  }
  .fav-header-btn .fav-label-text {
    display: none;
  }
  .categories-grid,
  .clubs-grid,
  .news-grid,
  .pricing-grid,
  .filter-grid,
  .footer-grid,
  .form-row-3,
  .form-row-address {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer {
    padding-bottom: 74px;
  }
  .section {
    padding: 34px 0;
  }
  .hero-section {
    padding: 28px 0 30px;
  }
  .hero-eyebrow {
    font-size: 12px;
    padding: 6px 12px;
    max-width: 100%;
    white-space: normal;
  }
  .hero-subtitle {
    font-size: 15.5px;
    margin-bottom: 18px;
  }
  .hero-visual-card {
    padding: 20px 16px;
  }
  .hero-brand-logo {
    width: 180px;
  }
  .hero-handwritten-note {
    font-size: 21px;
  }
  .detail-card,
  .pricing-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }
  .promo-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
  }
  .podolsk-map-canvas {
    height: 340px;
  }
  .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
  .btn-lg {
    padding: 13px 20px;
    font-size: 15px;
    width: 100%;
  }
  .modal-window {
    padding: 22px 16px;
    border-radius: var(--radius-lg);
  }
  .toast-msg {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }
}

@media (max-width: 580px) {
  .header-add-btn {
    display: none;
  }
  .nav-mobile-cta {
    display: inline-flex;
    width: 100%;
    margin-top: 8px;
  }
  .hero-search-form {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
    padding: 10px 12px;
    gap: 10px;
  }
  .hero-search-input {
    font-size: 15.5px;
    min-width: calc(100% - 34px);
  }
  .hero-search-form .btn {
    width: 100%;
  }
  .form-row-2,
  .form-row-4,
  .admin-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-stat-num {
    font-size: 20px;
  }
  .hero-stat-lbl {
    font-size: 11px;
  }
}

/* ==========================================================================
   Новые модули: 30-сек Квиз-подборщик, Гео-бейджи, SEO-чипсы, Сквозной баннер,
   Фотогалерея с лайтбоксом, Отзывы родителей и Кабинет статистики партнёра
   ========================================================================== */

.club-distance-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #e6f9f5;
  color: #0f766e;
  border: 1px solid #99f6e4;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.seo-landing-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.18s ease;
  box-shadow: var(--shadow-xs);
}

.seo-landing-chip:hover,
.seo-landing-chip.active {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
  transform: translateY(-1px);
}

/* Интерактивный подборщик (Квиз за 30 секунд) */
.quiz-finder-shell {
  background: linear-gradient(145deg, #f3fbf0 0%, #ffffff 55%, #fffcf2 100%);
  border: 2px solid var(--brand-green-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.quiz-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.quiz-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.quiz-step-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.quiz-step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.quiz-step-label span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.quiz-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quiz-pill {
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.quiz-pill:hover {
  border-color: var(--brand-green);
  color: var(--brand-green-deep);
}

.quiz-pill.active {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

.quiz-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.quiz-fallback-note {
  background: var(--brand-amber-soft);
  border: 1px solid var(--brand-amber-border);
  color: var(--brand-amber-deep);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.quiz-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quiz-mini-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}

.quiz-mini-card.promo {
  border-color: var(--brand-amber);
  background: #fffdf6;
}

/* Сквозной рекламный баннер внутри сетки каталога */
.catalog-inline-banner {
  grid-column: 1 / -1;
  background: linear-gradient(125deg, #1e4620 0%, #3d8b22 58%, #65b836 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-md);
}

/* Миниатюры фотогалереи и Лайтбокс */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.gallery-thumb-btn {
  width: 74px;
  height: 54px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--bg-muted);
  transition: all 0.16s ease;
}

.gallery-thumb-btn.active,
.gallery-thumb-btn:hover {
  border-color: var(--brand-green);
  transform: translateY(-1px);
}

.gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 12, 0.86);
  backdrop-filter: blur(6px);
  z-index: 3500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-backdrop.open {
  display: flex;
}

.lightbox-backdrop img {
  max-width: min(1040px, 94vw);
  max-height: 86vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

/* Отзывы родителей */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
}

.review-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Кабинет статистики партнёра */
.partner-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.kpi-val {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  color: var(--brand-green-deep);
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

@media (max-width: 1140px) {
  .quiz-controls-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .quiz-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .partner-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .quiz-finder-shell {
    padding: 18px 14px;
  }
  .quiz-mini-grid,
  .partner-stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalog-inline-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 16px;
  }
}

/* ==========================================================================
   Этап 2: Сертификаты ПФДО, Верификация владельцем, Смены, Сравнение, Дайджест
   ========================================================================== */

.badge-pfdo {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 800;
}

.badge-verified {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 800;
}

.schedule-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #f4f7f2;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.filter-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.owner-claim-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f5fbf1 0%, #fffbeb 100%);
  border: 1.5px dashed var(--brand-green);
}

.digest-lead-box {
  background: linear-gradient(135deg, #1b3617 0%, #2b5a22 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.digest-form-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr auto;
  gap: 10px;
}

/* Таблица сравнения кружков (/favorites) */
.compare-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.compare-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.compare-table th,
.compare-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  vertical-align: top;
  font-size: 13.5px;
  text-align: left;
  word-wrap: break-word;
}

.compare-table th:last-child,
.compare-table td:last-child {
  border-right: none;
}

.compare-table .compare-row-label {
  width: 170px;
  background: #f8fbf6;
  font-weight: 800;
  color: var(--text-secondary);
  font-size: 13px;
}

.compare-mobile-cards {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.compare-mobile-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.compare-mobile-kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 13px;
}

.compare-mobile-kv:last-child {
  border-bottom: none;
}

@media (max-width: 980px) {
  .digest-lead-box {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 18px;
  }
  .digest-form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .filter-extra-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .compare-table-wrap {
    display: none;
  }
  .compare-mobile-cards {
    display: flex;
  }
}

/* ==========================================================================
   Афиша открытых уроков и мастер-классов на выходные (/events)
   ========================================================================== */

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.events-grid > * {
  min-width: 0;
}

.event-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #bfd7b4;
}

.event-card.event-promoted {
  border: 2px solid var(--brand-amber);
  background: linear-gradient(180deg, #fffef8 0%, #ffffff 42%);
}

.event-card-top {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 18px 14px;
}

.event-thumb-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--brand-green-soft);
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-thumb-wrap img.event-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef9e6;
  color: var(--brand-green-deep);
  border: 1px solid #cbe8be;
  font-weight: 800;
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 99px;
}

.event-date-chip.is-weekend {
  background: #fff7df;
  color: #9a6400;
  border-color: #f6d57a;
}

.event-spots-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 3px 9px;
  border-radius: 99px;
}

.event-card-body {
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.events-filter-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.25fr 1.25fr 1.25fr;
  gap: 12px;
  align-items: end;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 980px) {
  .events-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .events-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-row-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .events-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .event-card-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .event-thumb-wrap {
    height: 168px;
  }
}

/* ==========================================================================
   Прозрачный счётчик просмотров карточек (.club-views-pill) и расцветающее
   дерево в логотипе шапки (.brand-logo-interactive)
   ========================================================================== */

.club-views-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: #f2f7ef;
  border: 1px solid #d9e7d3;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
  line-height: 1.3;
}

.brand-logo-interactive {
  overflow: visible;
  cursor: pointer;
}

.brand-logo-interactive .logo-tree-root {
  transform-origin: 84px 98px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}

.brand-link:hover .brand-logo-interactive .logo-tree-root {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 3px 8px rgba(113, 191, 68, 0.28));
}

.brand-logo-interactive .logo-blossom {
  opacity: 0;
  transform: scale(0) rotate(-75deg);
  transform-origin: 0 0;
  pointer-events: none;
}

.brand-logo-interactive .logo-sparkle {
  opacity: 0;
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

/* Активация цветения при клике на логотип */
.brand-link.is-blooming .logo-tree-root {
  animation: rrTreeSpringBloom 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.brand-link.is-blooming .logo-canopy-part {
  animation: rrCanopyLushGlow 1.35s ease-out forwards;
}
.brand-link.is-blooming .logo-canopy-part.part-2 { animation-delay: 0.05s; }
.brand-link.is-blooming .logo-canopy-part.part-3 { animation-delay: 0.10s; }
.brand-link.is-blooming .logo-canopy-part.part-4 { animation-delay: 0.14s; }

.brand-link.is-blooming .logo-blossom {
  animation: rrBlossomOpen 1.45s cubic-bezier(0.22, 1.28, 0.36, 1) forwards;
}
.brand-link.is-blooming .logo-blossom.b-1 { animation-delay: 0.04s; }
.brand-link.is-blooming .logo-blossom.b-2 { animation-delay: 0.10s; }
.brand-link.is-blooming .logo-blossom.b-3 { animation-delay: 0.16s; }
.brand-link.is-blooming .logo-blossom.b-4 { animation-delay: 0.08s; }
.brand-link.is-blooming .logo-blossom.b-5 { animation-delay: 0.21s; }
.brand-link.is-blooming .logo-blossom.b-6 { animation-delay: 0.26s; }
.brand-link.is-blooming .logo-blossom.b-7 { animation-delay: 0.18s; }

.brand-link.is-blooming .logo-sparkle {
  animation: rrPollenSparkle 1.25s ease-out forwards;
}
.brand-link.is-blooming .logo-sparkle.s-1 { animation-delay: 0.12s; }
.brand-link.is-blooming .logo-sparkle.s-2 { animation-delay: 0.20s; }
.brand-link.is-blooming .logo-sparkle.s-3 { animation-delay: 0.15s; }
.brand-link.is-blooming .logo-sparkle.s-4 { animation-delay: 0.25s; }
.brand-link.is-blooming .logo-sparkle.s-5 { animation-delay: 0.30s; }

@keyframes rrTreeSpringBloom {
  0% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 0 rgba(113, 191, 68, 0));
  }
  20% {
    transform: scale(0.93, 1.07) rotate(-2deg);
  }
  48% {
    transform: scale(1.09, 1.09) translateY(-2px) rotate(1.5deg);
    filter: drop-shadow(0 5px 14px rgba(113, 191, 68, 0.45));
  }
  75% {
    transform: scale(1.03) rotate(-0.5deg);
    filter: drop-shadow(0 4px 10px rgba(254, 188, 16, 0.35));
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 2px 6px rgba(113, 191, 68, 0.18));
  }
}

@keyframes rrCanopyLushGlow {
  0%   { filter: brightness(1) saturate(1); }
  40%  { filter: brightness(1.12) saturate(1.28); }
  100% { filter: brightness(1) saturate(1); }
}

@keyframes rrBlossomOpen {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-80deg);
  }
  38% {
    opacity: 1;
    transform: scale(1.24) rotate(12deg);
  }
  58% {
    opacity: 1;
    transform: scale(0.96) rotate(-4deg);
  }
  78% {
    opacity: 1;
    transform: scale(1.06) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.4) rotate(18deg);
  }
}

@keyframes rrPollenSparkle {
  0% {
    opacity: 0;
    transform: scale(0) translateY(3px);
  }
  35% {
    opacity: 1;
    transform: scale(1.5) translateY(-4px);
  }
  70% {
    opacity: 0.9;
    transform: scale(1.1) translateY(-8px);
  }
  100% {
    opacity: 0;
    transform: scale(0) translateY(-12px);
  }
}

/* ==========================================================================
   Раздел «О цели портала и история создания» (Евгений • 2018 → 2026)
   ========================================================================== */

.founder-story-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  background: linear-gradient(140deg, #f3fbf0 0%, #ffffff 52%, #fffcf1 100%);
  border: 2px solid var(--brand-green-border);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.founder-portrait-card {
  background: #ffffff;
  border: 1.5px solid #d5e8cc;
  border-radius: 22px;
  padding: 14px 14px 18px;
  box-shadow: 0 12px 30px rgba(34, 68, 24, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.founder-photo-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 64 / 76;
  background: linear-gradient(160deg, #eaf8e1 0%, #fff7df 100%);
  border: 1px solid #dfeed8;
}

.founder-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.founder-photo-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.founder-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.founder-photo-hint {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  border: 1px dashed #c8dec0;
}

.founder-year-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 40, 25, 0.84);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
}

.founder-caption-box {
  padding-top: 14px;
}

.founder-caption-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
}

.founder-caption-role {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.35;
}

.founder-hand-sign {
  font-family: var(--font-hand);
  font-size: 21px;
  font-weight: 700;
  color: var(--brand-green-deep);
  margin-top: 6px;
  line-height: 1.15;
}

.founder-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eaf8e1;
  color: var(--brand-green-deep);
  border: 1px solid #c5e6b4;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.founder-main-heading {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0 0 16px;
}

.founder-main-heading span {
  color: var(--brand-green-deep);
  background: linear-gradient(180deg, transparent 64%, rgba(254, 188, 16, 0.38) 64%);
  padding: 0 3px;
}

.founder-story-prose p {
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.founder-story-prose p strong {
  color: var(--text-primary);
}

.founder-mission-quote {
  margin: 18px 0 0;
  padding: 16px 20px;
  background: #ffffff;
  border-left: 4px solid var(--brand-amber);
  border-radius: 0 16px 16px 0;
  box-shadow: var(--shadow-xs);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
}

.founder-mission-quote footer {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-green-deep);
}

.founder-value-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.founder-value-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cfe4c5;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
}

.founder-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.founder-timeline-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.founder-timeline-card.highlight {
  border-color: var(--brand-green);
  background: linear-gradient(180deg, #f4fbf0 0%, #ffffff 65%);
}

.founder-timeline-year {
  display: inline-block;
  background: var(--brand-amber-soft);
  color: var(--brand-amber-deep);
  border: 1px solid var(--brand-amber-border);
  font-size: 12.5px;
  font-weight: 900;
  padding: 4px 11px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.founder-timeline-card.highlight .founder-timeline-year {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

.founder-timeline-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.founder-timeline-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.founder-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.founder-value-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.founder-value-card:hover {
  transform: translateY(-2px);
  border-color: #b7d9a7;
}

.founder-value-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.founder-value-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.founder-value-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.62;
  margin: 0;
}

@media (max-width: 960px) {
  .founder-story-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 20px;
    gap: 22px;
  }
  .founder-portrait-card {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
  }
  .founder-timeline-grid,
  .founder-values-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .founder-story-shell {
    padding: 18px 14px;
  }
  .founder-portrait-card {
    max-width: 250px;
  }
  .founder-story-prose p {
    font-size: 14.5px;
  }
}

/* Убираем встроенный SVG-флаг префикса Leaflet во всех картах */
.leaflet-control-attribution svg.leaflet-attribution-flag,
.leaflet-attribution-flag {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   Умный ИИ-консультант по кружкам Подольска (YandexGPT Chat Widget)
   ========================================================================== */

.ai-chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1090;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, #2e6d12 0%, #58ab2c 55%, #71bf44 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14.5px;
  box-shadow: 0 12px 30px rgba(46, 109, 18, 0.34), 0 0 0 4px rgba(113, 191, 68, 0.16);
  cursor: pointer;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease;
}

.ai-chat-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(46, 109, 18, 0.44), 0 0 0 6px rgba(254, 188, 16, 0.28);
}

.ai-chat-fab-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-amber);
  color: #1c2819;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(254, 188, 16, 0.45);
}

.ai-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  width: 400px;
  max-width: calc(100vw - 24px);
  height: 575px;
  max-height: calc(100dvh - 108px);
  z-index: 1095;
  background: #ffffff;
  border: 1.5px solid #cde8bc;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(24, 48, 16, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: aiPanelPop 0.22s var(--ease-spring);
}

.ai-chat-panel[hidden] {
  display: none !important;
}

@keyframes aiPanelPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #255a0e 0%, #4b9c22 100%);
  color: #ffffff;
  flex-shrink: 0;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ai-chat-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 14.5px;
  line-height: 1.2;
}

.ai-chat-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 2px;
}

.ai-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #febc10;
  box-shadow: 0 0 0 3px rgba(254, 188, 16, 0.28);
}

.ai-chat-header-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chat-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease;
}

.ai-chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 10px;
  background: #f8fbf6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-msg {
  max-width: 90%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.54;
  word-wrap: break-word;
}

.ai-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid #dcead5;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 8px rgba(34, 62, 22, 0.05);
}

.ai-msg-user {
  align-self: flex-end;
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 600;
  border-bottom-right-radius: 5px;
}

.ai-msg-bot p {
  margin: 0 0 7px;
}

.ai-msg-bot p:last-child {
  margin-bottom: 0;
}

.ai-msg-bot ul {
  margin: 6px 0 8px 17px;
  padding: 0;
}

.ai-msg-bot li {
  margin-bottom: 5px;
}

.ai-inline-link {
  color: var(--brand-green-deep);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-inline-link:hover {
  color: var(--brand-amber-deep);
}

.ai-clubs-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #dfead9;
}

.ai-club-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #f4faf0;
  border: 1px solid #cfe6c3;
  border-radius: 11px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.ai-club-mini-card:hover {
  background: #fff9e6;
  border-color: var(--brand-amber);
}

.ai-club-mini-title {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.25;
}

.ai-club-mini-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ai-club-mini-arrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-green-deep);
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  animation: aiDotBounce 1s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes aiDotBounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
  40% { transform: scale(1.15); opacity: 1; }
}

.ai-chat-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  scrollbar-width: none;
}

.ai-chat-chips::-webkit-scrollbar {
  display: none;
}

.ai-prompt-chip {
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid #cfe4c5;
  background: #f4faf0;
  color: var(--brand-green-deep);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ai-prompt-chip:hover {
  background: var(--brand-amber-soft);
  border-color: var(--brand-amber);
  color: var(--brand-amber-deep);
}

.ai-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 99px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-page);
  outline: none;
}

.ai-chat-input:focus {
  border-color: var(--brand-green);
  background: #ffffff;
}

.ai-chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--brand-green);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.ai-chat-send-btn:hover {
  background: var(--brand-green-hover);
  transform: scale(1.04);
}

.ai-chat-send-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 580px) {
  .ai-chat-fab {
    right: 14px;
    bottom: 14px;
    padding: 10px 15px 10px 11px;
    font-size: 13px;
  }
  .ai-chat-panel {
    right: 10px;
    left: 10px;
    bottom: 72px;
    width: auto;
    max-width: none;
    height: min(530px, calc(100dvh - 88px));
  }
}
