/* ============================================
   Dental Prime — design tokens
   ============================================ */
:root {
  /* Colors */
  --bg: #FAF7F2;
  --bg-alt: #F3ECE0;
  --bg-deep: #EBE0CC;
  --accent: #8C5A3C;
  --accent-hover: #6B4128;
  --text: #1C1410;
  --text-muted: #6B5F54;
  --border: #E8DDC9;
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Jost', system-ui, sans-serif;

  /* Spacing */
  --container: 1240px;
  --gutter: 24px;
  --section-y: 120px;

  /* Shapes */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Transitions */
  --t: 0.25s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================
   Typography scale
   ============================================ */
.h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.1;
  font-weight: 600;
}
.h3 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.25;
  font-weight: 600;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
  min-height: 54px;
  white-space: nowrap;
}
.btn-sm {
  padding: 12px 22px;
  min-height: 44px;
  font-size: 15px;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.btn-book {
  background: var(--accent);
  color: var(--white);
  padding: 12px 26px;
  min-height: 44px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(140, 90, 60, 0.25);
}
.btn-book:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(140, 90, 60, 0.35);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.logo-mark {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  display: inline-block;
  transform-origin: center;
  animation: logo-float 6s ease-in-out infinite;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo:hover .logo-mark {
  animation: none;
  transform: rotate(180deg);
}
@keyframes logo-float {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
}
.nav .nav-link {
  position: relative;
  transition: color var(--t);
  font-weight: 500;
}
.nav .nav-link:hover { color: var(--accent); }
.nav .nav-link.active {
  color: var(--accent);
}
.nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform var(--t), opacity var(--t);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.hero-content {
  max-width: 600px;
}
.hero-sub {
  margin-top: 24px;
  font-size: clamp(17px, 1.3vw, 19px);
  color: var(--text-muted);
  line-height: 1.55;
}
.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.trust-bar {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-bar li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust-bar strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.trust-bar span {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

/* ============================================
   Pain block
   ============================================ */
.pain {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: var(--bg-alt);
}
.pain-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
}
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pain-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--t), box-shadow var(--t);
}
.pain-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 20, 16, 0.06);
}
.pain-card h3 { font-size: clamp(20px, 1.6vw, 22px); line-height: 1.25; }
.pain-card > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}
.pain-answer {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pain-answer-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  color: var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}
.pain-answer-icon svg { width: 22px; height: 22px; }
.pain-answer-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.45vw, 20px);
  line-height: 1.3;
  color: var(--text);
}
.pain-answer p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

/* ============================================
   Bridge block
   ============================================ */
.bridge {
  padding-top: 100px;
  padding-bottom: 100px;
  text-align: center;
}
.bridge-inner {
  max-width: 860px;
}
.bridge-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}
.bridge-text em {
  color: var(--accent);
  font-style: normal;
}
.bridge-link {
  display: inline-block;
  margin-top: 32px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 15px;
  color: var(--text-muted);
  transition: color var(--t), border-color var(--t);
}
.bridge-link:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================
   Gallery
   ============================================ */
.gallery {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.gallery-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}
.gallery-sub {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: clamp(16px, 1.1vw, 17px);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1040px;
  margin: 0 auto;
}
.case {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
  transition: transform var(--t), box-shadow var(--t), opacity var(--t);
  opacity: 1;
}
.case.hide {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  margin: -10px 0;
}
.case:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(28, 20, 16, 0.08);
}
.case-img {
  aspect-ratio: 1 / 1;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-img::before {
  /* плейсхолдер когда фото не загружено */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 48%, rgba(140, 90, 60, 0.06) 50%, transparent 52%),
    var(--bg-deep);
}
.case-img img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.case-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: flex-start;
}
.case-patient {
  font-size: 17px;
  font-family: var(--font-display);
  font-weight: 600;
}
.case-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.gallery-credits {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
}
.gallery-cta {
  margin-top: 40px;
  text-align: center;
}

/* ============================================
   Reveal animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================
   Responsive: Tablet
   ============================================ */
@media (max-width: 1024px) {
  :root { --section-y: 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; margin: 0 auto; aspect-ratio: 16 / 11; }
  .pain-grid { grid-template-columns: 1fr; gap: 16px; max-width: 560px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .gallery-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .nav {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    padding: 8px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(28, 20, 16, 0.08);
  }
  .nav.open { display: flex; }
  .nav .nav-link {
    padding: 16px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--border);
  }
  .nav .nav-link:last-child { border-bottom: none; }
  .nav .nav-link.active::after { display: none; }
  .burger { display: flex; }
  .site-header .btn-book {
    margin-left: auto;
    padding: 10px 18px; font-size: 14px;
  }
}

/* ============================================
   Responsive: Mobile
   ============================================ */
@media (max-width: 640px) {
  :root { --section-y: 64px; }
  body { font-size: 16px; }
  .hero { padding-top: 100px; padding-bottom: 56px; min-height: auto; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
    margin-top: 40px;
    padding-top: 24px;
  }
  .pain-card { padding: 32px 24px; }
  .bridge-text { font-size: 22px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery-grid-2 { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================
   Accessibility
   ============================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================
   Calculator
   ============================================ */
.calc {
  padding: var(--section-y) 0;
  background: var(--bg-alt);
}
.calc-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.calc-sub {
  font-size: 17px; line-height: 1.55;
  color: var(--text-muted); margin-top: 12px;
}

.calc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 20px 60px rgba(28, 20, 16, 0.08);
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
}

.calc-steps { display: flex; flex-direction: column; gap: 36px; }

.calc-step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.calc-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  flex-shrink: 0;
}
.calc-step-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  color: var(--text); margin: 0;
  line-height: 1.3;
}

/* Slider */
.calc-slider-wrap { padding: 0 4px; }
.calc-slider-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
}
.calc-slider-min, .calc-slider-max {
  font-size: 13px; color: var(--text-muted);
}
.calc-slider-value {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  color: var(--accent);
}

input[type="range"]#calc-teeth {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--border); outline: none;
}
input[type="range"]#calc-teeth::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(140, 90, 60, 0.35);
  transition: transform var(--t);
}
input[type="range"]#calc-teeth::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]#calc-teeth::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(140, 90, 60, 0.35);
}

/* Options (veneer type) */
.calc-options {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
}
.calc-option {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 8px; padding: 20px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); cursor: pointer;
  font-family: var(--font-body);
  text-align: left; transition: border-color var(--t), background var(--t);
}
.calc-option:hover { border-color: var(--accent); background: var(--bg); }
.calc-option.selected {
  border-color: var(--accent); background: var(--bg);
  box-shadow: 0 0 0 3px rgba(140, 90, 60, 0.12);
}
.calc-option-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600; color: var(--text);
}
.calc-option-desc {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.calc-option-price {
  margin-top: auto;
  font-size: 14px; font-weight: 500; color: var(--accent);
}

/* Extras */
.calc-extras { display: flex; flex-direction: column; gap: 8px; }
.calc-extra {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: border-color var(--t), background var(--t);
}
.calc-extra:hover { border-color: var(--accent); background: var(--bg); }
.calc-extra input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--accent);
  cursor: pointer;
}
.calc-extra-title { flex: 1; font-size: 15px; color: var(--text); }
.calc-extra-price {
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}

/* Result card */
.calc-result {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px; position: sticky; top: 100px;
  align-self: start;
  border: 1.5px solid var(--border);
}
.calc-result-label {
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 12px;
}
.calc-result-value {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600; color: var(--text);
  line-height: 1.2;
}
.calc-result-dash { color: var(--text-muted); margin: 0 4px; }
.calc-result-unit {
  font-size: 14px; color: var(--text-muted); margin-top: 4px;
}
.calc-result-breakdown {
  list-style: none; padding: 0; margin: 24px 0;
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.calc-result-breakdown li {
  display: flex; justify-content: space-between;
  font-size: 14px;
}
.calc-bd-label { color: var(--text-muted); flex: 1; padding-right: 12px; }
.calc-bd-price { color: var(--text); font-weight: 500; white-space: nowrap; }

.calc-cta {
  width: 100%; margin-top: 12px;
  padding: 16px;
}
.calc-result-note {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5; margin-top: 14px; text-align: center;
}

@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; gap: 32px; }
  .calc-result { position: static; }
  .calc-options { grid-template-columns: 1fr; }
  .calc-card { padding: 32px 24px; }
}
@media (max-width: 640px) {
  .calc { padding: 80px 0; }
  .calc-card { padding: 24px 16px; }
  .calc-step-title { font-size: 17px; }
  .calc-result-value { font-size: 26px; }
}

/* ============================================
   Chat widget
   ============================================ */
.chat-widget {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 900;
  font-family: var(--font-body);
}
.chat-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px 14px 16px;
  background: var(--accent); color: var(--white);
  border: none; border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(28, 20, 16, 0.2);
  transition: background var(--t), transform var(--t), opacity var(--t);
}
.chat-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.chat-btn.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }
.chat-btn-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--white); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.chat-window {
  position: absolute; bottom: 0; right: 0;
  width: 380px; max-width: calc(100vw - 48px);
  height: 560px; max-height: calc(100vh - 48px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(28, 20, 16, 0.25);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}
.chat-window.open {
  opacity: 1; pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: var(--accent); color: var(--white);
  flex-shrink: 0;
}
.chat-header-title { display: flex; align-items: center; gap: 12px; }
.chat-header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-family: var(--font-display);
  flex-shrink: 0;
}
.chat-header-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
}
.chat-header-status {
  font-size: 12px; opacity: 0.8; margin-top: 2px;
}
.chat-close {
  background: none; border: none; color: var(--white);
  font-size: 24px; cursor: pointer; line-height: 1;
  padding: 4px 8px; opacity: 0.8;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}
.chat-bubble {
  max-width: 85%; padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.5;
  word-wrap: break-word;
}
.chat-bubble-assistant {
  background: var(--white);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble-user {
  background: var(--accent); color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Typing dots */
.chat-typing { display: flex; gap: 4px; padding: 14px 16px; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted); opacity: 0.6;
  animation: chat-bounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 0.9; }
}

.chat-actions {
  padding: 12px 16px 0;
  flex-shrink: 0;
}
.chat-human-btn {
  width: 100%; padding: 12px;
  background: var(--bg-alt); border: 1.5px solid var(--border);
  color: var(--accent); font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer; transition: border-color var(--t);
}
.chat-human-btn:hover { border-color: var(--accent); }

.chat-input-wrap {
  display: flex; gap: 8px;
  padding: 12px 16px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input-wrap input {
  flex: 1; padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px; color: var(--text);
  outline: none;
  transition: border-color var(--t);
}
.chat-input-wrap input:focus { border-color: var(--accent); }
.chat-input-wrap input:disabled { opacity: 0.6; }
.chat-input-wrap button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  border: none; font-size: 18px; cursor: pointer;
  transition: background var(--t);
  flex-shrink: 0;
}
.chat-input-wrap button:hover { background: var(--accent-hover); }

@media (max-width: 480px) {
  .chat-widget { bottom: 16px; right: 16px; }
  .chat-btn-text { display: none; }
  .chat-btn { padding: 14px; border-radius: 50%; }
  .chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    right: 0; bottom: 0;
  }
}

/* ============================================
   Doctors
   ============================================ */
.doctors {
  padding: var(--section-y) 0;
  background: var(--bg);
}
.doctors-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.doctors-sub {
  font-size: 17px; color: var(--text-muted);
  margin-top: 14px; line-height: 1.55;
}
.doctors-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.doctor {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  transition: border-color var(--t), transform var(--t);
}
.doctor:hover { border-color: var(--accent); transform: translateY(-2px); }
.doctor-photo {
  width: 180px; height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden; flex-shrink: 0;
}
.doctors-grid .doctor:nth-of-type(1) .doctor-photo img { object-position: 60% top; }
.doctors-grid .doctor:nth-of-type(2) .doctor-photo img { object-position: 73% top; }
.doctors-grid .doctor:nth-of-type(3) .doctor-photo img { object-position: 78% top; }
.doctors-grid .doctor:nth-of-type(4) .doctor-photo img { object-position: 62% top; }
.doctor-photo svg,
.doctor-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.doctor-body { display: flex; flex-direction: column; }
.doctor-name {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  color: var(--text); margin: 0 0 4px;
  line-height: 1.2;
}
.doctor-role {
  font-size: 14px; color: var(--accent);
  font-weight: 500; margin-bottom: 8px;
}
.doctor-stats {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 10px; letter-spacing: 0.01em;
}
.doctor-bio {
  font-size: 14px; color: var(--text);
  line-height: 1.55; margin-bottom: 16px; flex: 1;
}
.doctor-cta {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 14px;
}
.doctors-note {
  margin-top: 40px; text-align: center;
  font-size: 13px; color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 900px) {
  .doctors-grid { grid-template-columns: 1fr; gap: 20px; }
  .doctor { padding: 20px; gap: 16px; grid-template-columns: 120px 1fr; }
  .doctor-photo { width: 120px; height: 150px; }
  .doctor-name { font-size: 18px; }
}
@media (max-width: 560px) {
  .doctor { grid-template-columns: 1fr; }
  .doctor-photo { width: 100%; height: 200px; }
}

/* ============================================
   Trust (stats + reviews + guarantees)
   ============================================ */
.trust {
  padding: var(--section-y) 0;
  background: var(--white);
}
.trust-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px; margin-bottom: 96px;
  padding: 48px 40px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
}
.trust-stat { text-align: center; }
.trust-stat-value {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 600;
  color: var(--accent); line-height: 1;
  display: inline-flex; align-items: baseline; gap: 2px;
}
.trust-stat-sub {
  font-size: 22px; font-weight: 500;
  color: var(--accent-hover);
}
.trust-stat-label {
  margin-top: 10px; font-size: 14px;
  color: var(--text-muted); line-height: 1.4;
}

.trust-title { text-align: center; margin-bottom: 56px; }

.reviews-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 96px;
}
.review {
  background: var(--bg);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.review-stars {
  color: var(--accent); font-size: 16px;
  letter-spacing: 2px;
}
.review-text {
  font-size: 15px; line-height: 1.65;
  color: var(--text); flex: 1;
}
.review-author { display: flex; flex-direction: column; gap: 2px; }
.review-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px;
  color: var(--text);
}
.review-meta {
  font-size: 13px; color: var(--text-muted);
}

.trust-guarantees {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.guarantee {
  padding: 28px 24px;
  background: var(--bg); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: left;
}
.guarantee-icon {
  width: 40px; height: 40px;
  color: var(--accent);
  margin-bottom: 16px;
}
.guarantee-icon svg { width: 100%; height: 100%; }
.guarantee-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  margin-bottom: 8px; color: var(--text);
  line-height: 1.3;
}
.guarantee-text {
  font-size: 14px; line-height: 1.55;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .trust-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 32px 24px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .trust-guarantees { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .trust-stats { grid-template-columns: 1fr 1fr; padding: 24px 16px; gap: 20px; }
  .trust-stat-value { font-size: 36px; }
  .trust-guarantees { grid-template-columns: 1fr; }
  .trust { padding: 80px 0; }
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: var(--section-y) 0;
  background: var(--bg);
}
.faq-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.faq-sub {
  font-size: 17px; color: var(--text-muted);
  margin-top: 12px; line-height: 1.55;
}

.faq-list {
  max-width: 860px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t);
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  cursor: pointer; padding: 22px 28px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; list-style: none;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--accent);
  font-size: 28px; font-weight: 300;
  transition: transform 0.25s ease;
  line-height: 1; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }

.faq-answer {
  padding: 0 28px 24px;
  color: var(--text-muted); line-height: 1.65;
}
.faq-answer p {
  font-size: 15px; margin-bottom: 12px;
}
.faq-answer p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .faq { padding: 80px 0; }
  .faq-item summary { padding: 18px 20px; font-size: 15px; }
  .faq-answer { padding: 0 20px 20px; }
}

/* ============================================
   Contacts / Footer
   ============================================ */
.contacts {
  padding: var(--section-y) 0;
  background: var(--white);
}
.contacts-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contacts-lead {
  font-size: 17px; line-height: 1.6;
  color: var(--text-muted);
  margin: 16px 0 40px;
  max-width: 480px;
}
.contacts-block {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.contacts-block:last-of-type { border-bottom: none; padding-bottom: 0; }
.contacts-label {
  display: block;
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 8px;
}
.contacts-value {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500;
  color: var(--text);
  line-height: 1.4; display: block;
}
.contacts-phone {
  color: var(--accent); text-decoration: none;
  font-size: 22px;
}
.contacts-phone:hover { color: var(--accent-hover); }
.contacts-link {
  display: inline-block; margin-top: 10px;
  font-size: 14px; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}
.contacts-messengers {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.contacts-messenger {
  padding: 10px 20px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.contacts-messenger:hover {
  border-color: var(--accent); color: var(--accent); background: var(--white);
}
.contacts-cta {
  margin-top: 32px; padding: 16px 32px;
}

.contacts-map {
  border-radius: var(--radius-lg);
  overflow: hidden; min-height: 520px;
  border: 1px solid var(--border);
}
.contacts-map iframe {
  width: 100%; height: 100%;
  min-height: 520px; border: none;
}

.footer-bottom {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 32px; align-items: center;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
  color: var(--text);
}
.footer-brand .logo-mark { color: var(--accent); font-size: 22px; }
.footer-legal {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5;
}
.footer-disclaimer {
  font-size: 12px; color: var(--text-muted);
  font-style: italic; text-align: right;
  max-width: 320px;
}

@media (max-width: 960px) {
  .contacts-grid { grid-template-columns: 1fr; gap: 40px; }
  .contacts-map { min-height: 320px; }
  .contacts-map iframe { min-height: 320px; }
  .footer-bottom { grid-template-columns: 1fr; text-align: center; }
  .footer-disclaimer { text-align: center; max-width: none; margin: 0 auto; }
  .footer-brand { justify-content: center; }
}
@media (max-width: 560px) {
  .contacts { padding: 80px 0; }
}

/* ============================================
   Page hero (inner pages)
   ============================================ */
.page-hero {
  padding-top: 140px;
  padding-bottom: 56px;
  background: var(--bg-alt);
}
.page-hero-crumbs {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.page-hero-crumbs a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-hero-crumbs a:hover { color: var(--accent); }
.page-hero-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  margin-bottom: 24px;
  max-width: 820px;
}
.page-hero-lead {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 680px;
}

/* ============================================
   First visit (patient-now)
   ============================================ */
.first-visit {
  padding: var(--section-y) 0;
}
.first-visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: flex-start;
}
.first-visit-sub {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 16px;
}
.first-visit-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.first-visit-steps li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: flex-start;
}
.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--accent);
  grid-row: span 2;
}
.step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.first-visit-steps li p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
  grid-column: 2;
}
@media (max-width: 900px) {
  .first-visit-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================
   Services grid
   ============================================ */
.services {
  padding: var(--section-y) 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.service {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}
.service:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(28, 20, 16, 0.08);
}
.service-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-deep);
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--text);
}
.service-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  flex: 1;
}
.service-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  margin-top: 4px;
}
.service .btn-ghost {
  align-self: flex-start;
  margin-top: 8px;
}
.service-wide {
  grid-column: 1 / -1;
}
.service-wide .service-img {
  aspect-ratio: 21 / 9;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .service-wide { grid-column: 1 / -1; }
  .service-wide .service-img { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================================
   Final CTA (end of page)
   ============================================ */
.final-cta {
  padding: 120px 0;
  background: var(--text);
  color: var(--bg);
}
.final-cta-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.final-cta .h2 {
  color: var(--bg);
  margin-bottom: 20px;
}
.final-cta-sub {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(250, 247, 242, 0.75);
  margin-bottom: 40px;
}
.final-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.final-cta-actions .btn-book {
  padding: 18px 36px;
  font-size: 16px;
  min-height: 54px;
}
.final-cta-link {
  color: rgba(250, 247, 242, 0.8);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 247, 242, 0.3);
  padding-bottom: 2px;
  transition: color var(--t), border-color var(--t);
}
.final-cta-link:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ============================================
   Site footer (4-column)
   ============================================ */
.site-footer {
  background: var(--bg-alt);
  padding-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.footer-col a {
  color: var(--text);
  font-size: 15px;
  transition: color var(--t);
}
.footer-col a:hover { color: var(--accent); }
.footer-col p,
.footer-col .footer-addr {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.footer-brand-col .footer-brand {
  margin-bottom: 4px;
}
.footer-tag {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.site-footer .footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: block;
  background: var(--bg);
}
.site-footer .footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer .footer-legal,
.site-footer .footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
  max-width: none;
  margin: 0;
}
.site-footer .footer-disclaimer { font-style: italic; }

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 560px) {
  .final-cta { padding: 80px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .site-footer .footer-bottom .container { flex-direction: column; gap: 8px; }
}
