[data-saemg-profile="consultorio-odontologico"] .saemg-page-intro {
    --saemg-intro-copy-width: min(100%, 55vw, 53rem);
}

.saemg-dental-appointments,
.saemg-dental-gallery > .saemg-shell {
    padding-block: clamp(2.25rem, 5vw, 4.25rem);
}

.saemg-dental-appointments h2,
.saemg-dental-gallery h2 { margin-bottom: 1.35rem; }

.saemg-dental-appointment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
}

.saemg-dental-card {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    padding: clamp(1rem, 2.7vw, 2rem);
    border: 1px solid var(--saemg-card-border);
    border-radius: var(--saemg-radius);
    background: var(--saemg-card-surface);
    overflow-wrap: anywhere;
}

.saemg-dental-practitioner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(.75rem, 2vw, 1.35rem);
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--saemg-card-border);
}

.saemg-dental-practitioner img {
    display: block;
    width: clamp(9rem, 16vw, 13rem);
    height: auto;
    aspect-ratio: 1;
    border-radius: 10px;
    background: var(--saemg-card-surface);
    object-fit: cover;
}

.saemg-dental-practitioner p { margin: .25rem 0 0; color: var(--saemg-muted); }
.saemg-dental-details { display: grid; gap: .8rem; }
.saemg-dental-details :is(p, ul), .saemg-dental-schedule p { margin: 0; }
.saemg-dental-details ul { padding-inline-start: 1.15rem; }
.saemg-dental-details li + li { margin-top: .25rem; }
.saemg-dental-details li::marker { color: var(--saemg-blue); }

@media (min-width: 1000px) {
    .saemg-dental-details ul:has(> li:nth-child(8)) {
        column-count: 2;
        column-gap: 1.65rem;
        line-height: 1.5;
    }

    .saemg-dental-details ul:has(> li:nth-child(8)) > li { break-inside: avoid; }

    /* Os últimos serviços têm observações mais longas. */
    .saemg-dental-details ul:has(> li:nth-child(8)) > li:nth-last-child(-n + 2) { column-span: all; }
}

.saemg-dental-schedule {
    display: grid;
    justify-items: start;
    gap: .9rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--saemg-card-border);
}

.saemg-dental-visit {
    margin-top: clamp(1.25rem, 4vw, 2.5rem);
    padding: clamp(1rem, 2.7vw, 1.75rem);
    border-inline-start: 4px solid var(--saemg-blue);
    background: var(--saemg-card-surface);
}

.saemg-dental-visit p { margin: .35rem 0 0; }

.saemg-dental-gallery { background: var(--saemg-card-surface); }

[data-saemg-profile="consultorio-odontologico"]:has(> .saemg-dental-gallery) + .saemg-membership {
    margin-block-start: var(--saemg-flow);
}

.saemg-dental-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.6rem, 2vw, 1.25rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.saemg-dental-gallery-grid a {
    display: block;
    border-radius: 12px;
    cursor: zoom-in;
}

.saemg-dental-gallery-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--saemg-card-border);
    border-radius: 12px;
    background: var(--saemg-white);
    object-fit: contain;
}

.saemg-dental-lightbox {
    width: min(calc(100% - 1rem), 54rem);
    max-height: calc(100% - 1rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: var(--saemg-radius);
    background: var(--saemg-navy);
    color: var(--saemg-white);
}

.saemg-dental-lightbox::backdrop { background: #10122dd9; }

.saemg-dental-lightbox-panel {
    display: grid;
    gap: .65rem;
    padding: .75rem;
}

.saemg-dental-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.saemg-dental-lightbox-panel img {
    display: block;
    width: 100%;
    height: min(72dvh, 46rem);
    object-fit: contain;
}

:root:has(.saemg-dental-lightbox[open]) { overflow: hidden; }

@media (max-width: 780px) {
    [data-saemg-profile="consultorio-odontologico"] .saemg-page-intro { --saemg-intro-copy-width: 100%; }
    .saemg-dental-appointment-grid { grid-template-columns: 1fr; }
    .saemg-dental-practitioner img { width: min(38vw, 10rem); }
    .saemg-dental-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .saemg-dental-schedule .saemg-button { width: 100%; }
}
