﻿/* Aturan komponen disatukan agar tidak saling menimpa. */
:root {
  --green: #294936;
  --cream: #f5f1e8;
  --white: #fff;
  --earth: #806748;
  --text: #555b56;
  --line: #e3dccb;
  --shadow: 0 14px 36px rgba(27, 53, 37, .1);
  --radius: 18px;
  --nav-height: 84px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset, var(--nav-height)); }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--text); background: var(--white); line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
a { color: var(--green); }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--earth); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
h1, h2, h3 { margin: 0 0 .65em; color: var(--green); line-height: 1.25; letter-spacing: -.035em; overflow-wrap: break-word; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
p { margin: 0 0 1em; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 2000; padding: 10px 16px; border-radius: 8px; background: var(--green); color: var(--white); transform: translateY(-180%); }
.skip:focus { transform: translateY(0); }

/* Navbar transparan di atas foto; ruang header disediakan pada hero. */
.nav { position: fixed; inset: 0 0 auto; z-index: 1000; background: transparent; border-bottom: 1px solid transparent; transition: background .2s, box-shadow .2s; }
.nav.scrolled, .nav.menu-open { background: rgba(17, 35, 25, .78); border-bottom-color: rgba(255, 255, 255, .12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 6px 24px rgba(20, 38, 28, .12); }
.nav :focus-visible { outline-color: var(--cream); }
.nav-in { min-height: var(--nav-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; }
.brand-mark { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px; background: rgba(255, 255, 255, .04); color: var(--white); font-size: .95rem; font-weight: 800; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.brand-copy strong { color: var(--white); font-size: 1.06rem; font-weight: 800; }
.brand-copy small { margin-top: 3px; color: rgba(255, 255, 255, .9); font-size: .67rem; }
#menu { display: flex; align-items: center; gap: 5px; }
#menu a { display: block; padding: 11px 13px; border-radius: 9px; color: rgba(255, 255, 255, .95); font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
#menu a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
#menu a.active { background: rgba(255, 255, 255, .13); color: var(--white); }
.nav-toggle { display: none; flex-shrink: 0; min-height: 44px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 10px; color: var(--white); background: rgba(255, 255, 255, .04); font-weight: 700; cursor: pointer; }

/* Hero mengikuti tinggi isi, tanpa teks absolut atau tinggi tetap. */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(620px, 88svh, 820px); padding-top: var(--header-offset, var(--nav-height)); background: var(--green) url("img/hero.jpg") center 48% / cover no-repeat; color: var(--white); }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(17, 35, 25, .9), rgba(17, 35, 25, .65) 58%, rgba(17, 35, 25, .22)); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding-block: clamp(64px, 7vw, 100px); }
.hero-copy { width: 100%; max-width: 820px; min-width: 0; }
.hero-label, .section-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.hero-label { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--cream); }
.live-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(245, 241, 232, .15); }
.hero h1 { margin-bottom: 24px; color: var(--white); font-size: clamp(2.6rem, 5.8vw, 4.8rem); font-weight: 800; line-height: 1.12; letter-spacing: -.05em; }
.hero h1 span { display: block; margin-top: 5px; color: #e9d5a5; }
.hero-description { max-width: 600px; margin-bottom: 0; color: rgba(255, 255, 255, .92); font-size: clamp(.98rem, 1.6vw, 1.12rem); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-caption { display: flex; align-self: end; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--cream); font-size: .72rem; }
.caption-line { flex: 0 0 34px; height: 1px; background: currentColor; }
.btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 46px; padding: 11px 20px; border: 1px solid var(--green); border-radius: 999px; font: 700 .9rem/1.5 "Plus Jakarta Sans", system-ui, sans-serif; text-align: center; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; transition: background .2s, box-shadow .2s; }
.btn:hover { box-shadow: 0 6px 18px rgba(20, 38, 28, .12); }
.btn-primary { background: var(--green); color: var(--white); }
.hero .btn { min-height: 52px; padding-inline: 24px; }
.hero .btn-primary { background: var(--cream); border-color: var(--cream); color: var(--green); }
.hero .btn-primary:hover { background: var(--white); }
.btn-glass { background: rgba(255, 255, 255, .08); color: var(--white); border-color: rgba(255, 255, 255, .65); }
.btn-glass:hover { background: rgba(255, 255, 255, .18); }
.btn-small { padding: 9px 14px; font-size: .8rem; background: var(--white); color: var(--green); }

/* Akses cepat */
.portal-shortcuts { background: var(--cream); border-bottom: 1px solid var(--line); }
.shortcut-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-block: 22px; }
.shortcut { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.shortcut:hover { background: var(--white); }
.shortcut-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--green); font-size: 1.35rem; }
.shortcut > span:nth-child(2) { min-width: 0; }
.shortcut strong, .shortcut small { display: block; overflow-wrap: break-word; }
.shortcut strong { color: var(--green); font-size: .8rem; line-height: 1.5; }
.shortcut small { margin-top: 4px; color: var(--text); font-size: .68rem; line-height: 1.6; }
.shortcut-arrow { flex-shrink: 0; margin-left: auto; color: var(--earth); }

/* Bagian dan kartu */
.section { padding-block: clamp(60px, 7vw, 96px); }
.alt { background: var(--cream); }
.section-eyebrow { margin-bottom: 12px; color: var(--earth); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px; margin-bottom: 32px; }
.section-heading > div { flex: 1 1 540px; min-width: 0; max-width: 760px; }
.section-heading h2 { margin-bottom: 14px; }
.lead { max-width: 68ch; margin-bottom: 0; line-height: 1.85; }
.text-link { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: var(--green); font-size: .84rem; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card, .news-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(30, 55, 38, .045); }
.card[hidden] { display: none; }
.card-img { flex-shrink: 0; width: 100%; aspect-ratio: 16 / 10; background: var(--earth) center / cover no-repeat; }
.card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; padding: 24px; }
.badge { display: inline-block; max-width: 100%; margin: 0; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--earth); font-size: .72rem; line-height: 1.6; font-weight: 700; }
.card h3 { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.card p { margin: 0; font-size: .9rem; }
.card p.badge { font-size: .72rem; }
.card dl { width: 100%; margin: 0; font-size: .84rem; }
.card dt { margin-top: 10px; font-weight: 800; color: var(--green); }
.card dd { margin: 3px 0 0; }
.card .btns { width: 100%; margin-top: auto; padding-top: 12px; }
.card .btn { flex: 1 1 125px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.news-image { flex-shrink: 0; aspect-ratio: 16 / 10; background: var(--earth) center / cover no-repeat; }
.news-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; padding: 24px; }
.news-tag { margin-bottom: 12px; color: var(--earth); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.news-body h3 { font-size: 1.08rem; line-height: 1.5; }
.news-body p { font-size: .88rem; }
.news-body .text-link { margin-top: auto; padding-top: 6px; }
.notice { margin: 24px 0 0; padding: 16px 20px; border-left: 3px solid var(--earth); background: rgba(255, 255, 255, .7); font-size: .8rem; }

/* Peta: kolom boleh menyusut, kontrol tetap membungkus. */
.map-layout { display: grid; grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); align-items: start; gap: 24px; }
.map-list { display: grid; gap: 10px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.map-list li { min-width: 0; }
.map-list button { display: flex; flex-direction: column; gap: 5px; width: 100%; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--text); text-align: left; font: 600 .86rem/1.5 "Plus Jakarta Sans", system-ui, sans-serif; cursor: pointer; overflow-wrap: break-word; }
.map-list button:hover { border-color: var(--green); }
.map-list button[aria-current="true"] { background: var(--green); color: var(--white); border-color: var(--green); }
.map-list small { color: var(--earth); font-size: .72rem; }
.map-list button[aria-current="true"] small { color: var(--cream); }
.map-box { min-width: 0; }
#map { position: relative; isolation: isolate; width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 16px; background: #e8e4d8; }
.map-fallback { display: grid; place-items: center; align-content: center; gap: 10px; padding: 32px; text-align: center; }
.map-fallback p { max-width: 42ch; margin: 0; font-size: .9rem; }
.map-bar { display: grid; gap: 16px; margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.map-bar p { margin: 0; font-size: .85rem; overflow-wrap: break-word; }
.map-bar .btns { gap: 8px; }
.map-bar .btn { flex: 1 1 135px; }
.btn:disabled { opacity: .6; cursor: wait; box-shadow: none; }
.leaflet-popup-content { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: .85rem; line-height: 1.6; }
.leaflet-popup-content strong { color: var(--green); }

/* Panduan, tentang, footer */
.guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.guide article { min-width: 0; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.guide-number { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--earth); font-size: .78rem; font-weight: 800; }
.guide h3 { font-size: 1.08rem; line-height: 1.5; }
.guide ul { margin: 0; padding-left: 1.2em; font-size: .9rem; }
.guide li + li { margin-top: 8px; }
.guide .wide { grid-column: 1 / -1; border-left: 4px solid var(--earth); }
.guide .wide p { margin: 0; font-size: .9rem; }
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: clamp(28px, 6vw, 72px); }
.about > div { min-width: 0; }
.about p { font-size: .93rem; }
.about p:last-child { margin-bottom: 0; }
.about-panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
.about-panel h3 { margin: 24px 0 8px; font-size: 1.02rem; }
.about-panel h3:first-child { margin-top: 0; }
.footer { padding: 56px 0 24px; background: var(--green); color: #dfe6e0; }
.footer a { color: var(--white); font-size: .85rem; text-decoration: none; overflow-wrap: anywhere; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-in { display: grid; grid-template-columns: 1.1fr .8fr 1.2fr; gap: 32px; }
.foot-in > * { min-width: 0; }
.foot-in nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot-in p { margin-bottom: 10px; font-size: .85rem; }
.footer a.footer-brand { display: inline-block; margin-bottom: 14px; font-size: 1.25rem; font-weight: 800; }
.footer-disclaimer { margin-top: 16px; font-size: .75rem; opacity: .82; }
.copy { margin-top: 36px; margin-bottom: 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .75rem; }

dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100svh - 48px); margin: auto; overflow: auto; padding: clamp(22px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20, 38, 28, .7); }
dialog h3 { font-size: 1.35rem; }
dialog #dText { margin-block: 20px 24px; font-size: .95rem; }

/* Menu dilipat sebelum tautan bertabrakan dengan identitas situs. */
@media (max-width: 1080px) {
  :root { --nav-height: 76px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  #menu { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: min(calc(100svh - var(--header-offset, var(--nav-height)) - 12px), var(--menu-available-height, 100svh)); overflow-y: auto; padding: 12px 24px 20px; border-bottom: 1px solid rgba(255, 255, 255, .15); background: rgba(17, 35, 25, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); }
  #menu.open { display: grid; gap: 5px; }
  #menu a { padding: 12px 16px; white-space: normal; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-caption { margin-bottom: 0; }
  .shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .map-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #map { height: 420px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .news-card { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .news-image { height: auto; min-height: 230px; aspect-ratio: auto; }
}
@media (max-width: 760px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .foot-in > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --nav-height: 72px; }
  .wrap { width: calc(100% - 32px); }
  .nav-in { gap: 12px; }
  .brand { gap: 9px; }
  .brand-mark { flex-basis: 38px; height: 38px; }
  .brand-copy strong { font-size: .95rem; }
  .brand-copy small { max-width: 160px; font-size: .59rem; }
  .nav-toggle { padding-inline: 12px; font-size: .85rem; }
  #menu { padding-inline: 16px; }
  .hero { min-height: 0; background-position: 58% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(17, 35, 25, .88), rgba(17, 35, 25, .6)); }
  .hero-in { gap: 30px; padding-block: 64px 48px; }
  .hero-label { font-size: .62rem; letter-spacing: .08em; line-height: 1.8; }
  .hero h1 { font-size: clamp(2.2rem, 8.5vw, 3.5rem); line-height: 1.15; }
  .hero-description { font-size: .95rem; line-height: 1.8; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { flex: 1 1 180px; padding-inline: 18px; font-size: .85rem; }
  .hero-caption { font-size: .7rem; }
  .shortcut-grid { gap: 6px; padding-block: 16px; }
  .shortcut { gap: 10px; padding: 10px 6px; }
  .shortcut-arrow { display: none; }
  .shortcut-icon { flex-basis: 36px; height: 36px; font-size: 1.15rem; }
  .shortcut strong { font-size: .73rem; }
  .shortcut small { font-size: .64rem; }
  .section { padding-block: 56px; }
  .section-heading { margin-bottom: 26px; }
  .lead { font-size: .93rem; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .card-img { aspect-ratio: 16 / 9; }
  .card-body, .news-body { padding: 22px; }
  .news-card { display: flex; }
  .news-image { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .map-list { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x proximity; }
  .map-list li { flex: 0 0 min(78vw, 280px); scroll-snap-align: start; }
  #map { height: 350px; }
  .map-bar { padding: 16px; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .about-panel { padding: 24px; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-in > div:last-child { grid-column: auto; }
  .footer { padding-top: 42px; }
}
@media (max-width: 400px) {
  .brand-copy small { max-width: 125px; }
  .shortcut-grid { grid-template-columns: minmax(0, 1fr); }
  .shortcut { padding: 12px 6px; }
  .shortcut + .shortcut { border-top: 1px solid var(--line); border-radius: 0; }
  .shortcut-arrow { display: block; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { flex: 0 1 auto; width: 100%; }
  .card .btn { flex-basis: 100%; }
  .map-bar .btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
