/* =========================================================
   CSS HEADER / FOOTER / GLOBAL - RS Dian Harapan
   Palet: ungu logo (utama), merah logo (darurat), emas (aksen pelengkap)
   Ganti warna cukup di blok :root di bawah ini.
========================================================= */

:root {
    /* Ungu logo */
    --brand: #7B22AD;
    --brand-deep: #5A1580;
    --brand-ink: #2E0A47;

    /* Aksen emas: pelengkap, bukan dari logo */
    --accent: #F5A623;
    --accent-dark: #E08E0B;
    --teal: #FBC55A;            /* emas muda: fokus, garis, hover */

    /* Merah logo (darurat/IGD) */
    --red: #D90429;

    /* Netral keunguan */
    --mint-50: #F7ECFC;
    --mint-100: #FCF6FE;
    --slate: #5F5068;
    --ink: #2A1634;
    --line: #F0E4F6;
    --bg: #FCF7FE;

    --shadow-sm: 0 4px 16px rgba(90, 20, 130, .07);
    --shadow-md: 0 18px 48px rgba(90, 20, 130, .13);
    --shadow-lg: 0 28px 70px rgba(90, 20, 130, .19);
    --radius: 1.5rem;

    /* Alias lama (dipakai halaman lain) */
    --rs-primary: #7B22AD;
    --rs-dark: #2A1634;
    --rs-text: #5F5068;
    --rs-muted: #86768F;
    --rs-border: #F0E4F6;
}

html, body { margin: 0; padding: 0; width: 100%; min-height: 100%; scroll-behavior: smooth; }

body {
    overflow-x: hidden;
    background: #fff;
    color: var(--slate);
    line-height: 1.75;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 1.0625rem;
}

h1, h2, h3, h4, h5, h6 { color: var(--ink); letter-spacing: -.02em; }

a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }


/* =========================================================
   TOP BAR
========================================================= */

.top-header {
    background: linear-gradient(90deg, var(--brand-ink), var(--brand-deep) 60%, var(--brand)) !important;
    color: #F6E9FB !important;
    font-size: .8rem;
    border: 0 !important;
}

.top-header .text-white,
.top-header a,
.top-header span { color: #FBF3FE !important; text-decoration: none; }

.top-header a:hover { opacity: .8; }
.top-header .text-warning { color: var(--teal) !important; }
.top-header .text-danger { color: #FFB4AE !important; }

.top-header .btn-success {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50px;
    color: #fff !important;
    font-weight: 600;
}

.top-header .btn-success:hover { background: rgba(255, 255, 255, .24); }

.top-header a.fw-bold {
    padding: .25rem .9rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}

.top-header a.fw-bold:hover { background: rgba(255, 255, 255, .24); opacity: 1; }


/* =========================================================
   NAVBAR
========================================================= */

.header-wrapper { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; }

.header-wrapper .navbar {
    padding: .35rem 0;
    background: rgba(255, 255, 255, .86) !important;
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(240, 228, 246, .9);
    box-shadow: 0 6px 24px rgba(90, 20, 130, .06) !important;
}

/* Garis warna di bawah navbar: ungu -> emas */
.header-wrapper .navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent), var(--teal));
}

.navbar-nav .nav-link {
    position: relative;
    color: var(--ink) !important;
    font-weight: 500;
}

.navbar-nav .nav-link::after { display: none !important; }

.navbar-nav > .nav-item > .nav-link {
    padding: .7rem 1.1rem !important;
    border-radius: 14px;
    font-size: 1.02rem;
    transition: background .2s ease, color .2s ease;
}

.navbar-nav > .nav-item > .nav-link:hover { background: var(--mint-100); color: var(--brand) !important; }
.navbar-nav > .nav-item > .nav-link.active { background: var(--mint-50); color: var(--brand) !important; }

.navbar-nav .dropdown-toggle::after {
    border: 0;
    content: "\25BE";
    font-size: .8rem;
    margin-left: .3rem;
    position: static;
    height: auto;
    background: none;
    transform: none;
    display: inline;
    vertical-align: baseline;
}

.dropdown-menu {
    border: 1px solid var(--line) !important;
    border-radius: 16px;
    padding: .6rem;
    box-shadow: var(--shadow-md) !important;
}

.dropdown-item {
    padding: .7rem 1rem;
    border-radius: 12px;
    color: var(--slate);
    font-size: 1rem;
}

.dropdown-item:hover { background: var(--mint-100); color: var(--brand); }

.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu { top: -.6rem; left: 100%; margin-top: 0; margin-left: .3rem; }
.dropdown-submenu:hover .dropdown-menu { display: block; }

.header-wrapper .btn-primary {
    padding: .75rem 1.5rem !important;
    border: 0;
    border-radius: 14px !important;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 8px 20px rgba(123, 34, 173, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

.header-wrapper .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(123, 34, 173, .36);
}


/* =========================================================
   MENU MOBILE
========================================================= */

@media (max-width: 991.98px) {

    .header-wrapper .navbar {
        background: #fff !important;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .header-wrapper .navbar-collapse {
        margin-top: .75rem;
        padding: .75rem;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 1.25rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav > .nav-item > .nav-link { padding: .9rem 1.1rem !important; font-size: 1.05rem; }
    .dropdown-item { padding: .85rem 1rem; }

    .dropdown-submenu .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin: 0 0 0 .75rem;
        background: transparent;
        border: 0 !important;
        box-shadow: none !important;
    }

    .dropdown-submenu > .dropdown-menu { display: block; }
    .dropdown-submenu > .dropdown-toggle::after { display: none; }

    .top-header .contact-info { display: none !important; }
}


/* =========================================================
   HERO (dasar - detail halaman beranda ada di css-index.css)
========================================================= */

.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--brand-ink);
    border-radius: 0 0 2.5rem 2.5rem;
}

.carousel-item.active .hero-caption h2,
.carousel-item.active .carousel-cta { animation: heroIn .8s ease both; }

.carousel-item.active .carousel-cta { animation-delay: .15s; }

@keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* Tombol (dipakai di hero dan CTA footer) */
.btn-hero,
.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.6rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

.btn-hero {
    background: linear-gradient(135deg, #FBC55A, var(--accent));
    color: var(--brand-ink);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.btn-hero:hover { transform: translateY(-3px); color: var(--brand-ink); background: linear-gradient(135deg, #FFD27A, #FBC55A); }

.btn-hero-ghost {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .4);
}

.btn-hero-ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; transform: translateY(-3px); }

@media (max-width: 767.98px) {
    .hero-carousel-wrapper { border-radius: 0 0 1.75rem 1.75rem; }
    .btn-hero, .btn-hero-ghost { padding: .65rem 1.2rem; font-size: .85rem; }
}


/* =========================================================
   KOMPONEN UMUM (dipakai di banyak halaman)
========================================================= */

.text-primary { color: var(--brand) !important; }

.badge.bg-primary {
    background: rgba(255, 255, 255, .92) !important;
    color: var(--brand) !important;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: .9rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.section-label { border: 1px solid var(--line); box-shadow: var(--shadow-sm); }


/* =========================================================
   KARTU LAYANAN & ARTIKEL (markup lama / halaman lain)
========================================================= */

.card-layanan-foto {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .35s ease, box-shadow .35s ease;
}

.card-layanan-foto:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }

.card-layanan-image-wrapper { position: relative; overflow: hidden; }

.card-layanan-foto-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .6s ease;
}

.card-layanan-foto:hover .card-layanan-foto-img { transform: scale(1.07); }

.layanan-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 50%, rgba(46, 10, 71, .40));
}

.card-layanan-foto .card-body {
    justify-content: space-between !important;
    text-align: left !important;
    gap: .75rem;
    padding: 1.1rem 1.25rem !important;
}

.card-layanan-foto .card-body h3 { font-size: 1.05rem; transition: color .25s ease; }
.card-layanan-foto:hover .card-body h3 { color: var(--brand) !important; }

.card-layanan-foto .card-body::after {
    content: "\2192";
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mint-50);
    color: var(--brand);
    font-weight: 700;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.card-layanan-foto:hover .card-body::after { background: var(--brand); color: #fff; transform: translateX(3px); }

.card-artikel-item {
    flex: 0 0 clamp(280px, 26vw, 340px);
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}

.card-artikel-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-artikel-item .position-relative { overflow: hidden; }
.card-artikel-item .small { font-size: .95rem; }

.card-artikel-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .5s ease;
}

.card-artikel-item:hover .card-artikel-img { transform: scale(1.05); }

.title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.4;
}


/* =========================================================
   QUICK ACCESS (markup lama / halaman lain)
========================================================= */

.card-quick-access {
    border: 1px solid rgba(255, 255, 255, .8) !important;
    border-top: 4px solid var(--brand) !important;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--shadow-lg);
    transition: transform .3s ease, box-shadow .3s ease;
}

.card-quick-access:hover { transform: translateY(-6px); box-shadow: 0 34px 80px rgba(90, 20, 130, .24); }

.quick-access-section .col-md-4:nth-child(1) .card-quick-access { border-top-color: var(--accent) !important; }
.quick-access-section .col-md-4:nth-child(3) .card-quick-access { border-top-color: var(--red) !important; }

.icon-box-quick {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    box-shadow: 0 10px 22px rgba(90, 20, 130, .22);
}

.quick-access-section .bg-primary { background: linear-gradient(135deg, #9B3BC9, #7B22AD) !important; }
.quick-access-section .bg-success { background: linear-gradient(135deg, #FBC55A, #E08E0B) !important; }
.quick-access-section .bg-danger  { background: linear-gradient(135deg, #EA3A52, #D90429) !important; }

.icon-box-quick.text-success,
.icon-box-quick.text-primary,
.icon-box-quick.text-danger { color: #fff !important; }

.quick-access-section .text-primary { color: var(--brand) !important; }
.quick-access-section .text-success { color: var(--accent-dark) !important; }
.quick-access-section .text-danger  { color: var(--red) !important; }

.quick-access-title { color: var(--ink); font-size: 1.1rem; font-weight: 700; }
.quick-access-description { color: var(--slate); font-size: .95rem; line-height: 1.65; }

.quick-access-section a i { transition: transform .2s ease; display: inline-block; }
.quick-access-section a:hover i { transform: translateX(4px); }


/* =========================================================
   CTA IGD (sebelum footer)
========================================================= */

.cta-strip { padding: 0 0 7rem; background: #fff; }

.cta-card {
    position: relative;
    overflow: hidden;
    padding: 3.25rem;
    border-radius: 2rem;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-ink) 0%, var(--brand) 62%, #9B3BC9 100%);
    box-shadow: var(--shadow-lg);
}

.cta-card::before,
.cta-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(245, 166, 35, .12);
    pointer-events: none;
}

.cta-card::before { width: 320px; height: 320px; right: -90px; top: -120px; }
.cta-card::after  { width: 200px; height: 200px; right: 160px; bottom: -110px; background: rgba(255, 255, 255, .07); }

.cta-card h2 { margin-bottom: .5rem; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
.cta-card p { margin: 0; max-width: 520px; color: rgba(255, 255, 255, .88); }
.cta-card .btn-hero,
.cta-card .btn-hero-ghost { position: relative; z-index: 1; }

@media (max-width: 767.98px) {
    .cta-card { padding: 2.25rem 1.5rem; border-radius: 1.5rem; }
    .cta-strip { padding-bottom: 5.5rem; }
}


/* Tombol IGD WhatsApp mengambang: gayanya ada di includes/footer.php */


/* =========================================================
   FOOTER
========================================================= */

.footer {
    position: relative;
    overflow: hidden;
    margin-top: -40px;
    padding: 5.5rem 0 2rem;
    background: linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-ink) 100%) !important;
    color: #D9C2E6 !important;
    border-radius: 2.5rem 2.5rem 0 0;
}

.footer::before {
    content: "";
    position: absolute;
    top: -140px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, .20), transparent 65%);
    pointer-events: none;
}

.footer .container { position: relative; z-index: 1; }

.footer h5 {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: .8rem;
    color: #fff !important;
    font-size: 1.05rem;
    font-weight: 600;
}

.footer h5::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.footer a { color: #D9C2E6 !important; text-decoration: none; transition: color .2s ease; }
.footer a:hover { color: #fff !important; }

.footer-description { margin-top: 1.25rem; font-size: .97rem; }

.footer-socials a {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: .6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff !important;
    font-size: 1.15rem;
    transition: background .2s ease, transform .2s ease;
}

.footer-socials a:hover { background: var(--accent); color: var(--brand-ink) !important; transform: translateY(-3px); }

.footer-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: .9rem; font-size: .97rem; }
.footer-contact-list strong { display: block; margin-bottom: .1rem; color: #fff; font-weight: 600; }

.footer-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .09);
    color: var(--teal);
}

.footer .footer-map iframe {
    width: 100%;
    height: 210px;
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.footer-line { height: 1px; margin: 3rem 0 1.5rem; background: rgba(255, 255, 255, .12); }
.footer .copyright { margin: 0; font-size: .85rem; color: #B79ACB; }

.footer-top-button { text-align: right; }

.footer-top-button a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, .1);
    font-size: .85rem;
}

@media (max-width: 767.98px) {
    .footer { padding-top: 4rem; border-radius: 1.75rem 1.75rem 0 0; }
    .footer-top-button { text-align: left; margin-top: 1rem; }
}


/* =========================================================
   AKSESIBILITAS
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}