/* ================= VARIABLES & RESET ================= */
:root {
  --primary-navy: #0b2447;
  --bg-light: #f4f6f9;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --accent-orange: #ff9800;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ================= TOP BAR & NAVBAR ================= */
.time-bar {
  background-color: var(--primary-navy);
  color: white;
  padding: 10px 5%;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

/* ===================================================
   Z-INDEX HIERARCHY (BERSIH, TANPA KONFLIK):
   - Konten halaman    : z-index 1
   - Navbar (sticky)   : z-index 500
   - Overlay backdrop  : z-index 600
   - Sidebar mobile    : z-index 700
   - Tombol hamburger  : z-index 800
   =================================================== */

.navbar-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  padding: 0 5%;
  height: 80px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 500;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  height: 45px;
}

.logo-text p {
  font-size: 0.75rem;
  line-height: 1;
  margin: 0;
}

.logo-text strong {
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--primary-navy);
}

/* ================= NAV LINKS (DESKTOP) ================= */
.navbar-nav {
  display: flex;
  gap: 20px;
  height: 100%;
  align-items: center;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  transition: 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-navy);
}

.navbar-extra {
  display: none;
}

/* ================= DROPDOWN (DESKTOP) ================= */
.dropdown-wrapper {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  background-color: var(--white);
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  border-top: 3px solid var(--primary-navy);
  padding: 10px 0;
  z-index: 501;
}

.dropdown-wrapper:hover .dropdown-content {
  display: block;
}

.dropdown-content li a {
  display: block;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 400 !important;
  transition: 0.3s;
}

.dropdown-content li a:hover {
  background-color: var(--bg-light);
  color: var(--primary-navy);
  padding-left: 25px;
}

/* --- SUBMENU (DROPDOWN LEVEL 2) --- */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu-content {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background-color: var(--white);
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0 8px 8px 8px;
  border-top: 3px solid var(--primary-navy);
  padding: 10px 0;
  z-index: 502;
}

.dropdown-submenu:hover > .dropdown-submenu-content {
  display: block;
}

.dropdown-submenu > a::after {
  content: " \203A";
  float: right;
  font-weight: bold;
}

/* ================= CONTENT & ANIMATION ================= */
.halaman-konten {
  display: none;
  width: 100%;
  max-width: 100%;
  padding-bottom: 50px;
  position: relative;
  z-index: 1;
}

.halaman-konten.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= HOME LAYOUT ================= */
.container-width {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.home-grid {
  display: grid;
  grid-template-columns: 6.5fr 3.5fr;
  gap: 20px;
  align-items: start;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-navy);
  border-bottom: 3px solid var(--accent-orange);
  display: inline-block;
  margin-bottom: 20px;
  padding-bottom: 5px;
}

/* ================= SIGNATURE ================= */
.signature-container {
  width: 100%;
  height: 450px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
  background-color: #f4f6f9;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.signature-container iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

/* ================= KOTAK GEMPA ================= */
.card-gempa-baru {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  border-top: 3px solid var(--accent-orange);
}

.gempa-waktu {
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: #4a4a4a;
  margin-bottom: 20px;
}

.gempa-body {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
  align-items: center;
}

.gempa-peta {
  flex: 1;
}
.gempa-peta img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eaeaea;
  display: block;
}

.gempa-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gempa-item {
  display: flex;
  align-items: center;
  gap: 15px;
}
.gempa-text {
  display: flex;
  flex-direction: column;
}
.gempa-text span {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 2px;
}
.gempa-text strong {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.gempa-keterangan {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
  padding-top: 15px;
  border-top: 1px dashed #eee;
}
.gempa-item-baris {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.gempa-item-baris p {
  margin: 0;
  color: #4a4a4a;
  font-size: 1.05rem;
  line-height: 1.4;
}

.btn-outline-gempa {
  display: inline-block;
  padding: 10px 24px;
  background-color: #0b2447;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-outline-gempa:hover {
  background-color: #f39c12;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ================= CUACA KIRI ================= */
.cuaca-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.cuaca-item {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
  border: 1px solid #eee;
  height: 100%;
}

.cuaca-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.cuaca-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.cuaca-item span {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary-navy);
  background: #fdfdfd;
  line-height: 1.2;
}

/* ================= KOTAK PTSP ================= */
.ptsp-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border-top: 3px solid var(--accent-orange);
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.ptsp-card img {
  width: 100% !important;
  max-width: 100% !important;
  height: 180px;
  object-fit: cover;
  margin: 0 !important;
  border-bottom: 1px solid #eee;
}

.ptsp-content-wrapper {
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

/* ================= BERITA & KEGIATAN ================= */
.news-container {
  padding: 40px 0;
}

.news-header {
  margin-bottom: 25px;
}

.news-title {
  color: #0b2447;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-title i {
  width: 24px;
  height: 24px;
  color: #f39c12;
}

.news-subtitle {
  color: #666;
  margin: 5px 0 0 34px;
  font-size: 0.9rem;
}

.news-flex-wrapper {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.card-utama-home,
.card-samping-home {
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card-utama-home:hover,
.card-samping-home:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(11, 36, 71, 0.1) !important;
}

.news-main-column {
  flex: 1.5;
  min-width: 350px;
}

.card-utama-home {
  border-radius: 15px;
}

.img-utama-wrapper {
  position: relative;
}

.img-utama-wrapper img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.badge-terbaru {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #f39c12;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.news-content-padding {
  padding: 20px;
}

.news-content-padding h3 {
  margin: 0 0 15px 0;
  color: #0b2447;
  line-height: 1.4;
}

.news-side-column {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card-samping-home {
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 15px;
  border: 1px solid transparent;
}

.card-samping-home:hover h4 {
  color: #0b2447 !important;
}

.card-samping-home img {
  width: 100px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.card-samping-home h4 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #999;
  font-size: 0.75rem;
}

.news-meta i {
  width: 12px;
  color: #f39c12;
}

.btn-wrapper-right {
  margin-top: auto;
  text-align: right;
}

.btn-lihat-semua-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #0b2447;
  color: #0b2447;
  padding: 8px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.85rem;
  transition: 0.3s;
}

.btn-lihat-semua-home:hover {
  background: #0b2447;
  color: #ffffff !important;
}

/* ================= INFO GRAFIS ================= */
.info-grafis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}

.grafis-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.04),
    0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.grafis-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-orange);
}

.grafis-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  border: none;
}

.grafis-img-wrapper img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f1f5f9;
}

.grafis-card:hover img {
  transform: scale(1.05);
}

.btn-buka-penuh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 24px;
  background: var(--primary-navy);
  color: white !important;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-buka-penuh:hover {
  background-color: var(--accent-orange);
  box-shadow: 0 10px 15px -3px rgba(255, 152, 0, 0.3);
}

/* ================= MODAL ================= */
.modal-grafis {
  display: none;
  position: fixed;
  z-index: 9000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content-custom {
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  max-width: 80%;
  width: 600px;
  text-align: center;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 25px;
  cursor: pointer;
  color: #333;
}

.modal-content-custom img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin-bottom: 15px;
}

/* ================= PROFILE ================= */
.profile-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.profile-card {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--primary-navy);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 20px;
}

.profile-header .icon-box {
  width: 50px;
  height: 50px;
  background-color: #eef2f6;
  color: var(--primary-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-header h2 {
  color: var(--primary-navy);
  font-size: 1.8rem;
  font-weight: 700;
}

.visi-box,
.misi-box {
  background-color: #fcfcfc;
  border-left: 4px solid var(--accent-orange);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 0 8px 8px 0;
}

/* ================= CUACA KECAMATAN ================= */
.cuaca-gallery-center {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
  padding: 10px;
}

.cuaca-gallery-center .cuaca-item {
  width: 180px !important;
  flex: 0 0 auto !important;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid #eee;
  margin-bottom: 10px;
}

.cuaca-gallery-center .cuaca-item img {
  width: 100% !important;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.cuaca-gallery-center .cuaca-item span {
  font-size: 0.8rem;
  padding: 8px 2px;
  font-weight: bold;
  color: var(--primary-navy);
}

/* ================= ALUR & JENIS PELAYANAN ================= */
.alur-pelayanan,
.jenis-pelayanan {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1100px !important;
  margin: 30px auto !important;
  padding: 0 20px !important;
}

.alur-item,
.jenis-pelayanan-item {
  width: 100% !important;
  background: #ffffff !important;
  border-radius: 15px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #f0f0f0 !important;
  margin-bottom: 30px !important;
  transition: transform 0.3s ease !important;
}

.alur-item:hover,
.jenis-pelayanan-item:hover {
  transform: translateY(-5px) !important;
}

.alur-item img,
.jenis-pelayanan-item img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  padding: 5px !important;
}

/* ================= BULETIN & GALERI KEGIATAN ================= */
.buletin-center,
.kegiatan-grid-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 25px;
  width: 100%;
  padding: 20px 20px 50px 20px;
}

.buletin-item,
.kegiatan-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  transition: transform 0.3s;
  text-decoration: none;
}

.buletin-item {
  width: 260px;
}

.buletin-center {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, 260px) !important;
  justify-content: center !important;
  gap: 25px;
  max-width: 1140px;
  margin: 0 auto;
}

.kegiatan-card {
  width: 300px;
}

.buletin-item:hover,
.kegiatan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.buletin-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.414;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}

.kegiatan-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.buletin-teks,
.kegiatan-card-teks {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.buletin-judul,
.kegiatan-card-judul {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1565c0;
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s;
}

.buletin-item:hover .buletin-judul,
.kegiatan-card:hover .kegiatan-card-judul {
  color: var(--primary-navy);
}

.buletin-meta,
.kegiatan-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #888;
  flex-wrap: wrap;
}

/* ================= DETAIL KEGIATAN ================= */
.kegiatan-detail-container {
  max-width: 950px;
  margin: 30px auto 60px auto;
  padding: 0 20px;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 20px;
  color: #1565c0;
  font-weight: 600;
}

.breadcrumb a {
  color: #1565c0;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #666;
  font-weight: 400;
}

.kegiatan-detail-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid #eef0f5;
}

.kegiatan-judul-besar {
  font-size: 1.8rem;
  color: #2c3e50;
  line-height: 1.4;
  margin-bottom: 15px;
}

.kegiatan-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 25px;
}

.kegiatan-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gambar-utama {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 30px;
}

.kegiatan-teks p {
  font-size: 1rem;
  color: #444;
  line-height: 1.8;
  margin-bottom: 15px;
  text-align: justify;
}

.kegiatan-galeri {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.kegiatan-galeri img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s;
}

.kegiatan-galeri img:hover {
  transform: scale(1.05);
}

/* ================= KONTAK KAMI ================= */
.contact-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
}

.info-panel-full {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary-navy);
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-item .icon-circle {
  width: 45px;
  height: 45px;
  background-color: var(--bg-light);
  color: var(--primary-navy);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vertical-line {
  width: 1px;
  height: 50px;
  background-color: #ddd;
}

.contact-split-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.map-card,
.form-card {
  flex: 1;
  min-width: 300px;
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.map-container {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.form-row-custom {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.input-half {
  flex: 1;
}

.form-card input,
.form-card textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: #fcfcfc;
  transition: border 0.3s;
  display: block;
  margin-bottom: 15px;
}

.form-card input:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--primary-navy);
  background-color: #fff;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-navy);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
}

.btn-submit:hover {
  background-color: var(--accent-orange);
  color: var(--primary-navy);
}

/* ================= FOOTER ================= */
footer {
  background-color: #1a0044;
  color: #ffffff;
  padding: 70px 5% 20px 5%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 50px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-about {
  flex: 1.8;
}

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-orange, #f39c12);
  border-radius: 2px;
}

.text-justify {
  text-align: justify;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-links ul,
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-orange, #f39c12);
  transform: translateX(8px);
}

.contact-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-info-list i {
  color: var(--accent-orange, #f39c12);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.social-box {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-box i {
  width: 18px;
  height: 18px;
}

.social-box:hover {
  background-color: var(--accent-orange, #f39c12);
  color: #1a0044;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.app-badges {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
}

.app-badges img {
  width: auto;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.app-badges img:hover {
  transform: scale(1.05);
}

.app-badges img[alt="Play Store"] {
  height: 35px;
}

.app-badges img[alt="App Store"] {
  height: 65px;
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 50px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
  margin: 0 0 8px 0;
}

.admin-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s;
}

.admin-link:hover {
  color: var(--accent-orange, #f39c12);
}

/* ================= FIX GAMBAR GEMPA ================= */
.gempa-card-mini {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.gempa-map-side {
  width: 100% !important;
  max-width: 100% !important;
}

.gempa-card-mini img,
.gempa-map-side img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.gempa-top-row {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ================= GALERI KEGIATAN GRID ================= */
.kegiatan-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, 300px) !important;
  justify-content: center !important;
  gap: 25px;
  max-width: 1275px;
  margin: 0 auto;
  padding: 20px 20px 50px 20px;
}

/* ================= TOMBOL SELENGKAPNYA ================= */
.btn-selengkapnya {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--primary-navy);
  color: white;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-selengkapnya:hover {
  background-color: var(--accent-orange);
  color: var(--primary-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ================= STRUKTUR ORGANISASI & PEGAWAI ================= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
  margin-top: 15px;
}

.jabatan-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 30px 0 15px 0;
  padding-left: 12px;
  text-align: left;
  color: var(--primary-navy);
}

.blue-line {
  border-left: 4px solid #007bff;
}
.green-line {
  border-left: 4px solid #28a745;
}
.black-line {
  border-left: 4px solid #1a1a1a;
}

.pegawai-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 15px;
  width: 220px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pegawai-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.label-tim {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #eef5ff;
  padding: 4px 8px;
  border-radius: 4px;
}

.foto-pegawai {
  width: 110px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  margin-bottom: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.foto-placeholder {
  width: 100%;
  height: auto;
  margin: 0 auto 15px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
}

.pegawai-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #222;
  line-height: 1.3;
}

.pegawai-card p {
  font-size: 0.8rem;
  color: #666;
  margin: 2px 0;
  line-height: 1.4;
}

.grid-ppnpn {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 15px !important;
  width: 100% !important;
  margin-bottom: 30px;
}

.grid-ppnpn .pegawai-card {
  width: 100% !important;
  box-sizing: border-box;
}

/* ================= SEJARAH ================= */
.sejarah-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.sejarah-card-premium {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(11, 36, 71, 0.06);
  overflow: hidden;
  border-top: 5px solid #0b2447;
}

.sejarah-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 30px 40px 20px 40px;
  border-bottom: 1px solid #f0f0f0;
}

.sejarah-icon {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sejarah-icon i {
  width: 22px;
  height: 22px;
}

.sejarah-title {
  color: #0b2447;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.sejarah-body {
  display: flex;
  gap: 40px;
  padding: 30px 40px 40px 40px;
}

.sejarah-teks-utama {
  flex: 1.6;
  color: #4a4a4a;
  line-height: 1.8;
  font-size: 1.05rem;
  text-align: justify;
}

.teks-pembuka {
  font-size: 1.15rem;
  color: #0b2447;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.6;
}

.sejarah-teks-utama p {
  margin-bottom: 15px;
}

.sejarah-info-box {
  flex: 1;
}

.info-card {
  background: linear-gradient(135deg, #fdfdfd 0%, #f0f4f8 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  position: relative;
  margin-top: 10px;
}

.info-icon-top {
  position: absolute;
  top: -15px;
  right: 25px;
  background: #0b2447;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(11, 36, 71, 0.3);
  transition: transform 0.3s ease;
}

.info-card:hover .info-icon-top {
  transform: translateY(-5px);
}

.info-icon-top i {
  width: 16px;
  height: 16px;
}

.info-card h4 {
  color: #0b2447;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.garis-pembatas {
  width: 40px;
  height: 3px;
  background: #f39c12;
  margin-bottom: 15px;
  border-radius: 2px;
}

.info-card p {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
  text-align: justify;
}

/* ================= MISC ================= */
.img-responsif {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.gempa-action {
  margin-top: 15px;
  padding-top: 10px;
}

/* =================================================================
   OVERLAY BACKDROP (untuk menutup sidebar saat tap di luar)
   ================================================================= */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 600;
}

.nav-overlay.active {
  display: block;
}

/* =========================================================================
   MOBILE RESPONSIVE - MAX 900PX (ENGINE RE-STYLE STRUKTUR STATIC COLLAPSE)
   ========================================================================= */
@media (max-width: 900px) {
  .navbar-extra {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 800;
  }

  .navbar-extra i {
    font-size: 28px;
    color: var(--primary-navy);
    cursor: pointer;
  }

  #menu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 800;
    padding: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  /* --- SIDEBAR MOBILE --- */
  .navbar-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 0 30px 0;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 700;
    overflow-y: auto;
    gap: 0;
  }

  .navbar-nav.active {
    right: 0;
  }

  /* Padding gemuk agar jari tangan leluasa menekan tautan menu di HP */
  .nav-link {
    width: 100%;
    padding: 15px 25px !important;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
  }

  /* --- DROPDOWN & SUBMENU MOBILE (KUNCI PERBAIKAN STABIL ANTI-MELOMPAT) --- */
  .dropdown-wrapper {
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    display: flex;
  }

  /* Matikan total efek hover melayang PC saat di HP */
  .dropdown-wrapper:hover .dropdown-content,
  .dropdown-submenu:hover .dropdown-submenu-content {
    display: none !important;
  }

  /* Paksa anak menu memakan ruang statis di bawahnya dengan tenang */
  .dropdown-content {
    display: none;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    background-color: #f8f9fa !important;
    padding: 0 !important;
    border-top: none !important;
    border-radius: 0 !important;
    box-sizing: border-box;
  }

  .dropdown-submenu-content {
    display: none;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    background-color: #eef2f7 !important;
    padding: 0 !important;
    border-top: none !important;
    border-radius: 0 !important;
    box-sizing: border-box;
  }

  /* Hanya muncul saat di-toggle kelas aktif via JavaScript */
  .dropdown-wrapper.active-mobile > .dropdown-content {
    display: block !important;
  }

  .dropdown-submenu.active-mobile > .dropdown-submenu-content {
    display: block !important;
  }

  /* Indentasi list teks menjorok ke dalam dengan padding gemuk aman tap */
  .dropdown-content li a {
    padding: 14px 20px 14px 45px !important;
    border-bottom: 1px solid #e9ecef !important;
    display: block !important;
    font-size: 0.92rem !important;
    width: 100%;
    box-sizing: border-box;
  }

  .dropdown-submenu-content li a {
    padding: 14px 20px 14px 65px !important;
    font-size: 0.88rem !important;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #dfe4ea !important;
  }

  /* Rotasi animasi panah */
  .dropdown-wrapper.active-mobile > .nav-link i,
  .dropdown-submenu.active-mobile > a i {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
  }

  .dropdown-submenu > a::after {
    content: none;
  }

  /* --- CONFIGURASI LAYOUT RESPONSIVE HOME --- */
  .home-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    width: 100%;
  }

  .signature-container {
    height: 350px;
  }

  .gempa-body {
    flex-direction: column;
  }

  .gempa-peta img {
    max-width: 100%;
    margin: 0 auto;
  }

  .cuaca-gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    padding-bottom: 20px !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .cuaca-item {
    width: 45% !important;
    min-width: 130px !important;
    max-width: 180px !important;
    flex: 1 1 auto !important;
  }

  .cuaca-item img {
    width: 100% !important;
    height: auto !important;
  }

  .info-panel-full {
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    padding: 20px;
  }

  .info-item {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }

  .info-item .icon-circle {
    flex-shrink: 0;
    margin-top: 5px;
  }

  .vertical-line {
    display: none;
  }

  .contact-split-row {
    flex-direction: column;
  }

  .input-half {
    width: 100%;
  }

  .info-grafis-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    flex-direction: column;
  }

  .footer-section {
    min-width: 100%;
  }
}

/* =========================================================================
   MOBILE RESPONSIVE - MAX 800PX
   ========================================================================= */
@media (max-width: 800px) {
  .grid-ppnpn {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* =========================================================================
   MOBILE RESPONSIVE - MAX 768PX
   ========================================================================= */
@media (max-width: 768px) {
  .alur-pelayanan,
  .jenis-pelayanan {
    padding: 0 10px !important;
  }

  .jenis-pelayanan-item {
    border-radius: 8px !important;
    overflow-x: auto !important;
  }

  .sejarah-body {
    flex-direction: column;
    gap: 30px;
    padding: 25px;
  }

  .sejarah-header {
    padding: 25px;
  }
}

/* =========================================================================
   MOBILE RESPONSIVE - MAX 500PX
   ========================================================================= */
@media (max-width: 500px) {
  .info-grafis-grid {
    grid-template-columns: 1fr;
  }

  .grafis-img-wrapper img {
    height: auto;
    aspect-ratio: 4/3;
  }

  .berita-item {
    flex-direction: column;
    gap: 10px;
  }

  .berita-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .cuaca-item {
    width: 100% !important;
  }

  .grid-ppnpn {
    grid-template-columns: 1fr !important;
  }
}
