/* Tampilan menu dokter, profil, riwayat, dan tabel jadwal. */
/* Dropdown Dokter mengikuti ukuran dan jarak menu utama. */
.header-v2 .doctor-menu {
    position: relative;
    flex-shrink: 0;
}

.header-v2 .doctor-menu summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.header-v2 .doctor-menu summary::-webkit-details-marker {
    display: none;
}

.header-v2 .doctor-menu summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.header-v2 .doctor-menu[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}

.header-v2 .doctor-menu summary:hover,
.header-v2 .doctor-menu[open] summary {
    background: #eef6ef;
    color: #084b33;
}

.header-v2 .doctor-menu[data-active] summary {
    border-color: #18733d;
    color: #084b33;
}

.header-v2 .doctor-submenu {
    position: absolute;
    z-index: 25;
    top: calc(100% + 12px);
    left: 0;
    min-width: 200px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px #143e3414;
}

.header-v2 .doctor-submenu a {
    display: block;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.header-v2 .doctor-submenu a:hover,
.header-v2 .doctor-submenu a[aria-current='page'] {
    background: var(--mint);
    color: var(--green);
}

/* Penyesuaian tata letak untuk layar yang lebih kecil. */
@media (max-width: 1250px) {
    .header-v2 .doctor-menu summary {
        padding: 9px 12px;
    }
}

/* Penyesuaian tata letak untuk layar yang lebih kecil. */
@media (max-width: 1050px) {
    .header-v2 .doctor-submenu {
        position: static;
        margin-top: 6px;
        box-shadow: none;
        min-width: 0;
    }
}

.doctor-profile-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 48px;
    margin-top: 32px;
}

.doctor-profile-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.doctor-history {
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.doctor-history h2 {
    font-size: 24px;
    margin-bottom: 14px;
}

.doctor-history p {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Penyesuaian tata letak untuk layar yang lebih kecil. */
@media (max-width: 800px) {
    .doctor-profile-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .doctor-profile-photo {
        max-width: 300px;
    }
}

.doctor-history-text ul,
.doctor-history-text ol {
    padding-left: 24px;
    margin: 0 0 16px;
    color: var(--muted);
}

.doctor-history-text li {
    padding: 4px 0;
    overflow-wrap: anywhere;
}

.doctor-history-text p + p {
    margin-top: 12px;
}

.doctor-schedule-table {
    min-width: 960px;
    table-layout: fixed;
}
.doctor-schedule-container {
    max-width: 1360px;
}
.doctor-schedule-table th,
.doctor-schedule-table td {
    padding: 16px 12px;
}
.schedule-doctor {
    display: flex;
    align-items: center;
    gap: 14px;
}
.schedule-doctor span {
    overflow-wrap: anywhere;
}
.schedule-doctor-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 32%;
    background: var(--mint);
}
.schedule-session {
    display: grid;
    grid-template-columns: 19fr 15fr;
    align-items: start;
    padding: 5px 0;
}
.schedule-session > span:first-child {
    padding-right: 24px;
}
.schedule-session > span:last-child {
    padding-left: 10px;
    white-space: nowrap;
}
.doctor-schedule-table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}
.doctor-schedule-table .schedule-book-cell {
    text-align: center;
}
.doctor-schedule-table th:last-child {
    text-align: center;
}
.doctor-schedule-table th:nth-child(4),
.doctor-schedule-table .schedule-times {
    padding-left: 84px;
}
.schedule-session-value {
    padding: 5px 0;
    min-height: 30px;
    white-space: nowrap;
}
.schedule-book-link {
    display: inline-block;
    color: var(--green);
    font-weight: 600;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        color 0.2s ease;
}
.schedule-book-link:hover,
.schedule-book-link:focus-visible {
    color: var(--dark);
    transform: translateX(4px);
}
/* Mengikuti pilihan pengguna yang ingin mengurangi gerakan animasi. */
@media (prefers-reduced-motion: reduce) {
    .schedule-book-link {
        transition: none;
    }
    .schedule-book-link:hover,
    .schedule-book-link:focus-visible {
        transform: none;
    }
}

/* Galeri dokter beranda: tiga kartu di desktop, dapat digeser di semua ukuran. */
.doctor-showcase > .container.section {
    padding-top: 28px;
    padding-bottom: 24px;
}
.doctor-carousel-shell {
    position: relative;
}
.doctor-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 44px) / 3);
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0;
}
.doctor-carousel-track::-webkit-scrollbar {
    display: none;
}
.doctor-carousel-track > .doctor-card {
    min-width: 0;
    scroll-snap-align: start;
    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}
.doctor-showcase .doctor-card:hover {
    border-color: #a4c8b8;
    box-shadow: 0 8px 22px #164d4412;
}
.doctor-showcase .doctor-photo img {
    transition: transform 0.5s ease;
}
.doctor-showcase .doctor-card:hover .doctor-photo img {
    transform: scale(1.035);
}
.doctor-carousel-arrow {
    position: absolute;
    top: 42%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 0;
    line-height: 1;
    box-shadow: none;
    transition:
        color 0.2s,
        opacity 0.2s;
}
.doctor-carousel-arrow::before {
    content: '';
    width: 16px;
    height: 16px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    transform: translateX(-4px) rotate(45deg);
}
.doctor-carousel-prev::before {
    transform: translateX(4px) rotate(-135deg);
}
.doctor-carousel-prev {
    left: -38px;
}
.doctor-carousel-next {
    right: -38px;
}
.doctor-carousel-arrow:hover:not(:disabled) {
    color: #fff;
}
.doctor-carousel-arrow:disabled {
    opacity: 0.4;
    cursor: default;
}
.doctor-showcase-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.doctor-showcase-more .doctor-more-button {
    min-width: 240px;
    padding: 14px 36px;
    border: 1px solid var(--green);
    border-radius: 999px;
    background: transparent;
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}
.doctor-showcase-more .doctor-more-button:hover {
    background: #16736608;
    box-shadow: 0 0 0 3px #16736608;
    transform: none;
}
.doctor-showcase-more .doctor-more-button:active {
    background: var(--green);
    color: #fff;
    box-shadow: none;
}
.doctor-showcase.reveal-ready .section-heading,
.doctor-showcase.reveal-ready .doctor-carousel-shell,
.doctor-showcase.reveal-ready .doctor-showcase-more {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.doctor-showcase.is-revealed .section-heading,
.doctor-showcase.is-revealed .doctor-carousel-shell,
.doctor-showcase.is-revealed .doctor-showcase-more {
    opacity: 1;
    transform: translateY(0);
}
.doctor-showcase.is-revealed .doctor-carousel-shell {
    transition-delay: 0.12s;
}
.doctor-showcase.is-revealed .doctor-showcase-more {
    transition-delay: 0.22s;
}
.doctor-showcase.reveal-ready .doctor-card {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
}
.doctor-showcase.is-revealed .doctor-card {
    opacity: 1;
    transform: translateY(0);
}
.doctor-showcase.is-revealed .doctor-card:nth-child(3n + 2) {
    transition-delay: 0.1s;
}
.doctor-showcase.is-revealed .doctor-card:nth-child(3n) {
    transition-delay: 0.2s;
}
/* Penyesuaian tata letak untuk layar yang lebih kecil. */
@media (max-width: 900px) {
    .doctor-carousel-track {
        grid-auto-columns: calc((100% - 22px) / 2);
    }
}
/* Penyesuaian tata letak untuk layar yang lebih kecil. */
@media (max-width: 600px) {
    .doctor-showcase > .container.section {
        padding-top: 24px;
        padding-bottom: 24px;
    }
    .doctor-carousel-track {
        gap: 16px;
        grid-auto-columns: 100%;
    }
    .doctor-carousel-arrow {
        width: 38px;
        height: 38px;
    }
    .doctor-carousel-prev {
        left: -28px;
    }
    .doctor-carousel-next {
        right: -28px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .doctor-showcase.reveal-ready .doctor-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .doctor-showcase.reveal-ready .section-heading,
    .doctor-showcase.reveal-ready .doctor-carousel-shell,
    .doctor-showcase.reveal-ready .doctor-showcase-more {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .doctor-showcase .doctor-photo img,
    .doctor-showcase .doctor-card,
    .doctor-showcase .button {
        transition: none;
    }
    .doctor-showcase .doctor-card:hover .doctor-photo img {
        transform: none;
    }
}

.home-partners {
    padding-top: 32px;
    padding-bottom: 32px;
    border-top: 1px solid var(--line);
}
.partner-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 22px;
}
.home-partners h2 {
    text-align: center;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}
.home-partners h2 {
    letter-spacing: 0.06em;
    word-spacing: 0.12em;
}
.partner-subtitle {
    max-width: 860px;
    margin: -10px auto 24px;
    text-align: center;
    font-size: 15px;
    line-height: 1.8;
}
.partner-carousel-shell {
    position: relative;
    padding: 0 24px;
}
.home-partner-logos {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 96px) / 5);
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}
.home-partner-logos::-webkit-scrollbar {
    display: none;
}
.home-partner-logos figure {
    margin: 0;
    height: 110px;
    padding: 12px 8px;
    display: grid;
    place-items: center;
    scroll-snap-align: start;
}
.home-partner-logos img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.home-partner-logos figure:hover img {
    transform: scale(1.05);
}
.partner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--green);
}
.partner-prev {
    left: -18px;
}
.partner-next {
    right: -18px;
}
.partner-arrow::before {
    content: '';
    width: 14px;
    height: 14px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    transform: rotate(45deg);
}
.partner-prev::before {
    transform: rotate(-135deg);
}
.partner-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}
.partner-arrow:hover:not(:disabled) {
    color: var(--dark);
}
.home-partners.partner-reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.home-partners.partner-revealed {
    opacity: 1;
    transform: none;
}
@media (max-width: 900px) {
    .home-partner-logos {
        grid-auto-columns: calc((100% - 48px) / 3);
    }
}
@media (max-width: 600px) {
    .home-partner-logos {
        grid-auto-columns: calc((100% - 20px) / 2);
        gap: 20px;
    }
    .home-partner-logos figure {
        height: 90px;
    }
    .partner-heading {
        gap: 12px;
    }
    .partner-heading-accent {
        width: 28px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-partners.partner-reveal-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .home-partner-logos img {
        transition: none;
    }
    .home-partner-logos figure:hover img {
        transform: none;
    }
}

/* Gerakan khusus daftar dokter; posisi foto dan tata letak tetap stabil. */
@media (prefers-reduced-motion: no-preference) {
    #doctors-list .doctor-card {
        animation: doctor-directory-float 4.8s ease-in-out infinite;
        transition:
            transform 240ms ease,
            box-shadow 240ms ease,
            border-color 240ms ease;
    }
    #doctors-list .doctor-card:nth-child(3n + 2) {
        animation-delay: -1.6s;
    }
    #doctors-list .doctor-card:nth-child(3n) {
        animation-delay: -3.2s;
    }
    #doctors-list .doctor-cta span {
        display: inline-block;
        transition: transform 240ms ease;
    }
    #doctors-list .doctor-card:focus-within {
        animation-play-state: paused;
        transform: translateY(-4px);
        box-shadow: 0 16px 32px #164d441a;
        border-color: var(--green);
    }
    @media (hover: hover) {
        #doctors-list .doctor-card:hover {
            animation-play-state: paused;
            transform: translateY(-4px);
            box-shadow: 0 16px 32px #164d441a;
            border-color: var(--green);
        }
        #doctors-list .doctor-card:hover .doctor-cta span {
            transform: translateX(4px);
        }
    }
}
@keyframes doctor-directory-float {
    0%,
    100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -6px;
    }
}
