/* HALLO-PAS — PTSP Online PA Sambas */
:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --primary: #0d4f6c;
  --primary-light: #156a8f;
  --accent: #c9a227;
  --accent-soft: #f5edd8;
  --text: #1a2b32;
  --muted: #5c6f78;
  --border: #dce5ea;
  --success: #1e7e4a;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(13, 79, 108, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.brand .sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.nav-main {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-main a {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-main a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 2.5rem 0 2rem;
  background: linear-gradient(180deg, #e8f1f5 0%, var(--bg) 100%);
}

.hero h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--primary);
}

.hero .lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 1.25rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(145deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 16px rgba(13, 79, 108, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

/* Sections */
section {
  padding: 2.25rem 0;
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: var(--primary);
}

.section-desc {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-card .icon {
  font-size: 1.35rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.feature-card .btn {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}

/* Loket grid */
.loket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.loket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.loket-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

.loket-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: var(--accent-soft);
  color: var(--primary);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.loket-card h4 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  color: var(--text);
}

.loket-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Pengumuman */
.pengumuman-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pengumuman-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.pengumuman-card time {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}

.pengumuman-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--primary);
}

.pengumuman-isi {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}

/* FAQ */
.faq-toolbar {
  margin-bottom: 1rem;
}

.faq-toolbar input {
  width: 100%;
  max-width: 420px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
}

.faq-toolbar input:focus {
  outline: 2px solid var(--primary-light);
  border-color: transparent;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.faq-list summary {
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--primary);
  font-weight: 700;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list .answer {
  padding: 0 1rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.faq-list details.hidden {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #e8f1f5;
  padding: 1.75rem 0;
  margin-top: 2rem;
  font-size: 0.88rem;
}

.site-footer a {
  color: #fff;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* Chat widget */
.chat-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--success), #2a9d5c);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: 0 6px 24px rgba(30, 126, 74, 0.45);
  z-index: 200;
  display: grid;
  place-items: center;
}

.chat-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, 70vh);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  z-index: 199;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chat-panel.open {
  display: flex;
}

.chat-panel header {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 200px;
  background: #f8fafb;
}

.msg {
  max-width: 88%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.msg.bot {
  align-self: flex-start;
  background: #e8f1f5;
  color: var(--text);
}

.msg.user {
  align-self: flex-end;
  background: var(--primary-light);
  color: #fff;
}

.msg.staff {
  align-self: flex-start;
  background: #e8f5ec;
  border: 1px solid rgba(30, 126, 74, 0.35);
  color: var(--text);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.chat-input-row input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-input-row button {
  padding: 0.55rem 0.9rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.hint {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 1rem 0.75rem;
}

/* Modal zoom */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 79, 108, 0.45);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  margin: 0 0 0.75rem;
  color: var(--primary);
}

.modal-box p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.modal-box .btn {
  margin-top: 0.5rem;
}

.modal-box-wide {
  max-width: 520px;
}

/* Zoom */
.zoom-page {
  padding: 2rem 0 3rem;
}

.zoom-full {
  max-width: 640px;
}

.zoom-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  margin: 0 0 1.25rem;
}

.zoom-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  color: var(--primary);
}

.zoom-h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--primary);
}

.zoom-lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
}

.zoom-steps {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  font-size: 0.92rem;
  color: var(--text);
}

.zoom-steps li {
  margin-bottom: 0.45rem;
}

.zoom-box-warn {
  background: #fff8e6;
  border: 1px solid var(--accent);
}

.zoom-box {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.zoom-cta {
  margin: 1rem 0 1.5rem;
}

.zoom-btn-join {
  display: inline-flex;
}

.zoom-credentials {
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.zoom-hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.zoom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.zoom-label {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 6rem;
}

.zoom-code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.zoom-footnote {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 1rem 0 0;
  line-height: 1.45;
}

.zoom-p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
}

.zoom-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.zoom-more {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.zoom-alt {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.feature-card .btn + .btn,
.feature-card .btn + a.btn {
  margin-top: 0.45rem;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-quiet {
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-quiet:hover {
  background: var(--accent-soft);
  border-style: solid;
}

.zoom-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 400;
  transition: opacity 0.2s, transform 0.2s;
}

.zoom-toast.zoom-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .brand h1 {
    font-size: 1rem;
  }
}
