@font-face {
    font-family: 'Freigeist-Regular';
    src: url('font/Freigeist-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
}

.main-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.div1 {
    text-align: left;
    margin: 20px 20px 20px 20px;
}

.div2 {
    text-align: right;
    margin: 20px 20px 20px 20px;
}

.div1 p {
    color: #787571;
    font-family: 'Freigeist-Regular', sans-serif;
    font-size: 38px;
    margin: 0 0 0 0;
}

.div2 p {
    color: #AEA39C;
    font-size: 20px;
    margin: 0 0 0 0;
    font-family: 'Freigeist-Regular', sans-serif;
}

.div3 {
    background-image: url('images/main-clinic.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 26px 26px 26px 26px;
    margin: 20px 20px 20px 20px;
    width: auto;
    height: 800px;
    font-family: 'Freigeist-Regular', sans-serif;
    position: relative;
}

.div4 {
    position: absolute;
    font-family: 'Freigeist-Regular', sans-serif;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.div4 img {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.social-main {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background-color: #EEEAE7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-button-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    height: 40px;
    width: 170px;
    border-radius: 13px;
    background-color: #EEEAE7;
    cursor: pointer;
    font-family: 'Freigeist-Regular', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.call-button-main span {
    color: #787571;
    font-weight: bold;
    font-family: 'Freigeist-Regular', sans-serif;
}

.call-button-main img {
    width: 14px;
    height: 14px;
}

.div5{
    font-family: 'Freigeist-Regular', sans-serif;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 50px 20px 0 20px;
}

.services-title {
    text-align: left;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.services-title h1{
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #787571;
    margin: 0;
    font-family: 'Freigeist-Regular', sans-serif;
}

.services-button {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
    height: 40px;
    width: 100%;
    margin-left: auto;
    border-radius: 13px;
    cursor: pointer;
    font-family: 'Freigeist-Regular', sans-serif;
    font-size: 18px;
    background: white;
    border: 1px solid #AEA39C;
}

.services-button span {
    text-align: left;
    color: #AEA39C;
    font-family: 'Freigeist-Regular', sans-serif;
}

.services-button img {
    width: 14px;
    height: 14px;
}

.main-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 20px 20px 20px;
    gap: 16px;
}

/* Левая колонка (по факту это правая часть макета) */
.right-content {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 24px;
}

/* Текстовый блок */
.main-text {
    padding: 20px;
}

.main-text p {
    color: #AEA39C;
    font-size: 20px;
    font-family: 'Freigeist-Regular', sans-serif;
}

.right-services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ========== ОБЩИЕ СТИЛИ ДЛЯ КАРТОЧЕК ========== */
.right-services-br,
.right-services-vr,
.left-services-child,
.left-services-impl,
.left-services-otb {
    border-radius: 18px;
    padding: 0; /* Убираем паддинги у родителя, они нам больше не нужны */
    background-size: cover;
    background-position: center;
    position: relative; /* Важно: чтобы прижать плашку ко дну */
}

/* Высота для карточек */
.right-services-br,
.right-services-vr,
.left-services-child,
.left-services-impl {
    min-height: 350px;
}

.left-services-otb {
    min-height: 250px;
}

/* Фоновые изображения */
.right-services-br {
    background-image: url('images/br.png');
}
.right-services-vr {
    background-image: url('images/vr.png');
}
.left-services-child {
    background-image: url('images/child.png');
}
.left-services-impl {
    background-image: url('images/impl.png');
}
.left-services-otb {
    background-image: url('images/otb.png');
}

/* ========== СТИЛИ ДЛЯ ПЛАШЕК (SPAN) ========== */
.right-services-br span,
.right-services-vr span,
.left-services-child span,
.left-services-impl span,
.left-services-otb span {
    position: absolute;      /* Позиционируем относительно родителя */
    bottom: 20px;            /* Отступ снизу */
    left: 20px;              /* Отступ слева */
    right: 20px;             /* Отступ справа (чтобы ширина была резиновой) */
    width: auto;             /* Ширина автоматическая с учетом left/right */

    background-color: #ffffff;
    opacity: 0.67;           /* Использую 0.67 вместо 67% (проценты в opacity не работают) */
    border-radius: 14px;
    padding: 12px 16px;      /* Внутренние отступы для текста */

    color: #787571;
    font-size: 16px;         /* Добавил размер шрифта для наглядности */

    font-family: 'Freigeist-Regular', sans-serif;
    text-align: left;
    display: block;          /* Чтобы span можно было сделать блочным */
    box-sizing: border-box;  /* Чтобы паддинги не увеличивали ширину */
}

/* Правая колонка */
.left-services {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 16px;
    margin: 0 0 10px 0;
}

/* Верхние два блока */
.left-services-two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.clinic-main {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(2, 1fr);
    margin: 20px 20px 20px 20px;
}

.clinic-text {
    text-align: left;
    font-family: 'Freigeist-Regular', sans-serif;
}

.clinic-text p {
    color: #AEA39C;
    font-size: 22px;
    font-family: 'Freigeist-Regular', sans-serif;
    margin: 0; /* Убираем отступы между абзацами */
}

.clinic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

/* Исправлено: теперь стили применяются ко всем h1 внутри блоков */
.clinic-left h1,
.clinic-center h1,
.clinic-right h1 {
    font-family: 'Freigeist-Regular', sans-serif;
    color: #787571;
    font-size: 32px;
    margin: 0 0 10px 0; /* Убираем лишние отступы */
}

/* Исправлено: теперь стили применяются ко всем p внутри блоков */
.clinic-left p,
.clinic-center p,
.clinic-right p {
    font-family: 'Freigeist-Regular', sans-serif;
    font-size: 20px;
    font-weight: 1;
    color: #AEA39C;
    margin: 0; /* Убираем отступы между абзацами */
    line-height: 0.9; /* Делаем межстрочный интервал чуть меньше */
}

.custom-line {
    border: none;
    height: 1px;
    background-color: #AEA39C;
    width: 90%;
    margin: 15px 0; /* Уменьшаем отступы вокруг линии */
}

.clinic-left {
    text-align: left;
}

.clinic-center {
    text-align: center;
}

.clinic-center .custom-line{
    margin-left: 20px;
    margin-right: 0;
}

.clinic-right {
    text-align: right;
}

.clinic-right .custom-line {
    margin-left: auto; /* Автоматический отступ слева прижимает элемент вправо */
    margin-right: 0;   /* Обнуляем правый отступ */
}

.doctor-main{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 1fr);
    gap: 12px;
    margin: 20px 20px 0 20px;
    max-height: 800px;
}

.doctor{
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    max-height: 800px;
}

.doctor-khan,
.doctor-iveta,
.doctor-olga,
.doctor-pak{
    border-radius: 28px;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.doctor-khan {
    background-image: url('images/khan.png');
}

.doctor-iveta{
    background-image: url('images/iveta.png');
}

.doctor-olga{
    background-image: url('images/olga.png');
}

.doctor-pak{
    background-image: url('images/pak.png');
}

.doctor-khan span,
.doctor-iveta span,
.doctor-olga span,
.doctor-pak span{
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    width: auto;

    background-color: #ffffff;
    opacity: 0.67;
    border-radius: 14px;
    padding: 12px 16px;

    color: #787571;
    font-size: 16px;

    text-align: left;
    display: block;
    box-sizing: border-box;
    font-family: 'Freigeist-Regular', sans-serif;
}

.doctor-text{
    height: 200px;
}

.doctor-text h1 {
    color: #787571;
    font-size: 20px;
    font-family: 'Freigeist-Regular', sans-serif;
}

.doctor-text p {
    color: #AEA39C;
    font-size: 20px;
    font-weight: 1;
    margin: 10px 0 0 0;
    /*line-height: 1.1;*/
    text-align: justify;
    font-family: 'Freigeist-Regular', sans-serif;
}

.mobile{
    display: none;
}

@media (max-width: 1024px) {
    .mobile{
        display: block;
    }

    .desktop{
        display: none;
    }

    .main-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .div1, .div2 {
        margin: 0;
        text-align: center;
    }


    .div1 p {
        font-size: 28px;
    }

    .div2 p {
        font-size: 16px;
        line-height: 1.4;
    }

    .div3 {
        height: 420px;
        margin: 20px;

        border-radius: 28px;
    }

    .div4 {
        left: 20px;
        right: 20px;
        bottom: 20px;
        justify-content: space-between;
    }

    .div5-mob{
        font-family: 'Freigeist-Regular', sans-serif;
        display: block;
        gap: 8px;
        margin: 20px 20px 0 20px;
    }

    .services-title-mob {
        text-align: left;
        padding-bottom: 0.5rem;
        margin-bottom: 2rem;
    }

    .services-title h1{
        font-size: 32px;
    }

    .services-title-mob h1{
        font-size: 32px;
        font-weight: 400;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #787571;
        margin: 0;
        font-family: 'Freigeist-Regular', sans-serif;
    }

    .services-button-mob {
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 0 10px;
        height: 40px;
        width: 100%;
        margin-left: auto;
        border-radius: 13px;
        cursor: pointer;
        font-family: 'Freigeist-Regular', sans-serif;
        font-size: 18px;
        background-color: #EEEAE7;
    }

    .services-button-mob span {
        text-align: left;
        color: #787571;
        font-family: 'Freigeist-Regular', sans-serif;
    }

    .services-button-mob img {
        width: 14px;
        height: 14px;
    }

    .call-button-main {
        flex: 1;
        margin-right: 10px;
        height: 44px;
        border-radius: 18px;
        font-size: 16px;
    }

    .social-main {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .main-services {
        display: block;
        margin: 0 0 0 20px;
    }

    .right-content {
        display: block;
    }

    .main-text {
        padding: 0 20px 20px 0;
    }

    .right-services, .left-services-two {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
    }
    .right-services::-webkit-scrollbar, .left-services-two::-webkit-scrollbar {
        display: none;
    }

    .right-services > div, .left-services-two > div {
        min-width: 260px;
        height: 260px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }

    .left-services-otb {
        min-height: 260px;
        margin-right: 20px;
    }

    .clinic {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 10px;
    }

    .clinic-left, .clinic-center, .clinic-right {
        text-align: left;
    }

    .clinic-center .custom-line{
        margin-left: auto;
        margin-right: 0;
    }

    .custom-line {
        width: 100%;
    }

    .doctor-main {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding-left: 20px;
        scroll-snap-type: x mandatory;
    }

    .doctor-main::-webkit-scrollbar {
        display: none;
    }

    .doctor {
        min-width: 280px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .doctor-khan, .doctor-iveta, .doctor-olga, .doctor-pak {
        min-height: 420px;
    }

    .doctor-khan span, .doctor-iveta span, .doctor-olga span, .doctor-pak span{
        font-size: 14px;
    }

    .doctor-text{
        height: auto;
    }

    .doctor-text p {
        font-size: 16px;
    }

    .premium-slider {
        margin: 20px 0 0 0;
    }

    .slider-track {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 0 20px;
        -webkit-overflow-scrolling: touch;
    }

    .slider-track::-webkit-scrollbar {
        display: none;
    }

    .slide {
        flex: 0 0 85%;
        scroll-snap-align: center;
        height: 600px;
        margin-bottom: 20px;
    }

    .slider-indicator {
        display: flex;
        justify-content: center;
        gap: 6px;
    }

    .slider-indicator span {
        width: 40px;
        height: 3px;
        background-color: #E6E1DD;
        border-radius: 2px;
        transition: background-color 0.3s ease, transform 0.3s ease;
    }

    .slider-indicator span.active {
        background-color: #787571;
    }

    .doctor-button{
        display: none;
    }

    .services-slider .slider-track {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 0 20px;
    }

    .services-slider .slider-track::-webkit-scrollbar {
        display: none;
    }

    .services-slider .slide {
        min-width: 280px;

        flex: 0 0 85%;
        scroll-snap-align: center;

        height: 350px; /* можно подстроить под карточки */
    }

    .services-slider .slide > div {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .right-services-br,
    .right-services-vr,
    .left-services-child,
    .left-services-impl,
    .left-services-otb {
        min-height: 350px;
    }

    .services-title-mob {
        text-align: center;
    }

    .clinic-main {
        height: 600px;
    }

    .clinic-text,
    .main-text,
    .div2{
        text-align: center;
        margin: 0;
    }

}