/* =============================================
   RSU BINA KASIH - MAIN STYLESHEET
   Fully Responsive: Mobile → Tablet → Desktop
   ============================================= */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; }

img { max-width: 100%; height: auto; }

a { text-decoration: none; transition: all 0.3s ease; }

.section-title  { font-weight: 700; color: #1a3c6e; }
.section-subtitle {
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.btn { border-radius: 8px; font-weight: 500; }
.btn-primary { background: linear-gradient(135deg, #0d6efd, #0056d2); border: none; }
.btn-primary:hover { background: linear-gradient(135deg, #0056d2, #003d99); transform: translateY(-1px); }

/* ===== TOPBAR ===== */
.topbar {
    background: linear-gradient(135deg, #1a3c6e, #0d6efd) !important;
    font-size: 0.78rem;
}
/* Sembunyikan email di mobile, hanya tampilkan nomor telepon */
@media (max-width: 575px) {
    .topbar .topbar-email { display: none !important; }
    .topbar .topbar-separator { display: none !important; }
    .topbar { font-size: 0.72rem; }
}

/* ===== NAVBAR ===== */
.navbar { padding: 10px 0; }
.navbar-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.navbar-brand .brand-name { font-size: 1rem; line-height: 1.2; }
.navbar-brand .brand-tagline { font-size: 0.7rem; }
.nav-link {
    font-weight: 500;
    color: #333 !important;
    padding: 8px 12px !important;
    border-radius: 6px;
    transition: all 0.3s;
}
.nav-link:hover, .nav-link.active { color: #0d6efd !important; background: rgba(13,110,253,0.08); }

/* Mobile navbar dropdown */
@media (max-width: 991px) {
    .navbar-collapse { background: #fff; padding: 12px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.1); margin-top: 10px; }
    .nav-link { padding: 10px 16px !important; border-bottom: 1px solid #f0f0f0; }
    .nav-link:last-child { border-bottom: none; }
    .navbar-nav .ms-lg-2 { margin-top: 8px; }
    .navbar-nav .ms-lg-2 .btn { width: 100%; text-align: center; }
    .dropdown-menu { box-shadow: none; border: none; background: #f8f9ff; border-radius: 8px; }
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('../images/tampilandepan.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 100px 0 60px;
}
/* Overlay tipis agar gambar gedung tetap terlihat */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(10, 30, 60, 0.55) 0%,
        rgba(10, 30, 60, 0.25) 60%,
        rgba(10, 30, 60, 0.10) 100%
    );
    z-index: 0;
}
/* Pastikan konten di atas overlay */
.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    display: inline-block;
    padding: 5px 16px;
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 16px;
}
.hero-title {
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.hero-title span { color: #ffd700; }
.hero-desc {
    color: rgba(255,255,255,0.92);
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.emergency-badge {
    background: linear-gradient(135deg, #dc3545, #c0392b);
    color: #fff;
    border-radius: 14px;
    padding: 14px 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Hero panel kanan */
.hero-panel {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
}

/* Stat cards floating (desktop only) */
.hero-stat-card {
    background: white;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 150px;
}
.hero-stat-card .stat-num { font-size: 1.4rem; font-weight: 700; color: #0d6efd; line-height: 1; }
.hero-stat-card small { font-size: 0.72rem; color: #666; }
.hero-stat-1 { position: absolute; top: 20px; right: -15px; }
.hero-stat-2 { position: absolute; bottom: 90px; left: -25px; }
.hero-stat-3 { position: absolute; bottom: 20px; right: 10px; }

/* Stat cards mobile: inline row */
.hero-stats-mobile {
    display: none;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.hero-stats-mobile .stat-pill {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 6px 16px;
    color: #fff;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-stats-mobile .stat-pill strong { color: #ffd700; }

/* ===== SECTION ===== */
.section-py { padding: 70px 0; }
.bg-light-blue { background: linear-gradient(135deg, #f0f7ff, #e8f4fd); }

/* ===== QUICK ACCESS ===== */
.quick-access-item {
    padding: 16px 12px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    display: block;
    text-decoration: none;
}
.quick-access-item:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.quick-access-item i { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.quick-access-item span { font-size: 0.82rem; font-weight: 600; display: block; }

/* ===== STATISTIK ===== */
.stat-item { text-align: center; padding: 24px 16px; }
.stat-num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #0d6efd; line-height: 1; }
.stat-label { color: #666; font-size: 0.88rem; margin-top: 6px; }

/* ===== LAYANAN CARDS ===== */
.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(13,110,253,0.12);
    border-color: #0d6efd;
}
.service-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #e8f4fd, #cce5ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    color: #0d6efd;
    transition: all 0.3s;
}
.service-card:hover .service-icon {
    background: linear-gradient(135deg, #0d6efd, #1a3c6e);
    color: #fff;
}

/* ===== TENTANG KAMI ===== */
.tentang-badge {
    position: absolute;
    bottom: -18px;
    right: -18px;
    background: #fff;
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
    min-width: 170px;
}
/* Pada layar kecil, badge masuk ke dalam (tidak keluar) */
@media (max-width: 991px) {
    .tentang-badge {
        position: absolute;
        bottom: -18px;
        right: 16px;
    }
}
@media (max-width: 575px) {
    .tentang-badge {
        position: static;
        display: inline-flex;
        margin-top: 16px;
    }
}

/* ===== DOKTER CARDS ===== */
.doctor-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #eee;
    height: 100%;
}
.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(13,110,253,0.12);
}
.doctor-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e8f4fd, #cce5ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: #0d6efd;
}
.doctor-info { padding: 18px; }
.doctor-spec {
    background: #e8f4fd;
    color: #0d6efd;
    border-radius: 50px;
    padding: 3px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

/* ===== BERITA CARDS ===== */
.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.news-img {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #e8f4fd, #cce5ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.news-cat {
    background: #0d6efd;
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
}

/* ===== FORM ===== */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    padding: 11px 14px;
    font-size: 0.93rem;
}
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.12);
}

/* ===== PAGE HERO ===== */
.page-hero {
    background: linear-gradient(135deg, #1a3c6e, #0d6efd);
    color: #fff;
    padding: 50px 0;
}
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.breadcrumb-item a { color: rgba(255,255,255,0.75); }
.breadcrumb-item.active { color: #fff; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ===== CONTACT INFO CARD ===== */
.contact-info-card {
    background: linear-gradient(135deg, #1a3c6e, #0d6efd);
    border-radius: 20px;
    padding: 32px 28px;
    color: #fff;
}
.contact-item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-item-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ===== FLOATING WA ===== */
.floating-wa {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 4px 18px rgba(37,211,102,0.5);
    z-index: 9999;
    transition: all 0.3s;
}
.floating-wa:hover { transform: scale(1.1); color: #fff; box-shadow: 0 6px 25px rgba(37,211,102,0.7); }

/* ===== JADWAL TABLE ===== */
.jadwal-table { width: 100%; border-collapse: collapse; }
.jadwal-table th {
    background: linear-gradient(135deg, #1a3c6e, #0d6efd);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.88rem;
}
.jadwal-table td { padding: 10px 14px; border-bottom: 1px solid #eee; font-size: 0.88rem; }
.jadwal-table tr:hover td { background: #f8f9ff; }

/* ===== ALERTS ===== */
.alert { border-radius: 12px; }

/* ===== FOOTER ===== */
.footer-main {
    background: #0d1b2e;
    color: #ccc;
}
.footer-heading {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0d6efd;
    display: inline-block;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links li a {
    color: #b0bec5;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-links li a::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    color: #0d6efd;
    flex-shrink: 0;
}
.footer-links li a:hover {
    color: #fff;
    padding-left: 4px;
}
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #b0bec5;
    line-height: 1.5;
}
.footer-contact li a {
    color: #b0bec5;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-contact li a:hover { color: #fff; }
.footer-contact-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: rgba(13,110,253,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4d9fff;
    font-size: 0.85rem;
    margin-top: 2px;
}
.footer-sosmed {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b0bec5;
    font-size: 0.9rem;
    transition: all 0.25s;
    text-decoration: none;
}
.footer-sosmed:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    transform: translateY(-2px);
}
.footer-sosmed-wa:hover {
    background: #25D366;
    border-color: #25D366;
}
.footer-brand-name {
    color: #fff !important;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
}
.footer-tagline {
    color: #78909c !important;
    font-size: 0.8rem;
}
.footer-desc {
    color: #90a4ae !important;
    font-size: 0.85rem;
    line-height: 1.8;
}
.footer-bottom {
    background: rgba(0,0,0,0.35);
    border-top: 1px solid rgba(255,255,255,0.07);
}
.footer-bottom-text {
    color: #78909c;
}
.footer-bottom strong {
    color: #b0bec5 !important;
}
@media (max-width: 767px) {
    .footer-heading { font-size: 0.88rem; margin-bottom: 12px; }
    .footer-links li { margin-bottom: 7px; }
    .footer-contact li { font-size: 0.82rem; }
}

/* ===== ADMIN SIDEBAR ===== */
.admin-sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a3c6e, #0d3d8e);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.admin-content {
    margin-left: 250px;
    min-height: 100vh;
    background: #f4f6f9;
    transition: margin 0.3s;
}
.sidebar-brand {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar-brand img { width: 50px; height: 50px; object-fit: contain; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: rgba(255,255,255,0.75);
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: #ffd700;
}
.sidebar-nav a i { width: 18px; text-align: center; }
.admin-topbar {
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
}
.stat-card-admin {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid;
}

/* ===== SIDEBAR OVERLAY (mobile) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* Hero background mobile: fokus ke bagian atas gambar */
@media (max-width: 767px) {
    .hero-section {
        background-position: center top;
        min-height: auto;
        padding: 80px 0 40px;
    }
}
@media (max-width: 575px) {
    .hero-section {
        background-position: center top;
        padding: 75px 0 36px;
    }
}

/* Large tablet / small desktop */
@media (max-width: 1199px) {
    .hero-stat-1, .hero-stat-2, .hero-stat-3 { display: none; }
}

/* Tablet */
@media (max-width: 991px) {
    /* Admin */
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }

    /* Hero */
    .hero-section { min-height: auto; padding: 90px 0 50px; }
    .hero-stats-mobile { display: flex; }

    /* Tentang */
    .tentang-badge { right: 0; bottom: -16px; }

    /* Section spacing */
    .section-py { padding: 55px 0; }
}

/* Mobile (≤768px) */
@media (max-width: 767px) {
    .section-py { padding: 44px 0; }
    .hero-desc { font-size: 0.9rem; }
    .hero-badge { font-size: 0.75rem; padding: 4px 12px; }
    .emergency-badge { padding: 12px 16px; font-size: 0.88rem; }
    .emergency-badge .fw-bold { font-size: 0.9rem; }

    /* Hero buttons */
    .hero-section .btn-lg { padding: 10px 20px; font-size: 0.9rem; }

    /* Hero panel */
    .hero-panel { padding: 28px 20px; }
    .hero-panel img { width: 120px !important; height: 120px !important; }

    /* Page hero */
    .page-hero { padding: 36px 0; }

    /* Stat items */
    .stat-item { padding: 16px 10px; }
    .stat-num { font-size: 2rem; }

    /* Service cards: 2 per row */
    .service-icon { width: 55px; height: 55px; font-size: 1.4rem; }
    .service-card { padding: 20px 14px; }

    /* Doctor card placeholder */
    .doctor-img-placeholder { height: 170px; font-size: 3.5rem; }

    /* News img */
    .news-img { height: 170px; }

    /* Jadwal table: scrollable */
    .jadwal-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .jadwal-table { min-width: 540px; }

    /* Contact info card */
    .contact-info-card { padding: 24px 20px; }

    /* Forms */
    .form-control, .form-select { padding: 10px 12px; font-size: 0.9rem; }

    /* Admin */
    .admin-topbar { padding: 10px 14px; }
    .stat-card-admin { padding: 14px 16px; }

    /* Tables admin */
    .table-responsive { font-size: 0.82rem; }
    .badge { font-size: 0.7rem; }
}

/* Small mobile (≤575px) */
@media (max-width: 575px) {
    /* Navbar brand teks lebih kecil */
    .navbar-brand .brand-name { font-size: 0.88rem; }
    .navbar-brand .brand-tagline { display: none; }
    .navbar-brand img { width: 36px; height: 36px; }

    /* Hero: full center */
    .hero-section { text-align: center; padding: 75px 0 36px; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-badge { font-size: 0.72rem; }
    .emergency-badge { width: 100%; justify-content: center; }
    .d-flex.flex-wrap.gap-3 .btn { width: 100%; }

    /* Quick access: teks lebih kecil */
    .quick-access-item i { font-size: 1.5rem; }
    .quick-access-item span { font-size: 0.75rem; }

    /* Stat */
    .stat-num { font-size: 1.7rem; }
    .stat-label { font-size: 0.78rem; }

    /* Doctor card */
    .doctor-img-placeholder { height: 150px; font-size: 3rem; }

    /* Section title */
    .section-title { font-size: 1.4rem; }

    /* Page hero */
    .page-hero h1 { font-size: 1.4rem; }
    .page-hero { padding: 28px 0; }

    /* Forms side info */
    .daftar-info-col { order: -1; } /* Info muncul di atas form di mobile */

    /* Floating WA */
    .floating-wa { width: 46px; height: 46px; font-size: 1.3rem; bottom: 16px; right: 16px; }

    /* CTA section */
    .btn-lg.px-5 { padding-left: 20px !important; padding-right: 20px !important; font-size: 0.9rem; }
}
