/* =========================================================
   CSS BERANDA - RS Dian Harapan
   Daftar isi:
   1. Variabel
   2. Umum
   3. Hero slider
   4. Quick access
   5. Cari dokter
   6. Layanan unggulan
   7. Dokter
   8. Artikel
   9. Partner
   10. Responsive
   11. Aksesibilitas
========================================================= */


/* =========================================================
   1. VARIABEL
========================================================= */

:root {
    /* Warna utama: ungu logo */
    --home-purple: #7B22AD;
    --home-purple-dark: #5A1580;
    --home-purple-deep: #2E0A47;
    --home-purple-soft: #F7ECFC;

    /* Aksen emas: pelengkap, bukan dari logo (tombol utama, highlight) */
    --home-gold: #f5a623;
    --home-gold-light: #fbc55a;
    --home-gold-dark: #e08e0b;

    /* Aksen darurat: merah logo (IGD saja) */
    --home-red: #D90429;

    --home-text: #2A1634;
    --home-muted: #7A6A85;
    --home-line: #F0E4F6;

    --home-shadow-sm: 0 8px 25px rgba(90, 20, 130, .07);
    --home-shadow-md: 0 15px 40px rgba(90, 20, 130, .12);
}


/* =========================================================
   2. UMUM
========================================================= */

.home-section {
    padding: 80px 0;
}

.home-section-white {
    background: #fff;
}

.home-section-light {
    background: linear-gradient(180deg, #FCF7FE 0%, #F7ECFC 100%);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 50px;
    background: var(--home-purple-soft);
    color: var(--home-purple);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
}

.section-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--home-gold);
}

.section-title {
    margin-top: 14px;
    color: var(--home-text);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

.section-description {
    max-width: 650px;
    margin: 12px auto 0;
    color: var(--home-muted);
    font-size: 1rem;
    line-height: 1.8;
}


/* =========================================================
   3. HERO SLIDER
========================================================= */

.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #F7ECFC, #FDF9FE);
}

.hero-carousel .carousel-item {
    position: relative;
    width: 100%;
    height: clamp(420px, 62vw, 720px);
    min-height: 420px;
    overflow: hidden;
}

.hero-carousel .carousel-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
    transition: transform 7s ease;
}

.hero-carousel .carousel-item.active img {
    transform: scale(1.06);
}

/* Overlay gelap di sisi kiri (agar teks terbaca) */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(40, 8, 64, .84) 0%,
        rgba(40, 8, 64, .60) 38%,
        rgba(40, 8, 64, .14) 75%,
        rgba(40, 8, 64, .05) 100%
    );
}

/* Gradasi gelap di bawah */
.hero-carousel .carousel-item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 35%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(24, 4, 40, .45), transparent);
}

/* Caption */
.hero-caption {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
}

.hero-caption .container {
    padding-top: 30px;
}

.hero-caption h2 {
    max-width: 720px;
    margin: 0 0 25px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.04em;
    text-shadow: 0 5px 25px rgba(0, 0, 0, .3);
}

/* Tombol CTA */
.carousel-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-hero,
.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: .25s ease;
}

.btn-hero {
    color: var(--home-purple-deep) !important;
    background: linear-gradient(135deg, var(--home-gold-light), var(--home-gold));
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.btn-hero:hover {
    color: var(--home-purple-deep) !important;
    background: linear-gradient(135deg, #ffd27a, var(--home-gold-light));
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, .28);
}

.btn-hero-ghost {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .6);
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-hero-ghost:hover {
    color: var(--home-purple-dark) !important;
    background: #fff;
    transform: translateY(-3px);
}

/* Indikator */
.hero-carousel .carousel-indicators {
    z-index: 10;
    bottom: 28px;
    margin-bottom: 0;
    justify-content: flex-start;
    padding-left: max(15px, calc((100% - 1320px) / 2));
}

.hero-carousel .carousel-indicators button {
    width: 30px;
    height: 4px;
    margin: 0 5px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .55);
    opacity: 1;
    transition: width .3s ease, background .3s ease;
}

.hero-carousel .carousel-indicators button.active {
    width: 60px;
    background: var(--home-gold);
}

/* Tombol prev/next */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    top: 50%;
    z-index: 8;
    width: 55px;
    height: 55px;
    margin: 0 25px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(-50%);
    transition: .3s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    background: #fff;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    width: 22px;
    height: 22px;
}


/* =========================================================
   4. QUICK ACCESS
========================================================= */

.quick-access-section {
    position: relative;
    z-index: 20;
    margin-top: -45px;
    padding-bottom: 30px;
}

.quick-access-card {
    height: 100%;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 22px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 20px 45px rgba(90, 20, 130, .14);
    transition: transform .3s ease, box-shadow .3s ease;
}

.quick-access-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 25px 55px rgba(90, 20, 130, .20);
}

.quick-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 1.55rem;
}

.quick-icon.purple { color: var(--home-purple); background: var(--home-purple-soft); }
.quick-icon.gold   { color: var(--home-gold-dark); background: #fff3dc; }
.quick-icon.red    { color: var(--home-red); background: #FDE8EC; }

.quick-access-card h3 {
    margin: 0 0 5px;
    color: var(--home-text);
    font-size: 1rem;
    font-weight: 800;
}

.quick-access-card p {
    margin: 0 0 8px;
    color: var(--home-muted);
    font-size: .86rem;
    line-height: 1.55;
}

.quick-access-card a {
    color: var(--home-purple) !important;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none !important;
}


/* =========================================================
   5. CARI DOKTER
========================================================= */

.hm-search {
    padding: 35px 0 75px;
}

.hm-search-card {
    position: relative;
    overflow: hidden;
    padding: 45px;
    border-radius: 30px;
    background: linear-gradient(120deg, #2E0A47 0%, #6A1A96 50%, #8E2FBF 100%);
    box-shadow: 0 25px 60px rgba(46, 10, 71, .28);
}

.hm-search-card::before,
.hm-search-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(245, 166, 35, .10);
}

.hm-search-card::before {
    width: 450px;
    height: 450px;
    right: -160px;
    top: -220px;
}

.hm-search-card::after {
    width: 280px;
    height: 280px;
    right: 230px;
    bottom: -220px;
    background: rgba(255, 255, 255, .07);
}

.hm-search-card > * {
    position: relative;
    z-index: 2;
}

.hm-search-card h2 {
    margin: 0 0 7px;
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
}

.hm-search-card p {
    margin: 0 0 25px;
    color: rgba(255, 255, 255, .88);
}

.hm-search-form {
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    gap: 12px;
}

.hm-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}

.hm-field i {
    color: var(--home-purple);
    font-size: 1.1rem;
}

.hm-field select,
.hm-field input {
    flex: 1;
    min-width: 0;
    height: 58px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--home-text);
    font-size: .95rem;
}

.hm-search-btn {
    min-height: 58px;
    padding: 0 27px;
    border: 0;
    border-radius: 15px;
    color: var(--home-purple-deep);
    background: linear-gradient(135deg, var(--home-gold-light), var(--home-gold));
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .22);
    transition: .25s ease;
}

.hm-search-btn:hover {
    background: linear-gradient(135deg, #ffd27a, var(--home-gold-light));
    transform: translateY(-2px);
}


/* =========================================================
   6. LAYANAN UNGGULAN
========================================================= */

.layanan-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--home-shadow-sm);
    text-decoration: none !important;
    transition: transform .3s ease, box-shadow .3s ease;
}

.layanan-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--home-shadow-md);
}

.layanan-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--home-purple-soft);
}

.layanan-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.layanan-card:hover .layanan-image img {
    transform: scale(1.07);
}

.layanan-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(46, 10, 71, .50));
}

.layanan-body {
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 17px;
    text-align: center;
}

.layanan-body h3 {
    margin: 0;
    color: var(--home-text);
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.4;
}


/* =========================================================
   7. DOKTER
========================================================= */

.doctor-card {
    height: 100%;
    padding: 25px 18px 20px;
    border: 1px solid var(--home-line);
    border-radius: 25px;
    background: #fff;
    text-align: center;
    box-shadow: var(--home-shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}

.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--home-shadow-md);
}

.doctor-photo {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 18px;
    overflow: hidden;
    border: 7px solid var(--home-purple-soft);
    border-radius: 50%;
    background: linear-gradient(145deg, #F7ECFC, #E6C9F3);
    box-shadow: 0 12px 30px rgba(123, 34, 173, .18);
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .5s ease;
}

.doctor-card:hover .doctor-photo img {
    transform: scale(1.07);
}

.doctor-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--home-purple);
    font-size: 4rem;
}

.doctor-specialist {
    display: inline-flex;
    padding: 6px 13px;
    border-radius: 50px;
    color: var(--home-purple);
    background: var(--home-purple-soft);
    font-size: .75rem;
    font-weight: 700;
}

.doctor-name {
    min-height: 48px;
    margin: 12px 0;
    color: var(--home-text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
}

.doctor-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    border-radius: 12px;
    color: var(--home-purple) !important;
    background: var(--home-purple-soft);
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: .25s ease;
}

.doctor-button:hover {
    color: #fff !important;
    background: var(--home-purple);
}


/* =========================================================
   8. ARTIKEL
========================================================= */

.article-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.article-title {
    margin: 13px 0 0;
    color: var(--home-text);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
}

/* Tombol geser + "Lihat Semua" sejajar */
.article-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Daftar artikel yang bisa digeser */
.artikel-scroll-container {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 5px 5px 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #DCB8EE transparent;
}

.artikel-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.artikel-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.artikel-scroll-container::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #DCB8EE;
}

.article-card {
    flex: 0 0 310px;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--home-shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}

.article-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--home-shadow-md);
}

.article-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #F7ECFC, #ECD6F6);
}

.article-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease;
}

.article-card:hover .article-image {
    transform: scale(1.06);
}

.article-category {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 5;
    padding: 6px 11px;
    border-radius: 50px;
    color: #fff;
    background: rgba(123, 34, 173, .94);
    font-size: .7rem;
    font-weight: 700;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.article-body {
    padding: 20px;
}

.article-body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.35em;
    margin: 0 0 18px;
    color: var(--home-text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
}

.article-read {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--home-line);
    color: var(--home-purple) !important;
    font-size: .83rem;
    font-weight: 700;
    text-decoration: none !important;
}

.article-read i {
    transition: transform .2s ease;
}

.article-read:hover i {
    transform: translateX(5px);
}

.scroll-btn {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border: 1px solid #EAD4F3;
    border-radius: 12px;
    color: var(--home-purple);
    background: #fff;
    transition: .25s ease;
}

.scroll-btn:hover {
    color: #fff;
    border-color: var(--home-purple);
    background: var(--home-purple);
}

.article-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 17px;
    border: 1px solid #E4CBF0;
    border-radius: 12px;
    color: var(--home-purple) !important;
    background: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none !important;
}

.article-all:hover {
    color: #fff !important;
    border-color: var(--home-purple);
    background: var(--home-purple);
}


/* =========================================================
   9. PARTNER (marquee 3 grup: animasi bergeser 1/3 lebar)
========================================================= */

.section-partner {
    padding: 65px 0;
    background: #fff;
}

.partner-heading {
    margin-bottom: 28px;
    color: var(--home-muted);
    font-size: .85rem;
    font-weight: 700;
    text-align: center;
}

.marquee-mask {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* Jarak antar kartu memakai margin-right (bukan gap)
   supaya lebar tiap grup tepat dan loop tidak melompat. */
.marquee-track {
    display: flex;
    width: max-content;
    animation: partnerScroll 35s linear infinite;
}

.marquee-mask:hover .marquee-track {
    animation-play-state: paused;
}

.partner-card-marquee {
    flex: 0 0 170px;
    width: 170px;
    height: 85px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 1px solid var(--home-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--home-shadow-sm);
}

.partner-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes partnerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-33.3333%); }
}


/* =========================================================
   10. RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {

    .hero-carousel .carousel-item {
        height: 520px;
    }

    .hero-caption h2 {
        max-width: 600px;
    }

    .hm-search-form {
        grid-template-columns: 1fr;
    }

    .hm-search-btn {
        width: 100%;
    }

    .doctor-photo {
        width: 145px;
        height: 145px;
    }

}


@media (max-width: 767.98px) {

    .home-section {
        padding: 55px 0;
    }

    .hero-carousel .carousel-item {
        height: 520px;
        min-height: 520px;
    }

    .hero-overlay {
        background: linear-gradient(
            90deg,
            rgba(40, 8, 64, .80),
            rgba(40, 8, 64, .30)
        );
    }

    .hero-caption {
        align-items: flex-end;
        padding-bottom: 95px;
    }

    .hero-caption h2 {
        margin-bottom: 18px;
        font-size: 2rem;
        line-height: 1.15;
    }

    .carousel-cta {
        gap: 8px;
    }

    .btn-hero,
    .btn-hero-ghost {
        min-height: 45px;
        padding: 0 16px;
        font-size: .8rem;
    }

    .hero-carousel .carousel-indicators {
        bottom: 25px;
        padding-left: 15px;
    }

    .quick-access-section {
        margin-top: -30px;
    }

    .quick-access-card {
        padding: 20px;
    }

    .hm-search {
        padding: 25px 0 55px;
    }

    .hm-search-card {
        padding: 28px 20px;
        border-radius: 23px;
    }

    .hm-search-form {
        gap: 10px;
    }

    .article-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-controls {
        width: 100%;
        justify-content: space-between;
    }

    .article-card {
        flex-basis: 285px;
    }

    .partner-card-marquee {
        flex-basis: 145px;
        width: 145px;
        height: 75px;
    }

}


@media (max-width: 575.98px) {

    .hero-carousel .carousel-item {
        height: 500px;
        min-height: 500px;
    }

    .hero-caption {
        padding-bottom: 80px;
    }

    .hero-caption h2 {
        font-size: 1.65rem;
    }

    .btn-hero,
    .btn-hero-ghost {
        min-height: 42px;
        padding: 0 13px;
        gap: 6px;
        font-size: .76rem;
    }

    .quick-access-card {
        border-radius: 18px;
    }

    .doctor-photo {
        width: 125px;
        height: 125px;
        border-width: 5px;
    }

    .doctor-placeholder {
        font-size: 3rem;
    }

}


/* =========================================================
   11. AKSESIBILITAS
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .marquee-track {
        animation: none !important;
    }

    .hero-carousel .carousel-item.active img {
        transform: scale(1.01);
    }

}