/* Halaman publik PMB UNIMA — pelengkap app.css (design system biru institusional).
   Scoped dengan prefix agar tidak mengganggu area pendaftar/orkestrator. */

/* Utility tambahan yang belum ikut ter-compile di app.css */
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Navigasi responsif ---------- */
.site-nav { display: none; }
@media (min-width: 1024px) {
  .site-nav { display: flex; }
}
.site-nav.is-open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: .25rem;
  padding: .75rem 1rem 1rem;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .35);
  animation: pub-fade-in .18s ease-out;
}
.site-nav.is-open > * { width: 100%; }
.site-nav.is-open form { margin-top: .25rem; }
.site-nav a[aria-current="page"] {
  background: rgba(30, 64, 175, .08);
  color: var(--color-primary);
}
.nav-toggle {
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-primary);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--color-muted); }
.nav-toggle:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }
@keyframes pub-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Scroll reveal (Subtle, 350ms) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(12px); }
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .35s ease-out, transform .35s ease-out;
}
/* Tanpa JS atau reduced-motion: konten tetap terlihat (no-JS fallback). */
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* ---------- Hero & tombol ---------- */
.hero-actions .btn { width: 100%; }
@media (min-width: 640px) { .hero-actions .btn { width: auto; } }
.hero-lede { max-width: 42rem; }
.section-kicker {
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.pub-icon { flex-shrink: 0; }

/* ---------- Akses cepat ---------- */
.quick-link {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 1px solid var(--color-border);
  border-radius: .75rem;
  background: var(--color-card);
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.quick-link:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 18px -12px rgba(30, 64, 175, .5);
  transform: translateY(-2px);
}

/* ---------- Alur bernomor ---------- */
.langkah-item { position: relative; }
@media (min-width: 1024px) {
  .langkah-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18px;
    right: -12px;
    width: 24px;
    height: 2px;
    background: var(--color-border);
    z-index: 1;
  }
}
.langkah-nomor {
  display: grid;
  height: 2.25rem;
  width: 2.25rem;
  place-items: center;
  border-radius: .5rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
}

/* ---------- Kartu jalur ---------- */
.jalur-kartu { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.jalur-kartu:hover {
  border-color: var(--color-primary);
  box-shadow: 0 12px 24px -16px rgba(30, 64, 175, .55);
  transform: translateY(-2px);
}
.jalur-desc { min-height: 3.75rem; }
.jalur-info { display: flex; align-items: flex-start; gap: .5rem; font-size: .8125rem; color: var(--color-muted-foreground); }
.jalur-info svg { margin-top: .125rem; }
.jalur-kartu a.jalur-panduan {
  margin-top: auto;
  padding-top: 1rem;
  font-size: .8125rem;
  font-weight: 700;
}

/* ---------- Jadwal ---------- */
.jadwal-tanggal {
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: .5rem;
  background: rgba(30, 64, 175, .08);
  color: var(--color-primary);
}

/* ---------- Footer ---------- */
.site-footer a:hover { color: var(--color-primary); text-decoration: underline; }
.site-footer .footer-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-foreground);
}
.footer-sosial { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .625rem; }
.footer-sosial a {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-card);
  color: var(--color-muted-foreground);
  text-decoration: none;
  transition: color .2s, border-color .2s, background-color .2s;
}
.footer-sosial a:hover,
.footer-sosial a:focus-visible {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  text-decoration: none;
}
.footer-sosial-ikon { width: 1rem; height: 1rem; }

/* ---------- Halaman biaya ---------- */
[hidden] { display: none !important; }
.biaya-table { width: 100%; }
.biaya-table thead th {
  font-size: .75rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  white-space: nowrap;
}
.biaya-table tbody tr:nth-child(even) { background: rgba(239, 246, 255, .55); }
.biaya-table tbody tr:hover { background: var(--color-muted); }
.biaya-table th[scope="row"] { min-width: 12rem; line-height: 1.35; }
.biaya-angka {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--color-primary);
}
.biaya-kosong {
  color: var(--color-muted-foreground);
  font-weight: 400;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
#alat-biaya input, #alat-biaya select { min-height: 44px; }
#nav-fakultas a { text-decoration: none; }

@media (max-width: 640px) {
  .biaya-table, .biaya-table tbody, .biaya-table tr, .biaya-table th, .biaya-table td {
    display: block;
    width: 100%;
  }
  .biaya-table thead { display: none; }
  .biaya-table tbody tr {
    margin-bottom: .75rem;
    padding: .875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: .75rem;
    background: var(--color-card);
  }
  .biaya-table tbody tr:last-child { margin-bottom: 0; }
  .biaya-table th[scope="row"] {
    min-width: 0;
    padding: 0 0 .5rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }
  .biaya-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
    border: 0;
    text-align: right;
  }
  .biaya-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-muted-foreground);
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav.is-open { animation: none; }
  .quick-link, .jalur-kartu { transition: none; }
  .quick-link:hover, .jalur-kartu:hover { transform: none; }
}

/* ---------- Polish konsistensi visual (publik) ---------- */
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Kartu sebelumnya memakai shadow putih (tidak terlihat) -> ganti shadow halus. */
.card {
  border-color: var(--color-border) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 24px -18px rgba(15, 23, 42, .45) !important;
}

/* Samakan tinggi kartu sejajar dalam satu baris grid. */
.quick-link, .jalur-kartu, .langkah-item { height: 100%; }
.jalur-desc { min-height: 4.5rem; }
.jalur-kartu a.jalur-panduan { margin-top: auto; }

/* Ritme vertikal section lebih teratur. */
.section-kicker { margin-bottom: .5rem; }
.site-header { box-shadow: 0 1px 0 rgba(15, 23, 42, .05); }
.hero-lede { font-size: 1.0625rem; line-height: 1.6; }
.hero-actions { gap: .75rem; }
@media (max-width: 639px) {
  .hero-actions { align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* Badge tidak boleh terpotong di layar sempit. */
.badge-success, .badge-warning, .badge-neutral, .badge-danger { white-space: nowrap; }

/* Switcher bahasa ringkas dan tidak mendesak header. */
#switch-bahasa { max-width: 8.5rem; font-size: .8125rem; }
@media (max-width: 480px) { #switch-bahasa { max-width: 6.5rem; } }

/* Daftar info jalur lebih rapi. */
.jalur-info + .jalur-info { margin-top: .5rem; }
.jalur-info svg { margin-top: .125rem; }

/* ---------- Widget aksesibilitas ---------- */
.a11y-widget { position: fixed; left: 1rem; bottom: 1rem; z-index: 60; font-family: inherit; }
.a11y-toggle {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 9999px;
  border: 1px solid var(--color-border); background: var(--color-primary); color: #fff;
  box-shadow: 0 8px 24px -10px rgba(15,23,42,.55); cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.a11y-toggle svg { width: 24px; height: 24px; }
.a11y-toggle:hover { transform: translateY(-2px); background: var(--color-foreground); }
.a11y-toggle:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.a11y-panel {
  position: absolute; left: 0; bottom: calc(100% + .75rem); width: min(19rem, calc(100vw - 2rem));
  border: 1px solid var(--color-border); border-radius: .875rem; background: var(--color-card);
  padding: 1rem; box-shadow: 0 18px 40px -18px rgba(15,23,42,.5);
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--color-border); }
.a11y-title { font-weight: 700; color: var(--color-foreground); }
.a11y-close { min-width: 32px; min-height: 32px; border: 0; background: transparent; font-size: 1.25rem; line-height: 1; color: var(--color-muted-foreground); cursor: pointer; border-radius: .375rem; }
.a11y-close:hover { background: var(--color-muted); }
.a11y-close:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
.a11y-row { display: grid; gap: .5rem; margin-top: .875rem; }
.a11y-label { font-size: .8125rem; font-weight: 700; color: var(--color-muted-foreground); }
.a11y-btn-group { display: flex; gap: .375rem; }
.a11y-btn {
  flex: 1; min-height: 40px; border: 1px solid var(--color-border); border-radius: .5rem;
  background: var(--color-card); color: var(--color-foreground); font-weight: 700; cursor: pointer;
}
.a11y-btn:hover { background: var(--color-muted); border-color: var(--color-primary); }
.a11y-btn:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
.a11y-option {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%;
  min-height: 40px; padding: .5rem .625rem; border: 1px solid var(--color-border); border-radius: .5rem;
  background: var(--color-card); color: var(--color-foreground); font-size: .875rem; text-align: left; cursor: pointer;
}
.a11y-option:hover { border-color: var(--color-primary); }
.a11y-option[aria-pressed="true"] { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.a11y-status { font-size: .75rem; font-weight: 700; opacity: .85; }
.a11y-reset {
  margin-top: .875rem; width: 100%; min-height: 40px; border-radius: .5rem;
  border: 1px solid var(--color-border); background: var(--color-muted);
  color: var(--color-foreground); font-weight: 700; cursor: pointer;
}
.a11y-reset:hover { background: var(--color-muted-foreground); color: #fff; }
.a11y-reset:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }

/* Efek aksesibilitas */
html.a11y-kontras { --color-primary: #000; --color-foreground: #000; --color-background: #fff; --color-card: #fff; --color-muted: #eee; --color-muted-foreground: #111; --color-border: #000; --color-ring: #000; }
html.a11y-kontras body { background: #fff !important; color: #000 !important; }
html.a11y-kontras .card, html.a11y-kontras .input { background: #fff !important; border-color: #000 !important; color: #000 !important; }
html.a11y-kontras .btn-primary, html.a11y-kontras .a11y-toggle { background: #000 !important; color: #fff !important; border-color: #000 !important; }
html.a11y-kontras .text-muted-foreground, html.a11y-kontras .text-muted { color: #111 !important; }
/* Filter diterapkan ke konten, BUKAN body — agar widget a11y (position: fixed) tetap tampil. */
html.a11y-grayscale .site-header,
html.a11y-grayscale main,
html.a11y-grayscale .site-footer { filter: grayscale(100%); }
html.a11y-sorot a { outline: 2px solid #d97706 !important; outline-offset: 2px; background: #fef3c7 !important; color: #111 !important; }
html.a11y-stabil *, html.a11y-stabil *::before, html.a11y-stabil *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-stabil .js-reveal .reveal { opacity: 1 !important; transform: none !important; }

@media print { .a11y-widget { display: none !important; } }

/* ---------- Widget aksesibilitas lanjutan ---------- */
.a11y-panel { max-height: min(70vh, 34rem); overflow: hidden; display: flex; flex-direction: column; }
.a11y-scroll { overflow-y: auto; overscroll-behavior: contain; padding-right: .25rem; }
.a11y-group { margin: .875rem 0 .375rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-primary); }
.a11y-profil { display: grid; grid-template-columns: repeat(3, 1fr); gap: .375rem; }
.a11y-hint { margin-top: .375rem; font-size: .6875rem; color: var(--color-muted-foreground); }
.a11y-btn, .a11y-option { min-height: 44px; }
.a11y-keyboard-guide { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(15,23,42,.45); padding: 1rem; }
.a11y-keyboard-guide[hidden] { display: none; }
.a11y-guide-card { max-width: 26rem; width: 100%; border-radius: 1rem; border: 1px solid var(--color-border); background: var(--color-card); padding: 1.5rem; box-shadow: 0 24px 60px -20px rgba(15,23,42,.6); }
.a11y-guide-card h2 { font-size: 1.25rem; margin-bottom: .75rem; }
.a11y-guide-card ul { display: grid; gap: .5rem; margin-bottom: 1rem; font-size: .875rem; color: var(--color-foreground); }
.a11y-guide-card kbd { display: inline-block; min-width: 1.75rem; padding: .125rem .375rem; border: 1px solid var(--color-border); border-bottom-width: 2px; border-radius: .375rem; background: var(--color-muted); font-size: .75rem; text-align: center; }

html.a11y-hideimages img, html.a11y-hideimages svg:not(.a11y-toggle svg) { display: none !important; }
html.a11y-cursor, html.a11y-cursor * { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M3 2l9 24 3-9 9-3z" fill="%231e40af" stroke="white" stroke-width="1.5"/></svg>') 3 2, auto !important; }
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing .a11y-label { line-height: 1.9 !important; letter-spacing: .03em !important; word-spacing: .15em !important; }
html.a11y-spacing p { margin-bottom: 1.25em !important; }
html.a11y-linefocus p, html.a11y-linefocus li { background-image: repeating-linear-gradient(transparent, transparent 1.6em, rgba(30,64,175,.07) 1.6em, rgba(30,64,175,.07) 3.2em); }
html.a11y-calm .reveal, html.a11y-calm [class*="blur-"], html.a11y-calm [class*="gradient"], html.a11y-calm .site-header { backdrop-filter: none !important; animation: none !important; }
html.a11y-calm .site-header { background: #fff !important; }
html.a11y-bigtarget a, html.a11y-bigtarget button, html.a11y-bigtarget select, html.a11y-bigtarget input { min-height: 48px !important; }
html.a11y-bigtarget a { padding-top: .5rem !important; padding-bottom: .5rem !important; }
@media (prefers-reduced-motion: reduce) { .a11y-widget *, .a11y-keyboard-guide * { animation: none !important; transition: none !important; } }

/* ---------- Tombol dengarkan (TTS) ---------- */
.baca-nyaring { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .875rem; }
.baca-btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .875rem;
  border: 1px solid var(--color-border); border-radius: .5rem; background: var(--color-card);
  color: var(--color-primary); font-size: .875rem; font-weight: 700; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.baca-btn svg { width: 18px; height: 18px; }
.baca-btn:hover { background: var(--color-muted); border-color: var(--color-primary); }
.baca-btn:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
.baca-btn.baca-stop { color: var(--color-destructive); border-color: var(--color-destructive); }
.baca-status { font-size: .8125rem; color: var(--color-muted-foreground); }
.baca-btn[hidden], .baca-status:empty { display: none; }

/* ---------- Tombol baca teks pilihan ---------- */
.pilih-baca {
  position: fixed; z-index: 80; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: .45rem .75rem;
  border: 1px solid var(--color-primary); border-radius: 9999px;
  background: var(--color-primary); color: #fff;
  font-size: .8125rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(15,23,42,.5);
  transition: transform .15s ease, background-color .15s ease;
}
.pilih-baca svg { width: 16px; height: 16px; }
.pilih-baca:hover { transform: translateY(-2px); background: var(--color-foreground); }
.pilih-baca:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.pilih-baca:disabled { opacity: .75; cursor: progress; }
.pilih-baca[hidden] { display: none; }
@media print { .pilih-baca { display: none !important; } }
