/*
 * iTOP Page — /itop/itop.css
 *
 * Фиксы конфликтов со сторонними CSS:
 * 1) swiper_timeline.css задаёт .container { max-width: 77rem } — сужает контейнер шаблона
 * 2) custom.css задаёт .hero, #more { margin: 0 -17rem } — расширяет блоки для /company/,
 *    но на iTOP-странице (где контейнер разблокирован) они вылезают за экран
 */
.main > .container {
    max-width: none;
    padding-inline: 0;
}

/* Общий контейнер всех блоков страницы iTOP */
.itop-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.itop-content .hero,
.itop-content #more {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* =============================================
   Вводный блок (itop-intro)
   ============================================= */
.itop-intro h3 {
    font-size: 40px;
}

.itop-intro p {
    font-size: 17px;
}

/* =============================================
   Hero-цитата (упрощённая замена .container > .grid > .hero__content)
   ============================================= */
.itop-hero-text {
    max-width: 52rem;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 3;
}

.itop-hero-text p {
    margin-bottom: 0;
}

/* =============================================
   Баннер-карточка (упрощённая замена card-banner)
   ============================================= */
.itop-banner {
    display: flex;
    height: 480px;
    background: #f2f2f2;
    border-radius: 20px;
    overflow: hidden;
}


.itop-banner__text {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
    overflow-y: auto;
}

.itop-banner__title {
    font-size: 25px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
}

.itop-banner__text p {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.itop-banner__principles {
    margin: 20px 0 12px;
}

.itop-banner__principles dt {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 12px;
    font-style: italic;
}

.itop-banner__principles dd {
    font-size: 17px;
    margin: 0 0 8px;
}

.itop-banner__principles dd::before {
    content: "\2714\0020";
    color: #003B5C;
}

.itop-banner__btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    width: fit-content;
    margin-top: 20px;
    flex-shrink: 0;
}

.itop-banner__btn:hover {
    border-color: #999;
}

.itop-banner__img {
    flex: 0 0 50%;
    object-fit: cover;
    height: 100%;
}

/* =============================================
   Двойной блок «Я пациент / Я врач» (itop-dual)
   ============================================= */
.itop-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.itop-dual__card {
    background: #f2f2f2;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.itop-dual__img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.itop-dual__body {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.itop-dual__label {
    display: inline-block;
    background: #003baa;
    color: #fff;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    width: fit-content;
    margin-bottom: 16px;
}

.itop-dual__title {
    font-size: 25px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.itop-dual__body p {
    font-size: 17px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 auto;
}

.itop-dual__body .itop-banner__btn {
    margin-top: 20px;
}

/* =============================================
   Блок статистики (s2-stats)
   ============================================= */
.s2-stats {
    position: relative;
}

.s2-stats__heading {
    color: #fff;
    font-family: 'Geologica', sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 110%;
    background: none;
    padding: 50px 32px 10px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.s2-stats__footnote {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-align: right;
    margin-right: 2em;
}

.s2-stats__bg {
    background-color: #003baa;
    border-radius: 40px;
    position: absolute;
    inset: 0;
}

.s2-stats__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 30px 40px 100px;
    position: relative;
}

.s2-stats__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.s2-stats__card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #2760cc;
    border-radius: 40px;
    padding: 30px 10px 10px;
}

.s2-stats__card-info {
    padding: 0 20px 30px;
    text-align: center;
}

.s2-stats__tag {
    display: inline-flex;
    align-items: center;
    color: #fff;
    background: none;
    padding: 10px 20px;
    font-size: 20px;
    line-height: 1.2;
}

.s2-stats__card-text {
    color: #000;
    font-size: 20px;
    line-height: 120%;
}

.s2-stats__card-img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 30px;
    width: 100%;
}

/* =============================================
   Блок-счётчик (itop-metrics)
   ============================================= */
.itop-metrics {
    position: relative;
}

.itop-metrics__bg {
    background-color: #003baa;
    border-radius: 40px;
    position: absolute;
    inset: 0;
}

.itop-metrics__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 60px 40px;
}

.itop-metrics__grid {
    display: flex;
    gap: 80px;
    text-align: center;
}

.itop-metrics__value {
    color: #fff;
    font-family: 'Geologica', sans-serif;
    font-size: 52px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 8px;
}

.itop-metrics__label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}

.itop-metrics__caption {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

/* =============================================
   Фраза-миссия (itop-mission)
   ============================================= */
.itop-mission {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    color: #222;
    margin-top: 0;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    z-index: 3;
}

.itop-mission__accent {
    color: #003baa;
    font-weight: 700;
}

/* =============================================
   Адаптив
   ============================================= */
@media (max-width: 1024px) {
    .itop-banner {
        height: 380px;
    }

    .s2-stats__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .s2-stats__inner {
        padding: 40px 20px 60px;
    }

    .s2-stats__heading {
        font-size: 32px;
        margin: 30px 20px 0;
    }
}

@media (max-width: 768px) {
    .itop-banner {
        flex-direction: column;
        height: auto;
    }

    .itop-banner__text {
        flex: none;
    }

    .itop-banner__img {
        flex: none;
        height: 250px;
        width: 100%;
    }

    .s2-stats__heading {
        font-size: 26px;
        margin: 20px 20px 0;
        padding: 16px 24px;
    }

    .s2-stats__bg {
        border-radius: 20px;
    }

    .s2-stats__inner {
        padding: 30px 20px 50px;
    }

    .s2-stats__cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .s2-stats__tag {
        height: 34px;
        padding: 0 16px;
        font-size: 14px;
    }

    .itop-metrics__inner {
        padding: 40px 20px;
    }

    .itop-metrics__grid {
        flex-direction: column;
        gap: 30px;
    }

    .itop-metrics__value {
        font-size: 36px;
    }

    .itop-metrics__bg {
        border-radius: 20px;
    }

    .itop-dual {
        grid-template-columns: 1fr;
    }
}
