/* =========================================================================
   pregledi.online — публичен сайт
   Цветове: тюркоаз (основен), корал (само „Запази час“), нощ (текст).
   ========================================================================= */
:root {
    --ink: #0b1f33;
    --ink-2: #3e5168;
    --muted: #74859b;
    --line: #e2e9f1;
    --line-2: #eef3f8;
    --bg: #f5f8fb;
    --card: #ffffff;
    --teal: #0aa39a;
    --teal-d: #07857e;
    --teal-dd: #056a64;
    --teal-l: #e3f7f5;
    --teal-ll: #f1fbfa;
    --coral: #ff6b57;
    --coral-d: #f0533e;
    --coral-l: #fff0ed;
    --sun: #ffc43d;
    --sun-l: #fff6dc;
    --blue: #2952cc;
    --blue-l: #e8f0ff;
    --danger: #d93a2b;
    --ok: #12996a;
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 26px;
    --sh-1: 0 1px 2px rgba(11, 31, 51, .06);
    --sh-2: 0 6px 20px rgba(11, 31, 51, .08);
    --sh-3: 0 18px 50px rgba(11, 31, 51, .14);
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --header-h: 68px;
    --tabbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-feature-settings: "locl" 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--tabbar-h);
}
img, svg { max-width: 100%; }
a { color: var(--teal-d); text-decoration: none; }
a:hover { color: var(--teal-dd); }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -0.035em; }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.03em; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font-family: inherit; font-feature-settings: inherit; }
.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 26px; height: 26px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.wrap-sm { max-width: 860px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hide { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(10, 163, 154, .45); outline-offset: 2px; border-radius: 6px; }

/* ---------- Бутони ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px;
    border: 1.5px solid transparent; border-radius: 12px;
    font-weight: 700; font-size: 15px; line-height: 1.2;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-d); color: #fff; }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 87, .28); }
.btn-coral:hover { background: var(--coral-d); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9d6e3; color: var(--ink); background: #fbfcfe; }
.btn-soft { background: var(--teal-l); color: var(--teal-dd); }
.btn-soft:hover { background: #d3f1ee; color: var(--teal-dd); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #17324f; color: #fff; }
.btn-link { background: none; border: 0; color: var(--teal-d); padding: 0; min-height: 0; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.is-loading::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pg-spin .7s linear infinite; }
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* ---------- Форми ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea {
    width: 100%; min-height: 46px; padding: 10px 14px;
    font: inherit; font-size: 15.5px; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
    outline: none; transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 96px; resize: vertical; }
.select {
    padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2374859b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(10, 163, 154, .14); }
.input::placeholder, .textarea::placeholder { color: #9aa9bb; }
.is-invalid { border-color: var(--danger) !important; background-color: #fffafa; }
.invalid-feedback { color: var(--danger); font-size: 13px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal); flex-shrink: 0; }
.input-icon { position: relative; }
.input-icon .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input, .input-icon .select { padding-left: 44px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); width: 36px; height: 36px; cursor: pointer; border-radius: 8px; }
.phone-field { display: flex; min-width: 0; position: relative; }
.cc-list { left: 0; right: auto; width: min(320px, 90vw); top: calc(100% + 6px); }
.cc-list button { gap: 10px; }
.cc-list .cc-flag { font-size: 18px; }
.cc-list .ac-sub { margin-left: auto; }
.cc-list .ns-check { margin-left: 8px; }
.phone-field .cc:focus-visible { outline: 3px solid rgba(10, 163, 154, .45); }
.phone-field .cc { position: relative; display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; min-height: 46px; padding: 0 8px 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: #f8fafc; font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; cursor: pointer; }
.phone-field .cc-view { display: inline-flex; align-items: center; gap: 6px; }
.phone-field .cc-flag { font-size: 18px; line-height: 1; }
.phone-field .cc-caret { color: var(--muted); }
.phone-field .cc-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.phone-field .input { flex: 1; min-width: 0; border-radius: 0 12px 12px 0; }
.phone-field:focus-within .cc { border-color: var(--teal); }
.phone-field .cc:has(.cc-select:focus-visible) { box-shadow: 0 0 0 4px rgba(10, 163, 154, .14); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Чипове / баджове ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 36px; padding: 6px 14px;
    background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
    font-size: 14px; font-weight: 700; color: var(--ink-2);
    cursor: pointer; user-select: none; white-space: nowrap; transition: all .15s;
}
.chip:hover { border-color: #b8e6e2; color: var(--teal-dd); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chip.is-on, .chip:has(input:checked) { background: var(--teal-l); border-color: #a9e2dd; color: var(--teal-dd); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-nzok { background: var(--blue-l); color: var(--blue); }
.badge-private { background: var(--teal-l); color: var(--teal-dd); }
.badge-kids { background: var(--sun-l); color: #8a5d00; }
.badge-online { background: #f1ebff; color: #6233c9; }
.badge-homeopathy { background: #e6f6e8; color: #2d7a3a; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-nzok { background: var(--blue); }
.dot-private { background: var(--teal); }

/* ---------- Хедър ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 32px; height: 35px; }
.brand-text { font-weight: 800; font-size: 22px; letter-spacing: -0.04em; line-height: 1; }
.brand-text b { color: var(--teal); font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.main-nav a:hover, .main-nav a.is-active { color: var(--teal-dd); background: var(--teal-ll); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-actions .for-doctors { color: var(--teal-d); font-weight: 700; font-size: 15px; padding: 8px 6px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }

.account { position: relative; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; color: var(--ink); max-width: 220px; }
.account-btn span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-xs { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); padding: 8px; display: none; z-index: 60; }
.dropdown.is-open { display: block; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.dropdown a:hover { background: var(--bg); color: var(--ink); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dropdown .dd-title { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px 2px; }

/* мобилно меню */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(11, 31, 51, .45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 360px); background: #fff; z-index: 81; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; display: flex; flex-direction: column; box-shadow: var(--sh-3); }
.drawer-open .drawer { transform: none; visibility: visible; transition: transform .25s ease; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 10px 12px; overflow-y: auto; flex: 1; }
.drawer-body a { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; color: var(--ink); font-weight: 700; font-size: 16px; }
.drawer-body a:hover { background: var(--bg); }
.drawer-body .dd-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 4px; }
.drawer-foot { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--bg); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* долна лента (телефон) */
.tabbar { display: none; }

/* ---------- Футър ---------- */
.site-footer { background: var(--ink); color: #b9c7d6; margin-top: 64px; padding: 56px 0 0; font-size: 15px; }
.site-footer a { color: #d7e2ec; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-text b { color: #5fe0d6; }
.footer-brand p { margin: 14px 0 18px; max-width: 340px; line-height: 1.6; }
.footer-contact { display: grid; gap: 8px; }
.footer-contact div { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ico { color: #5fe0d6; margin-top: 2px; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-bottom { margin-top: 44px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13.5px; color: #8fa1b5; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: inline-flex; align-items: center; justify-content: center; }
.social a:hover { background: rgba(255, 255, 255, .16); }

/* ---------- Секции ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-tight { padding-top: 36px; padding-bottom: 36px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--ink-2); }
.section-head a.more { font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-d); margin-bottom: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 22px; }

/* ---------- Начало: hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(720px 380px at 88% 0%, rgba(10, 163, 154, .17), transparent 70%),
        radial-gradient(520px 320px at 0% 100%, rgba(255, 196, 61, .17), transparent 70%),
        #fff;
    border-bottom: 1px solid var(--line);
    padding: 64px 0 52px;
}
.hero h1 { max-width: 760px; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 600px; margin-bottom: 28px; }
.hero-deco { position: absolute; right: -40px; top: 40px; width: 360px; opacity: .08; pointer-events: none; }
.trust { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 28px; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.trust b { display: block; font-size: 24px; color: var(--ink); letter-spacing: -0.02em; }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-item .ico-wrap { width: 40px; height: 40px; border-radius: 12px; background: var(--teal-l); color: var(--teal-d); display: inline-flex; align-items: center; justify-content: center; }

/* търсачка */
.searchbox {
    display: grid; grid-template-columns: 1.35fr 1fr 1fr auto; align-items: stretch;
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 16px 44px rgba(11, 31, 51, .12); padding: 8px; max-width: 980px;
}
.sb-field { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 6px 16px; border-right: 1px solid var(--line); min-width: 0; }
.sb-field:nth-last-child(2) { border-right: 0; }
.sb-field label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.sb-field .select, .sb-field .input { border: 0; padding: 2px 30px 2px 0; min-height: 30px; font-weight: 700; font-size: 16px; background-position: right 0 center; box-shadow: none !important; border-radius: 0; }
.sb-field .input { padding-right: 0; }
.searchbox .btn { min-height: 58px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.quick-chips { margin-top: 16px; }

/* падащ списък (компютър) */
.ns { position: relative; min-width: 0; }
.ns-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; bottom: 0; left: 0; }
.ns-btn { display: flex; align-items: center; text-align: left; cursor: pointer; }
.ns-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-placeholder { color: var(--muted); }
.ns-btn[aria-expanded="true"] { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(10, 163, 154, .14); }
.sb-field .ns-btn[aria-expanded="true"] { box-shadow: none; }
.ns-list { min-width: 220px; }
.sb-field .ns-list { left: -16px; right: -16px; top: calc(100% + 18px); }
.ns-list button { justify-content: flex-start; }
.ns-list button.is-selected { color: var(--teal-dd); font-weight: 800; }
.ns-list .ns-check { margin-left: auto; color: var(--teal); }
.ns-search { position: sticky; top: -6px; margin: -6px -6px 6px; padding: 8px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ns-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 15px; color: var(--ink); min-width: 0; background: transparent; }

/* autocomplete */
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); padding: 6px; z-index: 40; max-height: 340px; overflow-y: auto; display: none; }
.ac-list.is-open { display: block; }
.ac-list a, .ac-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px; background: none; border: 0; text-align: left; cursor: pointer; }
.ac-list a:hover, .ac-list .is-active { background: var(--teal-ll); color: var(--teal-dd); }
.ac-list .ac-group { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; }
.ac-list .ac-sub { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: auto; }

/* ---------- Свободни скоро ---------- */
.soon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.soon-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.soon-card .avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 20px; }
.soon-when { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.soon-when b { color: var(--teal-dd); }
.soon-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.slot-more { background: var(--teal-l); border-style: dashed; }
.slot-more:hover { color: #fff; }

/* ---------- Специалности ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.spec-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.spec-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: #c8ebe7; color: var(--ink); }
.spec-ico { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; }
.spec-ico svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.spec-tile:hover .spec-ico svg { transform: scale(1.08); }
.spec-ico svg { transition: transform .15s; }
.spec-tile b { font-size: 14px; line-height: 1.25; }
.spec-tile small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.spec-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spec-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-weight: 700; }
.spec-row:hover { border-color: #b8e6e2; color: var(--teal-dd); }
.spec-row .spec-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; }
.spec-row .spec-ico svg { width: 25px; height: 25px; }
.spec-row small { margin-left: auto; color: var(--muted); font-weight: 600; }

/* ---------- Градове ---------- */
.city-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.city { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-weight: 700; }
.city:hover { border-color: #b8e6e2; color: var(--teal-dd); }
.city .ico { color: var(--teal); }
.city small { color: var(--muted); font-weight: 600; }
.city span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Как работи ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.step-num { width: 42px; height: 42px; border-radius: 13px; background: var(--ink); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 17px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* CTA за лекари */
.cta-doctors { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; background: var(--ink); color: #c4d1de; border-radius: var(--r-xl); padding: 40px; overflow: hidden; position: relative; }
.cta-doctors h2 { color: #fff; }
.cta-doctors ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.cta-doctors li { display: flex; gap: 10px; align-items: flex-start; }
.cta-doctors li .ico { color: #5fe0d6; margin-top: 2px; }
.cta-art { position: relative; justify-self: center; }
.cta-art .mini-cal { background: #fff; border-radius: 18px; padding: 16px; width: 280px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); color: var(--ink); }
.mini-cal h5 { margin: 0 0 10px; font-size: 14px; }
.mini-cal .row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Карта на лекар ---------- */
.doc-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.doc-card:hover, .doc-card.is-hover { box-shadow: var(--sh-2); border-color: #cfe9e6; }
.doc-card + .doc-card { margin-top: 14px; }
.doc-main { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.doc-head { display: flex; gap: 14px; align-items: flex-start; }
.avatar { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg, #0aa39a, #3cc9bf); color: #fff; font-weight: 800; font-size: 24px; display: inline-flex; align-items: center; justify-content: center; letter-spacing: -0.02em; }
.avatar-lg { width: 120px; height: 120px; border-radius: 28px; font-size: 38px; }
.doc-name { font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.25; display: block; letter-spacing: -0.01em; }
.doc-name:hover { color: var(--teal-dd); }
.doc-spec { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; color: var(--ink); }
.rating .ico { color: var(--sun); fill: var(--sun); stroke: var(--sun); width: 16px; height: 16px; }
.rating small { color: var(--muted); font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-places { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.doc-places li { display: flex; gap: 8px; align-items: flex-start; }
.doc-places .ico { color: var(--teal); margin-top: 1px; width: 17px; height: 17px; }
.doc-places a { color: var(--ink-2); }
.doc-places a:hover { color: var(--teal-dd); }
.doc-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.doc-slots { background: var(--teal-ll); border-left: 1px solid var(--line); padding: 16px 16px 14px; min-width: 0; }

/* ---------- Виджет със свободни часове ---------- */
.slots-widget { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sw-practices { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sw-practices::-webkit-scrollbar { display: none; }
.sw-practices .chip { min-height: 32px; padding: 4px 12px; font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.sw-first { font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sw-first b { color: var(--teal-dd); }
.sw-nav { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 6px; align-items: start; }
.sw-arrow { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-top: 4px; }
.sw-arrow:hover { border-color: var(--teal); color: var(--teal-d); }
.sw-arrow[disabled] { opacity: .35; cursor: default; }
.sw-days { display: grid; grid-template-columns: repeat(var(--sw-cols, 4), minmax(0, 1fr)); gap: 6px; min-width: 0; }
.sw-day { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sw-day-h { text-align: center; font-size: 12.5px; line-height: 1.25; color: var(--muted); font-weight: 700; padding: 4px 0 6px; }
.sw-day-h b { display: block; color: var(--ink); font-size: 13.5px; }
.sw-day-h.is-today b { color: var(--teal-d); }
.slot {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 4px;
    min-height: 36px; padding: 6px 4px; border-radius: 10px;
    background: #fff; border: 1.5px solid #bfe7e3; color: var(--teal-dd);
    font-weight: 800; font-size: 14px; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.slot:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.slot .dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; }
.slot-empty { min-height: 36px; border-radius: 10px; background: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(116, 133, 155, .07) 5px, rgba(116, 133, 155, .07) 10px); }
.sw-more { align-self: center; }
.sw-none { text-align: center; padding: 18px 10px; color: var(--ink-2); font-size: 14px; }
.sw-none .btn { margin-top: 8px; }
.sw-legend { display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.sw-legend span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Търсене ---------- */
.search-top { background: #fff; border-bottom: 1px solid var(--line); padding: 26px 0 18px; }
.search-top h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 6px; }
.search-top .intro { color: var(--ink-2); max-width: 820px; margin-bottom: 18px; }
.filters { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 10px; align-items: end; }
.filters .field { margin: 0; }
.filter-chips { margin-top: 12px; }
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; padding-top: 22px; align-items: start; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.results-bar strong { font-size: 15px; }
.map-panel { position: sticky; top: calc(var(--header-h) + 16px); height: min(calc(100vh - var(--header-h) - 32px), 560px); min-height: 420px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #e9eef3; }
.map-panel #map { width: 100%; height: 100%; }
.search-layout:not(:has(.map-panel)) { grid-template-columns: minmax(0, 1fr); }
.search-layout:not(:has(.map-panel)) .view-toggle { display: none !important; }
.search-layout:not(:has(.map-panel)) .results { max-width: 980px; }
.view-toggle { display: none; }
.empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed #cfdae6; border-radius: var(--r-lg); }
.empty .ico-wrap { width: 64px; height: 64px; border-radius: 20px; background: var(--teal-l); color: var(--teal-d); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 460px; margin: 0 auto 16px; }

/* доизреждане */
.page-mark { height: 0; }
.page-mark + .doc-card { margin-top: 14px; }
.page-mark:first-child + .doc-card { margin-top: 0; }
.infinite-status { display: flex; justify-content: center; padding: 22px 0 6px; min-height: 64px; }

/* пагинация */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.pager a:hover { border-color: var(--teal); color: var(--teal-dd); }
.pager .is-current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pager .is-disabled { opacity: .45; }

/* leaflet пин */
.pg-pin { width: 34px; height: 38px; }
.pg-pin svg { width: 34px; height: 38px; filter: drop-shadow(0 4px 6px rgba(11, 31, 51, .3)); transition: transform .15s; transform-origin: 50% 100%; }
.pg-pin.is-hot svg { transform: scale(1.3); }
.leaflet-popup-content-wrapper { border-radius: 14px !important; }
.leaflet-popup-content { font-family: var(--font); margin: 12px 14px !important; }

/* ---------- Профил на лекар ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--teal-dd); }
.breadcrumbs span.sep { opacity: .5; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "hero book" "info book"; grid-template-rows: auto 1fr; gap: 16px 24px; align-items: start; padding-top: 16px; }
.p-hero { grid-area: hero; min-width: 0; }
.p-book { grid-area: book; }
.p-info { grid-area: info; min-width: 0; }
.doc-head > a { flex-shrink: 0; display: block; line-height: 0; }
.profile-hero { padding: 26px; display: flex; gap: 22px; align-items: flex-start; }
.profile-hero h1 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 6px; }
.profile-hero .doc-spec { font-size: 16px; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--ink-2); font-size: 14.5px; }
.profile-facts span { display: inline-flex; align-items: center; gap: 6px; }
.profile-facts .ico { color: var(--teal); width: 17px; height: 17px; }
.booking-panel { position: sticky; top: calc(var(--header-h) + 16px); }
.booking-panel .card-pad { padding: 18px; }
.booking-panel h2 { font-size: 18px; margin: 0 0 4px; }
.prose { color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.prose h2 { font-size: 24px; margin: 1.6em 0 .6em; color: var(--ink); }
.prose h3 { font-size: 19px; margin: 1.4em 0 .5em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose > :first-child { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.info-block { padding: 22px 26px; }
.info-block h2 { font-size: 20px; margin-bottom: 12px; }
.info-block + .info-block { border-top: 1px solid var(--line); }
.place-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.place-card + .place-card { margin-top: 10px; }
.place-card b { display: block; }
.place-card small { color: var(--muted); }
.map-box { height: 300px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-top: 14px; }
.map-box #map { height: 100%; }

/* практика */
.practice-cover { height: 220px; border-radius: var(--r-lg); background: linear-gradient(135deg, #0aa39a, #0b1f33); background-size: cover; background-position: center; margin-top: 16px; position: relative; overflow: hidden; }
.practice-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.practice-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); }

/* ---------- Модален прозорец ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(11, 31, 51, .55); }
.modal.is-open { display: flex; }
.modal-box { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-3); display: flex; flex-direction: column; overflow: hidden; animation: pg-pop .18s ease; }
@keyframes pg-pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { font-size: 20px; margin: 0; }
.modal-body { padding: 16px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.book-summary { display: grid; gap: 10px; padding: 14px 16px; background: var(--teal-ll); border: 1px solid #cfeeea; border-radius: var(--r); margin-bottom: 16px; }
.book-summary div { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.book-summary b { color: var(--ink); }
.book-summary .ico { color: var(--teal-d); margin-top: 1px; }
.book-when { font-size: 18px; font-weight: 800; color: var(--ink); }

/* ---------- Тостове ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + 12px); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--sh-3); font-weight: 600; font-size: 14.5px; animation: pg-pop .18s ease; }
.toast-ok { background: #0f7f61; }
.toast-err { background: #b8321f; }
.toast .ico { margin-top: 1px; }

/* ---------- Страници със съдържание ---------- */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 34px 0 28px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 42px); margin: 8px 0 8px; }
.page-head p { color: var(--ink-2); max-width: 720px; margin: 0; font-size: 17px; }
.content-card { padding: clamp(22px, 4vw, 40px); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; transition: border-color .15s; }
.faq details[open] { border-color: #bfe7e3; box-shadow: var(--sh-1); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 700; font-size: 16.5px; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 7px; background: var(--teal-l) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2307857e' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 16px; color: var(--ink-2); line-height: 1.65; }
.faq details > div p:last-child { margin: 0; }
.faq h2 { font-size: 20px; margin: 28px 0 12px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.contact-tile { padding: 22px; }
.contact-tile .ico-wrap { width: 46px; height: 46px; border-radius: 14px; background: var(--teal-l); color: var(--teal-d); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.contact-tile h3 { font-size: 16px; margin-bottom: 4px; }
.contact-tile p { margin: 0; color: var(--ink-2); }
.contact-tile a { font-weight: 700; }
.map-embed { width: 100%; height: 360px; border: 0; border-radius: var(--r-lg); display: block; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { padding: 22px; }
.feature .ico-wrap { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- Вход / регистрация ---------- */
.auth { min-height: calc(100vh - var(--header-h) - 120px); display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 460px; padding: clamp(24px, 4vw, 36px); }
.auth-card h1 { font-size: 28px; margin-bottom: 4px; }
.auth-card .sub { color: var(--ink-2); margin-bottom: 22px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--ink-2); font-size: 15px; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.code-input { letter-spacing: .5em; text-align: center; font-size: 22px !important; font-weight: 800; }

/* ---------- Профил на пациента ---------- */
.account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; padding-top: 22px; }
.account-nav { padding: 10px; position: sticky; top: calc(var(--header-h) + 16px); }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 700; }
.account-nav a:hover { background: var(--bg); color: var(--ink); }
.account-nav a.is-active { background: var(--teal-l); color: var(--teal-dd); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; font-size: 15px; }
.tabs button.is-active { color: var(--teal-dd); border-bottom-color: var(--teal); }
.tabs button small { background: var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-size: 12px; }
.booking-item { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.booking-item + .booking-item { margin-top: 10px; }
.booking-date { text-align: center; background: var(--teal-ll); border: 1px solid #cfeeea; border-radius: 14px; padding: 8px 4px; }
.booking-date b { display: block; font-size: 26px; line-height: 1; color: var(--teal-dd); }
.booking-date span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; }
.booking-date em { display: block; font-style: normal; font-weight: 800; color: var(--ink); margin-top: 4px; }
.booking-item.is-past .booking-date { background: var(--bg); border-color: var(--line); }
.booking-item.is-past .booking-date b { color: var(--ink-2); }
.booking-item.is-cancelled { opacity: .7; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row b { display: block; }
.switch-row small { color: var(--muted); font-size: 14px; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cdd8e3; border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(20px); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; margin-bottom: 16px; }
.alert-ok { background: #e7f7f0; color: #0f6b51; border: 1px solid #bfe8d6; }
.alert-err { background: #fdeeec; color: #9b2b1c; border: 1px solid #f7cbc4; }
.alert-info { background: var(--teal-ll); color: var(--teal-dd); border: 1px solid #cfeeea; }

/* успешна резервация */
.success-icon { width: 76px; height: 76px; border-radius: 24px; background: #e7f7f0; color: var(--ok); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.success-icon .ico { width: 40px; height: 40px; stroke-width: 2.6; }
.summary-list { display: grid; gap: 0; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-align: left; }
.summary-list div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 12px 16px; background: #fff; font-size: 15px; }
.summary-list div + div { border-top: 1px solid var(--line); }
.summary-list dt, .summary-list span:first-child { color: var(--muted); font-weight: 700; font-size: 14px; }

/* =========================================================================
   Отзивчивост
   ========================================================================= */
@media (max-width: 1100px) {
    .spec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .search-layout { grid-template-columns: minmax(0, 1fr); }
    .map-panel { display: none; position: relative; top: 0; height: 60vh; }
    .search-layout.show-map .map-panel { display: block; }
    .search-layout.show-map .results { display: none; }
    .view-toggle { display: inline-flex; }
    .profile-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "book" "info"; }
    .booking-panel { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1000px) {
    .soon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    :root { --header-h: 60px; --tabbar-h: 66px; }
    .main-nav, .header-actions .for-doctors, .header-actions .desktop-only { display: none; }
    .menu-btn { display: inline-flex; }
    .brand-text { font-size: 20px; }
    .brand svg { width: 28px; height: 31px; }
    .searchbox { grid-template-columns: 1fr; padding: 6px; border-radius: 18px; }
    .sb-field { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
    .sb-field:nth-last-child(2) { border-bottom: 0; }
    .searchbox .btn { min-height: 52px; margin-top: 4px; }
    .filters { grid-template-columns: 1fr 1fr; }
    .filters .filters-q { grid-column: 1 / -1; }
    .filters .btn { grid-column: 1 / -1; }
    .doc-card { grid-template-columns: minmax(0, 1fr); }
    .doc-slots { border-left: 0; border-top: 1px solid var(--line); }
    .steps, .feature-grid, .contact-grid { grid-template-columns: 1fr; }
    .cta-doctors { grid-template-columns: 1fr; padding: 28px 22px; }
    .cta-art { display: none; }
    .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spec-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-layout { grid-template-columns: minmax(0, 1fr); }
    .account-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
    .account-nav a { white-space: nowrap; padding: 9px 12px; }
    .practice-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .tabbar {
        display: grid; grid-template-columns: repeat(4, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        height: var(--tabbar-h); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 12px; }
    .tabbar a .ico { width: 23px; height: 23px; }
    .tabbar a.is-active { color: var(--teal-dd); }
    body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
    .site-footer { margin-top: 40px; }
    .toasts { top: auto; bottom: calc(var(--tabbar-h) + 12px); }
}

@media (max-width: 600px) {
    body { font-size: 15.5px; }
    .wrap { padding: 0 16px; }
    .hero { padding: 30px 0 30px; }
    .hero .lead { margin-bottom: 20px; }
    .hero-deco { display: none; }
    .trust { gap: 12px 22px; }
    .trust b { font-size: 20px; }
    .section { padding-top: 38px; padding-bottom: 38px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .spec-grid .spec-tile:nth-child(n+9) { display: none; }
    .spec-list { grid-template-columns: 1fr; }
    .soon-grid { grid-template-columns: 1fr; }
    .city-grid { gap: 8px; }
    .city { padding: 12px 12px; font-size: 14.5px; }
    .doc-main { padding: 16px; }
    .avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 20px; }
    .avatar-lg { width: 88px; height: 88px; border-radius: 22px; font-size: 28px; }
    .doc-slots { padding: 14px 12px; }
    .profile-hero { padding: 18px; gap: 14px; flex-direction: column; }
    .info-block { padding: 18px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .modal { padding: 0; align-items: flex-end; }
    .modal-box { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; }
    .booking-item { grid-template-columns: 70px minmax(0, 1fr); }
    .booking-item > :last-child { grid-column: 1 / -1; }
    .summary-list div { grid-template-columns: 1fr; gap: 2px; }
    .filters { grid-template-columns: 1fr; }
    .page-head { padding: 24px 0 20px; }
    .chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
    .chips.scroll-x::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
    .site-header, .site-footer, .tabbar, .btn, .drawer { display: none !important; }
    body { background: #fff; padding: 0; }
}
