:root {
  --bg: #f8f3ea;
  --paper: #fffaf3;
  --white: #ffffff;
  --text: #211a14;
  --muted: #74675b;
  --line: #eadfce;
  --line-dark: #d8c6ad;
  --gold: #b98b3b;
  --gold-dark: #8c6423;
  --gold-soft: #f1dfbf;
  --brown: #3b2a1c;
  --brown-2: #5b432d;
  --green: #596f62;
  --danger: #c95b43;
  --radius-xl: 34px;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(76, 53, 29, .14);
  --shadow-small: 0 14px 36px rgba(76, 53, 29, .12);
  --container: min(1180px, calc(100% - 32px));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(185, 139, 59, .16), transparent 34%),
    radial-gradient(circle at 92% 3%, rgba(89, 111, 98, .11), transparent 33%),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.container { width: var(--container); margin: 0 auto; }

.topbar {
  background: var(--brown);
  color: rgba(255,255,255,.78);
  font-size: 14px;
  padding: 10px 0;
}
.topbar__inner { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.topbar__group { display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.topbar b { color: #fff; }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,243,234,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(234,223,206,.8);
}
.header__inner { min-height: 82px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.logo { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.logo__mark {
  width:48px; height:48px; border-radius:17px;
  background: linear-gradient(135deg, var(--brown), var(--gold));
  display:grid; place-items:center;
  box-shadow: 0 16px 34px rgba(185,139,59,.25);
  position: relative;
}
.logo__mark::before {
  content:""; width:17px; height:23px;
  border:3px solid #fff; border-radius: 50% 50% 45% 45%;
  transform: rotate(-8deg);
}
.logo__text strong { display:block; font-size:20px; letter-spacing:-.04em; line-height:1; }
.logo__text span { display:block; color:var(--muted); font-size:12px; margin-top:5px; }

.nav { display:flex; align-items:center; gap:6px; font-size:14px; font-weight:800; color:#4a3a2d; }
.nav__item { position:relative; }
.nav__link {
  display:inline-flex; align-items:center; gap:6px;
  padding:12px 10px; border-radius:999px;
  transition:.2s ease;
}
.nav__link:hover, .nav__link.active { color: var(--gold-dark); background: rgba(185,139,59,.1); }
.nav__link.has-dropdown::after { content:"⌄"; font-size:12px; opacity:.75; }
.dropdown {
  position:absolute; left:0; top: calc(100% + 8px); width: 310px;
  background: var(--white); border:1px solid var(--line); border-radius:24px;
  padding:10px; box-shadow: var(--shadow-small);
  opacity:0; transform: translateY(8px); pointer-events:none;
  transition:.18s ease;
}
.nav__item:hover .dropdown { opacity:1; transform: translateY(0); pointer-events:auto; }
.dropdown a { display:block; padding:13px 14px; border-radius:16px; color:#48372a; transition:.18s; }
.dropdown a:hover { background: var(--bg); color: var(--gold-dark); }
.dropdown small { display:block; color:var(--muted); margin-top:2px; font-weight:600; }
.header__actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }

.btn {
  border:0; border-radius:999px; padding:14px 22px;
  display:inline-flex; justify-content:center; align-items:center; gap:8px;
  cursor:pointer; font-weight:900; font-size:14px; white-space:nowrap;
  transition:.22s ease;
}
.btn--primary { background: var(--gold); color:#fff; box-shadow:0 18px 38px rgba(185,139,59,.24); }
.btn--primary:hover { background: var(--gold-dark); transform: translateY(-2px); }
.btn--dark { background: var(--brown); color:#fff; }
.btn--dark:hover { background:#24180f; transform: translateY(-2px); }
.btn--light { background:#fff; color:var(--text); border:1px solid var(--line); }
.btn--light:hover { border-color: var(--gold); color: var(--gold-dark); transform: translateY(-2px); }
.btn--ghost { background: rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.2); }
.btn--ghost:hover { background:rgba(255,255,255,.18); transform:translateY(-2px); }

.burger { display:none; width:46px; height:46px; border:1px solid var(--line); background:#fff; border-radius:15px; position:relative; cursor:pointer; }
.burger span { position:absolute; left:13px; width:20px; height:2px; background:var(--text); transition:.2s; }
.burger span:nth-child(1){ top:16px; } .burger span:nth-child(2){ top:22px; } .burger span:nth-child(3){ top:28px; }
.burger.active span:nth-child(1){ top:22px; transform:rotate(45deg); } .burger.active span:nth-child(2){ opacity:0; } .burger.active span:nth-child(3){ top:22px; transform:rotate(-45deg); }
.mobile-menu { display:none; position:fixed; inset:0; background:rgba(33,26,20,.58); z-index:90; opacity:0; pointer-events:none; transition:.2s; }
.mobile-menu.active { opacity:1; pointer-events:auto; }
.mobile-menu__panel { position:absolute; left:16px; right:16px; top:92px; background:#fff; border-radius:28px; box-shadow:var(--shadow); padding:14px; display:grid; gap:8px; max-height: calc(100vh - 120px); overflow:auto; }
.mobile-menu a, .mobile-menu button { background: var(--bg); border:0; color:var(--text); border-radius:16px; padding:14px; text-align:left; font-weight:900; }
.mobile-sub { display:grid; gap:6px; padding-left:10px; }
.mobile-sub a { background:#fff8eb; font-size:14px; }

.hero { padding:72px 0 50px; }
.hero__grid { display:grid; grid-template-columns:1.04fr .96fr; gap:40px; align-items:center; }
.eyebrow { display:inline-flex; gap:9px; align-items:center; background:rgba(185,139,59,.12); color:var(--gold-dark); border:1px solid rgba(185,139,59,.22); padding:9px 14px; border-radius:999px; font-weight:900; font-size:13px; margin-bottom:22px; }
.eyebrow::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--gold); box-shadow:0 0 0 6px rgba(185,139,59,.14); }
h1, .h1 { font-size: clamp(44px, 6vw, 78px); line-height:.93; letter-spacing:-.075em; margin-bottom:24px; }
h1 span, .accent-text { color: var(--gold-dark); }
.hero__lead { color:var(--muted); font-size:19px; max-width:650px; margin-bottom:30px; }
.hero__actions { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:26px; }
.badges { display:flex; gap:10px; flex-wrap:wrap; }
.badge { background:#fff; border:1px solid var(--line); border-radius:999px; padding:10px 14px; font-weight:800; color:#5d5046; font-size:14px; }

.hero-photo { position:relative; }
.hero-photo__wrap { background:#fff; border:1px solid var(--line); border-radius:42px; padding:18px; box-shadow:var(--shadow); }
.hero-photo__image { min-height:540px; border-radius:32px; background-size:cover; background-position:center; position:relative; overflow:hidden; }
.hero-photo__image::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, transparent 40%, rgba(33,26,20,.45)); }
.hero-card-label { position:absolute; z-index:1; left:20px; right:20px; bottom:20px; background:rgba(255,255,255,.9); backdrop-filter:blur(18px); border-radius:24px; padding:18px; display:flex; justify-content:space-between; gap:18px; align-items:center; }
.hero-card-label strong { display:block; font-size:18px; letter-spacing:-.03em; }
.hero-card-label span { color:var(--muted); font-size:14px; }
.rating { color:var(--gold); font-weight:900; white-space:nowrap; }
.float-note { position:absolute; background:#fff; border:1px solid var(--line); border-radius:22px; padding:18px; box-shadow:var(--shadow-small); max-width:210px; }
.float-note b { display:block; color:var(--gold-dark); font-size:32px; letter-spacing:-.06em; line-height:1; }
.float-note span { display:block; color:var(--muted); font-size:14px; margin-top:6px; }
.float-note--a { left:-24px; top:62px; } .float-note--b { right:-18px; top:190px; }

.section { padding:80px 0; }
.section--white { background:#fff; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.section--dark { background:var(--brown); color:#fff; }
.section--dark .section-head p, .section--dark .muted { color:rgba(255,255,255,.66); }
.section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:34px; }
.section-head h2 { font-size:clamp(34px,4vw,56px); line-height:.98; letter-spacing:-.065em; max-width:760px; }
.section-head p { color:var(--muted); max-width:460px; font-size:17px; }

.cards-4, .cards-3, .cards-2 { display:grid; gap:16px; }
.cards-4 { grid-template-columns:repeat(4,1fr); }
.cards-3 { grid-template-columns:repeat(3,1fr); }
.cards-2 { grid-template-columns:repeat(2,1fr); }
.card { background:#fff; border:1px solid var(--line); border-radius:28px; padding:26px; box-shadow:0 14px 36px rgba(76,53,29,.07); }
.card--paper { background:var(--paper); }
.card--dark { background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.12); color:#fff; }
.card h3 { font-size:24px; line-height:1.08; letter-spacing:-.045em; margin-bottom:10px; }
.card p { color:var(--muted); }
.card--dark p { color:rgba(255,255,255,.64); }
.icon { width:54px; height:54px; border-radius:18px; background:var(--gold-soft); color:var(--gold-dark); display:grid; place-items:center; font-size:24px; margin-bottom:18px; }
.card-footer { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-top:24px; }
.price { color:var(--gold-dark); font-weight:900; font-size:18px; }
.link-more { color:var(--gold-dark); font-weight:900; }

.stats { padding:20px 0 70px; }
.stat b { font-size:36px; line-height:1; letter-spacing:-.06em; }
.stat p { margin-top:7px; color:var(--muted); }

.page-hero { padding:64px 0 36px; }
.page-hero__grid { display:grid; grid-template-columns:1fr .62fr; gap:30px; align-items:center; }
.page-hero h1 { max-width:780px; }
.page-hero p { color:var(--muted); font-size:19px; max-width:720px; }
.page-hero__image { height:360px; border-radius:34px; border:1px solid var(--line); box-shadow:var(--shadow-small); background-size:cover; background-position:center; }
.breadcrumbs { color:var(--muted); font-size:14px; font-weight:800; margin-bottom:20px; }
.breadcrumbs a { color:var(--gold-dark); }

.content-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:24px; align-items:start; }
.side-card { position:sticky; top:110px; background:#fff; border:1px solid var(--line); border-radius:30px; padding:26px; box-shadow:var(--shadow-small); }
.side-card h3 { font-size:28px; letter-spacing:-.05em; margin-bottom:12px; }
.side-card p { color:var(--muted); margin-bottom:18px; }
.list { display:grid; gap:12px; }
.list li { list-style:none; display:flex; gap:12px; color:var(--muted); }
.list li::before { content:"✓"; flex:0 0 24px; width:24px; height:24px; border-radius:50%; background:var(--gold-soft); color:var(--gold-dark); display:grid; place-items:center; font-weight:900; }

.doctor-card { overflow:hidden; padding:0; }
.doctor-photo { height:320px; background-size:cover; background-position:center top; }
.doctor-body { padding:24px; }
.tags { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.tag { background:rgba(185,139,59,.13); color:var(--gold-dark); border:1px solid rgba(185,139,59,.18); padding:7px 10px; border-radius:999px; font-size:12px; font-weight:900; }

.price-table { background:var(--paper); border:1px solid var(--line); border-radius:30px; overflow:hidden; }
.price-row { display:grid; grid-template-columns:1.1fr .65fr 170px; gap:18px; align-items:center; padding:20px 24px; border-bottom:1px solid var(--line); }
.price-row:last-child { border-bottom:0; }
.price-row strong { font-size:18px; letter-spacing:-.02em; }
.price-row span { color:var(--muted); font-size:15px; display:block; margin-top:2px; }
.price-row b { color:var(--gold-dark); font-size:20px; white-space:nowrap; }

.gallery-card { padding:16px; }
.gallery-image { height:310px; border-radius:24px; background-size:cover; background-position:center; margin-bottom:18px; position:relative; overflow:hidden; }
.gallery-image::before { content:"до"; position:absolute; left:18px; bottom:18px; background:rgba(255,255,255,.88); padding:8px 13px; border-radius:999px; font-weight:900; text-transform:uppercase; font-size:12px; }
.gallery-image::after { content:"после"; position:absolute; right:18px; bottom:18px; background:var(--gold); color:#fff; padding:8px 13px; border-radius:999px; font-weight:900; text-transform:uppercase; font-size:12px; }
.stars { color:var(--gold); font-weight:900; margin-bottom:14px; }
.review-author { display:flex; gap:12px; align-items:center; margin-top:20px; }
.avatar { width:44px; height:44px; border-radius:50%; background:var(--gold-soft); color:var(--gold-dark); display:grid; place-items:center; font-weight:900; }
.review-author span { color:var(--muted); font-size:13px; }

.faq-list { display:grid; gap:12px; }
.faq-item { background:#fff; border:1px solid var(--line); border-radius:22px; overflow:hidden; }
.faq-question { width:100%; border:0; background:transparent; padding:22px 24px; display:flex; justify-content:space-between; gap:18px; align-items:center; text-align:left; cursor:pointer; font-size:18px; font-weight:900; }
.faq-question span { color:var(--gold-dark); font-size:25px; transition:.2s; }
.faq-answer { max-height:0; overflow:hidden; transition:max-height .25s ease; }
.faq-answer p { color:var(--muted); padding:0 24px 22px; }
.faq-item.active .faq-question span { transform:rotate(45deg); }

.contact-card { background:linear-gradient(135deg, var(--brown), #6a4b2d); color:#fff; border-radius:42px; padding:28px; display:grid; grid-template-columns:.9fr 1.1fr; gap:28px; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.contact-card::before { content:""; position:absolute; width:420px; height:420px; border-radius:50%; background:rgba(185,139,59,.22); right:-150px; top:-180px; }
.contact-info, .form { position:relative; z-index:1; }
.contact-info { padding:22px; }
.contact-info h2 { font-size:clamp(34px,4vw,56px); line-height:.98; letter-spacing:-.065em; margin-bottom:18px; }
.contact-info p { color:rgba(255,255,255,.68); font-size:18px; margin-bottom:24px; }
.contact-lines { display:grid; gap:12px; margin-bottom:24px; }
.contact-line { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); border-radius:18px; padding:15px; }
.contact-line b { display:block; }
.contact-line span { color:rgba(255,255,255,.64); }
.form { background:#fff; color:var(--text); border-radius:32px; padding:28px; }
.form h3 { font-size:30px; letter-spacing:-.05em; margin-bottom:8px; }
.form p { color:var(--muted); margin-bottom:20px; }
.form-grid { display:grid; gap:12px; }
.form-row { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.field { width:100%; border:1px solid var(--line); background:var(--bg); border-radius:16px; padding:15px 16px; outline:none; color:var(--text); transition:.18s; }
.field:focus { border-color:var(--gold); box-shadow:0 0 0 4px rgba(185,139,59,.12); background:#fff; }
textarea.field { min-height:110px; resize:vertical; }
.form small { color:var(--muted); display:block; margin-top:12px; }
.form-message { display:none; margin-top:14px; padding:14px 16px; border-radius:16px; background:rgba(185,139,59,.13); color:var(--gold-dark); font-weight:900; }
.form-message.active { display:block; }

.offer-popup { position:fixed; inset:0; background:rgba(33,26,20,.62); z-index:200; display:grid; place-items:center; padding:16px; opacity:0; pointer-events:none; transition:.25s; }
.offer-popup.active { opacity:1; pointer-events:auto; }
.offer-popup__card { width:min(620px,100%); background:#fff; border-radius:34px; box-shadow:var(--shadow); padding:28px; position:relative; border:1px solid var(--line); }
.offer-close { position:absolute; right:18px; top:18px; width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:var(--bg); cursor:pointer; font-size:22px; }
.offer-popup h2 { font-size:42px; line-height:.98; letter-spacing:-.065em; margin:18px 44px 12px 0; }
.offer-popup p { color:var(--muted); margin-bottom:18px; }
.offer-code { display:inline-flex; background:var(--gold-soft); color:var(--gold-dark); border-radius:999px; padding:9px 13px; font-weight:900; }

.float-contacts { position:fixed; right:18px; bottom:18px; z-index:80; display:grid; gap:10px; }
.float-contacts a { width:52px; height:52px; border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:900; box-shadow:var(--shadow-small); }
.float-contacts .wa { background:#25D366; } .float-contacts .tg { background:#2AABEE; } .float-contacts .call { background:var(--brown); }

.footer { background:var(--brown); color:#fff; padding:40px 0; }
.footer__inner { display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.footer p { color:rgba(255,255,255,.58); margin-top:6px; }
.footer__links { display:flex; gap:16px; flex-wrap:wrap; color:rgba(255,255,255,.7); }

@media (max-width:1120px) {
  .nav { display:none; }
  .burger { display:block; }
  .mobile-menu { display:block; }
  .hero__grid, .page-hero__grid, .content-grid, .contact-card { grid-template-columns:1fr; }
  .cards-4 { grid-template-columns:repeat(2,1fr); }
  .cards-3 { grid-template-columns:repeat(2,1fr); }
  .side-card { position:static; }
}
@media (max-width:760px) {
  .topbar { display:none; }
  .header__inner { min-height:72px; }
  .header__actions .btn { display:none; }
  .hero { padding:44px 0 30px; }
  .hero__actions .btn { width:100%; }
  .hero-photo__image { min-height:390px; }
  .float-note { display:none; }
  .hero-card-label { flex-direction:column; align-items:flex-start; }
  .section { padding:56px 0; }
  .section-head { flex-direction:column; align-items:flex-start; }
  .cards-4, .cards-3, .cards-2 { grid-template-columns:1fr; }
  .price-row { grid-template-columns:1fr; gap:8px; }
  .price-row .btn { width:100%; }
  .form-row { grid-template-columns:1fr; }
  .contact-card { border-radius:32px; padding:18px; }
  .float-contacts { left:12px; right:12px; bottom:12px; grid-template-columns:repeat(3,1fr); }
  .float-contacts a { width:auto; border-radius:18px; height:48px; }
  .footer { padding-bottom:84px; }
}
@media (max-width:430px) {
  .container { width:min(100% - 24px, 1180px); }
  h1, .h1 { font-size:42px; }
  .logo__text span { display:none; }
  .hero-photo__wrap { padding:12px; border-radius:30px; }
  .hero-photo__image { min-height:330px; border-radius:22px; }
  .hero-card-label { left:12px; right:12px; bottom:12px; border-radius:20px; }
  .card, .form, .offer-popup__card { padding:22px; }
}


/* ===== Stage 2: leads, offer form, demo Telegram, demo database ===== */
.offer-popup__card--wide { max-width: 720px; }
.mini-offer-form { display: grid; gap: 12px; margin-top: 18px; }
.form-message.is-error { background: #ffe8df; color: #9b3f2d; border-color: rgba(201,91,67,.22); }
.form-message a { color: var(--gold-dark); font-weight: 900; text-decoration: underline; }

.telegram-demo { position: fixed; right: 22px; bottom: 96px; z-index: 140; }
.telegram-demo__button {
  width: 62px; height: 62px; border: 0; border-radius: 22px;
  background: linear-gradient(135deg, #2aabee, #1888cc); color: white;
  box-shadow: 0 20px 44px rgba(24,136,204,.28); cursor: pointer;
  display: grid; place-items: center; position: relative; font-weight: 1000;
}
.telegram-demo__button span { font-size: 18px; letter-spacing: -.04em; }
.telegram-demo__button b {
  position: absolute; right: -6px; top: -6px; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: 999px; background: var(--danger); color: white;
  display: grid; place-items: center; font-size: 12px; border: 2px solid white;
}
.telegram-demo__panel {
  position: absolute; right: 0; bottom: 76px; width: min(390px, calc(100vw - 32px));
  background: #f2f6fb; border: 1px solid rgba(24,136,204,.18);
  border-radius: 28px; box-shadow: var(--shadow); overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none; transition: .2s ease;
}
.telegram-demo__panel.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.telegram-demo__head {
  padding: 16px 18px; background: #1888cc; color: white; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
}
.telegram-demo__head strong { display: block; line-height: 1; }
.telegram-demo__head span { display: block; font-size: 12px; opacity: .78; margin-top: 4px; }
.telegram-demo__head button { border: 0; background: rgba(255,255,255,.16); color: white; width: 32px; height: 32px; border-radius: 999px; font-size: 22px; cursor: pointer; }
.telegram-demo__messages { padding: 14px; max-height: 410px; overflow: auto; display: grid; gap: 10px; }
.tg-message {
  background: white; border-radius: 18px 18px 18px 6px; padding: 12px 13px;
  box-shadow: 0 8px 22px rgba(24,136,204,.08); border: 1px solid rgba(24,136,204,.08);
}
.tg-message b { display:block; color:#13364a; margin-bottom: 6px; }
.tg-message p { color:#40545f; font-size: 13px; line-height: 1.45; }
.tg-message small { display:block; color:#7b8c96; margin-top: 8px; font-size: 11px; }
.tg-message button {
  margin-top: 10px; border:0; border-radius: 999px; padding: 8px 12px;
  background:#e7f4ff; color:#1376b1; cursor:pointer; font-weight:900; font-size:12px;
}
.telegram-demo__actions { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: white; border-top: 1px solid rgba(24,136,204,.12); }
.telegram-demo__actions .btn { padding: 11px 12px; font-size: 12px; }

.demo-db { background: #fff; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-small); }
.empty-db { padding: 34px; text-align: center; }
.empty-db h3 { font-size: 28px; letter-spacing: -.04em; margin-bottom: 8px; }
.empty-db p { color: var(--muted); }
.db-table-wrap { width: 100%; overflow-x: auto; }
.db-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.db-table th, .db-table td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.db-table th { background: var(--paper); color: var(--brown); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.db-table td { color: var(--text); }
.db-table td small { display:block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.status-pill { display:inline-flex; padding: 6px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-dark); font-size: 12px; font-weight: 900; }
.page-hero--center { text-align: center; }
.page-hero--center .hero__actions { justify-content: center; }

@media (max-width: 760px) {
  .telegram-demo { right: 12px; bottom: 84px; }
  .telegram-demo__button { width: 54px; height: 54px; border-radius: 18px; }
  .telegram-demo__panel { bottom: 66px; }
  .telegram-demo__actions { grid-template-columns: 1fr; }
}

/* === Stage 4.1 FIXES: hero overlap + visible client Telegram === */
.hero-photo { position: relative; isolation: isolate; }
.hero-photo__wrap { position: relative; z-index: 1; }
.float-note { z-index: 5; }
@media (min-width: 1121px) {
  .hero-photo { padding: 18px 18px 18px 18px; }
  .float-note--a { left: 0; top: 34px; }
  .float-note--b { right: 0; top: 156px; }
}
@media (max-width: 1320px) and (min-width: 1121px) {
  .float-note { position: static; display: inline-flex; flex-direction: column; margin: 0 10px 14px 0; max-width: 220px; vertical-align: top; }
  .hero-photo { display: block; }
  .hero-photo__wrap { clear: both; }
}
.telegram-demo { z-index: 220; }
.telegram-demo__button { position: relative; }
.telegram-demo__button::after {
  content: "Демо чат";
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #2a5f78;
  border: 1px solid #cfe3ee;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(24, 136, 204, .12);
}
@media (max-width: 760px) {
  .telegram-demo__button::after { display: none; }
  .telegram-demo { right: 12px; bottom: 150px; }
  .float-contacts { bottom: 12px; }
}


/* === Stage 5 final bugfix: safer hero, simpler mobile CTA, case links === */
@media (min-width: 1121px) {
  .hero-photo { padding: 0; }
  .hero-photo__wrap { margin: 0; }
  .float-note--a { left: 18px; top: 24px; }
  .float-note--b { right: 18px; top: 142px; }
}
@media (max-width: 1320px) and (min-width: 921px) {
  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
  .hero-photo .float-note { position: static; display: block; max-width: none; margin: 0; order: 1; }
  .hero-photo__wrap { grid-column: 1 / -1; order: 2; clear: none; }
}
@media (max-width: 920px) {
  .hero-photo .float-note { display: none; }
}
@media (max-width: 760px) {
  .float-contacts { grid-template-columns: repeat(2, 1fr); }
  .float-contacts a:nth-child(3) { display:none; }
  .telegram-demo { bottom: 132px; }
}
.footer__links a[href="admin.html"], .footer__links a[href="START_HERE.html"] { color: var(--gold-dark); font-weight: 900; }
