/* ===========================
   PORTAL SIMANIS — PORTAL.CSS
   =========================== */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Poppins", sans-serif;
  background: #f4f7fa;
  color: #222;
  line-height: 1.45;
}

/* ===========================
   HEADER
   =========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e6eef2;
  padding: 18px 24px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-simanis {
  height: 54px;
  width: auto;
  display: block;
}
.desa-title h1 {
  font-size: 28px;
  margin-bottom: 4px;
}
.desa-sub {
  color: #666;
  font-size: 14px;
}

/* gov logo kecil kanan atas */
.logo-gov {
  height: 110px;
  object-fit: contain;
  display: block;
}

/* ===========================
   NAVBAR
   =========================== */
.portal-navbar {
  background: linear-gradient(180deg,#0f93c1,#0c7aa9);
  box-shadow: 0 4px 8px rgba(3,64,120,0.06);
  position: relative;
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

/* menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-menu li {
  position: relative;
}
.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 8px;
  display: inline-block;
  border-radius: 6px;
  transition: background .18s, color .18s, transform .12s;
}
.nav-menu li a:hover,
.nav-menu li a:focus {
  background: rgba(255,255,255,0.06);
  color: #fff;
  transform: translateY(-2px);
}

/* dropdown container (hidden by default, show on hover) */
.nav-menu li .dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #ffffff;
  display: none;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  overflow: hidden;
  padding: 8px 0;
  z-index: 200;
}
.nav-menu li:hover .dropdown,
.nav-menu li:focus-within .dropdown {
  display: block;
}
/* dropdown item */
.nav-menu li .dropdown a {
  color: #333;
  padding: 10px 14px;
  display: block;
  font-weight: 600;
}
.nav-menu li .dropdown a:hover {
  background: #f4f7fa;
  color: #0c7aa9;
}

/* tombol layanan */
.btn-mandiri {
  background: linear-gradient(90deg,#1ed2c9,#14a8d1);
  color: #fff;
  padding: 10px 18px;
  border-radius: 26px;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20,168,209,0.12);
}

/* mobile toggle button */
.nav-toggle {
  display: none;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}

/* ===========================
   CONTENT WRAPPER
   =========================== */
.content {
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 20px;
}

/* ===========================
   HERO
   =========================== */
.home-hero {
  background-size: cover;
  background-position: center;
  padding: 80px;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  box-shadow: 0 6px 20px rgba(15,23,42,0.04);
}
.home-hero h2 {
  font-size: 36px;
  margin-bottom: 8px;
}
.home-hero p {
  opacity: .95;
  font-size: 18px;
}

/* ===========================
   BERITA GRID / CARD
   =========================== */
.berita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 20px;
}
.berita-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15,23,42,0.06);
  transition: transform .18s, box-shadow .18s;
}
.berita-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(15,23,42,0.08);
}
.berita-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.berita-card h4 {
  font-size: 18px;
  padding: 12px;
}
.berita-card p {
  padding: 0 12px 14px;
  color: #555;
}

/* ===========================
   MODAL (LAYANAN OTP)
   =========================== */
.modal {
  display: none; /* toggled by JS inline */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[aria-hidden="false"] {
  display: flex;
}
.modal-dialog {
  background: #fff;
  border-radius: 10px;
  padding: 22px;
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

/* ===========================
   LAYANAN / FORM OTP
   =========================== */
.form-otp {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}
.form-otp label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}
.form-otp input,
.modal input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d7e3ea;
  outline: none;
  font-size: 14px;
}
.form-actions {
  margin-top: 8px;
  text-align: right;
}
.btn {
  background: #0c7aa9;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

/* small helpers */
.muted {
  color: #666;
  margin-top: 8px;
}
.btn-link {
  background: none;
  border: 0;
  color: #0284c7;
  cursor: pointer;
  padding: 6px 10px;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  margin-top: 40px;
  background: #0f172a;
  color: #cbd5e1;
  padding: 24px;
  text-align: center;
  border-radius: 10px 10px 0 0;
}

/* ===========================
   OTHER SMALL UI
   =========================== */
.header-crest {
  position: absolute;
  right: 18px;
  top: 6px;
  height: 90px;
  opacity: 0.95;
}
.layanan-center {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    background: #0c7aa9;
    padding: 12px;
    gap: 8px;
    top: 64px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 120;
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .logo-gov {
    height: 64px;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .home-hero {
    padding: 36px 18px;
  }
  .berita-card img {
    height: 140px;
  }
}

/* further small-screen tweaks */
@media (max-width: 540px) {
  .desa-title h1 { font-size: 22px; }
  .home-hero h2 { font-size: 24px; }
  .nav-container { padding: 10px 14px; }
  .btn-mandiri { padding: 8px 12px; font-size: 14px; }
}
