/* ============================================================
   Talgar Clinic — дизайн-система
   Сигнатурный элемент: линия пульса/кардиограммы (как на неоновой
   вывеске клиники) используется как разделитель секций и маркер
   списков — сквозной мотив вместо обычных линий и точек.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
    --ink: #0F1B2D;
    --navy: #163A64;
    --navy-deep: #0E2647;
    --teal: #2FB6C4;
    --teal-bright: #4FD8E6;
    --paper: #F4F7F7;
    --surface: #FFFFFF;
    --line: #DDE6E8;
    --muted: #5C6B78;

    --font-display: 'Manrope', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 14px;
    --shadow: 0 10px 30px -12px rgba(15, 27, 45, 0.18);
    --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0 0 0.5em;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h1 { font-weight: 700; }
h2 { font-weight: 700; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-weight: 500; font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--muted); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================== HEADER ============================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 247, 247, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 76px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--navy-deep);
    white-space: nowrap;
}

.brand .pulse-badge {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.main-nav a:hover { color: var(--navy-deep); background: rgba(22,58,100,0.06); }
.main-nav a.active { color: var(--navy-deep); background: rgba(47,182,196,0.14); }

.header-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.header-phone a {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy-deep);
}

.nav-toggle { display: none; }

@media (max-width: 880px) {
    .main-nav { display: none; }
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
        border: none;
        background: none;
        font-family: var(--font-display);
        font-size: 0.85rem;
        color: var(--navy-deep);
    }
    .header-phone { display: none; }
}

/* ============================== BUTTONS ============================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn-primary {
    background: var(--teal);
    color: var(--navy-deep);
    box-shadow: 0 8px 24px -8px rgba(47,182,196,0.55);
}
.btn-primary:hover { background: var(--teal-bright); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: var(--surface);
    border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

.btn-dark {
    background: var(--navy-deep);
    color: var(--surface);
}
.btn-dark:hover { background: var(--navy); }

/* ============================== HERO ============================== */

.hero {
    position: relative;
    color: var(--surface);
    background: radial-gradient(120% 140% at 78% 15%, #163f6e 0%, var(--navy-deep) 55%, #081a30 100%);
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(circle, rgba(47,182,196,0.35) 0%, rgba(47,182,196,0) 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 96px 24px 64px;
    max-width: var(--container);
    margin: 0 auto;
}

.hero-inner-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 32px;
}

.hero-logo {
    display: flex;
    justify-content: center;
}
.hero-logo img {
    width: 100%;
    max-width: 380px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.35));
}

@media (max-width: 880px) {
    .hero-inner-split { grid-template-columns: 1fr; }
    .hero-logo { order: -1; }
    .hero-logo img { max-width: 220px; margin: 0 auto; }
}

.hero-eyebrow {
    font-family: var(--font-mono);
    color: var(--teal-bright);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero h1 {
    font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem);
    max-width: 14ch;
    margin-bottom: 20px;
}

.hero-lead {
    color: rgba(255,255,255,0.82);
    max-width: 52ch;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* ============================== PULSE DIVIDER ============================== */
/* Сигнатурный элемент сайта — линия кардиограммы вместо обычного <hr> */

.pulse-divider {
    width: 100%;
    height: 40px;
    display: block;
    color: var(--teal);
}

.pulse-divider.on-dark { color: var(--teal-bright); opacity: 0.9; }

.pulse-divider path {
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================== SECTIONS ============================== */

section { padding: 20px 0 64px; }

.section-head {
    max-width: 640px;
    margin-bottom: 36px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    color: var(--teal);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    display: block;
}

/* ============================== CARDS / GRIDS ============================== */

.grid {
    display: grid;
    gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 880px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    /* На мобильном специалисты — горизонтальная лента со свайпом,
       а не длинный вертикальный список */
    .specialists-row {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 14px;
        margin: 0 -24px;
        padding: 4px 24px 10px;
        -webkit-overflow-scrolling: touch;
    }
    .specialists-row .specialist-card {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 26px;
    border: 1px solid var(--line);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card-icon {
    width: 44px;
    height: 44px;
    color: var(--teal);
    margin-bottom: 16px;
}

/* pulse bullet list — заменяет обычные <li> точки на мини-пульс */
.pulse-list { list-style: none; margin: 0; padding: 0; }
.pulse-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    color: var(--ink);
}
.pulse-list li:last-child { border-bottom: none; }
.pulse-list svg { flex-shrink: 0; width: 22px; height: 16px; margin-top: 4px; color: var(--teal); }

/* Specialists */
.specialist-card { text-align: left; }
.specialist-photo {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
    background: var(--paper);
}
.specialist-role {
    font-family: var(--font-mono);
    color: var(--teal);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: block;
}
.specialist-schedule {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
}
.specialist-schedule strong { color: var(--navy-deep); }

/* Services */
.service-category { margin-bottom: 8px; }
.service-category h3 {
    font-family: var(--font-mono);
    color: var(--navy-deep);
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
    padding-bottom: 6px;
    margin-bottom: 4px;
}
.service-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
}
.service-row:last-child { border-bottom: none; }
.service-name { font-weight: 700; margin-bottom: 4px; }
.service-desc { font-size: 0.92rem; margin: 0; }
.service-price {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--navy-deep);
    white-space: nowrap;
    padding-top: 2px;
}

/* News */
.news-card img { width: 100%; max-height: 260px; object-fit: contain; background: #EAF0F1; border-radius: 10px; margin-bottom: 14px; }
.news-date { font-family: var(--font-mono); color: var(--teal); font-size: 0.8rem; }

/* Reviews */
.review-card { position: relative; }
.review-author { font-weight: 700; margin-bottom: 2px; }
.review-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 12px; display: block; }
.review-stars { display: flex; gap: 2px; color: #E8A33D; margin-bottom: 10px; }

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.gallery-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; }
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Why-us dark band */
.band-dark {
    background: var(--navy-deep);
    color: var(--surface);
}
.band-dark p { color: rgba(255,255,255,0.72); }
.band-dark .pulse-list li { color: var(--surface); border-bottom-color: rgba(255,255,255,0.14); }

/* CTA strip */
.cta-strip {
    background: var(--navy-deep);
    color: var(--surface);
    border-radius: 20px;
    padding: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.cta-strip h2 { margin: 0; max-width: 22ch; }

/* ============================== FORMS ============================== */

.form-grid { display: grid; gap: 14px; }
.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--navy-deep);
}
.field input, .field textarea, .field select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--teal);
    outline: none;
}

.form-note { font-size: 0.82rem; color: var(--muted); }

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}
.alert-success { background: rgba(47,182,196,0.14); color: var(--navy-deep); }
.alert-error { background: #FCEBEA; color: #8A2C22; }

/* ============================== ВЕРСИЯ ДЛЯ СЛАБОВИДЯЩИХ ============================== */

.a11y-bar {
    background: #1c2733;
    color: #fff;
}
.a11y-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 24px;
    gap: 16px;
}
.lang-switch {
    display: flex;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
}
.lang-switch a {
    padding: 3px 9px;
    border-radius: 999px;
    color: rgba(255,255,255,0.6);
}
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { background: var(--teal); color: var(--navy-deep); }
.a11y-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}
.a11y-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.a11y-toggle-track {
    width: 34px;
    height: 19px;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s;
}
.a11y-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
}
.a11y-toggle input:checked + .a11y-toggle-track { background: var(--teal); }
.a11y-toggle input:checked + .a11y-toggle-track .a11y-toggle-thumb { transform: translateX(15px); }
.a11y-toggle input:focus-visible + .a11y-toggle-track { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
.a11y-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}
.a11y-toggle:hover .a11y-toggle-label { color: #fff; }

/* Режим повышенной доступности: крупный шрифт, максимальный контраст,
   убраны декоративные фоновые изображения и полупрозрачность текста. */
html.a11y-mode {
    font-size: 122%;
}
html.a11y-mode body {
    line-height: 1.7;
}
html.a11y-mode,
html.a11y-mode body {
    --ink: #000000;
    --navy: #000000;
    --navy-deep: #000000;
    --teal: #0b3fb3;
    --teal-bright: #0b3fb3;
    --paper: #ffffff;
    --surface: #ffffff;
    --line: #000000;
    --muted: #000000;
}
html.a11y-mode h1, html.a11y-mode h2, html.a11y-mode h3, html.a11y-mode h4 {
    font-family: var(--font-body);
}
html.a11y-mode a:not(.btn):not(.social-icon) {
    text-decoration: underline;
}
html.a11y-mode .card,
html.a11y-mode table,
html.a11y-mode .field input,
html.a11y-mode .field textarea,
html.a11y-mode .field select,
html.a11y-mode .btn-outline {
    border-width: 2px !important;
}
html.a11y-mode .btn {
    border: 2px solid #000 !important;
}
html.a11y-mode .hero-glow,
html.a11y-mode .hero-eyebrow svg,
html.a11y-mode .pulse-divider {
    display: none;
}
html.a11y-mode .hero {
    background: #000;
}
html.a11y-mode .band-dark p,
html.a11y-mode .hero-lead,
html.a11y-mode .site-footer,
html.a11y-mode .site-footer p,
html.a11y-mode .footer-bottom,
html.a11y-mode .breadcrumb {
    color: #ffffff !important;
    opacity: 1 !important;
}
html.a11y-mode .card:hover {
    transform: none;
    box-shadow: none;
}
html.a11y-mode .site-header {
    background: #ffffff;
}

/* ============================== FOOTER ============================== */

.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.75);
    padding: 56px 0 28px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--surface); font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer a:hover { color: var(--teal-bright); }
.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.social-icon svg { width: 19px; height: 19px; }
.social-icon:hover { background: var(--teal); color: var(--navy-deep); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 20px;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================== BREADCRUMB / PAGE HEADER ============================== */

.page-header {
    background: var(--navy-deep);
    color: var(--surface);
    padding: 56px 0 40px;
}
.page-header h1 { margin-bottom: 8px; }
.breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}
.breadcrumb a:hover { color: var(--teal-bright); }

/* ============================== UTILITIES ============================== */

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.small { font-size: 0.85rem; }
