/* ==========================================================================
   /tools/chem-zanyat-rebenka — «Чем занять ребёнка»
   Наследует hero/FAQ/share базу из maternity-bag.css. Стеклянный стиль.
   ========================================================================== */
@import url("/assets/css/maternity-bag.css");
@import url("/assets/css/partners.css");

:root {
  --cz-coral: #e0855f;
  --cz-teal: #4fb0a4;
  --cz-ink: #2b2724;
  --cz-border: #ecdfd6;
}

/* ---------- Page & Hero ---------- */
.cz-page {
  background:
    radial-gradient(ellipse 55% 45% at 10% 6%, rgba(224, 133, 95, 0.13), transparent 60%),
    radial-gradient(ellipse 50% 45% at 92% 22%, rgba(79, 176, 164, 0.13), transparent 62%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(224, 133, 95, 0.08), transparent 65%),
    #fdf9f5 !important;
}
.cz-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(247, 235, 226, 0.55) 100%),
    url("/assets/images/chem-zanyat-rebenka-hero-bg.webp") center / cover no-repeat,
    linear-gradient(180deg, #ffffff 0%, #f6e7db 100%) !important;
  border-bottom-color: #eed9c9 !important;
}
.cz-hero .mb-hero-title span::after {
  background: linear-gradient(90deg, rgba(224, 133, 95, 0.5), rgba(79, 176, 164, 0.4));
}

/* ---------- Стеклянные плашки ---------- */
.cz-form-section { margin-bottom: 0 !important; }
.cz-form-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.80) 0%, rgba(250, 244, 237, 0.55) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 26px rgba(150, 110, 80, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  border-radius: 20px; padding: 26px 30px; margin: 0 0 12px;
}

.cz-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.cz-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cz-field label { font-family: "Montserrat", sans-serif; font-size: 14px; font-weight: 600; color: var(--cz-ink); }
.cz-field select {
  width: 100%; padding: 12px 14px;
  font-family: "Nunito", sans-serif; font-size: 16px; color: var(--cz-ink);
  background: #fff; border: 1.5px solid var(--cz-border); border-radius: 12px;
  appearance: none; cursor: pointer;
}

/* Кастомный стеклянный селект */
.cz-select { position: relative; }
.cz-select-native { display: none !important; }
.cz-select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; font-family: "Nunito", sans-serif; font-size: 16px; color: var(--cz-ink);
  text-align: left; cursor: pointer;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(250, 244, 237, 0.6));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.85); border-radius: 12px;
  box-shadow: 0 2px 10px rgba(150, 110, 80, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color .15s, box-shadow .15s;
}
.cz-select-trigger:hover { border-color: rgba(224, 133, 95, 0.5); }
.cz-select.is-open .cz-select-trigger { border-color: var(--cz-coral); box-shadow: 0 0 0 3px rgba(224, 133, 95, 0.15); }
.cz-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-select-chev { display: inline-flex; color: #a58f84; transition: transform .2s, color .2s; flex-shrink: 0; }
.cz-select-chev svg { width: 16px; height: 16px; }
.cz-select.is-open .cz-select-chev { transform: rotate(180deg); color: var(--cz-coral); }
.cz-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  display: none; flex-direction: column; gap: 2px; padding: 6px;
  background: linear-gradient(150deg, #ffffff 0%, #fdf4ee 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(224, 200, 185, 0.7); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(120, 80, 60, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  max-height: 300px; overflow-y: auto;
}
.cz-select.is-open .cz-select-menu { display: flex; animation: cz-pop .16s ease; }
@keyframes cz-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cz-select-option {
  text-align: left; padding: 10px 12px; border: none; background: transparent;
  font-family: "Nunito", sans-serif; font-size: 15px; color: var(--cz-ink);
  border-radius: 9px; cursor: pointer; transition: background .12s;
}
.cz-select-option:hover { background: rgba(224, 133, 95, 0.12); }
.cz-select-option.is-selected { background: linear-gradient(135deg, rgba(224, 133, 95, 0.22), rgba(224, 133, 95, 0.1)); font-weight: 700; color: #b45f3c; }

.cz-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cz-calc-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 28px;
  font-family: "Montserrat", sans-serif; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--cz-coral), #c96a45);
  border: none; border-radius: 14px; cursor: pointer;
  transition: transform .12s, box-shadow .2s; box-shadow: 0 6px 18px rgba(201, 106, 69, 0.28);
}
.cz-calc-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(201, 106, 69, 0.34); }
.cz-shuffle-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px;
  font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700; color: var(--cz-ink);
  background: rgba(255, 255, 255, 0.7); border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px; cursor: pointer; transition: background .15s, transform .12s;
  box-shadow: 0 4px 14px rgba(150, 110, 80, 0.08);
}
.cz-shuffle-btn:hover { background: #fff; transform: translateY(-1px); }
.cz-shuffle-btn[hidden] { display: none; }
.cz-share { margin: 0 0 24px; }

/* ---------- Результаты ---------- */
.cz-results { margin-bottom: 8px; }
.cz-results-title {
  font-family: "Montserrat", sans-serif; font-size: 22px; font-weight: 800;
  color: var(--main-bg-color); margin: 0 0 6px !important; letter-spacing: -.01em;
}
/* заголовки — балансировка длины строк */
.cz-page .mb-hero-title,
.cz-page .cz-results-title,
.cz-page .cz-card-title,
.cz-page .mb-seo h2,
.cz-page .faq-title {
  text-wrap: balance;
}
.cz-note {
  margin: 0 0 16px !important; padding: 8px 14px;
  background: rgba(224, 133, 95, 0.10); border-left: 3px solid var(--cz-coral);
  border-radius: 8px; font-size: 13.5px; color: #8a6a58;
}
.cz-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
/* стеклянная карточка (frosted glass) — в стиле umenshitelnye-imena */
.cz-card {
  --edge: var(--cz-teal);
  position: relative;
  overflow: hidden; /* держим угловой glow внутри карточки — иначе на мобилке горизонтальный скролл */
  min-width: 0;
  padding: 16px 18px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(214, 190, 175, 0.4);
  box-shadow: 0 8px 26px rgba(150, 110, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cz-card--calm   { --edge: var(--cz-teal);  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(79, 176, 164, 0.16)); }
.cz-card--active { --edge: var(--cz-coral); background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(224, 133, 95, 0.16)); }
.cz-card::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--edge) 55%, transparent), transparent 70%);
}
.cz-card > * { position: relative; z-index: 1; }
.cz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(150, 110, 80, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.cz-card-head { display: flex; align-items: center; gap: 10px; }
.cz-card-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  flex-shrink: 0; border-radius: 10px; color: var(--edge);
  background: color-mix(in srgb, var(--edge) 15%, rgba(255, 255, 255, 0.6));
}
.cz-card-ic svg { width: 19px; height: 19px; }
.cz-card-title { font-family: "Montserrat", sans-serif; font-size: 17px; font-weight: 700; color: var(--cz-ink); margin: 0; }
.cz-card-desc { font-family: "Nunito", sans-serif; font-size: 14.5px; line-height: 1.55; color: #6b615a; margin: 0; }
.cz-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.cz-tag {
  font-family: "Nunito", sans-serif; font-size: 12px; font-weight: 600; color: #7a6f66;
  background: rgba(150, 110, 80, 0.08); border-radius: 999px; padding: 4px 10px;
}
.cz-tag-age { background: color-mix(in srgb, var(--edge) 16%, #fff); color: var(--edge); }
.cz-tag-free { background: rgba(79, 176, 164, 0.14); color: #37877c; }
.cz-empty { color: #8c7f76; font-size: 15px; padding: 16px 0; }

.cz-more-btn {
  display: block; margin: 20px auto 0; padding: 11px 26px;
  font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700; color: var(--cz-ink);
  background: rgba(255, 255, 255, 0.7); border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(150, 110, 80, 0.08);
  transition: background .15s, transform .12s;
}
.cz-more-btn:hover { background: #fff; transform: translateY(-1px); }
.cz-more-btn[hidden] { display: none; } /* атрибут hidden сильнее display:block */

/* ---------- Нумерованный список в SEO ---------- */
.cz-seo ol {
  list-style: none; counter-reset: cz-step; padding: 0; margin: 0 0 16px !important;
}
.cz-seo ol li {
  position: relative; counter-increment: cz-step; padding: 8px 0 8px 40px;
  font-size: 15px; line-height: 1.6; color: var(--dark-text-color); border-bottom: 1px dashed #f0e5dc;
}
.cz-seo ol li:last-child { border-bottom: none; }
.cz-seo ol li::before {
  content: counter(cz-step); position: absolute; left: 0; top: 7px;
  width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ea9c78, var(--cz-coral)); color: #fff; border-radius: 50%;
  font-family: "Montserrat", sans-serif; font-size: 12px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(201, 106, 69, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .cz-form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .cz-form-card { padding: 22px 18px; }
  /* равномерный перенос: ровные края + перенос по слогам (lang=ru) */
  .cz-page .cz-card-desc,
  .cz-page .mb-seo p,
  .cz-page .mb-seo li,
  .cz-page .faq-answer p {
    text-align: justify;
    text-wrap: pretty;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
  }
}
@media (max-width: 520px) {
  .cz-form-grid { grid-template-columns: 1fr; }
  .cz-grid { grid-template-columns: 1fr; }
  .cz-results-title { font-size: 19px; }
  .cz-actions { flex-direction: column; }
  .cz-calc-btn, .cz-shuffle-btn { justify-content: center; }
}
