/* =====================================================
   mobile.css — FINAL (ANTI BENTROK DESKTOP)
   Target: ≤ 768px
 /* =====================================================
   mobile.css — MOBILE ONLY (CLEAN SEPARATION)
   Target: <= 768px
===================================================== */

@media (max-width: 768px) {

  /* Global */
  body {
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 0px;
  }

   header{
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 9999;
      background: #006400;
  }

  .navbar{
    position: relative;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;     /* FIX: biar menu tidak terdorong ke kanan */
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    text-align: center;
  }

  /* Logo */
  .logo h1 {
    font-size: 16px;
    line-height: 1.1;
    white-space: normal;             /* mobile boleh turun baris */
  }

  .logo a,
  .logo a:visited,
  .logo a:hover,
  .logo a:active {
    color: #ffffff !important;
    text-decoration: none;
  }

  /* Menu: default mobile tampil vertikal
     Jika Anda pakai JS toggle => set display:none lalu .active => display:flex
  */
  /* ===== MOBILE NAV: CENTER + DROPDOWN FULL WIDTH ===== */
.menu{
  list-style:none;
  display:flex;
  flex-direction:column;
  width:100%;
  padding:0;
  margin-top:10px;
  gap:0;
  align-items:center;
}

.menu li{
  width:100%;
  border-bottom:1px solid rgba(255,255,255,0.15);
}

.menu li > a{
  display:block;
  width:100%;
  padding:8px 8px;
  font-size:16px;
  color:#fff;
  text-decoration:none;
  text-align:center;
}

/* Trigger dropdown */
.menu-link{
  width:100%;
  display:flex;                 /* WAJIB supaya justify-content bekerja */
  justify-content:center;       /* teks + icon ke tengah */
  align-items:center;
  gap:8px;
  padding:10px 8px;
  font-size:15px;
  color:#fff;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.menu-link .arrow{ margin-left:6px; }
  /* =====================================================
     MEGA MENU MOBILE = ACCORDION
     - Default tertutup
     - Buka ketika .dropdown.active (kalau JS toggle ada)
     - Juga support :focus-within agar tetap bisa kebuka tanpa JS
  ===================================================== */

  /* ===== DROPDOWN (MEGA MENU) FULL WIDTH ===== */
.dropdown{
  width:100%;
}

/* Pastikan container submenu ikut full width */
.dropdown > .mega-menu{
    position:static !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    transform:none !important;

    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0px;
    box-sizing:border-box;

    display:none;                /* closed */
    background:#006400;
  }

  /* Jika pakai JS toggle, matikan mode focus-within biar bisa nutup */
  .dropdown:focus-within > .mega-menu { display: none; }
  .dropdown.active > .mega-menu { display: block; }

  @media (max-width:768px){

  .dropdown:nth-child(2) .mega-menu{
      min-width:100% !important;
      width:100% !important;
  }

}

/* Kolom submenu di mobile harus stack dan full width */
.mega-menu .menu-column{
  width:100%;
  min-width:0;                  /* override min-width desktop */
  border:none;
  padding:0px;
  text-align:center;            /* kalau mau isi submenu ke tengah */
}

.mega-menu .menu-column h3{
  width:100%;
  margin:0px !important;
  text-align:center;
}

.mega-menu .menu-column a{
  display:block;
  width:100%;
  text-align:center;
  padding:0px;
  color:#fff;
  text-decoration:none;
  border-radius:8px;
}
  /* Kolom jadi stack */
  .menu-column {
    border: none;
    padding: 8px 12px;
    text-align: left;
    min-width: unset;
  }

  .menu-column h3 {
    color: #ffc107;
    font-size: 14px;
    margin: 6px 0 6px;
    border-bottom: 1px solid rgba(255,193,7,0.6);
    display: inline-block;
    padding-bottom: 0px;
  }

  .menu-column a {
    display: block;
    color: #ffffff;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
  }

  .menu-column a:active {
    background: rgba(255,255,255,0.12);
  }

  @media (max-width:768px){

  .menu{
      display:none;
  }

  .menu.active{
      display:flex;
      flex-direction:column;
  }

}

/* =========================
   HAMBURGER MOBILE
========================= */
.hamburger{
    display:flex;
    align-items:center;
    justify-content:center;

    width:auto;
    margin:0;

    font-size:24px;
    color:#fff;
    cursor:pointer;
}

.logo{
    flex:1;
}

.menu{
    display:none;
    width:100%;
}

.menu.active{
    display:flex;
    flex-direction:column;
}

.layanan {
  font-size: 20px !important;
}

.alasan {
  font-size: 22px !important;
}

.dokter {
  font-size: 22px !important;
}

.inti {
  font-size: 15px !important;
}

.reason-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;

  gap: 10px;

  width: 100%;
}
.reason-item {
  background: #fff;
  border-radius: 16px;
  padding: 18px 14px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  text-align: center;
  height: 100%;
  min-height: 260px;
}

.reason-item i {
  font-size: 28px;
  margin-bottom: 10px;
  color: #008000;
}

.reason-item h3 {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.reason-item p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
  .reason-item p {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

  /* =========================
     HERO (SEMUA POLI & LAB)
  ========================= */
  .poli-page .hero,
  .laboratorium-page .hero {
    height: 48vh;
    padding: 0 20px;
    text-align: center;
    align-items: center;
  }

  .poli-page .hero h1,
  .laboratorium-page .hero h1 {
    font-size: 26px;
    line-height: 1.3;
  }

  .poli-page .hero p,
  .laboratorium-page .hero p {
    font-size: 15px;
  }

  /* =========================
     SECTION & CONTENT
  ========================= */
  .poli-page .section,
  .laboratorium-page .section {
    padding: 50px 20px;
  }

  .poli-page .card-container,
.laboratorium-page .card-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 0 15px 30px;
}

  .poli-page .card,
.laboratorium-page .card {
  padding: 18px;
  border-radius: 14px;
}

.poli-page .card h3,
.laboratorium-page .card h3 {
  font-size: 16px;
  line-height: 1.4;
}

.poli-page .card p,
.laboratorium-page .card p {
  font-size: 13px;
  line-height: 1.6;
}

/* =========================
   DOKTER MOBILE
========================= */

@media (max-width:768px){

  .doctor-grid,
  .poli-page .doctor-grid{
      display:grid !important;
      grid-template-columns:repeat(2,1fr) !important;
      width:100% !important;
      max-width:100% !important;
      padding:0 10px !important;
      gap:10px !important;
  }

  .doctor-card,
  .poli-page .doctor-card{
      width:auto !important;
      min-width:0 !important;
      max-width:100% !important;
      box-sizing:border-box !important;
  }

  img{
      max-width:100%;
  }

  body{
      overflow-x:hidden;
  }
}
  .poli-page .doctor-section h2{
    font-size:22px;
    margin-bottom:30px;
}

  /* FOTO */
  .poli-page .doctor-card img{
    width:100px;
    height:100px;
    margin-bottom:10px;
  }

.poli-page .doctor-card img{
    object-fit:cover;
    border-radius:50%;
}

  /* NAMA */
  .poli-page .doctor-card h3{
    font-size:11px;
    line-height:1.4;
    margin-bottom:6px;
  }

  /* JABATAN */
  .poli-page .specialist{
    font-size:10px;
    line-height:1.4;
    margin-bottom:10px;
  }

  .poli-page .status-badge{
    width:auto !important;
    display:inline-block;
    padding:8px 12px;
    font-size:10px;
    line-height:1.4;
    margin:0 auto;
}

/* Sedang praktik */
.status-badge.aktif{
    background:#dcfce7;
    color:#166534;
    border:1px solid #86efac;
}

/* Telah usai */
.status-badge.selesai{
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #fca5a5;
}

/* Kembali hari ini */
.status-badge.hari-ini{
    background:#fef3c7;
    color:#92400e;
    border:1px solid #facc15;
}

/* Kembali hari lain */
.status-badge.hari-lain{
    background:#f3f4f6;
    color:#111827;
    border:1px solid #d1d5db;
}

/* Tidak ada jadwal */
.status-badge.off{
    background:#e5e7eb;
    color:#6b7280;
}

/* =========================
   PRICING MOBILE FINAL
========================= */
* {
  box-sizing: border-box;
}
  
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 10px;
  padding: 0 10px;

  width: 100%;
}

.pricing-card {
  background: #fff;

  border-radius: 16px;
  padding: 12px 8px;

  display: flex;
  flex-direction: column;

  width: 100%;
  min-width: 0;

  box-sizing: border-box;
}

/* Judul */
.pricing-card h3 {
  font-size: 13px;
  line-height: 1.4;

  margin-bottom: 8px;
}

/* Deskripsi */
.pricing-card p {
  font-size: 11px;
  line-height: 1.5;

  margin-bottom: 10px;

  word-break: break-word;
}

/* Mulai dari */
.pricing-card .mulai {
  font-size: 12px;
  margin-top: auto;
}

/* Harga */
.pricing-card .price {
  font-size: 14px;
  line-height: 1.3;

  margin: 8px 0;
}

/* Tombol */
.pricing-card .btn {
  width: 100%;

  padding: 8px;
  font-size: 11px;

  box-sizing: border-box;
}
  /* =========================
     CTA
  ========================= */
  .poli-page .cta,
  .laboratorium-page .cta {
    margin: 25px 15px;
    padding: 30px 20px;
  }

  .poli-page .cta a,
  .laboratorium-page .cta a {
    width: 100%;
    padding: 14px;
    font-size: 15px;
  }

  /* =========================
     MAPS & FOOTER
  ========================= */
  .poli-page .maps iframe,
  .laboratorium-page .maps iframe {
    height: 260px;
  }

  .footer {
    padding: 40px 20px;
    text-align: center;
  }

}
