:root {
  --bs-primary: #0d5bd7;
  --bs-dark: #0a2f7a;
  --bs-warning: #ffc21a;
  --bg: #f3f8ff;
  --card: #fff;
  --text: #1d2b4a;
  --muted: #5d6b88;
  --line: #e2eaf7;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1428;
    --card: #121d38;
    --text: #e6ecfa;
    --muted: #9fb0d3;
    --line: #22345f;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1428;
  --card: #121d38;
  --text: #e6ecfa;
  --muted: #9fb0d3;
  --line: #22345f;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--bs-primary);
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.row > * {
  padding: 10px;
}

.col-12 {
  width: 100%;
}

.col-6 {
  width: 50%;
}

@media (min-width: 768px) {
  .col-md-6 { width: 50%; }
  .col-md-4 { width: 33.333%; }
  .col-md-3 { width: 25%; }
  .col-md-5 { width: 41.66%; }
  .col-md-7 { width: 58.33%; }
}

@media (max-width: 767px) {
  .col-6 { width: 100%; }
}

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }

.navbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1000;
  background: var(--card);
  box-shadow: 0 2px 14px rgba(13, 91, 215, 0.12);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--bs-primary);
  font-size: 22px;
}

.brand .default-logo {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Hamburger Toggler Button */
.navbar-toggler {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  outline: none;
}

.navbar-toggler span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: all 0.3s ease;
}

.nav-close-btn {
  display: none;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: space-between;
  margin-left: 20px;
}

.nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav a {
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.nav a.active,
.nav a:hover {
  background: var(--bs-primary);
  color: #fff;
}

/* Dropdown Menu CSS */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  z-index: 1001;
  margin-top: 4px;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  border-radius: 0;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--bg);
  color: var(--bs-primary);
}

@media (min-width: 768px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 99px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--bs-primary);
  color: #fff;
}

.btn-warning {
  background: var(--bs-warning);
  color: #1d2b4a;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

@media (max-width: 767px) {
  .brand .default-logo { height: 34px; }
  .navbar-toggler { display: block; }

  .nav-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
  }
  .nav-close-btn:hover {
    background: var(--bs-primary);
    color: #fff;
  }

  .nav-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 70px 20px 30px;
    gap: 16px;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    margin-left: 0;
  }
  .nav-wrapper.show { right: 0; }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }
  .nav a {
    border-radius: 8px;
    width: 100%;
  }

  .dropdown { width: 100%; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg);
    padding: 4px 0 4px 12px;
    margin-top: 4px;
    border-radius: 8px;
  }
  .dropdown.open .dropdown-menu { display: block; }

  .menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
  }
  .menu-overlay.show { display: block; }
}

.hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  background: #0a2f7a;
  color: #fff;
  display: flex;
  align-items: center;
}

.hero-photo {
  position: absolute;
  inset: 0 0 0 38%;
  background: #1a4aa8 url("../uploads/bpmpdepan.png") center/cover no-repeat;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0a2f7a 0%, rgba(10, 47, 122, 0.35) 40%, transparent 100%);
}

@media (max-width: 767px) {
  .hero-photo { inset: 0; opacity: 0.35; }
}

.waves {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 60px;
  z-index: 1;
}

.sails {
  position: absolute;
  left: calc(50% - 50vw);
  top: -70px;
  width: min(780px, 100vw);
  height: calc(100% + 210px);
  z-index: 0;
}

.wind {
  transform-origin: 30px 500px;
  animation: wind 6s ease-in-out infinite;
}

@keyframes wind {
  0%, 100% { transform: skewY(0) scaleX(1); }
  50% { transform: skewY(-1.8deg) scaleX(1.035); }
}

.wave { animation: wave 8s linear infinite; }
.wave.w2 { animation-duration: 12s; animation-direction: reverse; }
.wave.w3 { animation-duration: 16s; }

@keyframes wave {
  to { transform: translateX(-300px); }
}

.hero h1, .hero p, .hero .btn {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0 80px;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.1;
  margin: 0 0 14px;
  font-weight: 800;
  text-shadow: 0 2px 18px rgba(0, 20, 80, 0.5);
}

.hero h1 span {
  display: block;
  font-size: 0.78em;
  font-weight: 600;
}

.hero p {
  max-width: 440px;
  margin: 0 0 22px;
  opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
  .wind, .wave { animation: none; }
}

section { padding: 44px 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  height: 100%;
  box-shadow: 0 8px 24px rgba(13, 91, 215, 0.07);
  transition: transform 0.2s;
}

.card:hover { transform: translateY(-4px); }

.ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e7f0ff;
  color: var(--bs-primary);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.card h4, .card h5 {
  margin: 0 0 6px;
  color: var(--bs-primary);
  font-size: 15px;
}

.card p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.badge {
  display: inline-block;
  background: #fff2c9;
  color: #7a5600;
  border-radius: 99px;
  padding: 2px 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

h2 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--bs-primary);
  font-weight: 800;
}

.lead {
  color: var(--muted);
  font-size: 14px;
}

ol {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.map {
  height: 210px;
  border-radius: 14px;
  background: linear-gradient(135deg, #cfe3ff, #e7f0ff);
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  overflow: hidden;
}

.links .card {
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

footer {
  background: linear-gradient(120deg, #0a2f7a, #0d5bd7);
  color: #fff;
  padding: 26px 0;
  font-size: 13px;
}

footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

footer a {
  color: #fff;
  margin-right: 12px;
}

.ppid-apps-row { margin-top: 20px; }

.ppid-app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text);
  text-decoration: none;
}

.ppid-app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(13, 91, 215, 0.15);
  color: var(--bs-primary);
}

.ppid-app-img {
  width: 100%;
  max-width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
}

.ppid-app-card span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* ================================================= */
/* PLUGIN AKSESIBILITAS DISABILITAS                  */
/* ================================================= */
.a11y-float-btn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 9999;
  background: var(--bs-primary);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.2s, background 0.2s;
}
.a11y-float-btn:hover {
  transform: scale(1.1);
  background: var(--bs-dark);
}

.a11y-modal {
  position: fixed;
  bottom: 85px;
  left: 25px;
  z-index: 9999;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 12px;
}
.a11y-modal.show {
  display: flex;
}
.a11y-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.a11y-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
}
.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.a11y-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.a11y-btn:hover, .a11y-btn.active {
  background: var(--bs-primary);
  color: #fff;
  border-color: var(--bs-primary);
}
.a11y-reset {
  grid-column: span 2;
  background: #fde8e8;
  color: #e23b3b;
  border-color: #fca5a5;
}
.a11y-reset:hover {
  background: #e23b3b;
  color: #fff;
}

/* Modifikasi Efek Aksesibilitas */
body.a11y-high-contrast {
  background: #000 !important;
  color: #ff0 !important;
}
body.a11y-high-contrast .card,
body.a11y-high-contrast .navbar,
body.a11y-high-contrast footer {
  background: #000 !important;
  color: #ff0 !important;
  border-color: #ff0 !important;
}
body.a11y-grayscale {
  filter: grayscale(100%) !important;
}
body.a11y-dyslexia * {
  font-family: "Comic SansMS", "Comic Sans", cursive, sans-serif !important;
}

