/* ==========================================================
   1. VARIABEL GLOBAL & PENGATURAN DASAR
   ========================================================== */
:root {
  --primary-color: #0d8253;
  --primary-hover: #08613d;
  --focus-ring: #0284c7;
  --bg-color: #ffffff;
  --text-color: #1e293b;
  --card-bg: #f8fafc;
  --card-border: #e2e8f0;
}

/* Navigasi Lewati Konten (Screen Reader & Keyboard) */
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  background: #000;
  color: #fff;
  padding: 12px 18px;
  z-index: 99999;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease-in-out;
}

.skip-link:focus {
  top: 0;
  outline: 4px solid var(--focus-ring);
}

*:focus-visible {
  outline: 3px solid #0284c7 !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

/* ==========================================================
   2. DESAIN DEFAULT KOMPONEN (MODE NORMAL)
   ========================================================== */
.top-accessibility-bar {
  background: #0b1f17;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.brand-text-braille {
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0d8253;
}

.btn-primary-accessible {
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  text-decoration: none;
}

.btn-primary-accessible:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.access-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.access-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

/* ==========================================================
   3. MODE KONTRAS TINGGI: STRUKTUR UMUM & HEADER DESKTOP
   ========================================================== */
body.high-contrast {
  background-color: #0d1117 !important;
  color: #f0f6fc !important;
}

/* Bilah Atas Aksesibilitas */
body.high-contrast .top-accessibility-bar {
  background-color: #010409 !important;
  border-bottom: 2px solid #30363d !important;
}

/* Header Navigasi Utama */
body.high-contrast header.py-3,
body.high-contrast .sticky-top header,
body.high-contrast .sticky-top {
  background-color: #0d1117 !important;
  border-bottom: 1px solid #30363d !important;
}

body.high-contrast header nav a,
body.high-contrast nav a {
  color: #f0f6fc !important;
  font-weight: 600 !important;
}

body.high-contrast header nav a:hover,
body.high-contrast nav a:hover {
  color: #58a6ff !important;
  text-decoration: underline !important;
}

/* ==========================================================
   4. MODE KONTRAS TINGGI: HERO, BANNER & KARTU KONTEN
   ========================================================== */
   
/* ==========================================================
   LOGO MODE KONTRAS TINGGI (BACKGROUND PUTIH)
   ========================================================== */
body.high-contrast header img,
body.high-contrast .offcanvas-header img,
body.high-contrast .footer-accessible img {
  background-color: #ffffff !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4) !important;
}   
   
/* Kontainer Banner / Gradien */
body.high-contrast header[style*="linear-gradient"],
body.high-contrast section[style*="linear-gradient"],
body.high-contrast div[style*="linear-gradient"],
body.high-contrast header.rounded-4,
body.high-contrast section[aria-labelledby="hero-title"] {
  background: #161b22 !important;
  border: 1px solid #30363d !important;
}

/* Tipografi Banner */
body.high-contrast header[style*="linear-gradient"] h1,
body.high-contrast header.rounded-4 h1,
body.high-contrast #hero-title {
  color: #ffffff !important;
}

body.high-contrast header[style*="linear-gradient"] p,
body.high-contrast header.rounded-4 p,
body.high-contrast header[style*="linear-gradient"] span,
body.high-contrast header.rounded-4 span {
  color: #c9d1d9 !important;
}

body.high-contrast header[style*="linear-gradient"] .badge,
body.high-contrast header.rounded-4 .badge,
body.high-contrast section[aria-labelledby="hero-title"] .badge {
  background-color: #21262d !important;
  color: #58a6ff !important;
  border: 1px solid #30363d !important;
}

/* Kontainer Artikel & Kotak Konten */
body.high-contrast .card,
body.high-contrast .bento-card,
body.high-contrast .access-card,
body.high-contrast .footer-accessible,
body.high-contrast main,
body.high-contrast article,
body.high-contrast [class*="bg-white"],
body.high-contrast [class*="bg-light"] {
  background-color: #161b22 !important;
  color: #f0f6fc !important;
  border: 1px solid #30363d !important;
}

body.high-contrast section[aria-labelledby="hero-title"] .bg-white {
  background-color: #0d1117 !important;
  border: 1px solid #30363d !important;
}

/* Tipografi Global Kontras Tinggi */
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast p,
body.high-contrast li {
  color: #f0f6fc !important;
}

body.high-contrast a {
  color: #58a6ff !important;
}

body.high-contrast .text-muted,
body.high-contrast .text-secondary {
  color: #8b949e !important;
}

/* ==========================================================
   5. MODE KONTRAS TINGGI: DRAWER NAVIGASI MOBILE (OFFCANVAS)
   ========================================================== */
body.high-contrast .offcanvas,
body.high-contrast .offcanvas-header,
body.high-contrast .offcanvas-body {
  background-color: #0d1117 !important;
  color: #f0f6fc !important;
  border-left: 1px solid #30363d !important;
}

body.high-contrast .offcanvas-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
}

body.high-contrast .offcanvas label,
body.high-contrast .offcanvas .text-uppercase,
body.high-contrast .offcanvas .text-secondary,
body.high-contrast .offcanvas .text-muted {
  color: #8b949e !important;
}

body.high-contrast .offcanvas nav a {
  background-color: #161b22 !important;
  color: #f0f6fc !important;
  border: 1px solid #30363d !important;
}

body.high-contrast .offcanvas nav a:hover,
body.high-contrast .offcanvas nav a:focus {
  background-color: #21262d !important;
  color: #58a6ff !important;
  border-color: #58a6ff !important;
}

body.high-contrast .offcanvas nav a.bg-success {
  background-color: #238636 !important;
  color: #ffffff !important;
  border-color: #2ea043 !important;
}

body.high-contrast #search-input-mobile {
  background-color: #010409 !important;
  color: #ffffff !important;
  border-color: #30363d !important;
}

body.high-contrast #search-input-mobile::placeholder {
  color: #6e7681 !important;
}

body.high-contrast .offcanvas .badge {
  background-color: #21262d !important;
  color: #58a6ff !important;
  border: 1px solid #30363d !important;
}

body.high-contrast .offcanvas hr,
body.high-contrast .offcanvas .border-top,
body.high-contrast .offcanvas .border-bottom {
  border-color: #30363d !important;
}

/* ==========================================================
   6. MODE KONTRAS TINGGI: AUDIO TTS & ELEMEN KONTROL
   ========================================================== */
body.high-contrast [style*="background-color: rgb(220"],
body.high-contrast [style*="background-color: #d"],
body.high-contrast [style*="background-color: #e"],
body.high-contrast mark,
body.high-contrast .tts-highlight,
body.high-contrast .tts-active,
body.high-contrast .speaking,
body.high-contrast [class*="highlight"] {
  background-color: #1f3a5f !important;
  color: #ffffff !important;
  border: 1.5px solid #58a6ff !important;
  border-radius: 6px !important;
  box-shadow: 0 0 10px rgba(88, 166, 255, 0.25) !important;
}

body.high-contrast mark *,
body.high-contrast .tts-highlight *,
body.high-contrast .tts-active *,
body.high-contrast .speaking * {
  color: #ffffff !important;
}

body.high-contrast div[class*="tts-player"],
body.high-contrast div:has(> #btn-toggle-tts),
body.high-contrast .border.rounded-3,
body.high-contrast [class*="card"][class*="shadow-sm"] {
  background-color: #161b22 !important;
  border-color: #30363d !important;
  color: #ffffff !important;
}

body.high-contrast .btn-group button,
body.high-contrast button[class*="btn-outline"] {
  background-color: #21262d !important;
  color: #f0f6fc !important;
  border-color: #30363d !important;
}

body.high-contrast .badge,
body.high-contrast [class*="badge"] {
  background-color: #21262d !important;
  color: #58a6ff !important;
  border: 1px solid #30363d !important;
}

body.high-contrast .btn-primary-accessible,
body.high-contrast .btn-success {
  background-color: #238636 !important;
  color: #ffffff !important;
  border: 1px solid #2ea043 !important;
  font-weight: 700 !important;
}