/* ================= MOBILE NAV CONFIG ================= */
:root{
    --nav-top-height: 150px;
    --nav-menu-height: 60px;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    body {
        padding-top: 130px;
    }

    /* ===== NAVBAR ===== */
    .navbar-top{
        position: fixed;
        top: 0;
        height: auto; /* 🔥 penting */
        z-index: 1050;
        padding: 5px 0;
    }

    .navbar-top .container-fluid {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .navbar-top .container-fluid > div {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .navbar-top .nav-link {
        font-size: 12px;
        padding: 6px 8px;
    }

    .navbar-menu{
        position: fixed;
        top: var(--nav-top-height);
        left: 0;
        right: 0;
        height: auto;
        z-index: 1060;
        background: #fff;
        overflow: visible;
    }

    .navbar-menu .collapse{
        background: #fff;
        padding: 10px 15px;
    }

    .navbar-menu .navbar-nav{
        flex-direction: column;
    }

    .navbar-menu .nav-item{
        width: 100%;
    }

    .navbar-menu .navbar-brand{
        height: 100%;
        display: flex;
        align-items: center;
    }

    /* ===== NAV LINK ===== */
    .navbar-top .nav-link,
    .navbar-menu .nav-link {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* ===== MEGA MENU MOBILE ===== */
    .mega-menu {
        position: relative !important;
        width: 100%;
        max-height: 70vh;
        margin-top: 5px;
        border-radius: 10px;
        box-shadow: none;
        padding: 10px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mega-dropdown {
        position: relative !important;
    }

    .mega-menu .row {
        display: block;
    }

    .mega-menu .col-md-3,
    .mega-menu .col-lg-3,
    .mega-menu .col-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 10px;
    }

    .mega-title {
        font-size: 13px;
        margin-top: 10px;
    }

    .mega-menu .dropdown-item {
        padding: 8px 10px;
        font-size: 13px;
    }

    .hero {
        top: 180px;
        margin-top: 50px;
        display: block;
        padding: 20px 15px;
        margin-top: 10px;
        padding-top: 10px;
        border-radius: 0 0 20px 20px;

        /* ðŸ”¥ penting */
        min-height: auto !important;
        height: auto !important;
    }

    .hero-overlay {
        padding: 15px;
        position: relative !important;
        min-height: 60vh;
    }

    .hero,
    .hero-home,
    .hero-inner {
        min-height: 60vh !important;
        height: auto !important;
    }
    
    .hero.hero-half {
        min-height: 40vh;
    }

    /* ===== HERO CONTENT ===== */
    .hero-content {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        top: auto !important;
        text-align: left;
        margin-top: 10px;
        display: block;
        width: 100%;
        margin-bottom: 15px;
    }

    .hero-content h1 { 
        font-size: 1.4rem;
        line-height: 1,3; 
    }

    .hero-content p { 
        font-size: 0.85rem;
        opacity: 0.9; 
    }

    /* ===== HERO SERVICES ===== */
    .hero-services {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        margin-top: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }

    .hero-content-up {
        margin-bottom: 20px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }

    .hero-cta .btn {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    .hero-services .row {
        row-gap: 10px;
        column-gap: 0;
    }

    .service-mini .card {
        padding: 10px 6px;
        border-radius: 12px;
    }

    .service-mini .icon {
        font-size: 22px;
    }

    .service-mini span {
        font-size: 12px;
    }

    /* ===== KOMPONEN ===== */
    .bmi-circle {
        width: 140px;
        height: 140px;
        font-size: 2.4rem;
    }
    
    #dokter-home .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    #dokter-home .carousel-item .row {
    display: flex;
    flex-wrap: wrap;
}

    .doctor-img,
    .doctor-foto {
        height: 220px !important;
    }

    /* ===== GRID ===== */
    .row > [class*="col-"] {
        margin-bottom: 16px;
    }

    /* ===== DISABLE HOVER DI HP ===== */
    .card:hover,
    .service-card:hover .card,
    .mcu-card:hover,
    .promo-card:hover {
        transform: none;
        box-shadow: none;
    }
    
     section {
        padding: 1.5rem 0;
    }

    /* ===== BERITA ===== */
    #berita {
        padding: 16px 12px !important;
    }

    #berita h3{
        font-size: 1rem;
        margin-bottom: 15px !important;
        text-align: left;
    }

    #berita .berita-box {
        display: block !important;
        padding: 12px !important;
        border-radius: 14px;
    }

    #berita .berita-img {
        width: 100%;
        height: 150px;
        margin-bottom: 8px;
    }

    #berita .berita-box h5 {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    #berita .berita-box p {
        font-size: 0.75rem;
        line-height: 1.5;
        margin-bottom: 6px;

        display: -webkit-box;
        -webkit-line-clamp: 2; /* ðŸ”¥ batasi 3 baris */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    #berita .btn {
        width: 100%;
        font-size: 14px;
        padding: 10px;
        border-radius: 10px;
    }

    /* ===== SIDEBAR ===== */
    #artikel-sidebar {
        margin-top: 30px;
    }
    
    /* Card lebih rapih di HP */
    #bmi .card {
        border-radius: 16px;
        padding: 15px;
    }

    /* Input lebih nyaman disentuh */
    #bmi input {
        height: 42px;
        font-size: 14px;
    }

    /* Circle BMI lebih kecil */
    .bmi-circle {
        width: 120px;
        height: 120px;
        font-size: 2rem;
        margin: 0 auto;
    }

    /* Center semua hasil */
    #bmi .text-center {
        text-align: center;
    }

    /* spacing antar elemen */
    #bmi .row > div {
        margin-bottom: 15px;
    }

    /* ===== FOOTER ===== */
    .footer-section {
        border-radius: 25px 25px 0 0;
    }

    .footer-wrapper {
        padding: 40px 15px 20px;
    }

    .footer-section .col-md-3 {
        margin-bottom: 30px;
    }

}

/* ================= EXTRA SMALL ================= */
@media (max-width: 480px) {

    .hero-home { padding: 15px; }
    .hero-inner { padding: 15px; }

    .hero-content h1 { font-size: 1.4rem; }
    .hero-content p { font-size: 0.85rem; }

    #dokter-home .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .doctor-img,
    .doctor-foto {
        height: 180px !important;
    }

    h1, h2, h3 { font-size: 90%; }
    p { font-size: 14px; }

    .footer-title { font-size: 16px; }

    .footer-list a,
    .footer-section p {
        font-size: 13px;
    }

    .footer-social i {
        font-size: 16px;
    }
}