/* Обнуление и база */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Палитра как на https://xn--80ajfggzjgq0i5a.xn--p1ai/ — бирюза, фон #ebf6fb, акценты #00a1b6 / #009ab2 */
:root {
    --color-bg: #ebf6fb;
    --color-surface: #ffffff;
    --color-text: #222222;
    --color-text-muted: #4a6570;
    --color-accent: #00a1b6;
    --color-accent-hover: #008fa3;
    --color-accent-bar: #009ab2;
    --color-accent-deep: #10798b;
    --color-border: #c5e0eb;
    --shadow-soft: 0 8px 30px rgba(0, 90, 105, 0.1);
    --radius: 12px;
    --header-h: 72px;
    --font-sans: 'TildaSans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --weight-heading: 300;
    --weight-heading-tight: 400;
    --weight-body: 400;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--weight-body);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

main section[id],
.contacts {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    width: 100%;
    background: var(--color-surface);
    border-top: 3px solid var(--color-accent-bar);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--header-h);
}

.header__container {
    padding-top: 14px;
    padding-bottom: 14px;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text);
    flex-shrink: 0;
}

.header__brand:hover .header__logo-text {
    color: var(--color-accent);
}

.header__logo-img {
    display: block;
    height: 42px;
    width: auto;
    object-fit: contain;
}

.header__logo-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.02em;
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
}

.header__burger:hover {
    background: var(--color-bg);
}

.header__burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    margin: 0 auto;
    transition: transform 0.2s, opacity 0.2s;
}

.header__menu .menu__list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.menu__link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.menu__link:hover {
    color: var(--color-accent);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header__phone {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.header__btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* Hero */
.hero {
    padding: 56px 0 64px;
    background: linear-gradient(160deg, #d4eef5 0%, var(--color-bg) 55%, var(--color-bg) 100%);
}

.hero__label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.hero__title {
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    font-weight: var(--weight-heading);
    line-height: 1.15;
    max-width: 20ch;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero__text {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 52ch;
    margin-bottom: 28px;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn--primary {
    background: var(--color-accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn--ghost {
    background: transparent;
    color: var(--color-accent);
    border-color: rgba(0, 161, 182, 0.45);
}

.btn--ghost:hover {
    background: rgba(0, 161, 182, 0.08);
}

/* Секции общие */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.05rem);
    font-weight: var(--weight-heading);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-lead {
    color: var(--color-text-muted);
    max-width: 60ch;
    margin-bottom: 32px;
}

/* Сегменты */
.segments {
    padding: 64px 0;
}

.segment-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.segment-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.segment-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
}

.segment-card__text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Процедура */
.procedure {
    padding: 64px 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.procedure__lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 32px;
    max-width: 40ch;
    letter-spacing: -0.01em;
}

.procedure-block {
    margin-bottom: 36px;
}

.procedure-block:last-child {
    margin-bottom: 0;
}

.procedure-block__title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.procedure-block p {
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.procedure-block p:last-child {
    margin-bottom: 0;
}

.procedure-list {
    margin-top: 12px;
    padding-left: 1.25rem;
    color: var(--color-text-muted);
}

.procedure-list li {
    margin-bottom: 12px;
}

.procedure-list li:last-child {
    margin-bottom: 0;
}

.procedure-list strong {
    color: var(--color-text);
}

/* Эксперт */
.expert {
    padding: 64px 0;
}

.expert-card {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 32px;
    background: transparent;
    border-radius: var(--radius);
    border: none;
    overflow: visible;
    box-shadow: none;
    align-items: stretch;
}

.expert-card__figure {
    margin: 0;
    background: transparent;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 28px; /* Выравниваем по верхнему краю текста (отступ 28px) */
    min-height: 100%;
}

.expert-card__photo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center top;
}

.expert-card__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.expert-card__header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, #e8f6fa 0%, var(--color-surface) 100%);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.expert-card__name {
    font-size: 1.35rem;
    font-weight: var(--weight-heading-tight);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 6px;
}

.expert-card__role {
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.expert-card__creds {
    list-style: disc;
    padding-left: 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.expert-card__creds li {
    margin-bottom: 8px;
}

.expert-card__body {
    padding: 28px;
}

.expert-card__body p {
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.expert-card__body p:last-child {
    margin-bottom: 0;
}

.expert-card__question {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .expert-card {
        grid-template-columns: 1fr;
    }

    .expert-card__figure {
        max-height: 420px;
        align-items: center;
    }

    .expert-card__photo {
        max-height: 400px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}

/* Сертификаты */
.certificates {
    padding: 64px 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.certificates__grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    align-items: start;
}

.certificates__link {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.certificates__link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.certificates__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Отзывы */
.reviews {
    padding: 64px 0;
}

.reviews__inner {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}



/* Контакты */
.contacts {
    padding: 64px 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.contacts__grid {
    display: grid;
    gap: 28px;
    align-items: start;
}

@media (min-width: 640px) {
    .contacts__grid {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

.contacts__address {
    font-style: normal;
    color: var(--color-text-muted);
}

.contacts__address p {
    margin-bottom: 10px;
}

.contacts__address p:last-child {
    margin-bottom: 0;
}

.contacts__address a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}

.contacts__address a:hover {
    text-decoration: underline;
}

.contacts__cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contacts__map {
    margin-top: 36px;
    height: 380px;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    background: #d8eef4;
}

.contacts__map iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Футер */
.footer {
    padding: 28px 0;
    background: var(--color-accent-deep);
    color: #b8dde5;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer__logo {
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer__link {
    color: #e2f4f8;
    text-decoration: none;
    font-size: 0.95rem;
}

.footer__link:hover {
    color: #fff;
}

.footer__site {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Мобильное меню */
@media (max-width: 992px) {
    .header__inner {
        position: relative;
    }

    .header__logo-text {
        order: 0;
    }

    .header__actions {
        order: 2;
        margin-left: auto;
    }

    .header__burger {
        display: flex;
        order: 3;
        margin-left: 8px;
    }

    .header__menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-surface);
        padding: 24px 20px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        border-top: 1px solid var(--color-border);
        overflow-y: auto;
        z-index: 999;
    }

    .header__menu.is-open {
        transform: translateX(0);
    }

    .header__menu .menu__list {
        flex-direction: column;
        gap: 0;
    }

    .header__menu .menu__list li {
        border-bottom: 1px solid var(--color-border);
    }

    .header__menu .menu__link {
        display: block;
        padding: 16px 0;
        font-size: 1.05rem;
    }

    .header__phone {
        font-size: 0.9rem;
    }
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 992px) {
    .header.is-open .header__burger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .header.is-open .header__burger-line:nth-child(2) {
        opacity: 0;
    }

    .header.is-open .header__burger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 576px) {
    .header__btn {
        display: none;
    }

    .header__brand {
        gap: 8px;
    }

    .header__logo-img {
        height: 34px;
    }

    .header__logo-text {
        font-size: 0.95rem;
    }

    .hero__cta .btn {
        width: 100%;
    }
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.modal.is-active {
    opacity: 1;
    visibility: visible;
}

.modal__dialog {
    background: var(--color-surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal.is-active .modal__dialog {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    color: var(--color-accent);
}

.modal__content {
    padding: 32px;
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.modal__lead {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f7fbfe;
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 161, 182, 0.15);
}

.form-submit {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    font-size: 1.05rem;
}

.booking-success {
    text-align: center;
    padding: 20px 0;
}

.booking-success__title {
    font-size: 1.25rem;
    color: var(--color-accent);
    margin-bottom: 8px;
}

/* Лайтбокс сертификатов */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox__img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox__btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.lightbox__prev {
    left: 20px;
}

.lightbox__next {
    right: 20px;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.lightbox__close:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .lightbox__btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.4);
    }
    .lightbox__prev { left: 10px; }
    .lightbox__next { right: 10px; }
    .lightbox__close { top: 10px; right: 15px; font-size: 36px; }
    .lightbox__img { max-height: 80vh; }
}