/* ==========================================================================
   RW DIGITAL - CUSTOM STYLESHEET (MENU HORIZONTAL MOBILE)
   ========================================================================== */

:root {
    --custom-orange: #fd7e14;
    --custom-orange-dark: #f35f08;
}

body {
    margin: 0;
    padding: 0;
    background-color: #fff8f0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23f4a259' stroke-width='2' opacity='0.35'%3E%3Crect x='10' y='140' width='30' height='70'/%3E%3Cline x1='16' y1='150' x2='16' y2='200'/%3E%3Cline x1='24' y1='150' x2='24' y2='200'/%3E%3Cline x1='32' y1='150' x2='32' y2='200'/%3E%3Crect x='45' y='110' width='24' height='100'/%3E%3Cline x1='50' y1='120' x2='50' y2='200'/%3E%3Cline x1='58' y1='120' x2='58' y2='200'/%3E%3Cline x1='64' y1='120' x2='64' y2='200'/%3E%3Crect x='75' y='150' width='28' height='60'/%3E%3Cline x1='81' y1='158' x2='81' y2='202'/%3E%3Cline x1='89' y1='158' x2='89' y2='202'/%3E%3Cline x1='97' y1='158' x2='97' y2='202'/%3E%3C/g%3E%3Cg fill='none' stroke='%23e56b4f' stroke-width='2' opacity='0.35'%3E%3Ccircle cx='170' cy='150' r='14'/%3E%3Cpath d='M156 136 L170 118 L184 136 Z'/%3E%3Crect x='158' y='164' width='24' height='40' rx='4'/%3E%3Cline x1='158' y1='178' x2='148' y2='195'/%3E%3Cline x1='182' y1='178' x2='192' y2='195'/%3E%3Cline x1='164' y1='204' x2='164' y2='218'/%3E%3Cline x1='176' y1='204' x2='176' y2='218'/%3E%3Ccircle cx='164' cy='146' r='2'/%3E%3Ccircle cx='176' cy='146' r='2'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 240px 240px;
    background-attachment: fixed;
}

input, select, textarea {
    font-size: 16px !important;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
header {
    background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%) !important;
    padding: 40px 0 !important;
    position: relative;
}

header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: #ff8c00;
    border-radius: 3px;
}

header img {
    height: 45px;
}

header h2 {
    letter-spacing: 1px;
    color: #333;
    text-transform: uppercase;
}

header p {
    font-size: 0.85rem !important;
    color: #777 !important;
    max-width: 500px;
    margin: 0 auto !important;
}

.logo-pusat {
    height: 80px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.logo-pusat:hover {
    transform: scale(1.05);
}

.Alamat-header {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

@media (max-width: 576px) {
    .Alamat-header {
        font-size: 0.85rem;
        padding: 0 15px;
    }
    header h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   NAVBAR & DROPDOWN
   ========================================================================== */
.bg-custom-orange {
    background: linear-gradient(135deg, #ff8c00 0%, var(--custom-orange-dark) 100%) !important;
    border: none !important;
}

.navbar.sticky-top {
    margin: 0 !important;
    padding: 10px 0 !important;
    z-index: 1030;
}

/* Navbar diposisikan menumpang di atas banner (bukan blok terpisah) */
.navbar-on-banner {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0 !important;
    z-index: 20;
}

/* Sejajarkan lebar navbar dengan banner (full width, tanpa padding samping) */
.navbar .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    transition: all 0.2s ease !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.navbar-nav .nav-link.active {
    background-color: #fff !important;
    color: var(--custom-orange-dark) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.dropdown-menu {
    border: none !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    z-index: 9999 !important;
}

/* Desktop Hover */
@media (min-width: 992px) {
    .navbar-nav .nav-item.dropdown {
        position: relative;
        padding-bottom: 12px;
        margin-bottom: -12px;
    }

    .navbar-nav .dropdown-menu {
        margin-top: 0 !important;
        top: 100% !important;
    }

    .navbar-nav .nav-item.dropdown:hover > .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ==========================================================================
   4. NAVBAR MOBILE (HORIZONTAL SCROLL & FIX DROPDOWN KLIK HP)
   ========================================================================== */
.nav-scroller-mobile {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-scroller-mobile::-webkit-scrollbar {
    display: none;
}

.nav-scroller-mobile .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    padding: 2px 0 !important;
    margin: 0 !important;
    width: max-content !important;
}

.nav-scroller-mobile .nav-item {
    position: relative;
    flex: 0 0 auto !important;
}

/* Ukuran & jarak teks menu diperkecil supaya semua item muat tanpa scroll */
.nav-scroller-mobile .nav-link {
    padding: 6px 8px !important;
    margin: 0 !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
}

.nav-scroller-mobile .dropdown-toggle::after {
    margin-left: 2px !important;
    vertical-align: middle !important;
}

/* Memastikan Dropdown Muncul & Bisa Diklik di Layar Sentuh HP */
@media (max-width: 991.98px) {
    .nav-scroller-mobile .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        margin-top: 8px !important;
        z-index: 999999 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    }

    .nav-scroller-mobile .dropdown-menu.show {
        display: block !important;
    }

    .nav-scroller-mobile .dropdown-item {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
    }
}

/* ==========================================================================
   SECTION & BANNER
   ========================================================================== */
.content-section {
    display: block !important;
    min-height: 70vh;
    transition: opacity 0.3s ease-in-out;
    padding-top: 30px;
}

.content-section.active,
#beranda {
    display: block !important;
}

.content-section#beranda {
    margin: 0 !important;
    padding-top: 0 !important;
}

#beranda .banner-section {
    margin-top: 0 !important;
    margin-bottom: 3rem;
    border-radius: 0 !important;
    overflow: hidden;
}

/* ==========================================================================
   CAROUSEL
   ========================================================================== */
.carousel-item img {
    width: 100%;
    height: 300px !important;
    object-fit: cover;
    object-position: center;
    border-radius: 15px 15px 0 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 15px;
}

@media (max-width: 768px) {
    .carousel-item img {
        height: 250px;
    }
    .banner-section h1 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   DRIVER & PENGURUS
   ========================================================================== */
.card-driver img {
    border-radius: 50%;
    object-fit: cover;
}

.card-pengurus {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.card-pengurus:hover {
    transform: translateY(-5px);
}

.card-pengurus img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 20px auto 10px;
    border: 3px solid #ff8c00;
}

.jabatan {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--custom-orange);
    font-weight: bold;
}

.garis-hirarki {
    width: 2px;
    height: 30px;
    background: #dee2e6;
    margin: 0 auto;
}

.garis-pembatas-seksi {
    width: 50%;
    margin: 0 auto;
    border-top: 2px dashed #dee2e6;
}

/* ==========================================================================
   CARD & ADMIN BAR
   ========================================================================== */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.admin-status-bar {
    background-color: #ffc107;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 5px 0;
}

.admin-status-bar a {
    text-decoration: none;
    color: #000;
    margin-left: 15px;
}

.admin-status-bar a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   FORM & INPUT
   ========================================================================== */
.form-control:focus, .form-select:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 0 0.25rem rgba(255, 140, 0, 0.25);
}

.text-orange {
    color: var(--custom-orange-dark) !important;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
}

/* ==========================================================================
   BUTTONS & FOOTER
   ========================================================================== */
.download-section {
    position: relative;
    z-index: 100;
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

.btn-download-mobile {
    position: relative;
    z-index: 101;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 25px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    cursor: pointer;
}

.btn-download-mobile:active {
    transform: scale(0.96);
    background-color: #004a9b !important;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}

.btn-download-mobile span {
    white-space: nowrap;
}

.btn-warning {
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}

footer {
    background-color: #212529;
}

/* ==========================================================================
   RESPONSIVE MOBILE UMUM
   ========================================================================== */
@media (max-width: 767.98px) {
    .content-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    h1.display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    #posyandu .card-body {
        padding: 1.5rem !important;
    }

    .btn-warning {
        font-size: 0.9rem;
    }
}