﻿.layout,
.layout * {
    box-sizing: border-box;
}

.layout {
    padding: 112px 24px 64px;
    background: linear-gradient(180deg, #effaf8 0, #fff 440px);
    color: #243d42;
    font-family: Arial, Helvetica, sans-serif;
}

.layout > h2 {
    position: relative;
    padding: 0 0 28px;
    text-align: center;
    font-size: clamp(28px, 4vw, 38px);
    color: #176e65;
}

.layout > h2::after {
    content: "";
    position: absolute;
    background: url("/src/border.png") no-repeat center / contain;
    left: 50%;
    bottom: 0;
    width: min(300px, 100%);
    height: 20px;
    transform: translateX(-50%);
}

.doctors-intro {
    max-width: 600px;
    margin: 18px auto 36px;
    text-align: center;
    line-height: 1.7;
    color: #52676b;
}

.doctors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    max-width: 1240px;
    margin: 0 auto;
}

.doctor-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 26px;
    border: 1px solid #d8ebe7;
    border-top: 4px solid #029e90;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgb(27 82 73 / 8%);
}

.doctor-department {
    margin-bottom: 24px;
    color: #08786d;
    font-size: 17px;
    line-height: 1.5;
}

.doctor-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.doctor-photo {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #d8ebe7;
    background: #e0f7f5;
}

.doctor-details {
    min-width: 0;
    overflow-wrap: anywhere;
}

.doctor-details h4 {
    margin-bottom: 6px;
    font-size: 20px;
    line-height: 1.3;
    color: #243d42;
}

.doctor-qualifications,
.doctor-role {
    font-size: 13px;
    line-height: 1.6;
    color: #52676b;
}

.doctor-role {
    color: #08786d;
    font-weight: 600;
}

.doctor-description {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.8;
    color: #52676b;
}

.doctor-book {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 14px 16px;
    border-radius: 9px;
    background: #e9f7f4;
    color: #086c62;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.doctor-book:hover {
    background: #ffe8d6;
    color: #813707;
}

.doctor-book:focus-visible {
    outline: 3px solid #08786d;
    outline-offset: 4px;
}

@media (max-width: 1100px) {
    .doctors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .layout {
        padding: 108px 16px 40px;
    }

    .doctors {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .doctor-card {
        padding: 22px;
    }

    .doctor-photo {
        flex-basis: 72px;
        width: 72px;
        height: 72px;
    }
}
