/* =========================================================
   DOCMIND.ASIA — уникальная дизайн-система
   Палитра: глубокий сине-графитовый + лавандовый + мягкий
   коралловый акцент. Mobile-first.
   ========================================================= */

:root {
  --ink: #1E2440;
  --ink-soft: #565C7E;
  --paper: #F6F5FB;
  --paper-raised: #FFFFFF;
  --lav: #6C63FF;
  --lav-dark: #5449E8;
  --lav-tint: #ECEAFF;
  --coral: #FF7A6E;
  --coral-dark: #E85D50;
  --coral-tint: #FFE7E3;
  --line: #E5E3F0;
  --radius: 18px;
  --shadow: 0 14px 36px rgba(30, 36, 64, 0.10);
  --font-display: "Manrope", -apple-system, sans-serif;
  --font-body: "Golos Text", -apple-system, sans-serif;
  --dusk: linear-gradient(100deg, var(--ink) 0%, var(--lav-dark) 55%, var(--coral) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; overflow-x: hidden; width: 100%; max-width: 100vw; position: relative;
  background: var(--paper); color: var(--ink); font-family: var(--font-body);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--lav-dark); text-decoration-color: var(--coral); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: clamp(1.7rem, 6vw, 2.7rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.3rem, 4vw, 1.85rem); }
h3 { font-size: clamp(1.02rem, 3vw, 1.18rem); font-weight: 700; }
p { margin: 0 0 1.05em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; width: 100%; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 18px; width: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 999px; font-weight: 700; font-size: 14.5px; font-family: var(--font-display); text-decoration: none; border: 2px solid transparent; cursor: pointer; white-space: nowrap; width: 100%; }
@media (min-width: 560px) { .btn { width: auto; } }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 10px 22px rgba(255,122,110,0.32); }
.btn-primary:hover { background: var(--coral-dark); color: #fff; }
.btn-lav { background: var(--lav); color: #fff; }
.btn-lav:hover { background: var(--lav-dark); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--lav-tint); color: var(--lav-dark); }
.btn-ghost:hover { background: var(--lav); color: #fff; }
.btn-sm { padding: 9px 15px; font-size: 13px; width: auto; }

.topbar { background: var(--ink); color: #E7E6F3; font-size: 12.5px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px; gap: 10px; flex-wrap: wrap; position: relative; }
.topbar a { color: #E7E6F3; text-decoration: none; }
.topbar a.phone-link { color: #fff; font-weight: 700; }
.topbar-contacts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.topbar-contacts span { display: none; }
@media (min-width: 700px) { .topbar-contacts span { display: inline; } }
.city-pill { background: rgba(255,255,255,0.12); border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; }
.city-dropdown-panel { columns: 2; background: var(--ink); position: absolute; right: 18px; top: 100%; padding: 14px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.28); z-index: 90; max-height: 260px; width: max-content; max-width: min(300px, calc(100vw - 20px)); overflow-y: auto; }
.city-dropdown-panel a { display: block; padding: 3px 0; color: #C6C4DE; text-decoration: none; font-size: 12.5px; break-inside: avoid; }
.city-dropdown-panel a:hover { color: var(--coral); }

.nav { background: var(--paper-raised); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; gap: 10px; position: relative; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; flex-shrink: 1; overflow: hidden; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--dusk); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 15px; flex-shrink: 0; }
.brand-text { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { color: var(--coral-dark); }

.nav-cta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; order: 3; }
.nav-cta .btn { width: auto; }
.nav-cta .btn-outline.btn-sm { display: none; }
@media (min-width: 480px) { .nav-cta .btn-outline.btn-sm { display: inline-flex; } }

/* --- Мобильное меню: нативный <details>/<summary>, без зависимости от JS --- */
.mobile-menu-details { order: 2; }
.mobile-menu-details > summary.burger { list-style: none; display: flex; background: none; border: none; cursor: pointer; width: 38px; height: 38px; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; }
.mobile-menu-details > summary.burger::-webkit-details-marker { display: none; }
.mobile-menu-details > summary.burger::marker { content: ""; }
.mobile-menu-details > summary.burger span { display: block; width: 21px; height: 2px; background: var(--ink); border-radius: 2px; }
@media (min-width: 940px) { .mobile-menu-details { display: none; } }

.mm-panel { display: none; }
.mobile-menu-details[open] .mm-panel {
  display: block;
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper-raised);
  padding: 18px 18px 30px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.mm-close-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mm-panel-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--ink); }
.mm-close { width: 34px; height: 34px; border-radius: 50%; background: var(--lav-tint); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--ink); cursor: pointer; flex-shrink: 0; }

.nav-links { list-style: none; margin: 0; padding: 0; }
.nav-links > li { border-bottom: 1px solid var(--line); list-style: none; }
.nav-links > li > a { display: block; padding: 13px 4px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }

/* --- Десктопное меню: отдельный, независимый от мобильного блок --- */
.desktop-nav { display: none; }
@media (min-width: 940px) {
  .desktop-nav { display: flex; order: 2; }
  .nav-links-desktop { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: 14px; align-items: center; }
  .nav-links-desktop > li > a { color: var(--ink); text-decoration: none; font-weight: 700; }
  .nav-links-desktop > li > a:hover { color: var(--lav-dark); }
}

/* Пока мобильное меню открыто — блокируем скролл фона и прячем нижние
   плавающие панели, чтобы они не перекрывали контент. Работает без JS
   через :has(), а там где :has() не поддерживается — меню всё равно
   открывается и закрывается нормально, просто без этих удобств. */
html:has(#mobileMenuDetails[open]) { overflow: hidden; }
html:has(#mobileMenuDetails[open]) .mobile-cta-bar,
html:has(#mobileMenuDetails[open]) .cookie-banner { display: none !important; }

.has-mega { position: relative; }
.mega-trigger summary { list-style: none; cursor: pointer; color: var(--ink); font-weight: 700; font-size: 15px; padding: 13px 4px; }
.mega-trigger summary::-webkit-details-marker { display: none; }
.mega-trigger summary::after { content: " ▾"; font-size: 10px; color: var(--lav-dark); }
.mega-trigger[open] summary { color: var(--coral-dark); }
.mega-menu { padding: 4px 4px 12px 10px; }
.mega-grid { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 940px) {
  .mega-menu { position: absolute; top: calc(100% + 14px); left: -20px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; width: 600px; z-index: 70; }
  .mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.mega-col-title { font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--coral-dark); margin-bottom: 6px; }
.mega-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mega-grid a { font-size: 13px; text-decoration: none; color: var(--ink); }
.mega-grid a:hover { color: var(--coral); }
.mega-all { display: inline-block; margin-top: 12px; font-weight: 800; font-size: 13px; color: var(--lav-dark); text-decoration: none; border-top: 1px solid var(--line); padding-top: 12px; width: 100%; }

.crumbs { font-size: 13px; color: var(--ink-soft); padding: 16px 0 0; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--coral); }

.hero { padding: 30px 0 40px; background: radial-gradient(ellipse 700px 460px at 90% -10%, rgba(108,99,255,0.14), transparent 60%), radial-gradient(ellipse 560px 440px at 4% 20%, rgba(255,122,110,0.12), transparent 55%); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; } }
.kicker { display: inline-block; font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--lav-dark); background: var(--lav-tint); padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; }
.hero-lead { font-size: 1.02rem; color: var(--ink-soft); max-width: 50ch; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
@media (min-width: 560px) { .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; } }
.hero-more { font-weight: 800; font-size: 13.5px; color: var(--coral-dark); text-decoration: none; align-self: flex-start; }
.hero-photo { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/11; position: relative; }
@media (min-width: 860px) { .hero-photo { aspect-ratio: 4/5; } }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--dusk); z-index: 2; }

.service-hero { padding: 16px 0 6px; }
.service-hero-grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 16px 0 4px; }
@media (min-width: 860px) { .service-hero-grid { grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; } }
.service-photo { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/10; }
@media (min-width: 860px) { .service-photo { aspect-ratio: 5/4; } }
.service-photo img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--lav-dark); background: var(--lav-tint); padding: 5px 11px; border-radius: 999px; margin-bottom: 10px; }
.eyebrow.narko { color: var(--coral-dark); background: var(--coral-tint); }

.section-head { max-width: 640px; margin-bottom: 22px; }
.py { padding: 34px 0; }
.py:first-of-type { padding-top: 20px; }
@media (min-width: 860px) { .py { padding: 50px 0; } }

.service-layout { display: grid; grid-template-columns: 1fr; gap: 30px; padding: 18px 0 6px; }
@media (min-width: 940px) { .service-layout { grid-template-columns: 1fr 300px; gap: 44px; align-items: start; } }
.service-body { max-width: 100%; overflow-wrap: break-word; }
@media (min-width: 940px) { .service-body { max-width: 720px; } }
.service-body h2 { margin-top: 30px; }
.service-body h2:first-child { margin-top: 0; }
.service-body h3 { margin-top: 20px; color: var(--coral-dark); }
.side-card { background: var(--ink); color: #E7E6F3; border-radius: 18px; padding: 22px 20px; }
@media (min-width: 940px) { .side-card { position: sticky; top: 84px; } }
.side-card h3 { color: #fff; font-size: 1.02rem; margin-bottom: 8px; }
.side-card p { color: #B7B4D8; font-size: 13.5px; }
.side-card .btn { margin-top: 8px; }
.side-card .addr { font-size: 12.5px; color: #B7B4D8; margin-top: 14px; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 12px; }

.related-inline { margin-top: 36px; }
.related-inline-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .related-inline-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .related-inline-grid { grid-template-columns: repeat(3, 1fr); } }
.related-inline-grid a { display: block; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; font-weight: 600; text-decoration: none; }
.related-inline-grid a:hover { border-color: var(--lav); background: var(--lav-tint); }

.cat-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 780px) { .cat-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
.card-list { display: flex; flex-direction: column; gap: 12px; }
.item-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.item-card h3 { margin-bottom: 4px; font-size: 0.98rem; }
.item-card p { font-size: 13.5px; margin: 0; }

.why-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .why-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.why-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; box-shadow: 0 6px 18px rgba(30,36,64,0.05); }
.why-num { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--lav); margin-bottom: 4px; }

.clinic-feature { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; }
@media (min-width: 860px) { .clinic-feature { grid-template-columns: 1fr 1fr; gap: 40px; } }
.clinic-photo { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.clinic-photo img { width: 100%; height: 100%; object-fit: cover; }

.doctors-section { background: var(--lav-tint); border-radius: 22px; margin: 0 10px; }
@media (min-width: 860px) { .doctors-section { margin: 0 18px; border-radius: 28px; } }
.doctors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 860px) { .doctors-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.doctor-card { text-align: center; }
.doctor-photo { border-radius: 50%; overflow: hidden; aspect-ratio: 1/1; margin: 0 auto 8px; box-shadow: var(--shadow); max-width: 120px; background: var(--coral-tint); }
@media (min-width: 860px) { .doctor-photo { max-width: 150px; } }
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.doctor-role { font-size: 11.5px; color: var(--ink-soft); }

.sitemap-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 780px) { .sitemap-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }
.sitemap-sub { margin-bottom: 20px; }
.sitemap-sub h3 { font-size: 0.94rem; color: var(--coral-dark); margin-bottom: 8px; }
.sitemap-sub ul { list-style: none; margin: 0; padding: 0; columns: 1; }
@media (min-width: 480px) { .sitemap-sub ul { columns: 2; } }
.sitemap-sub li { margin-bottom: 5px; break-inside: avoid; }
.sitemap-sub a { font-size: 13px; text-decoration: none; }
.city-menu-grid { columns: 2; font-size: 13px; }
@media (min-width: 640px) { .city-menu-grid { columns: 3; } }
@media (min-width: 940px) { .city-menu-grid { columns: 4; } }
.city-menu-grid a { display: block; padding: 4px 0; color: var(--lav-dark); text-decoration: none; break-inside: avoid; }

.cta-band { background: var(--dusk); border-radius: 22px; padding: 30px 22px; text-align: center; color: #fff; }
@media (min-width: 860px) { .cta-band { padding: 44px; border-radius: 28px; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 52ch; margin: 0 auto; }
.cta-band .hero-actions { justify-content: center; align-items: center; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-primary:hover { background: #fff; opacity: 0.9; }
.cta-band .btn-outline { border-color: #fff; color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--ink); }

footer { background: var(--ink); color: #B7B4D8; padding: 36px 0 20px; margin-top: 50px; }
@media (min-width: 860px) { footer { padding: 50px 0 24px; margin-top: 70px; } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .footer-grid { grid-template-columns: 1.2fr repeat(4, 1fr); gap: 24px; } }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-col a { color: #B7B4D8; text-decoration: none; font-size: 13px; }
.footer-col a:hover { color: var(--coral); }
.footer-brand p { color: #8B87AE; font-size: 13px; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 28px; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 12px; color: #8B87AE; }
@media (min-width: 700px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom a { color: #8B87AE; }
.footer-bottom a:hover { color: var(--coral); }
.footer-bottom-links { display: flex; gap: 14px; flex-wrap: wrap; }
.city-switcher summary { cursor: pointer; list-style: none; color: #B7B4D8; font-size: 13px; }
.city-switcher summary::-webkit-details-marker { display: none; }

.static-page { padding: 30px 0 50px; }
@media (min-width: 860px) { .static-page { padding: 44px 0 70px; } }
.static-page h2 { margin-top: 26px; }
.notfound { min-height: 55vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 18px; }
.notfound-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 18vw, 6.5rem); background: var(--dusk); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 6px; }
.notfound p { max-width: 44ch; margin: 0 auto; }
.notfound .hero-actions { justify-content: center; align-items: center; margin-top: 18px; }

.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 82px; z-index: 200; max-width: 560px; margin: 0 auto; background: var(--ink); color: #E7E6F3; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -10px 36px rgba(0,0,0,0.25); transform: translateY(140%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
@media (min-width: 940px) { .cookie-banner { bottom: 12px; } }
@media (min-width: 560px) { .cookie-banner { flex-direction: row; align-items: center; padding: 14px 18px; } }
.cookie-banner.show { transform: translateY(0); opacity: 1; }
body.menu-open .cookie-banner { display: none; }
.cookie-banner p { color: #B7B4D8; font-size: 12.5px; margin: 0; flex: 1; }
.cookie-banner a { color: #fff; text-decoration: underline; }

.mobile-cta-bar {
  display: flex; gap: 8px;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: #fff; box-shadow: 0 -8px 24px rgba(30,36,64,0.14);
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
}
.mobile-cta-bar .btn { flex: 1; padding: 12px 8px; font-size: 14px; width: auto; }
@media (min-width: 940px) { .mobile-cta-bar { display: none; } }
body.menu-open .mobile-cta-bar { display: none; }
body.has-mobile-cta { padding-bottom: 66px; }

main { padding-bottom: 6px; overflow-x: hidden; }
