/* =========================================================
1. TIPOGRAFI, IDENTITAS WARNA & CUSTOM SCROLLBAR
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --cassiopeia-font-family-body: 'Inter', system-ui, -apple-system, sans-serif;
  --cassiopeia-font-family-headings: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Warna Standar SK Dirjen Badilag */
  --cassiopeia-color-primary: #056e4f;
  --cassiopeia-color-link: #056e4f;
  --cassiopeia-color-hover: #034a35;

  --bs-primary: #056e4f;
  --bs-primary-rgb: 5, 110, 79;
  --bs-secondary: #ff9900;
  --bs-secondary-rgb: 255, 153, 0;

  /* Gradasi Khas PA Atambua */
  --grad-primary: linear-gradient(135deg, #06825d 0%, #056e4f 45%, #034531 100%);
  --grad-secondary: linear-gradient(90deg, #ff9900 0%, #f58200 100%);
}

body {
  font-family: var(--cassiopeia-font-family-body);
  color: #212529;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--cassiopeia-font-family-headings);
  letter-spacing: -0.02em;
}

/* Custom Scrollbar Hijau PA Atambua */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #06825d 0%, #056e4f 60%, #034531 100%);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff9900;
}

/* =========================================================
2. HEADER, BANNER GAP, FOOTER & TOMBOL UTAMA
   ========================================================= */
.container-header {
  background-color: #056e4f;
  background-image: var(--grad-primary);
  border-bottom: 4px solid #ff9900;
  box-shadow: 0 4px 12px rgba(5, 110, 79, 0.15);
}

.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li > a:hover {
  color: #ff9900;
  font-weight: 600;
}

/* Rapatkan jarak putih antara Hero Banner dan konten di bawahnya */
.container-banner {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.container-top-a,
.container-main-top {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.container-top-a .mod-custom,
.container-main-top .mod-custom {
  margin-top: 0 !important;
}

.container-footer {
  background-color: #033d2c !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 15% 20%, rgba(255, 153, 0, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(6, 130, 93, 0.35) 0%, transparent 55%) !important;
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100% !important;
  border-top: 4px solid #ff9900;
}

/* Ratakan Footer Penuh & Pas di Tengah */
.container-footer .grid-child {
  display: block !important;
  width: 100% !important;
}
.container-footer .mod-custom {
  width: 100% !important;
}

.btn-primary {
  background-image: var(--grad-primary);
  border: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, #056e4f 0%, #023626 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 110, 79, 0.25);
}

.btn-secondary {
  background-image: var(--grad-secondary);
  border: none;
  color: #1a1a1a;
  font-weight: 600;
}
.btn-secondary:hover {
  background-image: linear-gradient(90deg, #e68a00 0%, #cc7000 100%);
  color: #1a1a1a;
}

/* =========================================================
3. LAYOUT BERITA UTAMA (STYLE BARU - MODERN EDITORIAL)
   ========================================================= */
.pa-news-section {
  padding: 12px 0 32px;
}

.pa-news-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.pa-news-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #056e4f;
  margin-bottom: 4px;
}

.pa-news-eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: #ff9900;
  display: inline-block;
}

.pa-news-heading {
  font-size: 25px;
  font-weight: 800;
  color: #034531;
  margin: 0;
  line-height: 1.25;
}

.pa-news-more {
  font-size: 12.5px;
  font-weight: 700;
  color: #056e4f;
  background: #e9f6f1;
  padding: 7px 16px;
  border-radius: 99px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s ease;
}
.pa-news-more:hover {
  background: #056e4f;
  color: #ffffff;
}

.pa-news-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 22px;
  align-items: stretch;
}

/* KARTU BERITA UTAMA (KIRI) */
.pa-news-featured {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(5, 110, 79, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pa-news-featured:hover {
  transform: translateY(-4px);
  border-color: rgba(5, 110, 79, 0.35);
  box-shadow: 0 16px 36px rgba(5, 110, 79, 0.13);
}

.pa-news-featured-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pa-news-featured-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e6f3ef;
}

.pa-news-featured-img::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(3, 61, 44, 0.65), transparent);
  pointer-events: none;
}

.pa-news-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.pa-news-featured:hover .pa-news-featured-img img {
  transform: scale(1.05);
}

.pa-badge-date {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: linear-gradient(90deg, #ff9900 0%, #f58200 100%);
  color: #111827;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pa-badge-utama {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  background: rgba(3, 61, 44, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
}

.pa-news-featured-body {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pa-news-featured-body h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.38;
  margin: 0 0 14px;
  transition: color 0.2s ease;
}

.pa-news-featured:hover h3 {
  color: #056e4f;
}

.pa-read-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 13px;
  font-weight: 700;
  color: #056e4f;
  padding: 6px 14px;
  border-radius: 99px;
  background: #f4fbf8;
  transition: all 0.22s ease;
}

.pa-news-featured:hover .pa-read-more {
  background: #056e4f;
  color: #ffffff;
}

/* DAFTAR BERITA LAINNYA (KANAN - GLASSMORPHISM HIJAU GELAP) */
.pa-news-list {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background-color: #033d2c;
  background-image:
    radial-gradient(circle at 90% 10%, rgba(255, 153, 0, 0.18) 0%, transparent 45%),
    linear-gradient(145deg, #067a57 0%, #033d2c 65%, #022a1e 100%);
  border-bottom: 4px solid #ff9900;
  box-shadow: 0 12px 30px rgba(3, 61, 44, 0.2);
}

.pa-news-list::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.pa-news-item {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 3px solid transparent;
  border-radius: 13px;
  padding: 10px 12px;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.pa-news-item:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 153, 0, 0.45);
  border-left-color: #ff9900;
}

.pa-news-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.pa-news-thumb {
  width: 78px;
  height: 58px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pa-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.pa-news-item:hover .pa-news-thumb img {
  transform: scale(1.07);
}

.pa-news-meta {
  min-width: 0;
  flex: 1;
}

.pa-item-date {
  display: inline-block;
  background: rgba(255, 153, 0, 0.2);
  color: #ffd580;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.pa-news-meta h4 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.38;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.pa-news-item:hover h4 {
  color: #ffd580;
}

/* =========================================================
4. SIDEBAR SUB-NAVIGASI HALAMAN DALAM
   ========================================================= */
.container-sidebar-left .card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(5, 110, 79, 0.06);
  padding: 12px;
}

.container-sidebar-left .card-header {
  background: transparent;
  border-bottom: 2px solid #ff9900;
  color: #034531;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px 10px;
  margin-bottom: 8px;
}

.container-sidebar-left .mod-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
}

.container-sidebar-left .mod-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.container-sidebar-left .mod-menu a:hover {
  background: #e9f6f1;
  color: #056e4f;
  padding-left: 16px;
}

.container-sidebar-left .mod-menu li.active > a,
.container-sidebar-left .mod-menu li.current > a {
  background-image: linear-gradient(135deg, #06825d 0%, #056e4f 60%, #034531 100%);
  color: #ffffff !important;
  border-left: 3px solid #ff9900;
}

/* =========================================================
5. KHUSUS DESKTOP (>= 992px): STICKY, MENU 1 BARIS & DROPDOWN
   ========================================================= */
@media (min-width: 992px) {
  .container-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1045 !important;
    box-shadow: 0 6px 20px rgba(5, 110, 79, 0.18);
  }

  .container-header .navbar-toggler {
    display: none !important;
  }

  .container-header .grid-child,
  .container-header .container-nav {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
  }

  .container-header .container-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .container-header .navbar {
    padding: 2px 0 !important;
    min-height: 0 !important;
  }

  .container-sidebar-left {
    position: sticky;
    top: 90px;
    align-self: start;
  }

  /* Menu Utama 1 Baris Rapat */
  .container-header .mod-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    margin: 0 !important;
  }

  .container-header .mod-menu > li {
    position: relative;
    margin: 0 !important;
  }

  .container-header .mod-menu > li > a,
  .container-header .mod-menu > li > button {
    padding: 6px 8px !important;
    font-size: 13.8px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  .container-header .mod-menu > li > a:focus,
  .container-header .mod-menu > li > button:focus {
    outline: none;
    box-shadow: none;
  }

  /* Hover Dropdown Desktop */
  .container-header .mod-menu > li:hover > .mm-collapse,
  .container-header .mod-menu > li:hover > .mod-menu__sub,
  .container-header .mod-menu > li:focus-within > .mm-collapse,
  .container-header .mod-menu > li:focus-within > .mod-menu__sub {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
  }

  .container-header .mod-menu .mm-collapse,
  .container-header .mod-menu .mod-menu__sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 245px;
    padding: 6px !important;
    margin-top: 0 !important;
    background: #ffffff;
    border: 1px solid rgba(5, 110, 79, 0.08);
    border-top: 3px solid #ff9900;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 28px rgba(5, 110, 79, 0.16);
    animation: paDropFade 0.16s ease-out;
  }

  @keyframes paDropFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .container-header .mod-menu .mm-collapse li,
  .container-header .mod-menu .mod-menu__sub li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .container-header .mod-menu .mm-collapse a,
  .container-header .mod-menu .mod-menu__sub a {
    display: block;
    padding: 7px 12px !important;
    line-height: 1.35 !important;
    border-radius: 7px;
    color: #334155 !important;
    font-size: 14px !important;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
  }

  .container-header .mod-menu .mm-collapse a:hover,
  .container-header .mod-menu .mm-collapse li.active > a,
  .container-header .mod-menu .mod-menu__sub a:hover,
  .container-header .mod-menu .mod-menu__sub li.active > a {
    background-color: #e9f6f1;
    color: #056e4f !important;
    font-weight: 600;
    padding-left: 16px !important;
  }
}

/* =========================================================
6. RESPONSIF HP & TABLET (<= 991.98px)
   ========================================================= */
@media (max-width: 991.98px) {
  /* Hilangkan bar hijau kosong di bawah header putih (navigasi pakai Bottom Bar) */
  .container-header {
    position: relative !important;
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .container-header .navbar-toggler {
    display: none !important;
  }

  /* Berita Jadi 1 Kolom di HP/Tablet */
  .pa-news-grid {
    grid-template-columns: 1fr;
  }
  .pa-news-featured-body h3 {
    font-size: 17px;
  }
}

/* =========================================================
7. OPTIMASI INDEKS SURVEI DI HP KECIL
   ========================================================= */
@media (max-width: 767.98px) {
  .survei-box-pa {
    padding: 22px 16px !important;
  }
  .survei-item-pa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left !important;
    padding: 14px 16px !important;
    gap: 12px;
  }
  .survei-item-pa .small {
    flex: 1;
    font-size: 13px;
    line-height: 1.3;
  }
  .survei-angka {
    font-size: 26px !important;
    margin: 0 !important;
  }
}

/* =========================================================
8. TINGGI IFRAME DOKUMEN GLOBAL (ANTI SCROLL TRAP)
   ========================================================= */
.pa-doc-frame {
  height: 78vh !important;
  min-height: 520px !important;
  max-height: 820px !important;
}

@media (max-width: 767.98px) {
  .pa-doc-frame {
    height: 68vh !important;
    min-height: 420px !important;
  }
}