/* Новая версия ortwill.ru — доработка дизайн-системы темы afina.
   Цвета и шрифт — из темы: синий #2365DB, васильковый #6A96E5 / #5C7BC1, серебристый #F5F7FF, Gotham Pro. */

:root {
    --rd-blue: var(--color-blue, #2365DB);
    --rd-blue-deep: #1A4FB5;
    --rd-cornflower: var(--cornflower-light, #6A96E5);
    --rd-silver: var(--silver, #F5F7FF);
    --rd-line: #E3E5EE;
    --rd-ink: var(--color-black, #070808);
    --rd-muted: var(--color-gray, #72778F);
    --rd-radius: 1rem;
    --rd-radius-sm: 0.5rem;
    --rd-shadow: 0 1px 2px rgba(18, 38, 82, .04), 0 8px 24px rgba(18, 38, 82, .06);
    --rd-shadow-hover: 0 2px 4px rgba(18, 38, 82, .05), 0 16px 32px rgba(35, 101, 219, .12);
    --rd-ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; }
/* Тема задаёт шрифт не всем элементам — новым блокам явно. */
.rd-monogram, .rd-equation, .rd-review-site, .rd-icon { font-family: 'Gotham Pro', Arial, sans-serif; }
/* Слайдеры и ленты ссылок темы вылезают за край на пару пикселей — горизонтальной прокрутки быть не должно. */
html:has(body.rd) { overflow-x: clip; }
body.rd { overflow-x: clip; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(35, 101, 219, .18); }

/* Фокус с клавиатуры виден везде. */
.rd a:focus-visible, .rd button:focus-visible, .rd input:focus-visible, .rd textarea:focus-visible, .rd [tabindex]:focus-visible {
    outline: 3px solid var(--rd-cornflower);
    outline-offset: 3px;
    border-radius: var(--rd-radius-sm);
}

/* Заголовки: плотнее и ровнее. */
.rd h1, .rd h2 { letter-spacing: -0.015em; text-wrap: balance; }
.rd h3, .rd h4 { text-wrap: balance; }
.rd p { text-wrap: pretty; }

/* Кнопки темы: одинаковые скругления и мягкие переходы. */
.rd .header__center-info-btn a,
.rd .home-preview__container-top-item-btn a,
.rd .come-contacts-text-item-btn a,
.rd .home-about-item-text > a,
.rd .doctor-view-content-name-job-title a,
.rd a.js-modal {
    border-radius: var(--rd-radius-sm);
    transition: background-color .2s var(--rd-ease), color .2s var(--rd-ease), box-shadow .2s var(--rd-ease), transform .2s var(--rd-ease);
}
.rd .header__center-info-btn a:hover,
.rd .home-preview__container-top-item-btn a:hover,
.rd .come-contacts-text-item-btn a:hover,
.rd a.js-modal:hover { transform: translateY(-1px); }

/* Карточки: единое скругление, тень и отклик. */
.rd .advantages__container-item,
.rd .home-come-item, .rd [class*="come__container-item"],
.rd .services-orthodontics__container-item,
.rd .example__container-info,
.rd .news-item .news-item__content,
.rd .care-item-info,
.rd .service-view-info-content-advantages-item {
    border-radius: var(--rd-radius);
}
.rd a.doctor, .rd a.services-orthodontics__container-item, .rd a.news-item,
.rd .home-services a, .rd [class*="services__container"] a {
    transition: transform .25s var(--rd-ease), box-shadow .25s var(--rd-ease);
}
.rd a.services-orthodontics__container-item:hover,
.rd a.news-item:hover .news-item__content { box-shadow: var(--rd-shadow-hover); }
.rd a.services-orthodontics__container-item:hover { transform: translateY(-3px); }
.rd a.doctor:hover .doctor-img { box-shadow: var(--rd-shadow-hover); }
.rd .doctor-img, .rd .doctor-view-img { border-radius: var(--rd-radius); transition: box-shadow .25s var(--rd-ease); }
.rd .doctor-img img, .rd .doctor-view-img img { border-radius: var(--rd-radius); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Первые экраны без фото: фирменный фон и текст ---------- */
.rd-hero { position: relative; overflow: hidden; border-radius: var(--rd-radius); }

.rd-hero--blue {
    background-color: var(--rd-blue) !important;
    background-image:
        radial-gradient(120% 90% at 100% 0%, rgba(106, 150, 229, .55) 0%, rgba(106, 150, 229, 0) 60%),
        linear-gradient(160deg, var(--rd-blue) 0%, var(--rd-blue-deep) 100%) !important;
    color: #fff;
}
.home-preview__container-top-item.rd-hero--blue { min-height: 31rem; }
.rd-hero--blue .home-preview__container-top-item-text h2 { font-size: clamp(2.6rem, 2rem + 2.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em; }
.rd-hero--blue .home-preview__container-top-item-text p { opacity: .92; width: auto; max-width: 26ch; }
.rd-hero--blue .home-preview__container-top-item-btn a { box-shadow: 0 10px 30px rgba(9, 30, 80, .25); }

.rd-hero--light {
    background: var(--rd-silver) !important;
    border: 1px solid var(--rd-line) !important;
    color: var(--rd-blue);
}
.rd-hero--light .home-preview__container-top-item-text p {
    background: transparent !important; box-shadow: none !important; padding: 0 !important;
    color: var(--rd-ink) !important; max-width: 16ch;
}

.installment-preview-info.rd-hero--blue { min-height: 22rem; }
.installment-preview-info.rd-hero--blue h3, .installment-preview-info.rd-hero--blue p { color: #fff; }
.installment-preview-info.rd-hero--blue .installment-preview-info-text { max-width: 40rem; }

/* Плитки под первым экраном: высота по содержимому, чтобы заголовок не прилипал к краю. */
.rd .link-to-elainer {
    border-radius: var(--rd-radius); overflow: hidden;
    aspect-ratio: auto; max-height: none; min-height: 18.75rem;
    padding: 2.5rem 2rem; gap: 2.5rem;
}
.rd .elainer-img.rd-tile {
    background: #fff;
    border: 1px solid var(--rd-line);
    box-shadow: var(--rd-shadow);
}
.rd .elainer-img.rd-tile .home-preview__container-bottom-text h3 { color: var(--rd-blue) !important; }

@media (max-width: 1000px) {
    .home-preview__container-top-item.rd-hero--blue { min-height: 0; gap: 2.5rem; padding-bottom: 2rem; }
    /* Тема прятала подпись на телефоне (её заменяло фото) — без фото показываем. */
    .rd-hero--light .home-preview__container-top-item-text-right p { display: block !important; margin-bottom: 2rem; }
    .home-preview__container-top-item.rd-hero--light { height: auto !important; aspect-ratio: auto; padding-bottom: 2rem; gap: 1.5rem; }
    .installment-preview-info.rd-hero--blue { min-height: 0; padding-bottom: 2.5rem; }
}

/* ---------- «Работа команды = отличный результат» вместо видео ---------- */
.rd-equation {
    display: flex; flex-direction: column; justify-content: center; gap: 1.75rem;
    padding: clamp(2rem, 1rem + 3vw, 4rem);
    border-radius: var(--rd-radius);
    background: var(--rd-silver);
    border: 1px solid var(--rd-line);
    min-height: 100%;
}
.rd-equation__line {
    display: flex; flex-direction: column; gap: .25rem;
    font-size: clamp(1.9rem, 1.2rem + 1.8vw, 3.2rem); font-weight: 700; line-height: 1.05;
    letter-spacing: -0.02em; color: var(--rd-ink); margin: 0;
}
.rd-equation__line b { color: var(--rd-blue); font-size: 1.5em; line-height: .9; font-weight: 500; }
.rd-equation__note { color: var(--rd-muted); font-size: 1.125rem; line-height: 1.5; max-width: 36ch; margin: 0; }

/* ---------- Врач без фото ---------- */
.rd-monogram {
    position: relative; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #F5F7FF 0%, #E4EBFB 100%);
    border-radius: inherit; overflow: hidden;
}
.rd-monogram span {
    font-weight: 700; color: var(--rd-blue); letter-spacing: .02em;
    font-size: clamp(2.4rem, 1.6rem + 2vw, 3.6rem); line-height: 1;
}
.rd-monogram i {
    position: absolute; left: 22%; right: 22%; bottom: 20%; height: .7rem;
    border-top: 2px solid rgba(35, 101, 219, .35); border-bottom: 2px solid rgba(35, 101, 219, .35);
}
.rd-monogram--lg span { font-size: clamp(4rem, 2rem + 6vw, 8rem); }
.rd-monogram--lg i { height: 1.1rem; bottom: 22%; left: 30%; right: 30%; }

/* ---------- Иконки преимуществ ---------- */
.rd-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.75rem; height: 3.75rem; border-radius: 50%;
    background: rgba(35, 101, 219, .08); color: var(--rd-blue);
}
.rd-icon svg { width: 2rem; height: 2rem; }

/* ---------- Отзывы на площадках ---------- */
.rd-review-sites .item a { display: block; height: 100%; text-decoration: none; }
.rd-review-site {
    display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
    height: 100%; min-height: 9rem; padding: 1.75rem;
    border-radius: var(--rd-radius); background: var(--rd-silver); border: 1px solid var(--rd-line);
    transition: background-color .2s var(--rd-ease), border-color .2s var(--rd-ease);
}
.rd-review-site b { font-size: 1.6rem; font-weight: 700; color: var(--rd-ink); }
.rd-review-site span { color: var(--rd-blue); font-size: 1.05rem; }
.rd-review-site span::after { content: " →"; }
.rd-review-sites .item a:hover { opacity: 1 !important; }
.rd-review-sites .item a:hover .rd-review-site { background: #fff; border-color: var(--rd-cornflower); }

/* ---------- Блоки, оставшиеся без фото ---------- */
.example__container-info.rd-noimg { display: block; }
.example__container-info.rd-noimg .example__container-info-text-items {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); column-gap: 5rem; row-gap: 2rem; align-items: start;
}
.example__container-info.rd-noimg .example__container-info-text-item:nth-child(2) { grid-row: span 2; }
@media (max-width: 1000px) {
    .example__container-info.rd-noimg .example__container-info-text-items { grid-template-columns: none; }
    .example__container-info.rd-noimg .example__container-info-text-item:nth-child(2) { grid-row: auto; }
}
.rd .example__container-info { border: 1px solid var(--rd-line); }

a.news-item.rd-noimg .news-item__content { min-height: 15rem; justify-content: space-between; gap: 3rem; }
a.news-item.rd-noimg .news-item__title { font-weight: 500; }
a.news-item.rd-noimg .news-item__read { color: var(--rd-blue); }
a.news-item.rd-noimg .news-item__read::after { content: " →"; }

a.services-orthodontics__container-item.rd-noimg { display: flex; flex-direction: column; justify-content: space-between; min-height: 11rem; border: 1px solid var(--rd-line); }

.high-quality-preview.rd-noimg { display: block; }
.high-quality-preview.rd-noimg .high-quality-preview-text { max-width: 62rem; }
.splide__slide-innovative-equipment-info.rd-noimg { display: block; }
.about-preview__container.rd-noimg h1 { margin-bottom: 0; }

.rd .service_section_block:not(:has(.service_section_block_images)):not(:has(.service_section_block_video)) { display: block; }
.rd .service_section_block:not(:has(.service_section_block_images)):not(:has(.service_section_block_video)) .service_section_block_text { max-width: 62rem; }

/* Карта на контактах: скругление и тень. */
.rd .come-contacts-map iframe { border-radius: var(--rd-radius); box-shadow: var(--rd-shadow); max-width: 100%; }

/* ---------- Хлебные крошки: перенос целыми пунктами ---------- */
.rd .breadcrumb__container { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .5rem; row-gap: .25rem; }

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
    /* Чтение: ровный кегль и воздух между строк. */
    .rd p, .rd li { line-height: 1.5; }

    /* Мелкий серый текст в карточках (было 14px) — до 16px и чуть темнее. */
    .rd .advantages__container-item-text p,
    .rd .care-item-info-text p,
    .rd .service-view-info-content-advantages-item-text p,
    .rd .doctor-view-basic-information-bottom p,
    .rd .team__container-info-chief-physician-info p { font-size: 1rem; color: #575C75; }
    .rd .header-top-mobile p { font-size: .8125rem; line-height: 1.35; }
    .rd form button, .rd form [type="submit"] { font-size: 1rem; }
    .rd form > p, .rd .installment-form__container > p { font-size: .875rem; line-height: 1.45; }

    /* Длинные абзацы по 24px на телефоне тяжелы — 18px. */
    .rd .team__container-description p,
    .rd .awards__container-text p,
    .rd .service_type-info-text p,
    .rd .services-orthodontics__container-text p,
    .rd .jobs-info-text p,
    .rd .what-cost-of-treatment__container p,
    .rd .__the_content p,
    .rd .__the_content li,
    .rd .sign-up-doctor-text p { font-size: 1.125rem; }
    .rd .__the_content blockquote p { font-size: 1.1875rem; }
    .rd .price-list-info-tab p { font-size: 1.125rem; }

    /* Заголовки разделов чуть крупнее (было 24px). */
    .rd h2 { font-size: 1.6875rem; line-height: 1.18; }

    /* Карточки-ссылки на услуги: компактная строка «название → стрелка» вместо высокой плитки. */
    .rd .services-item {
        flex-direction: row !important; align-items: center; justify-content: space-between;
        gap: 1rem; min-height: 0 !important; height: auto !important; padding: 1.125rem 1.25rem !important;
    }
    .rd .services-item .services-item-svg { flex: none; margin: 0 !important; }
    .rd .other-services-item { gap: 1.5rem; padding: 1.5rem; }
    .rd .other-services-item-bottom-info p { font-size: 1rem; color: var(--rd-blue); }
    .rd a.services-orthodontics__container-item.rd-noimg { min-height: 0; gap: 1.25rem; }

    /* Преимущества: иконка над текстом, текст на всю ширину. */
    .rd .service-view-info-content-advantages-item { flex-direction: column; gap: 1rem; }

    /* Ленты якорных ссылок («Показания / Лечение / …») переносятся, а не обрезаются. */
    .rd [class*="content-links"] ul { flex-wrap: wrap; overflow: visible; row-gap: .75rem; column-gap: 1.25rem; }

    /* Тема на телефоне ставила grid-template-columns: none — колонка растягивалась по самому длинному
       неразрывному названию и вылезала за экран. */
    .rd .services-orthodontics__container-items, .rd .sign-up__container { grid-template-columns: minmax(0, 1fr); }
    .rd a.news-item, .rd .news-item__content { min-width: 0; }
    /* На «Прайсе» контейнер вложен в контейнер — двойные поля сужали блок записи к врачу. */
    .rd .container .container { padding-left: 0; padding-right: 0; }
    .rd .sign-up-doctors { min-width: 0; max-width: 100%; }
    .rd .kt-anchors ul { flex-wrap: wrap; overflow: visible; row-gap: .75rem; column-gap: 1.25rem; }
    .rd .page__container a, .rd .__the_content a { overflow-wrap: anywhere; }

    .rd-equation { padding: 1.75rem 1.5rem; gap: 1.25rem; }
    .rd-equation__line { font-size: 1.75rem; }
    .rd-review-site { min-height: 0; gap: 1.25rem; padding: 1.5rem; }
}

/* На «Прайсе» подвал оказался внутри контейнера страницы — растягиваем на всю ширину, поля как у шапки. */
.rd .container > footer.footer { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.rd .container > footer.footer .container { padding: 0 1.5em; }
@media (min-width: 600px) { .rd .container > footer.footer .container { padding: 0 5vw; } }
