/* ============================================================
   Говірка — логопедичний простір
   Палітра взята з лого: крем, олива, теракот, гарбузовий
   ============================================================ */

:root {
  --cream: #FAF6EC;
  --cream-2: #F1EADA;
  --cream-3: #E9DFC8;
  --olive: #8CA173;
  --olive-dark: #647954;
  --olive-deep: #4C5D40;
  --terracotta: #C05F33;
  --terracotta-dark: #A34E28;
  --orange: #E9A13B;
  --orange-soft: #F3C880;
  --ink: #2E2A24;
  --ink-soft: #57503F;
  --white: #FFFDF8;

  --radius: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 30px rgba(46, 42, 36, 0.08);
  --font-head: 'Comfortaa', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; position: relative; }

/* якорі не ховаються під закріпленим хедером */
section[id], div[id="kontakty"] { scroll-margin-top: 92px; }

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  margin-bottom: 14px;
}

.section-sub {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 52px;
  color: var(--ink-soft);
  font-size: 18px;
}

/* ---------- Кнопки: ледь заокруглені, НЕ капсули ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-terracotta { background: var(--terracotta); color: var(--white); }
.btn-terracotta:hover { background: var(--terracotta-dark); }

.btn-olive { background: var(--olive); color: var(--white); }
.btn-olive:hover { background: var(--olive-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-white { background: var(--white); color: var(--ink); border-color: var(--cream-3); }

/* ---------- Хедер: хвиляста форма ---------- */

/* ---------- Хедер: хвиляста форма ---------- */
/* Закріплений: угорі сторінки — хвиля, при скролі — компактна суцільна смуга */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: var(--olive-deep);
  box-shadow: 0 6px 24px rgba(46, 42, 36, 0.14);
}

.site-header.scrolled .header-shape { opacity: 0; }

.site-header.scrolled .header-inner {
  padding-top: 10px;
  padding-bottom: 10px;
}

.header-inner { transition: padding 0.25s ease; }

.logo-badge { transition: width 0.25s ease, height 0.25s ease; }
.logo-badge img { transition: width 0.25s ease, height 0.25s ease; }

.site-header.scrolled .logo-badge { width: 64px; height: 64px; }
.site-header.scrolled .logo-badge img { width: 56px; height: 56px; }

.header-shape {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 150px;
  pointer-events: none;
}

.header-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo-badge {
  background: var(--white);
  border-radius: 50%;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}

.logo-badge img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;   /* пункти меню на одній висоті */
  gap: 26px;
  margin-left: auto;
  margin-right: -14px;   /* тягне пункти праворуч, щоб не залазили за фігуру */
}

.main-nav a,
.nav-drop-btn {
  color: var(--white);
  text-decoration: none;
  font: 700 16px/1.2 var(--font-body);   /* кнопки не успадковують шрифт — задаємо явно */
  text-shadow: 0 1px 2px rgba(0,0,0,0.12);
  transition: opacity 0.15s;
}

/* випадний список послуг у меню */
.nav-drop { position: relative; }

.nav-drop-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nd-caret { display: none; }   /* стрілочку прибрано — лишилось слово */


.nav-drop-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: -20px;
  min-width: 300px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(40, 50, 25, 0.22);
  padding: 10px;
  display: none;
  z-index: 50;
}

.nav-drop.open .nav-drop-panel { display: block; }

.nav-drop-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  text-shadow: none;
  font: 700 15px/1.3 var(--font-body);
  transition: background 0.15s, color 0.15s;
}

.nav-drop-panel a:hover { background: #F0F1E4; color: var(--olive-dark); }

.main-nav a:hover { opacity: 0.8; }

.header-cta {
  flex-shrink: 0;
  /* ===== ТВІК КНОПКИ "ЗАПИСАТИСЯ" ===== */
  --cta-shift: -40px;    /* зсув кнопки: мінус = правіше, плюс = лівіше */
  margin-right: var(--cta-shift);
}

.nav-toggle {
  display: none;
  background: var(--white);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
  margin-left: auto;
  color: var(--olive-deep);
}

/* ---------- Герой ---------- */

.hero {
  padding: 200px 0 90px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 12% 85%, rgba(140,161,115,0.12), transparent 70%),
    var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-block;
  background: var(--cream-2);
  border-radius: 10px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 14px;
  color: var(--olive-dark);
  letter-spacing: 0.4px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  margin-bottom: 20px;
}

/* акцентні кольори слів у заголовках — працюють у будь-якому блоці */
.accent { color: var(--terracotta); }
.accent-olive { color: var(--olive-dark); }

.hero-text {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Інтерактивні літери р л с ш ж у герой */

.hero-letters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-letters span {
  position: absolute;
  font-family: var(--font-head);
  font-weight: 700;
  user-select: none;
  will-change: transform;
  transition: color 0.3s;
}

.hl-1 { font-size: 120px; color: rgba(192,95,51,0.16);  top: 24%; left: 3%; }
.hl-2 { font-size: 90px;  color: rgba(140,161,115,0.2); top: 62%; left: 42%; }
.hl-3 { font-size: 70px;  color: rgba(233,161,59,0.22); top: 16%; left: 46%; }
.hl-4 { font-size: 100px; color: rgba(140,161,115,0.15);top: 70%; left: 6%; }
.hl-5 { font-size: 84px;  color: rgba(192,95,51,0.13);  top: 12%; right: 6%; }

/* Декоративна композиція замість фото простору (поки немає фото) */

.hero-visual {
  position: relative;
  aspect-ratio: 5 / 4.4;
}

.blob {
  position: absolute;
  border-radius: 46% 54% 55% 45% / 48% 44% 56% 52%;
}

.blob-main {
  inset: 6% 4% 10% 6%;
  background: var(--olive);
}

.blob-back {
  inset: 0 10% 2% 12%;
  background: var(--orange-soft);
  opacity: 0.55;
  border-radius: 54% 46% 42% 58% / 52% 56% 44% 48%;
}

.hero-photo-slot {
  position: absolute;
  inset: 16% 14% 20% 16%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white);
}

/* фото заповнює весь круг */
.hero-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

.leaf {
  position: absolute;
  width: 90px;
  opacity: 0.9;
}

.leaf-1 { bottom: 4%; left: -2%; transform: rotate(-20deg); }
.leaf-2 { top: 4%; right: 0; transform: rotate(160deg) scaleX(-1); width: 70px; }

/* ---------- Маскот-«шпигун»: тигреня виглядає з-за краю екрана ----------
   Фіксований у нижньому правому куті, їде разом зі скролом. По замовчуванню
   схований — видно лише очі, ніби підглядає. При наведенні виїжджає назовні,
   з'являється бульбашка «Р-р-р!». */

.mascot {
  position: fixed;
  bottom: 0;
  right: 10px;
  width: 155px;
  z-index: 60;
  user-select: none;
  pointer-events: auto;
  transform: translateY(55%);
  transition: transform 0.35s ease;
}

.mascot.active { transform: translateY(0); }

.mascot-img {
  display: block;
  width: 100%;
  animation: mascot-peek 5s ease-in-out infinite;
}

.mascot.active .mascot-img { animation-play-state: paused; }

/* ледь помітне «підглядання»: тигрик трохи завмирає та присідає */
@keyframes mascot-peek {
  0%, 100% { transform: translateY(0); }
  12%      { transform: translateY(6px); }
  22%      { transform: translateY(2px); }
  78%      { transform: translateY(2px); }
  88%      { transform: translateY(6px); }
}

/* бульбаша ліворуч від тигрика, хвостик по діагоналі — до мордочки */
.mascot-bubble {
  position: absolute;
  bottom: 58%;
  right: calc(100% + 10px);
  background: var(--white);
  border: 2px solid var(--orange);
  color: var(--terracotta);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  padding: 8px 16px;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(8px) scale(0.85);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

/* хвостик — діагонально вниз-управо, до голови тигрика */
.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 2px;
  border: 8px solid transparent;
  border-top-color: var(--orange);
  border-bottom: none;
  transform: rotate(-42deg);
  transform-origin: top right;
}

/* реагуємо на мишку лише там, де вона є — щоб на тач-екранах
   стан "наведення" не прилипав після тапу */
@media (hover: hover), (pointer: fine) {
  .mascot:hover { transform: translateY(0); }
  .mascot:hover .mascot-img { animation-play-state: paused; }
  .mascot:hover .mascot-bubble {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* стан після тапу на тач-екрані */
.mascot.active .mascot-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Хвиля-розділювач ---------- */

.wave-divider { display: block; width: 100%; height: 60px; }

/* ---------- Послуги: карусель карток з фото ---------- */

.services-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.services-topbar .section-title {
  text-align: left;
  margin-bottom: 0;
}

.services-topbar .section-sub {
  text-align: left;
  margin: 8px 0 0;
  font-size: 17px;
}

.services-grid {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 18px;
  margin-top: 26px;
  scrollbar-width: none;
}

.services-grid::-webkit-scrollbar { display: none; }

.service-card {
  flex: 0 0 calc((100% - 52px) / 3);
  scroll-snap-align: start;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 12px 12px 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  border: 1.5px solid var(--cream-3);
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.service-card h3 {
  font-size: 19px;
  line-height: 1.25;
  padding: 6px 8px 0;
  /* однакова висота заголовків: короткі займають місце двох рядків,
     щоб фото й описи на всіх картках були на одному рівні */
  min-height: calc(2 * 1.25em);
}

.service-photo {
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  aspect-ratio: 4 / 3.1;
  order: 1;
}

.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .service-photo img { transform: scale(1.05); }

.service-card p {
  color: var(--ink-soft);
  font-size: 15px;
  padding: 0 8px;
  flex-grow: 1;
}

.service-btn {
  align-self: flex-start;
  margin: 6px 8px 0;
  padding: 10px 18px;
  font-size: 15px;
  border: none;
  cursor: pointer;
}

/* кожна картка — свій відтінок кнопки і рамки: теракот / олива / гарбуз */
.service-card:nth-child(3n+1) { border-color: rgba(192, 95, 51, 0.5); }
.service-card:nth-child(3n+2) { border-color: rgba(140, 161, 115, 0.55); }
.service-card:nth-child(3n)   { border-color: rgba(233, 161, 59, 0.6); }

.service-card:nth-child(3n+1) .service-btn { background: var(--terracotta); }
.service-card:nth-child(3n+1) .service-btn:hover { background: var(--terracotta-dark); }
.service-card:nth-child(3n+2) .service-btn { background: var(--olive); }
.service-card:nth-child(3n+2) .service-btn:hover { background: var(--olive-dark); }
.service-card:nth-child(3n)   .service-btn { background: var(--orange); }
.service-card:nth-child(3n)   .service-btn:hover { background: var(--orange); filter: brightness(0.95); }

/* ---------- Кроки (таймлайн) ---------- */

.steps-section { background: var(--cream-2); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 34px;
  left: 8%;
  right: 8%;
  border-top: 3px dotted var(--olive);
  opacity: 0.5;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 24px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.step-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: var(--white);
  margin: 0 auto 18px;
}

.step-card:nth-child(1) .step-num { background: var(--terracotta); }
.step-card:nth-child(2) .step-num { background: var(--orange); }
.step-card:nth-child(3) .step-num { background: var(--olive); }
.step-card:nth-child(4) .step-num { background: var(--olive-deep); }

.step-card h3 { font-size: 19px; margin-bottom: 8px; }
.step-card p { font-size: 15px; color: var(--ink-soft); }

/* сліди лапок тигрика: «пройдуться» по стежці кроків, один за одним */
.paw-track {
  position: absolute;
  left: -26px;
  top: -64px;
  width: calc(100% + 52px);
  height: calc(100% + 90px);
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

/* ---------- Про простір ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-grid h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  margin-bottom: 18px;
  text-align: left;
}

.about-grid > div > p {
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.about-points {
  list-style: none;
  display: grid;
  gap: 14px;
}

.about-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 600;
}

.about-points .pt-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: url('../images/paw.png') center / contain no-repeat;
  opacity: 0.9;
}

.about-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.collage-item {
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1.05;
  background: var(--olive);
}

/* фото заповнює плитку повністю, з фігурними кутами */
.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transition: transform 0.3s ease;
}

.collage-item:hover img { transform: scale(1.05); }

.collage-item:nth-child(1) { border-radius: 44px 14px 14px 14px; }
.collage-item:nth-child(2) { border-radius: 14px 44px 14px 14px; }
.collage-item:nth-child(3) { border-radius: 14px 14px 44px 14px; }
.collage-item:nth-child(4) { border-radius: 14px 14px 14px 44px; }

/* ---------- Команда ---------- */

/* ================= НАША КОМАНДА: Modern Bio Card ================= */

.team-section {
  position: relative;
  overflow: hidden;
  background: var(--olive);
  padding: 84px 0 90px;
}

.team-section .section-title { color: var(--cream); }
.team-section .section-sub { color: rgba(252, 248, 238, 0.8); margin-bottom: 64px; }

/* напівпрозорі сліди лапок на зеленому фоні */
.team-paws {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.team-paws image { opacity: 0.15; }

.team-section .container { position: relative; z-index: 1; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  max-width: 1020px;
  margin: 0 auto;
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(60, 70, 40, 0.10);
}

/* фото: верхня половина + градієнт у тіло картки */
.tcard-photo {
  position: relative;
  height: 295px;
  flex-shrink: 0;
}

.tcard-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  display: block;
}

.tcard-grad {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
}

.tcard-name {
  margin-top: 28px;
  font: 700 24px/1.15 var(--font-head);
  color: var(--ink);
}

.tc-sub {
  margin: 2px 0 14px;
  font: 800 13px/1.4 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tc-sub .tc-role { color: var(--terracotta); }
.tc-sub .tc-exp { color: var(--olive-dark); }

.tcard-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 2px 22px 20px;
}

.tcard-role {
  font: 800 13px/1.4 var(--font-body);
  color: var(--terracotta);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tcard-role span {
  display: block;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 2px;
  color: var(--olive-dark);
}

/* вкладки */
.tcard-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid rgba(140, 161, 115, 0.4);
  margin: 14px 0 14px;
}

.tcard-tab {
  border: none;
  background: none;
  padding: 0 2px 9px;
  font: 700 14px/1 var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tcard-tab.active { color: var(--olive-dark); }

.tcard-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--olive-dark);
}

.tcard-pane { display: none; }

.tcard-pane.active { display: block; animation: tfade 0.25s ease; margin-top: 12px; }

@keyframes tfade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* панель "Про мене" */
.tcard-pane p {
  font: 400 15px/1.55 var(--font-body);
  color: var(--ink-soft);
  margin: 0;
}

.tcard-pane p + p { margin-top: 8px; }

/* панель "Напрямки" */
.tcard-pane ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.tcard-pane li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font: 700 14px/1.35 var(--font-body);
  color: var(--ink);
}

.tcard-pane li::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--olive);
}

/* вирівнювання висоти карток у рядку */
.team-grid .team-card:nth-child(odd)  { --lift: 0; }

@media (max-width: 900px) {
  .team-grid { gap: 32px; }
  .tcard-photo { height: 260px; }
}

@media (max-width: 600px) {
  .team-grid { grid-template-columns: 1fr; }
  .tcard-photo { height: 300px; }
  .tcard-name { font-size: 26px; }
}

/* ---------- Відгуки Google: бейдж рейтингу + карусель ---------- */

.reviews-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.g-rating {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1.5px solid var(--cream-3);
  border-radius: var(--radius);
  padding: 14px 22px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.g-rating:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.g-logo { display: flex; flex-shrink: 0; }

.g-rating-info { display: grid; gap: 2px; }

.g-rating-label {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.g-rating-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}

.g-rating-count { font-size: 13.5px; color: var(--ink-soft); }

.stars { color: var(--orange); font-size: 17px; letter-spacing: 2px; }

.carousel-nav { display: flex; gap: 12px; }

.car-btn {
  width: 72px;
  height: 56px;
  border-radius: 20px;
  border: none;
  background: var(--olive);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: background 0.18s ease, transform 0.18s ease;
}

/* грайливі радіуси — у тон плитках і баблах */
.car-btn:nth-of-type(odd)  { border-radius: 12px 22px 12px 22px; }
.car-btn:nth-of-type(even) { border-radius: 22px 12px 22px 12px; }

.car-btn:hover {
  background: var(--terracotta);
  transform: translateY(-3px);
}

.car-btn:active { transform: translateY(-1px); }

/* Стрічка відгуків: гортається стрілками й свайпом */

.reviews-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--olive) transparent;
}

.review-card {
  flex: 0 0 380px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rv-blue  { background: #E8F0F7; }
.rv-green { background: #EAF2E2; }

.rv-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.rv-quote {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 58px;
  line-height: 0.6;
  color: var(--olive-dark);
  margin-top: 14px;
}

.review-card p {
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  flex-grow: 1;
}

/* довгі відгуки: обрізаються, розгортаються кнопкою «Читати більше» */
.review-card p.rv-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rv-more {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--terracotta);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
}

.rv-more:hover { text-decoration: underline; }

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-author .ra-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}

.review-card .ra-avatar { background: var(--olive); }

.ra-name { font-weight: 800; font-size: 15px; line-height: 1.3; }
.ra-meta { font-size: 13px; color: var(--ink-soft); }

.reviews-all { text-align: center; margin-top: 26px; }

/* ---------- FAQ ---------- */

/* обгортка списку — точка відліку для лапки */
.faq-list-wrap {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.faq-list { display: grid; gap: 14px; position: relative; z-index: 1; }

/* тигряча лапа — визирає з-за першого питання */
.faq-paw {
  position: absolute;
  left: 0;
  top: -215px;
  width: 175px;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

@media (max-width: 1140px) {
  .faq-paw { display: none; }
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--cream-3);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 56px 20px 24px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  color: var(--terracotta);
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item .faq-body { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- Контакти / футер ---------- */

.contacts-section {
  background: var(--olive-deep);
  padding-top: 70px;
  padding-bottom: 70px;
}

.contacts-inner {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  
  box-shadow: var(--shadow-soft);
}

.contacts-info h2 { margin-bottom: 12px; }

.contact-rows { display: grid; gap: 16px; margin: 26px 0; }

.contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 16px;
}

.contact-row .cr-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(140,161,115,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.contact-row a { font-weight: 800; text-decoration: none; color: var(--terracotta); }
.contact-row a:hover { text-decoration: underline; }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 6px;
}

.hours-table td { padding: 5px 0; }
.hours-table td:first-child { color: var(--ink-soft); width: 45%; }
.hours-table td:last-child { font-weight: 800; }
.hours-table .closed { color: var(--terracotta); }

.messenger-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.ms-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s;
}

.ms-btn:hover { transform: translateY(-2px); }
.ms-btn-telegram { background: #2AABEE; color: var(--white); }
.ms-btn-whatsapp { background: #25D366; color: var(--white); }
.ms-btn-viber    { background: #7360F2; color: var(--white); }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 26px;
  border: 1.5px solid var(--cream-3);
  line-height: 0;
}

.map-wrap iframe { width: 100%; height: 230px; border: 0; }

/* Форма */

.signup-form h3 { font-size: 26px; margin-bottom: 6px; }
.signup-form > p { color: var(--ink-soft); margin-bottom: 24px; }

.form-grid { display: grid; gap: 16px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-field label {
  display: block;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 14px;
  border: 1.5px solid var(--cream-3);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--olive); }

.form-field textarea { resize: vertical; min-height: 90px; }

.form-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.form-note { font-size: 13px; color: var(--ink-soft); }

.form-status {
  font-weight: 800;
  font-size: 15px;
  display: none;
}

.form-status.ok { display: block; color: var(--olive-dark); }
.form-status.err { display: block; color: var(--terracotta); }

/* Футер */
.footer {
  background: #37432E;
  border-top: 1px solid rgba(250, 246, 236, 0.12);
  padding: 46px 0 26px;
  color: rgba(250, 246, 236, 0.85);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 34px;
}

.footer-top .footer-nav { justify-self: center; }
.footer-top .footer-social {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.footer-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-logo {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.footer-brand strong {
  font-family: var(--font-head);
  color: var(--cream);
  font-size: 20px;
}

.footer-brand p {
  font-size: 14px;
  margin-top: 4px;
  color: rgba(250, 246, 236, 0.75);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 8px 36px;   /* 2 колонки по 3: менше висоти, вужчий футер */
}

.footer-nav a {
  color: rgba(250, 246, 236, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.footer-nav a:hover { color: var(--white); }

.footer-social { display: grid; gap: 8px; }

.footer-social a {
  color: var(--orange-soft);
  font-weight: 800;
  text-decoration: none;
  font-size: 15px;
}

.footer-social a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(250, 246, 236, 0.12);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: rgba(250, 246, 236, 0.65);
}

.footer-bottom a { color: var(--orange-soft); font-weight: 700; text-decoration: none; }

/* ---------- Сторінки послуг ---------- */

.service-hero {
  padding: 170px 0 70px;
  background:
    radial-gradient(500px 260px at 88% 20%, rgba(233,161,59,0.14), transparent 70%),
    var(--cream);
  position: relative;
  overflow: hidden;
}

.service-hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  max-width: 760px;
  margin-bottom: 16px;
}

.service-hero .lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 30px;
}

.breadcrumbs {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--ink-soft);
}

.breadcrumbs a { color: var(--olive-dark); text-decoration: none; }

.service-body { max-width: 800px; margin: 0 auto; }

.service-body h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 54px 0 18px;
}

.service-body p { color: var(--ink-soft); margin-bottom: 16px; }

.check-list { list-style: none; display: grid; gap: 12px; margin: 22px 0; }

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--white);
  border: 1.5px solid var(--cream-3);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.check-list .chk {
  flex-shrink: 0;
  color: var(--olive-dark);
  font-weight: 900;
}

.cta-banner {
  background: var(--olive);
  border-radius: var(--radius-lg);
  color: var(--white);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin: 60px 0 0;
}

.cta-banner h2 {
  color: var(--white);
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 30px);
}

.cta-banner p { color: rgba(255,253,248,0.85); margin: 0; }

/* Плавна поява блоків при скролі — ледь помітна */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .mascot-img { animation: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1020px) {
  .steps-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .service-card { flex-basis: calc((100% - 26px) / 2); }
}

@media (max-width: 860px) {
  .hero { padding-top: 150px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; margin: 0 auto; width: 100%; }
  .contacts-inner { grid-template-columns: 1fr; gap: 36px; }

  .nav-drop-panel {
    position: static;
    min-width: 0;
    box-shadow: none;
    display: none;
  }

  .nav-drop.open .nav-drop-panel { display: block; }

  .main-nav {
    padding-left: 0;
    display: none;
    position: absolute;
    top: 84px;
    left: 16px;
    right: 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    flex-direction: column;
    gap: 0;
    padding: 10px;
    margin: 0;
  }

  .main-nav.open { display: flex; }

  .main-nav a {
    color: var(--ink);
    text-shadow: none;
    padding: 12px 16px;
    border-radius: 10px;
  }

  .main-nav a:hover { background: var(--cream-2); opacity: 1; }

  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .header-shape { height: 120px; }
}

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-grid h2, .about-grid > div > p { text-align: left; }
}

@media (max-width: 700px) {
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .steps-grid, .team-grid { grid-template-columns: 1fr; }
  .team-grid { gap: 36px; }
  .service-card { flex-basis: 100%; }
  .review-card { flex-basis: 84%; }
  .form-row { grid-template-columns: 1fr; }
  .contacts-inner { padding: 28px 22px; }
  .cta-banner { padding: 30px 24px; }
  .mascot { width: 110px; right: 6px; transform: translateY(48%); }
  .mascot-bubble { font-size: 14px; padding: 6px 12px; }
  .hl-1, .hl-4 { display: none; }
}



/* ===== Логопедам: приклади матеріалів (фото + відео) ===== */
.materials-grid {
  display: grid;
  gap: 22px;
  margin: 26px 0 8px;
}

.materials-grid.photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.materials-grid.videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.material-item {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 10px 30px rgba(60, 70, 40, 0.12);
}

.material-item img,
.material-item video {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .materials-grid.videos { grid-template-columns: 1fr; }
}

/* ===== Модальне вікно запису ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(45, 52, 34, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--white);
  border-radius: 24px;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 80px rgba(30, 35, 20, 0.35);
}

.modal h3 {
  font: 700 24px/1.2 var(--font-head);
  color: var(--ink);
  margin: 0 0 6px;
  padding-right: 30px;
}

.modal-sub {
  font: 400 14.5px/1.5 var(--font-body);
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #F1EFE4;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { background: #E7E4D5; }

.modal-form { display: grid; gap: 12px; }

.modal-form input {
  width: 100%;
  font: 400 15px/1.2 var(--font-body);
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid rgba(140, 161, 115, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
}

.modal-form input:focus { border-color: var(--olive); }

.modal-form .btn { width: 100%; }

.mf-status { display: none; font: 700 14px/1.4 var(--font-body); }
.mf-status:not(:empty) { display: block; }
.mf-status.ok { color: var(--olive-dark); }
.mf-status.err { color: var(--terracotta); }

.modal-contacts { margin-top: 16px; }

.mc-label {
  display: block;
  font: 700 12.5px/1 var(--font-body);
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 10px;
}

.mc-row { display: flex; gap: 8px; }

.mc-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 12px;
  font: 700 13px/1 var(--font-body);
  color: var(--white);
  text-decoration: none;
  transition: filter 0.15s;
}

.mc-btn:hover { filter: brightness(1.08); }
.mc-tg { background: #2AABEE; }
.mc-wa { background: #25D366; }
.mc-viber { background: #7360F2; }

/* Mobile layout: approved responsive changes, desktop rules stay above. */
@media (max-width: 860px) {
  .container { width: 100%; padding-left: 16px; padding-right: 16px; }
  .hero-grid, .contacts-inner, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid > *, .contacts-inner > *, .team-grid > *, .form-grid > *,
  .form-row > *, .footer-top > *, .contact-row > div { min-width: 0; }
  .hero h1, .service-hero h1, .service-body h2 { overflow-wrap: anywhere; }
  .header-inner { padding-left: 16px; padding-right: 16px; }
  .main-nav {
    top: calc(100% + 12px);
    align-items: stretch;
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-header.scrolled .main-nav {
    max-height: calc(100vh - 108px);
    max-height: calc(100dvh - 108px);
  }
  .main-nav a { display: block; }
  .main-nav .nav-drop-btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    color: var(--ink);
    text-shadow: none;
    text-align: left;
  }
  .nav-drop-panel { padding: 0 0 8px 12px; }
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 28px;
  }
  .team-card { width: 100%; height: auto; }
  .tcard-photo { height: clamp(280px, 70vw, 420px); }
  .tcard-pane p { font-size: 16px; }
  .contacts-inner { padding: 28px 20px; gap: 28px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .form-field input, .form-field select, .form-field textarea { min-width: 0; max-width: 100%; }
  .modal-form input { font-size: 16px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
  .footer-top .footer-nav { justify-self: stretch; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
  .footer-top .footer-social { justify-items: start; }
  .footer-brand { align-items: flex-start; }
  .footer-brand p, .footer-nav a { overflow-wrap: anywhere; }
  .faq-list-wrap { padding-top: 76px; }
  .faq-paw { display: block; width: 96px; top: 0; left: 12px; }
}
@media (max-width: 600px) {
  .hero-grid { gap: 28px; }
  .hero-text { font-size: 17px; }
  .service-hero .lead { font-size: 17px; }
  .tcard-body { padding-left: 18px; padding-right: 18px; }
  .contacts-inner { padding: 24px 16px; }
  .contacts-info h2, .signup-form h3 { font-size: 24px; }
  .contact-row { gap: 10px; }
  .contact-row .cr-icon { width: 36px; height: 36px; }
  .hours-table { font-size: 14px; }
  .hours-table td:last-child { white-space: nowrap; }
  .form-submit .btn { width: 100%; padding-left: 12px; padding-right: 12px; }
}

/* Contain decorative overflow at page edges without changing the paw path. */
.steps-section { overflow-x: clip; }

@media (max-width: 860px) {
  .faq-paw { clip-path: inset(0 0 calc(100% - 86px) 0); }
}

/* Compact messenger row and balanced mobile footer. */
.footer-label-short { display: none; }
@media (max-width: 860px) {
  .messenger-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .messenger-btns .ms-btn {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 12px 4px;
    font-size: clamp(12px, 3.4vw, 15px);
    white-space: nowrap;
  }
  .footer-label-full { display: none; }
  .footer-label-short { display: inline; }
  .footer-nav { gap: 8px 20px; }
  .footer-nav a { display: flex; align-items: center; justify-content: center; min-height: 36px; text-align: center; }
  .footer-top .footer-social {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    justify-items: stretch;
  }
  .footer-social a { display: flex; justify-content: center; align-items: center; min-height: 44px; }
}
