/* ============================================================
   БЛОК 4: ВРАЧИ
   ============================================================ */
.doctors {
    padding: 70px 20px;
    background: #f4f8fa;
}

.doctors__container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ----- РАЗДЕЛИТЕЛЬ С ДАТЧИКОМ ----- */
.doctors__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.doctors__divider-line {
    flex: 1;
    height: 1.5px;
    background: #3A7CA5;
    opacity: 0.3;
}

.doctors__divider-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    animation: doctors-spin 20s linear infinite;
}

.doctors__divider-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@keyframes doctors-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----- ЗАГОЛОВКИ ----- */
.doctors__title {
    font-size: 38px;
    font-weight: 300;
    color: #2C3E50;
    text-align: center;
    margin-bottom: 8px;
}

.doctors__subtitle {
    font-size: 18px;
    color: #6B8A9E;
    text-align: center;
    margin-bottom: 40px;
}

/* ----- СЕТКА КАРТОЧЕК ----- */
.doctors__grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ===== КАРТОЧКА (горизонтальная) ===== */
.doctors__card {
    display: flex;
    align-items: center;
    gap: 30px;
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(58, 124, 165, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doctors__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(58, 124, 165, 0.10);
}

/* ----- ФОТО ----- */
.doctors__card-photo {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #D9E9F2;
}

.doctors__card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ----- ТЕЛО КАРТОЧКИ ----- */
.doctors__card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doctors__card-badge {
    display: inline-block;
    background: #3A7CA5;
    color: #ffffff;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.doctors__card-badge--secondary {
    background: #6B8A9E;
}

.doctors__card-name {
    font-size: 24px;
    font-weight: 600;
    color: #2C3E50;
    margin: 0;
}

.doctors__card-spec {
    font-size: 16px;
    color: #3A7CA5;
    margin: 0;
}

.doctors__card-list {
    list-style: none;
    padding: 0;
    margin: 4px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.doctors__card-list li {
    font-size: 15px;
    color: #4A6A80;
    position: relative;
    padding-left: 16px;
}

.doctors__card-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3A7CA5;
    font-weight: 700;
}

.doctors__card-desc {
    font-size: 15px;
    color: #6B8A9E;
    line-height: 1.5;
    margin: 0;
}

/* ----- ВТОРИЧНАЯ КАРТОЧКА (отец) ----- */
.doctors__card--secondary {
    background: #f8fbfc;
    border: 1px solid #e0ecf2;
}

.doctors__card--secondary .doctors__card-photo {
    width: 130px;
    height: 130px;
    border-color: #c0d8e4;
}

.doctors__card--secondary .doctors__card-name {
    font-size: 20px;
    color: #4A6A80;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 768px) {
    .doctors {
        padding: 50px 16px;
    }
    .doctors__title {
        font-size: 30px;
    }
    .doctors__subtitle {
        font-size: 16px;
    }
    .doctors__card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }
    .doctors__card-photo {
        width: 120px;
        height: 120px;
    }
    .doctors__card--secondary .doctors__card-photo {
        width: 100px;
        height: 100px;
    }
    .doctors__card-badge {
        margin: 0 auto;
    }
    .doctors__card-list {
        justify-content: center;
    }
    .doctors__card-desc {
        text-align: center;
    }
    .doctors__card-body .btn {
        margin: 0 auto;
    }
    .doctors__card-name {
        font-size: 20px;
    }
    .doctors__card--secondary .doctors__card-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .doctors__card-photo {
        width: 100px;
        height: 100px;
    }
    .doctors__card--secondary .doctors__card-photo {
        width: 80px;
        height: 80px;
    }
    .doctors__card-name {
        font-size: 18px;
    }
    .doctors__card-list li {
        font-size: 14px;
    }
    .doctors__divider-icon {
        width: 30px;
        height: 30px;
    }
    /* ============================================================
   ИСПРАВЛЕНИЕ ДЛЯ ТЕЛЕФОНА (карточка врача)
   ============================================================ */

/* Ограничиваем ширину текста в карточке */
.doctors__card-body {
    min-width: 0;
    width: 100%;
}

.doctors__card-list {
    flex-wrap: wrap;
    gap: 6px 16px;
}

.doctors__card-list li {
    font-size: 14px;
    word-break: break-word;
    max-width: 100%;
}

/* На телефоне карточка адаптируется */
@media (max-width: 768px) {
    .doctors__card {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 12px;
    }

    .doctors__card-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .doctors__card-list {
        justify-content: center;
        width: 100%;
    }

    .doctors__card-list li {
        font-size: 14px;
        text-align: center;
        padding-left: 0;
        max-width: 100%;
        word-break: break-word;
    }

    .doctors__card-list li::before {
        display: none;
    }

    .doctors__card-desc {
        text-align: center;
        max-width: 100%;
    }

    .doctors__card-body .btn {
        margin: 0 auto;
        width: auto;
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .doctors__card-photo {
        width: 100px;
        height: 100px;
    }

    .doctors__card--secondary .doctors__card-photo {
        width: 80px;
        height: 80px;
    }

    .doctors__card-name {
        font-size: 18px;
    }

    .doctors__card-list li {
        font-size: 13px;
    }

    .doctors__card-body .btn {
        font-size: 14px;
        padding: 10px 18px;
        width: 100%;
        justify-content: center;
    }
}
/* ============================================================
   ИСПРАВЛЕНИЕ КНОПОК В КАРТОЧКАХ ВРАЧЕЙ (для телефонов)
   ============================================================ */

/* Ограничиваем кнопки внутри карточки */
.doctors__card-body .btn {
    display: inline-block;
    max-width: 100%;
    white-space: normal;      /* разрешаем перенос текста */
    word-wrap: break-word;    /* переносим длинные слова, если надо */
    text-align: center;
    box-sizing: border-box;
}

/* На телефонах растягиваем кнопки на всю ширину карточки */
@media (max-width: 768px) {
    .doctors__card-body .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 15px;
        box-sizing: border-box;
    }

    .doctors__card-body {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .doctors__card-body .btn {
        font-size: 14px;
        padding: 10px 12px;
        width: 100%;
        white-space: normal;
        text-align: center;
    }
}
}