body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: aliceblue;
}

header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

footer {
    margin-top: auto;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Shadow untuk sticky effect */
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem 1rem;
}

/* Hover effect modern dengan underline animasi */
.navbar-nav .nav-link {
    position: relative;
    font-weight: 500;
    color: #fff;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 50%;
    height: 2px;
    background-color: #ffc107;
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-link:hover {
    color: #ffc107; /* highlight text saat hover */
    background-color: rgba(255, 255, 255, 0.05); /* subtle background */
    border-radius: 6px;
}

/* Active state */
.navbar-nav .nav-link.active {
    color: #ffc107;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* subtle shadow untuk menonjolkan */
}

.navbar-nav .nav-item {
    margin-left: 0.8rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
}

.navbar-brand img {
    padding: 3px;
    border-radius: 6px;
}

.table th {
    font-weight: 600;
    color: #5a6a85;
}

.table td {
    color: #5a6a85;
}

.badge {
    font-weight: 500;
}

.btn-warning {
    background-color: #ffb703;
    border: none;
}

.btn-warning:hover {
    background-color: #fca311;
}

.icon-box {
    width: 70px;
    height: 70px;
    margin: auto;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
}

.card h2 {
    color: #2c3e50;
}

/* Dropdown hover */
@media (min-width: 992px) {

    .navbar .dropdown-menu {
        display: block;              /* selalu block */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: 
            opacity 0.25s ease-in-out,
            transform 0.25s ease-in-out,
            visibility 0s linear 0.25s;
    }

    /* MUNCUL LANGSUNG */
    .navbar .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0s;
    }
}

.dropdown-item {
    transition: background-color .2s ease, color .2s ease, padding-left .2s ease;
}

.dropdown-item:hover {
    background-color: #0d6efd;
    color: #ffffff;
    padding-left: 1.5rem;
}

.dropdown-menu .dropdown-item {
    border-left: 0 solid #ffc107;
    transition:
        border-left 0.25s ease,
        padding-left 0.25s ease,
        background-color 0.25s ease;
}

.dropdown-menu .dropdown-item:hover {
    border-left: 4px solid #ffc107;
    padding-left: 1.6rem;
}

.dropdown-item.active {
    border-left: 4px solid #ffc107;
    padding-left: 1.6rem;
    background-color: #0d6efd;
    color: #ffffff;
}

/* underline hover tetap di ::after */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 50%;
    height: 2px;
    background-color: #ffc107;
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* panah selalu di kanan */
.navbar-nav .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem; /* jarak teks dan panah */
}

.navbar-nav .dropdown-arrow {
    font-size: 0.6em;
    color: #ffc107;
    transition: transform 0.3s ease;
}

/* rotate saat dropdown terbuka */
.navbar-nav .dropdown:hover .dropdown-arrow,
.navbar-nav .dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* HEADER SLIDER */
.header-img {
    height: 550px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.45);
    padding: 15px 25px;
    border-radius: 8px;
}

.carousel-caption h5 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.carousel-caption p {
    font-size: 1rem;
    margin-bottom: 0;
}

.carousel-item {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Mobile */
@media (max-width: 576px) {
    .header-img {
        height: 220px;
    }
    .carousel-caption {
        font-size: 0.9rem;
    }
}

.slide-item {
    cursor: grab;
}
.slide-item:active {
    cursor: grabbing;
}

/* =========================================
   HEADER - OVERLAY GELAP BAGIAN ATAS
   ========================================= */

#headerCarousel {
    position: relative;
}


/* Overlay gelap pada bagian atas header */

#headerCarousel::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 180px;

    z-index: 2;

    pointer-events: none;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.75),
        rgba(0, 0, 0, 0.30),
        rgba(0, 0, 0, 0)
    );
}


/* Pastikan navbar berada di atas overlay */

#mainNavbar {
    z-index: 1030;
}


/* Carousel indicators tetap di atas gambar */

#headerCarousel .carousel-indicators {
    z-index: 5;
}


/* Caption tetap di atas gambar */

#headerCarousel .carousel-caption {
    z-index: 5;
}

/* ============================= */
/* IDENTITAS RTH RANTAU BARU */
/* ============================= */
:root {
    --rth-green: #2e7d32;
    --rth-green-light: #4caf50;
}

/* ============================= */
/* SECTION KONTEN UMUM */
/* ============================= */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    color: var(--rth-green);
    font-weight: 700;
}

.section-title p {
    color: #6c757d;
    max-width: 720px;
    margin: auto;
}

/* ============================= */
/* FASILITAS RTH */
/* ============================= */
.facility-card h5 {
    color: var(--rth-green);
    font-weight: 600;
}

.facility-card ul {
    list-style: none;
    padding-left: 0;
}

.facility-card ul li {
    margin-bottom: 0.4rem;
}

.facility-card ul li::before {
    content: "✔";
    color: var(--rth-green-light);
    margin-right: 8px;
}

/* ============================= */
/* GALERI FOTO */
/* ============================= */
.gallery-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    transition: 
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ============================= */
/* PETA LOKASI */
/* ============================= */
.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.map-wrapper iframe {
    width: 100%;
    height: 400px;
    border: 0;
}

/* ============================= */
/* AKSESIBILITAS TAMBAHAN */
/* ============================= */
.gallery-img:focus {
    outline: 3px solid var(--rth-green-light);
    outline-offset: 2px;
}

/* ============================= */
/* MODERN ENHANCEMENT (AMAN) */
/* ============================= */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* HERO MODERN */
.hero-modern {
    min-height: 65vh;
    background:
        linear-gradient(135deg, rgba(46,125,50,0.85), rgba(0,0,0,0.55)),
        url('images/rth.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-modern h1 {
    font-size: clamp(2.3rem, 4vw, 3.5rem);
    font-weight: 800;
}

.hero-modern p {
    max-width: 650px;
    font-size: 1.15rem;
    opacity: 0.95;
}

/* CARD MODERN */
.card-modern {
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.18);
}

/* SECTION DIVIDER */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    display: block;
    margin: 0 auto 15px;
    width: 80px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(
        to right,
        var(--rth-green),
        var(--rth-green-light)
    );
}

/* BUTTON CTA */
.btn-cta {
    border-radius: 50px;
    padding: 0.75rem 2.2rem;
    font-weight: 600;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s ease-in-out;
    animation: pulse 2s infinite;
}

.floating-wa:hover {
    background-color: #1ebe5d;
    transform: scale(1.1);
    color: white;
}

/* Animasi Pulse */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Responsive kecilkan di mobile */
@media (max-width: 576px) {
    .floating-wa {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

/* toggle switch status aduan */
.status-toggle:checked {
    background-color: #198754; /* hijau */
    border-color: #198754;
}
.status-toggle:not(:checked) {
    background-color: #dc3545; /* merah */
    border-color: #dc3545;
}

.krb-img{
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
}

@media (max-width: 768px){
    .krb-img{
        max-height: 220px;
    }
}

/* Tooltip Kecamatan & Desa */
.info-tooltip{
    background:#fff;
    border:1px solid #d0d0d0;
    border-radius:8px;
    padding:6px 10px;
    font-size:13px;
    font-weight:600;
    color:#333;
    box-shadow:0 2px 8px rgba(0,0,0,.15);
}

/* Hilangkan panah bawaan tooltip */
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before{
    display:none;
}

/* Animasi polygon */
.leaflet-interactive{
    transition:all .35s ease;
}

.leaflet-interactive{
    transition:
        fill-opacity .35s ease,
        opacity .35s ease,
        stroke-width .35s ease;
}

.fade-in{
    animation: fadePolygon .35s ease;
}

@keyframes fadePolygon{

    from{
        opacity:0;
    }

    to{
        opacity:1;
    }

}

/* =====================================================
   GOOEY DASHBOARD CARD
   KHUSUS .gooey-card
   Tidak mempengaruhi .card lainnya
===================================================== */

.gooey-card {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate;

    border: 0 !important;
    border-radius: 22px !important;

    background: #ffffff !important;

    cursor: pointer;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease !important;
}


/* Hover card */
.gooey-card:hover {
    transform: translateY(-7px) !important;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.18) !important;
}


/* =====================================================
   LINGKARAN UTAMA
===================================================== */

.gooey-card .gooey-bg {
    position: absolute !important;

    width: 110px !important;
    height: 110px !important;

    right: -45px !important;
    bottom: -45px !important;

    display: block !important;

    border-radius: 50% !important;

    background: var(--gooey-color) !important;

    opacity: 0.35 !important;

    z-index: 0 !important;

    pointer-events: none !important;

    transform: translateZ(0);

    transition:
        width 0.65s cubic-bezier(.4, 0, .2, 1),
        height 0.65s cubic-bezier(.4, 0, .2, 1),
        right 0.65s cubic-bezier(.4, 0, .2, 1),
        bottom 0.65s cubic-bezier(.4, 0, .2, 1),
        opacity 0.35s ease !important;
}


/* =====================================================
   LINGKARAN KECIL KEDUA
===================================================== */

.gooey-card::before {
    content: "" !important;

    position: absolute !important;

    width: 55px !important;
    height: 55px !important;

    left: -20px !important;
    top: -20px !important;

    border-radius: 50% !important;

    background: var(--gooey-color) !important;

    opacity: 0.15 !important;

    z-index: 0 !important;

    pointer-events: none;

    transition:
        width 0.6s ease,
        height 0.6s ease,
        transform 0.6s ease,
        opacity 0.4s ease !important;
}


/* =====================================================
   CONTENT CARD
===================================================== */

.gooey-card .card-body {
    position: relative !important;

    z-index: 2 !important;

    padding: 30px 20px !important;
}


/* =====================================================
   ICON
===================================================== */

.gooey-card .icon-box {
    position: relative !important;

    z-index: 3 !important;

    width: 70px;
    height: 70px;

    margin-left: auto !important;
    margin-right: auto !important;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: var(--gooey-color) !important;

    color: #ffffff;

    font-size: 30px;

    transition:
        transform 0.35s ease,
        background 0.35s ease !important;
}


/* =====================================================
   TEXT
===================================================== */

.gooey-card .card-title-gooey,
.gooey-card .card-number-gooey {
    position: relative !important;

    z-index: 3 !important;

    transition:
        color 0.35s ease,
        transform 0.35s ease !important;
}


/* =====================================================
   WARNA
===================================================== */

.gooey-card.gooey-warning {
    --gooey-color: #ffc107;
}

.gooey-card.gooey-success {
    --gooey-color: #198754;
}

.gooey-card.gooey-danger {
    --gooey-color: #dc3545;
}

.gooey-card.gooey-primary {
    --gooey-color: #0d6efd;
}


/* =====================================================
   HOVER - LINGKARAN MEMENUHI CARD
===================================================== */

.gooey-card:hover .gooey-bg {
    width: 600px !important;
    height: 600px !important;

    right: -200px !important;
    bottom: -200px !important;

    opacity: 1 !important;
}


/* Lingkaran kedua ikut bergerak */
.gooey-card:hover::before {
    width: 180px !important;
    height: 180px !important;

    transform: translate(30px, 30px);

    opacity: 0.25 !important;
}


/* =====================================================
   HOVER ICON
===================================================== */

.gooey-card:hover .icon-box {
    background: rgba(255, 255, 255, 0.20) !important;

    color: #ffffff !important;

    transform:
        scale(1.08)
        rotate(-4deg);
}


/* =====================================================
   HOVER TEXT
===================================================== */

.gooey-card:hover .card-title-gooey,
.gooey-card:hover .card-number-gooey {
    color: #ffffff !important;
}


/* Angka sedikit membesar */
.gooey-card:hover .card-number-gooey {
    transform: scale(1.08);
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 576px) {

    .gooey-card .card-body {
        padding: 25px 15px !important;
    }

    .gooey-card .gooey-bg {
        width: 90px !important;
        height: 90px !important;

        right: -35px !important;
        bottom: -35px !important;
    }

    .gooey-card:hover .gooey-bg {
        width: 450px !important;
        height: 450px !important;

        right: -150px !important;
        bottom: -150px !important;
    }
}

/* =====================================================
   NAVBAR
   ===================================================== */

#mainNavbar {
    width: 100%;
    z-index: 1030;

    transition:
        background-color 0.35s ease,
        backdrop-filter 0.35s ease,
        -webkit-backdrop-filter 0.35s ease,
        box-shadow 0.35s ease;
}


/* =====================================================
   BERANDA
   Navbar menyatu dengan header
   ===================================================== */

#mainNavbar.navbar-home {
    position: fixed;
    top: 0;
    left: 0;

    background: transparent !important;

    border-bottom: 1px solid transparent;
    box-shadow: none;
}


/* Saat scroll di Beranda */

#mainNavbar.navbar-home.scrolled {
    background: rgba(13, 110, 253, 0.72) !important;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.15);

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15);
}


/* =====================================================
   HALAMAN LAIN - KONDISI AWAL
   ===================================================== */

#mainNavbar.navbar-page {
    position: sticky;
    top: 0;

    background: rgba(13, 110, 253, 0.92) !important;

    border-bottom: 1px solid rgba(255, 255, 255, 0.10);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    transition:
        background-color 0.35s ease,
        backdrop-filter 0.35s ease,
        -webkit-backdrop-filter 0.35s ease,
        box-shadow 0.35s ease;
}


/* =====================================================
   HALAMAN LAIN - SAAT SCROLL
   ===================================================== */

#mainNavbar.navbar-page.scrolled {
    background: rgba(13, 110, 253, 0.65) !important;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   LINK
   ===================================================== */

#mainNavbar .navbar-nav .nav-link {
    position: relative;

    color: #fff;
    font-weight: 500;

    padding: 0.65rem 1rem;

    transition:
        color 0.3s ease,
        background-color 0.3s ease;
}


#mainNavbar .navbar-nav .nav-link:hover {
    color: #ffc107;

    background-color: rgba(255, 255, 255, 0.08);

    border-radius: 7px;
}


/* ACTIVE */

#mainNavbar .navbar-nav .nav-link.active {
    color: #ffc107;

    background-color: rgba(255, 255, 255, 0.10);

    border-radius: 7px;
}


/* UNDERLINE */

#mainNavbar .navbar-nav .nav-link::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 4px;

    width: 50%;
    height: 2px;

    background: #ffc107;

    transform: translateX(-50%) scaleX(0);

    transition: transform 0.3s ease;
}


#mainNavbar .navbar-nav .nav-link:hover::after,
#mainNavbar .navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}


/* =====================================================
   LOGO
   ===================================================== */

#mainNavbar .navbar-brand {
    color: #fff;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 991.98px) {

    #mainNavbar.navbar-home {
        background: transparent !important;
    }

    #mainNavbar.navbar-home.scrolled {
        background: rgba(13, 110, 253, 0.80) !important;

        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    #mainNavbar.navbar-page {
        background: rgba(13, 110, 253, 0.95) !important;
    }

}