.physician {
    --physician-accent: #86b725;
    position: relative;
    padding: 24px 14px;
    font-size: 16px;
    background-color: #fff;
    color: #333;
    text-align: left;
    container-type: inline-size;
}

.physician-fd {
    --physician-accent: #1d8fce;
}

.physician.even {
    background-color: #f8f8f8;
}

/*
 * Każdy lekarz ma ten sam szkielet co dotąd na produkcji: kto | gdzie przyjmuje.
 * Zdjęcie i opis dochodzą w lewej kolumnie, nie zmieniając układu wiersza.
 * Układ zależy od szerokości karty (plugin bywa w col-md-9 obok menu).
 */
.physician-card {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas: "who aside";
    column-gap: 40px;
}

.physician-who {
    grid-area: who;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
        "photo head"
        "body body"
        "more more";
    column-gap: 18px;
    align-content: start;
}

.physician-no-photo .physician-who {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "head"
        "body"
        "more";
}

.physician-photo {
    grid-area: photo;
    margin-bottom: 16px;
}

.physician-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.physician-head {
    grid-area: head;
    align-self: center;
}

.physician .name {
    margin: 0 0 10px;
    padding-bottom: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

/* Wyłącza zieloną kreskę z `.page-text h2::after` — akcentem jest specjalizacja */
.physician .name::after {
    display: none;
}

.physician .specialty {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.physician .specialty-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.physician .specialty-icon i {
    font-size: 24px;
    color: var(--physician-accent);
}

.physician .specialty-icon img {
    width: 24px;
    height: 24px;
}

.physician .specialty-name p {
    margin: 0;
    color: var(--physician-accent);
}

/* Opis: zwykły kolor tekstu, każda linia jako akapit (filtr `paragraphs`) */
.physician-body {
    grid-area: body;
    max-width: 65ch;
    margin-top: 6px;
    font-size: 15px;
}

.physician-body p {
    margin: 0 0 0.8em;
    line-height: 1.65;
    color: #444;
}

.physician-body p:last-child {
    margin-bottom: 0;
}

/* Zwinięty opis: ok. 5 wierszy z wygaszeniem (klasę dodaje physicians.js) */
.physician-body.is-collapsed {
    max-height: calc(1.65em * 5);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
    mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

.physician-more {
    grid-area: more;
    justify-self: start;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--physician-accent);
    cursor: pointer;
}

.physician-more[hidden] {
    display: none;
}

.physician-more:hover {
    text-decoration: underline;
}

.physician-more:focus-visible,
.physician .contact a:focus-visible {
    outline: 2px solid var(--physician-accent);
    outline-offset: 2px;
}

.physician-aside {
    grid-area: aside;
    font-size: 15px;
}

.physician .places > p {
    margin: 0 0 8px;
}

.physician .place {
    position: relative;
    padding-left: 14px;
    margin-bottom: 12px;
}

.physician .place:last-child {
    margin-bottom: 0;
}

.physician .place .placename {
    font-weight: 600;
    line-height: 1.4;
}

.physician .place .placename:before {
    content: ' ';
    position: absolute;
    top: 6px;
    left: 0;
    width: 7px;
    height: 7px;
    background-color: var(--physician-accent);
}

.physician .place .address {
    margin-top: 4px;
    color: #555;
}

.physician .place .address p {
    margin: 0;
}

.physician .place .hours {
    margin-top: 4px;
    font-size: 14px;
    color: #555;
}

/* Telefon i strona lekarza — pod imieniem, żeby nie mieszały się z telefonami gabinetów */
.physician .contact {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 20px;
    margin-top: 6px;
    font-size: 15px;
}

.physician .contact p {
    margin: 0;
}

.physician .contact a {
    font-weight: 600;
    color: #333;
    word-wrap: break-word;
}

.physician .contact a:hover,
.physician .contact a:focus {
    color: var(--physician-accent);
    text-decoration: none;
}

/* Wąska karta: kto, opis i gdzie przyjmuje jedno pod drugim */
@container (max-width: 559px) {
    .physician-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "who"
            "aside";
    }

    .physician-aside {
        margin-top: 18px;
    }

    .physician-body {
        max-width: none;
    }
}
