/* ============================================
   ЭВЕРЕСТ — Стоматологическая клиника
   Стили
   ============================================ */

/* === ПЕРЕМЕННЫЕ === */
:root {
    --c-bg:        #f5f1ea;       /* кремовый фон */
    --c-bg-alt:    #ebe5da;       /* тёплый бежевый */
    --c-surface:   #fbf9f5;       /* поверхность карточек */
    --c-text:      #1a1f1e;       /* основной текст */
    --c-text-mute: #5a625e;       /* приглушённый */
    --c-text-dim:  #8a918d;       /* совсем тихий */
    --c-accent:    #1a4d4a;       /* deep teal — основной акцент */
    --c-accent-hover: #0f3633;
    --c-accent-soft: #d8e3df;     /* мягкий бирюзовый */
    --c-line:      #d8d2c5;       /* линии-разделители */
    --c-gold:      #b8956a;       /* акцент-нумерация */

    --font-display: 'TildaSans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body:    'TildaSans', -apple-system, BlinkMacSystemFont, sans-serif;

    --container:   1200px;
    --radius:      4px;
    --radius-lg:   12px;

    --shadow-sm:   0 1px 2px rgba(26,31,30,0.04), 0 2px 8px rgba(26,31,30,0.04);
    --shadow-md:   0 2px 4px rgba(26,31,30,0.05), 0 8px 24px rgba(26,31,30,0.08);
    --shadow-lg:   0 4px 8px rgba(26,31,30,0.06), 0 16px 48px rgba(26,31,30,0.12);

    --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { font: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }
ul { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* === КОНТЕЙНЕР === */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

/* === ТИПОГРАФИКА === */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--c-text);
}

/* === ШАПКА === */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(245, 241, 234, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(216, 210, 197, 0.4);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--c-accent);
    flex-shrink: 0;
}

.logo__mark {
    width: 32px;
    height: 32px;
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo__name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.logo__sub {
    font-size: 10px;
    color: var(--c-text-mute);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 3px;
}

.nav {
    display: flex;
    gap: 36px;
    flex: 1;
    justify-content: center;
}

.nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    position: relative;
    padding: 4px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 1px;
    background: var(--c-accent);
    transition: all var(--transition);
    transform: translateX(-50%);
}

.nav a:hover { color: var(--c-accent); }
.nav a:hover::after { width: 100%; }

.header__phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    flex-shrink: 0;
}

.header__phone-label {
    font-size: 10px;
    color: var(--c-text-mute);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.header__phone-num {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-accent);
}

.header__phone:hover .header__phone-num { color: var(--c-accent-hover); }

.burger {
    display: none;
    width: 32px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
}

.burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--c-text);
    transition: all var(--transition);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 20px 32px 32px;
    background: var(--c-bg);
    border-top: 1px solid var(--c-line);
}

.nav-mobile a {
    padding: 14px 0;
    font-size: 17px;
    font-weight: 500;
    border-bottom: 1px solid var(--c-line);
}

.nav-mobile a:last-child { border-bottom: 0; }

.nav-mobile__phone {
    color: var(--c-accent) !important;
    font-weight: 600 !important;
    margin-top: 12px;
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top right, rgba(216, 227, 223, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(184, 149, 106, 0.08) 0%, transparent 50%),
        var(--c-bg);
    z-index: -1;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero__content { max-width: 640px; }

.hero__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 640px;
    border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px;  /* арочная форма сверху */
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 1s ease-out 0.3s backwards;
}

.hero__photo::before {
    content: '';
    position: absolute;
    top: -16px;
    right: -16px;
    bottom: 16px;
    left: 16px;
    border: 1px solid var(--c-accent);
    border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px;
    z-index: -1;
    opacity: 0.4;
}

.hero__photo picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--c-text-mute);
    padding: 8px 16px;
    border: 1px solid var(--c-line);
    border-radius: 100px;
    margin-bottom: 32px;
    animation: fadeUp 0.8s ease-out backwards;
}

.hero__title {
    font-size: clamp(40px, 7vw, 84px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
    animation: fadeUp 0.8s ease-out 0.1s backwards;
}

.hero__title em {
    font-style: normal;
    color: var(--c-accent);
    font-weight: 600;
}

.hero__lead {
    font-size: 18px;
    line-height: 1.7;
    color: var(--c-text-mute);
    max-width: 560px;
    margin-bottom: 32px;
    animation: fadeUp 0.8s ease-out 0.2s backwards;
}

.hero__offer {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 560px;
    padding: 18px 22px;
    margin-bottom: 36px;
    background: var(--c-surface);
    border: 1px solid var(--c-accent-soft);
    border-left: 3px solid var(--c-accent);
    border-radius: var(--radius);
    animation: fadeUp 0.8s ease-out 0.25s backwards;
}

.hero__offer-icon {
    width: 36px;
    height: 36px;
    color: var(--c-accent);
    flex-shrink: 0;
}

.hero__offer-text {
    flex: 1;
    min-width: 0;
}

.hero__offer-title {
    font-size: 16px;
    line-height: 1.35;
    color: var(--c-text);
    font-weight: 500;
}

.hero__offer-title strong {
    font-weight: 700;
    color: var(--c-accent);
}

.hero__offer-sub {
    font-size: 13px;
    color: var(--c-text-mute);
    line-height: 1.4;
    margin-top: 3px;
}

.hero__cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 64px;
    animation: fadeUp 0.8s ease-out 0.3s backwards;
}

.hero__meta {
    display: flex;
    gap: 64px;
    flex-wrap: wrap;
    animation: fadeUp 0.8s ease-out 0.4s backwards;
}

.hero__meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero__meta-item strong {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    color: var(--c-accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero__meta-item span {
    font-size: 13px;
    color: var(--c-text-mute);
    letter-spacing: 0.05em;
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--c-accent);
    animation: bounce 2s infinite;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}

/* === КНОПКИ === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
}

.btn--primary {
    background: var(--c-accent);
    color: var(--c-bg);
}

.btn--primary:hover {
    background: var(--c-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--ghost {
    background: transparent;
    color: var(--c-text);
    border-color: var(--c-text);
}

.btn--ghost:hover {
    background: var(--c-text);
    color: var(--c-bg);
}

.btn--large { padding: 20px 40px; font-size: 16px; }
.btn--full  { width: 100%; }

/* === ЗАГОЛОВКИ СЕКЦИЙ === */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 24px;
}

.section-head__num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--c-gold);
    letter-spacing: 0.1em;
}

.section-head__title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.03em;
}

.section-lead {
    font-size: 18px;
    color: var(--c-text-mute);
    max-width: 720px;
    margin-bottom: 64px;
    line-height: 1.6;
}

/* === СЕКЦИЯ "О КЛИНИКЕ" === */
.about { padding: 120px 0; }

.about__text {
    max-width: 820px;
    margin: 0 auto 80px;
    text-align: center;
}

.about__text .lead {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 300;
    line-height: 1.4;
    color: var(--c-text);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.about__text p {
    color: var(--c-text-mute);
    font-size: 16px;
    line-height: 1.7;
}

/* === ПРЕИМУЩЕСТВА === */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature {
    padding: 40px 28px;
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-accent-soft);
}

.feature__icon {
    width: 56px;
    height: 56px;
    color: var(--c-accent);
    margin-bottom: 24px;
}

.feature h3 {
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.25;
}

.feature p {
    color: var(--c-text-mute);
    font-size: 15px;
    line-height: 1.6;
}

/* === УСЛУГИ / АККОРДЕОН === */
.services {
    padding: 120px 0;
    background: var(--c-bg-alt);
    position: relative;
}

.accordion {
    max-width: 920px;
    margin: 0 auto;
}

.accordion__item {
    border-bottom: 1px solid var(--c-line);
    transition: all var(--transition);
}

.accordion__item:first-child { border-top: 1px solid var(--c-line); }

.accordion__item summary {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px 0;
    cursor: pointer;
    list-style: none;
    transition: all var(--transition);
}

.accordion__item summary::-webkit-details-marker { display: none; }

.accordion__num {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--c-gold);
    flex-shrink: 0;
    width: 40px;
}

.accordion__title {
    flex: 1;
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 500;
    line-height: 1.2;
    transition: color var(--transition);
}

.accordion__icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--c-text);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition);
}

.accordion__icon::before,
.accordion__icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    background: var(--c-text);
    transition: all var(--transition);
}

.accordion__icon::before {
    width: 12px;
    height: 1px;
    transform: translate(-50%, -50%);
}

.accordion__icon::after {
    width: 1px;
    height: 12px;
    transform: translate(-50%, -50%);
}

.accordion__item[open] .accordion__title { color: var(--c-accent); }
.accordion__item[open] .accordion__icon  { background: var(--c-accent); border-color: var(--c-accent); }
.accordion__item[open] .accordion__icon::before { background: var(--c-bg); }
.accordion__item[open] .accordion__icon::after  { display: none; }

.accordion__item:hover summary { padding-left: 12px; }

.accordion__body {
    padding: 0 0 40px 72px;
    animation: fadeUp 0.4s ease-out;
}

.accordion__body p,
.accordion__body li {
    color: var(--c-text-mute);
    font-size: 16px;
    line-height: 1.7;
}

.accordion__body ul {
    list-style: none;
    padding: 0;
}

.accordion__body li {
    padding: 8px 0 8px 24px;
    position: relative;
}

.accordion__body li::before {
    content: '';
    position: absolute;
    left: 0; top: 18px;
    width: 12px;
    height: 1px;
    background: var(--c-accent);
}

/* === ЦЕНЫ — ПЛИТКИ === */
.prices { padding: 120px 0; }

.prices__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.price-tile {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 32px 28px;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    animation: fadeUp 0.5s ease-out backwards;
}

.price-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(26, 77, 74, 0.04) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.price-tile:hover {
    transform: translateY(-6px);
    border-color: var(--c-accent);
    box-shadow: var(--shadow-md);
}

.price-tile:hover::before { opacity: 1; }

.price-tile__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.price-tile__icon {
    width: 48px;
    height: 48px;
    color: var(--c-accent);
    transition: transform var(--transition);
}

.price-tile:hover .price-tile__icon {
    transform: scale(1.08) rotate(-2deg);
}

.price-tile__from {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--c-gold);
    letter-spacing: 0.02em;
    padding: 6px 12px;
    background: rgba(184, 149, 106, 0.1);
    border-radius: 100px;
    white-space: nowrap;
}

.price-tile__title {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--c-text);
}

.price-tile__short {
    font-size: 14px;
    color: var(--c-text-mute);
    line-height: 1.55;
    margin-bottom: 24px;
    flex: 1;
}

.price-tile__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: gap var(--transition);
}

.price-tile:hover .price-tile__more {
    gap: 14px;
}

.prices__note {
    text-align: center;
    color: var(--c-text-dim);
    font-size: 13px;
    font-style: italic;
}

/* === SLIDE-IN ПАНЕЛЬ === */
.panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.panel[hidden] { display: none; }

.panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 23, 21, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel--open .panel__backdrop { opacity: 1; }

.panel__sheet {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 560px;
    max-width: 100%;
    background: var(--c-bg);
    box-shadow: -16px 0 48px rgba(13, 23, 21, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}

.panel--open .panel__sheet { transform: translateX(0); }

.panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 36px 24px;
    border-bottom: 1px solid var(--c-line);
    flex-shrink: 0;
}

.panel__eyebrow {
    display: block;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--c-gold);
    margin-bottom: 8px;
}

.panel__title {
    font-size: 36px;
    line-height: 1.1;
    color: var(--c-accent);
}

.panel__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-mute);
    border: 1px solid var(--c-line);
    border-radius: 50%;
    transition: all var(--transition);
    flex-shrink: 0;
}

.panel__close:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    transform: rotate(90deg);
}

.panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 36px 32px;
    overscroll-behavior: contain;
}

.panel__lead {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.5;
    color: var(--c-text);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--c-line);
    margin-bottom: 24px;
}

.panel__section-title {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--c-accent);
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-line);
    line-height: 1.3;
}

.panel__section-title--small {
    font-size: 17px;
    color: var(--c-text-mute);
    margin-top: 28px;
}

.panel__section-title:first-of-type { margin-top: 0; }

.panel__intro {
    font-size: 14px;
    color: var(--c-text-mute);
    line-height: 1.6;
    margin-bottom: 16px;
    font-style: italic;
}

.panel__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel__list--small li { padding: 6px 0; }

.panel__list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 15px;
    line-height: 1.4;
    padding: 4px 0;
}

.panel__list-name {
    color: var(--c-text);
    flex-shrink: 1;
    min-width: 0;
}

.panel__list-name small {
    display: block;
    font-size: 12px;
    color: var(--c-text-dim);
    margin-top: 2px;
    font-style: italic;
}

.panel__list-dots {
    flex: 1;
    border-bottom: 1px dotted var(--c-line);
    transform: translateY(-4px);
    min-width: 16px;
    align-self: center;
}

.panel__list-price {
    color: var(--c-accent);
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.panel__foot {
    padding: 24px 36px 32px;
    border-top: 1px solid var(--c-line);
    background: var(--c-surface);
    flex-shrink: 0;
}

.panel__note {
    font-size: 12px;
    color: var(--c-text-dim);
    line-height: 1.5;
    margin-bottom: 16px;
    font-style: italic;
    text-align: center;
}

/* === ОБРАЗОВАНИЕ В ПАНЕЛИ === */
.edu-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
    align-items: start;
}

.edu-item:last-child { border-bottom: 0; }

.edu-item__year {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--c-accent);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.edu-item__text {
    font-size: 14px;
    color: var(--c-text);
    line-height: 1.6;
}

/* === КНОПКА СЛАБОВИДЯЩИХ === */
.header__a11y {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-mute);
    border: 1px solid var(--c-line);
    border-radius: 50%;
    transition: all var(--transition);
    flex-shrink: 0;
}

.header__a11y:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
    background: var(--c-accent-soft);
}

.nav-mobile__a11y {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text-mute);
    width: 100%;
    text-align: left;
}

.nav-mobile__a11y svg { color: var(--c-accent); }

/* === ПАНЕЛЬ ДОСТУПНОСТИ === */
.a11y-panel {
    position: fixed;
    top: 88px;
    right: 24px;
    width: 340px;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    z-index: 999;
    animation: a11yIn 0.25s ease-out;
}

.a11y-panel[hidden] { display: none; }

@keyframes a11yIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.a11y-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--c-line);
    margin-bottom: 20px;
}

.a11y-panel__head h2 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-text);
    margin: 0;
}

.a11y-panel__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-mute);
    border: 1px solid var(--c-line);
    border-radius: 50%;
    transition: all var(--transition);
    flex-shrink: 0;
}

.a11y-panel__close:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
}

.a11y-panel__group {
    margin-bottom: 18px;
}

.a11y-panel__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-text-mute);
    margin-bottom: 8px;
}

.a11y-panel__btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.a11y-panel__btns--themes {
    grid-template-columns: repeat(2, 1fr);
}

.a11y-panel__btns button {
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-text);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
    text-align: center;
}

.a11y-panel__btns button:hover {
    border-color: var(--c-accent);
}

.a11y-panel__btns button[aria-checked="true"] {
    background: var(--c-accent);
    color: var(--c-bg);
    border-color: var(--c-accent);
}

/* Цветовые схемы — превью прямо в кнопках */
.a11y-th--bw { background: #fff; color: #000; border-color: #000; }
.a11y-th--wb { background: #000; color: #fff; border-color: #000; }
.a11y-th--by { background: #f5e9c5; color: #1a1a1a; border-color: #1a1a1a; }
.a11y-th--bw[aria-checked="true"],
.a11y-th--wb[aria-checked="true"],
.a11y-th--by[aria-checked="true"] {
    box-shadow: 0 0 0 2px var(--c-accent);
}

.a11y-panel__toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.a11y-panel__check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--c-text);
    cursor: pointer;
    user-select: none;
}

.a11y-panel__check input { width: 16px; height: 16px; accent-color: var(--c-accent); }

.a11y-panel__reset {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-text-mute);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.a11y-panel__reset:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
}

/* === КЛАССЫ-МОДИФИКАТОРЫ ДОСТУПНОСТИ === */

/* Размер шрифта */
html.a11y-font-large       { font-size: 18px; }
html.a11y-font-xlarge      { font-size: 22px; }
html.a11y-font-large body,
html.a11y-font-xlarge body { font-size: 1rem; }   /* фиксируем body относительно html */

/* Чёрно-белая (на белом) */
html.a11y-theme-bw {
    --c-bg:        #ffffff;
    --c-bg-alt:    #ffffff;
    --c-surface:   #ffffff;
    --c-text:      #000000;
    --c-text-mute: #000000;
    --c-text-dim:  #333333;
    --c-accent:    #000000;
    --c-accent-hover: #000000;
    --c-accent-soft: #e0e0e0;
    --c-line:      #000000;
    --c-gold:      #000000;
}

/* Белая на чёрном */
html.a11y-theme-wb {
    --c-bg:        #000000;
    --c-bg-alt:    #000000;
    --c-surface:   #000000;
    --c-text:      #ffffff;
    --c-text-mute: #ffffff;
    --c-text-dim:  #cccccc;
    --c-accent:    #ffffff;
    --c-accent-hover: #ffffff;
    --c-accent-soft: #333333;
    --c-line:      #ffffff;
    --c-gold:      #ffffff;
}

/* Бежевый/чёрный — щадящий вариант */
html.a11y-theme-by {
    --c-bg:        #f5e9c5;
    --c-bg-alt:    #f5e9c5;
    --c-surface:   #f5e9c5;
    --c-text:      #1a1a1a;
    --c-text-mute: #1a1a1a;
    --c-text-dim:  #444444;
    --c-accent:    #1a1a1a;
    --c-accent-hover: #1a1a1a;
    --c-accent-soft: #d8c896;
    --c-line:      #1a1a1a;
    --c-gold:      #1a1a1a;
}

/* В режимах a11y отключаем декоративные тени, бейдж теряет «спецэффекты» */
html[class*="a11y-theme-"] .doctor-feature,
html[class*="a11y-theme-"] .feature,
html[class*="a11y-theme-"] .price-tile,
html[class*="a11y-theme-"] .modal__window,
html[class*="a11y-theme-"] .panel__sheet,
html[class*="a11y-theme-"] .a11y-panel,
html[class*="a11y-theme-"] .contacts__map,
html[class*="a11y-theme-"] .doctor-feature__badge {
    box-shadow: none;
}

html[class*="a11y-theme-"] .hero__bg,
html[class*="a11y-theme-"] .hero__photo::before,
html[class*="a11y-theme-"] .cta-band::before {
    background: transparent;
}

html[class*="a11y-theme-"] .hero__photo {
    border-radius: var(--radius);
}

/* Скрыть изображения */
html.a11y-no-images img,
html.a11y-no-images picture,
html.a11y-no-images .hero__photo,
html.a11y-no-images .doctor-feature__photo {
    display: none !important;
}

html.a11y-no-images .doctor-feature {
    grid-template-columns: 1fr;
}

/* Увеличенный интервал между букв */
html.a11y-letterspacing,
html.a11y-letterspacing * {
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

/* Кнопка a11y подсвечивается когда панель открыта */
.header__a11y[aria-expanded="true"] {
    background: var(--c-accent);
    color: var(--c-bg);
    border-color: var(--c-accent);
}

/* === ВРАЧ — БЛОК-ГЕРОЙ === */
.specialists {
    padding: 120px 0;
    background: var(--c-bg-alt);
}

.doctor-feature {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.doctor-feature__photo {
    position: relative;
    background: var(--c-line);
    /* колонка фото подстраивается под высоту info-колонки */
    min-height: 480px;
}

.doctor-feature__photo picture {
    position: absolute;
    inset: 0;
    display: block;
}

.doctor-feature__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transition: transform 0.6s ease;
}

.doctor-feature:hover .doctor-feature__photo img {
    transform: scale(1.03);
}

.doctor-feature__badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background: var(--c-accent);
    color: var(--c-bg);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.doctor-feature__badge span {
    display: block;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.doctor-feature__badge small {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    font-weight: 500;
}

.doctor-feature__info {
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;                    /* позволяет grid-item сжиматься */
}

.doctor-feature__role {
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--c-gold);
    margin-bottom: 20px;
    font-weight: 600;
}

.doctor-feature__name {
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--c-text);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.doctor-feature__specs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
    padding: 0;
}

.doctor-feature__specs li {
    font-size: 16px;
    color: var(--c-text);
    padding: 0 0 0 24px;
    position: relative;
    line-height: 1.5;
}

.doctor-feature__specs li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 14px;
    height: 1px;
    background: var(--c-accent);
}

.doctor-feature__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* === CTA-BAND === */
.cta-band {
    padding: 80px 0;
    background: var(--c-accent);
    color: var(--c-bg);
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(184,149,106,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
    position: relative;
}

.cta-band h2 {
    color: var(--c-bg);
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 12px;
    line-height: 1.15;
}

.cta-band p {
    color: rgba(245, 241, 234, 0.8);
    font-size: 16px;
}

.cta-band .btn--primary {
    background: var(--c-bg);
    color: var(--c-accent);
}

.cta-band .btn--primary:hover {
    background: var(--c-surface);
    color: var(--c-accent-hover);
}

/* === КОНТАКТЫ === */
.contacts { padding: 120px 0; }

.contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
}

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

.contact-item__label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--c-text-dim);
    margin-bottom: 8px;
}

.contact-item p {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.4;
    color: var(--c-text);
}

.contact-item a:hover { color: var(--c-accent); }

.contacts__map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 480px;
    background: var(--c-bg-alt);
    box-shadow: var(--shadow-md);
}

.contacts__map iframe { display: block; }

/* === FOOTER === */
.footer {
    background: #0d1715;
    color: rgba(245, 241, 234, 0.7);
    padding: 80px 0 24px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(245, 241, 234, 0.1);
}

.footer__brand .logo__name {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--c-bg);
    display: block;
    margin-bottom: 12px;
}

.footer__brand p {
    font-size: 14px;
    line-height: 1.6;
}

.footer__col h4 {
    color: var(--c-bg);
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer__col a, .footer__col span {
    display: block;
    font-size: 14px;
    margin-bottom: 12px;
    color: rgba(245, 241, 234, 0.7);
}

.footer__col a:hover { color: var(--c-bg); }

.footer__bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(245, 241, 234, 0.4);
}

/* === МОДАЛЬНОЕ ОКНО === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal[hidden] { display: none; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 23, 21, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal__window {
    position: relative;
    background: var(--c-bg);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
    position: absolute;
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-mute);
    border-radius: 50%;
    transition: all var(--transition);
}

.modal__close:hover { background: var(--c-line); color: var(--c-text); }

.modal__content { padding: 48px 40px; }

.modal__content h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.modal__lead {
    color: var(--c-text-mute);
    font-size: 15px;
    margin-bottom: 32px;
}

/* === ФОРМА === */
.form { display: flex; flex-direction: column; gap: 18px; }

.form__group { display: flex; flex-direction: column; gap: 6px; }

.form__group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-mute);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form__optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--c-text-dim);
}

.form__group input,
.form__group select,
.form__group textarea {
    padding: 14px 16px;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all var(--transition);
    font-family: var(--font-body);
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
    outline: none;
    border-color: var(--c-accent);
    background: var(--c-bg);
}

.form__group input.invalid,
.form__group select.invalid {
    border-color: #c74d4d;
    background: rgba(199, 77, 77, 0.05);
}

.form__group textarea { resize: vertical; min-height: 80px; }

.form__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--c-text-mute);
    line-height: 1.5;
    margin-top: 4px;
    cursor: pointer;
}

.form__check input { margin-top: 3px; flex-shrink: 0; }
.form__check a { color: var(--c-accent); text-decoration: underline; }

.form__status {
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: center;
    display: none;
}

.form__status.success {
    display: block;
    background: rgba(26, 77, 74, 0.1);
    color: var(--c-accent);
    border: 1px solid var(--c-accent-soft);
}

.form__status.error {
    display: block;
    background: rgba(199, 77, 77, 0.1);
    color: #c74d4d;
    border: 1px solid rgba(199, 77, 77, 0.3);
}

/* === АДАПТИВ === */
@media (max-width: 1024px) {
    .features      { grid-template-columns: repeat(2, 1fr); }
    .prices__grid  { grid-template-columns: repeat(2, 1fr); }
    .footer__inner { grid-template-columns: 1fr 1fr; }

    .hero__inner   { grid-template-columns: 1fr; gap: 48px; }
    .hero__photo   { max-width: 480px; max-height: 540px; margin: 0 auto; aspect-ratio: 4/5; }

    .doctor-feature {
        grid-template-columns: 1fr;
    }
    .doctor-feature__photo { min-height: 0; aspect-ratio: 16 / 10; max-height: 480px; }
    .doctor-feature__photo img { object-position: center 30%; }
    .doctor-feature__info  { padding: 48px; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }

    .header__inner { height: 64px; gap: 12px; }
    .nav { display: none; }
    .header__phone { display: none; }
    .header__a11y { width: 36px; height: 36px; }
    .burger { display: flex; }
    .nav-mobile { display: flex; }
    .nav-mobile[hidden] { display: none; }

    .hero { min-height: auto; padding: 120px 0 60px; }
    .hero__title { font-size: clamp(36px, 9vw, 56px); }
    .hero__lead { font-size: 16px; margin-bottom: 24px; }
    .hero__offer { padding: 14px 16px; gap: 12px; margin-bottom: 28px; }
    .hero__offer-icon { width: 28px; height: 28px; }
    .hero__offer-title { font-size: 14px; }
    .hero__offer-sub { font-size: 12px; }
    .hero__cta { flex-direction: column; margin-bottom: 48px; }
    .hero__cta .btn { width: 100%; }
    .hero__meta { gap: 32px; }
    .hero__meta-item strong { font-size: 26px; }
    .hero__scroll { display: none; }
    .hero__photo { max-width: 100%; aspect-ratio: 4/3; max-height: 360px; }
    .hero__photo::before { display: none; }

    .about, .services, .prices, .specialists, .contacts { padding: 80px 0; }

    .section-head { gap: 16px; flex-wrap: wrap; }
    .section-lead { font-size: 16px; margin-bottom: 40px; }

    .features      { grid-template-columns: 1fr; gap: 16px; }
    .prices__grid  { grid-template-columns: 1fr; gap: 16px; }
    .price-tile    { min-height: auto; padding: 28px 24px; }
    .contacts__grid { grid-template-columns: 1fr; gap: 40px; }
    .contacts__map { min-height: 360px; }

    .accordion__item summary { gap: 16px; padding: 24px 0; }
    .accordion__num { width: auto; font-size: 12px; }
    .accordion__body { padding-left: 0; }

    .cta-band { padding: 60px 0; }
    .cta-band__inner { flex-direction: column; text-align: center; gap: 32px; }
    .cta-band .btn { width: 100%; }

    /* Врач */
    .doctor-feature__photo { aspect-ratio: 4 / 3; }
    .doctor-feature__info  { padding: 32px 24px 36px; }
    .doctor-feature__name  { font-size: 28px; margin-bottom: 24px; }
    .doctor-feature__specs li { font-size: 15px; }
    .edu-item { grid-template-columns: 70px 1fr; gap: 12px; }
    .edu-item__year { font-size: 15px; }
    .edu-item__text { font-size: 13px; }
    .doctor-feature__badge { padding: 10px 14px; }
    .doctor-feature__badge span { font-size: 20px; }
    .doctor-feature__badge small { font-size: 9px; }
    .doctor-feature__actions { flex-direction: column; align-items: stretch; }
    .doctor-feature__actions .btn { width: 100%; }

    /* Панель доступности на мобиле — на весь экран снизу */
    .a11y-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Slide-in панель */
    .panel__sheet  { width: 100%; }
    .panel__head   { padding: 24px 20px 20px; }
    .panel__title  { font-size: 28px; }
    .panel__body   { padding: 20px 20px 24px; }
    .panel__lead   { font-size: 16px; }
    .panel__section-title { font-size: 19px; margin-top: 24px; }
    .panel__list li { font-size: 14px; flex-wrap: wrap; }
    .panel__list-name { flex-basis: 100%; margin-bottom: 4px; }
    .panel__list-dots { display: none; }
    .panel__list-price { margin-left: auto; font-size: 15px; }
    .panel__foot   { padding: 20px; }

    .footer__inner { grid-template-columns: 1fr; gap: 32px; }
    .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }

    .modal__content { padding: 40px 24px; }
    .modal__content h2 { font-size: 26px; }
}

/* === A11Y === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 2px;
}
