/* ===== ДЕСКТОП/ПЛАНШЕТ — без изменений ===== */
.doctors-slider{
    text-align:center; position:relative; z-index:2; background:transparent; padding-top:30px;
}
.doctors-slider .swiper{ padding:10px 0 70px; max-width:1400px; margin:0 auto; }
.doctors-slider .swiper-wrapper{ align-items:stretch !important; }
.doctors-slider .swiper-slide{ display:flex; justify-content:center; height:auto; }

.swiper-button-prev::after, .swiper-button-next::after{ display:none !important; content:none !important; }

.doctor-card{
    background:#fff; border-radius:32px; box-shadow:0 6px 30px #0001;
    padding:0 0 24px; width:360px; min-height:540px; height:80%;
    display:flex; flex-direction:column; align-items:stretch; margin:0 10px; overflow:visible; position:relative;
}
.doctor-card__img{
    width:100%; height:260px; background:#fff; border-radius:32px 32px 0 0;
    overflow:hidden; display:flex; align-items:flex-end; justify-content:center; margin:0 auto; box-shadow:0 6px 30px #0001; z-index:2; position:relative;
}
.doctor-card__img img{ width:100%; height:100%; object-fit:cover; object-position:center top; display:block; border-radius:32px 32px 0 0; }
.doctor-card__content{
    background:#04afcf; border-radius:0 0 32px 32px; color:#fff;
    padding: 6px 10px 12px; min-height:180px; position:relative; z-index:1; width:100%;
    display:flex; flex-direction:column; align-items:center; justify-content:flex-start; flex:1 1 auto;
}
.doctor-card__name{ font-weight:700; font-size:22px; line-height:1.18; letter-spacing:.5px; margin:16px 0 5px; color:#fff; text-align:center; word-break:break-word; }
.doctor-card__name .surname{ display:block; font-weight:700; }
.doctor-card__name .namepatronymic{ display:block; font-weight:400; }
.doctor-card__position{ margin-bottom:24px; font-size:18px; color:#fff; text-align:center; }
.doctor-card__btns{ display:flex; gap:16px; justify-content:center; margin-top:auto; padding-bottom:8px; flex-wrap:wrap; }
.doctor-card__btn{ padding:9px 18px; border-radius:22px; border:none; font-size:16px; font-weight:700; cursor:pointer; text-decoration:none; transition:.2s; margin:0 4px; min-width:110px; max-width:160px; text-align:center; }
.doctor-card__btn--primary{ background:#E71963; color:#fff; box-shadow:0 2px 6px #e719631a; }
.doctor-card__btn--primary:hover{ background:#d11557; opacity:.93; }
.doctor-card__btn--secondary{ background:#fff; color:#E71963; border:1.5px solid #E71963; }
.doctor-card__btn--secondary:hover{ background:#f8e6ef; color:#E71963; border-color:#E71963; }

.custom-swiper-arrow{ display:flex !important; align-items:center; justify-content:center; width:48px; height:48px; position:absolute; top:50%; transform:translateY(-50%); z-index:9; cursor:pointer; background:none !important; border:none !important; }
.swiper-button-prev.custom-swiper-arrow{ left:8px; }
.swiper-button-next.custom-swiper-arrow{ right:8px; }
.custom-swiper-arrow svg circle{ fill:#fff; stroke:#E71963; stroke-width:2; transition:.2s; }
.custom-swiper-arrow svg path{ stroke:#E71963; stroke-width:3; transition:.2s; }
.custom-swiper-arrow:hover svg circle{ fill:#E71963; stroke:#E71963; }
.custom-swiper-arrow:hover svg path{ stroke:#fff; }

/* стандартная пагинация снизу (для десктопа) */
.doctors-slider .swiper-pagination{
    position:absolute; left:0; right:0; bottom:18px; text-align:center; pointer-events:auto; z-index:5;
}
.doctors-slider .swiper-pagination-bullet{
    width:10px; height:10px; border-radius:50%;
    background:#cfe9f0; opacity:1; margin:0 6px !important;
    transition:transform .2s, background-color .2s;
}
.doctors-slider .swiper-pagination-bullet-active{ background:#04afcf; transform:scale(1.2); }

/* планшетные брейки */
@media (max-width:1400px){ .doctors-slider .swiper{max-width:1200px;height:800px;} .doctor-card{width:280px;} .doctor-card__img{height:220px;} }
@media (max-width:1024px){ .doctors-slider .swiper{max-width:900px; height:700px;}  .doctor-card{width:240px;} .doctor-card__img{height:220px;} }

/* ===== МОБИЛЬНЫЙ ВИД СЛАЙДЕРА ===== */
@media (max-width:900px){
    .doctors-slider .swiper{
        max-width:100vw;
        padding-top:56px;       /* место под прогресс сверху */
        padding-bottom:16px;
    }
    .doctors-slider .swiper-slide{
        padding:0 10px; box-sizing:border-box;
    }

    /* карточка — почти на всю ширину, авто-высота */
    .doctor-card{
        width:calc(100vw - 32px);
        min-height:unset; height:auto; margin:0;
    }
    /* фото выше и крупнее — ЧУТЬ увеличили (было 300px) */
    .doctor-card__img{ width:100%; height:340px; }

    .doctor-card__content{ padding:22px 14px; }
    .doctor-card__name{ font-size:19px; margin-top:10px; }
    .doctor-card__btn{ padding:10px 16px; font-size:15px; min-width:128px; }

    /* стрелок нет */
    .custom-swiper-arrow{ display:none !important; }

    /* скрываем стандартные точки, вместо них — инста-полоска */
    .doctors-slider .swiper-pagination{ display:none !important; }

    /* ==== ИНСТА-ПРОГРЕСС ПО СЕГМЕНТАМ ==== */
    .doctors-slider .swiper-ig-bars{
        position:absolute; left:12px; right:12px; top:10px;
        display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:4px;
        z-index:6; pointer-events:auto;
    }
    .doctors-slider .swiper-ig-bar{
        position:relative; height:4px; background:rgba(4,175,207,.22); border-radius:999px; overflow:hidden;
    }
    .doctors-slider .swiper-ig-bar::before{
        content:""; position:absolute; inset:0; width:var(--progress, 0%);
        background:#04afcf; border-radius:999px; transition:width .22s ease;
    }
    .doctors-slider .swiper-ig-bar.is-active::before{
        width:var(--progress, 100%);
    }
}

@media (max-width:480px){
    .doctors-slider{ padding-top:60px }
    html, body { overflow-x:hidden; }
    .doctors-slider{ overflow-x:hidden; }              /* страхуемся от горизонт. скролла */
    .doctors-slider .swiper{ overflow:visible;
        padding-left:5px;
        padding-right:5px;}       /* чтобы тени не резались */

    /* Swiper ставит inline width/margin-right — перебиваем */
    .doctors-slider .swiper-slide{
        width:100% !important;
        margin-right:0 !important;
        box-sizing:border-box;
        padding:0 10px;

        overflow:visible; /* тени карточки не режем *//* если нужны боковые поля у контента */
    }

    .doctor-card{
        width:100% !important;
        margin:0 !important;
        min-height:unset; height:auto; box-sizing:border-box;
    }

    /* чтобы кнопки не разъезжали ширину */
    .doctor-card__btn{ min-width:0; max-width:100%; flex:1 1 auto; }
}






/* ===== ПОП-АПЫ (общая база) ===== */
.doctor-popup, .doctor-appointment-popup{ position:fixed; inset:0; z-index:9999; display:none; }
.doctor-popup.active, .doctor-appointment-popup.active{ display:flex; }
.doctor-popup__overlay{ position:absolute; inset:0; background:rgba(0,0,0,.6); }
.doctor-popup__content{
    position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
    background:#02b1c5; color:#fff; padding:30px; border-radius:16px;
    max-width:600px; width:90%; max-height:90vh; overflow:auto; box-shadow:0 10px 40px rgba(0,0,0,.3);
}
.doctor-popup__close{ position:absolute; right:15px; top:10px; background:none; border:none; font-size:24px; cursor:pointer; color:#fff; transition:color .2s; }
.doctor-popup__close:hover{ color:#e71963; }
.doctor-popup__body{ display:flex; flex-wrap:wrap; margin-bottom:10px; }
.doctor-popup__img img{padding:12px; max-width:200px; border-radius:20px;  object-fit:cover; display:block; }
.doctor-popup__info{ flex:1; display:flex; flex-direction:column; justify-content:center; }
.doctor-popup__info div{ margin-bottom:12px; font-size:16px; line-height:1.4; }
.doctor-popup__name{ font-size:22px; font-weight:700; margin-bottom:15px; }
.doctor-popup__btn-wrapper{ text-align:right; }
.doctor-popup__btn{
    background:#fff; color:#02b1c5; padding:12px 24px; font-weight:700; font-size:14px;
    text-decoration:none; border-radius:30px; display:inline-block; transition:background .3s, color .3s;
}
.doctor-popup__btn:hover{ background:#e71963; color:#fff; }
.doctor-popup__input{
    width:100%; padding:9px 12px; margin:6px 0 10px; border-radius:8px; border:1px solid #eee;
    font-size:15px; color:#222; background:#f5f7fa; box-sizing:border-box; outline:none; resize:none;
}
.doctor-popup__input:focus{ border-color:#02b1c5; background:#fff; }

/* ===== МОБИЛЬНЫЕ ПОП-АПЫ ===== */
@media (max-width:768px){
    .doctors-slider{ padding-top:60px }
    .doctor-popup.active, .doctor-appointment-popup.active{
        align-items:flex-start; justify-content:center;
        /* верхний отступ подставляет JS от высоты шапки */
    }
    .doctor-popup__content{
        position:relative; left:auto; top:auto; transform:none;
        width:92vw; max-width:92vw; max-height:82vh; overflow:auto;
        border-radius:12px; padding:20px 14px;
    }
    .doctor-popup__body{ flex-direction:column; gap:14px; }
    .doctor-popup__img img{ max-width:120px; margin:0 auto; }
    .doctor-popup__btn-wrapper{ text-align:center; }
    .doctor-popup__close{ right:8px; top:6px; font-size:26px; }
    .doctor-popup__info div{ margin-bottom:0; } /* уплотнили, как просил */
    .doctor-popup__name{ font-size:20px; margin-bottom:10px; }

    .doctor-appointment-popup .doctor-popup__content{ padding:18px 12px; max-height:80vh; }
    .doctor-appointment-popup .doctor-popup__input{ margin:8px 0; min-height:44px; font-size:16px; }
    .doctor-appointment-popup .doctor-popup__btn{ width:100%; padding:12px 16px; }
}
@media (max-width:380px){
    .doctors-slider{ padding-top:60px }
    .doctor-popup__content{ width:94vw; padding:16px 10px; border-radius:10px; }
    .doctor-popup__close{ top:4px; right:4px; }
}
