:root {
    --primary-color: #0d6efd;
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
}

/* StandarWCAG: Penanda Focus Navigasi Keyboard yang Sangat Jelas */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #ffc107 !important;
    outline-offset: 3px !important;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Skip Link untuk Pemakai Keyboard / Screen Reader */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* Layout Komponen */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

header {
    background-color: #1b4332;
    color: #ffffff;
    padding: 15px 0;
}

.accessibility-bar {
    background-color: #081c15;
    color: #fff;
    padding: 8px 0;
    font-size: 0.9rem;
}

.accessibility-bar button {
    background: #2d6a4f;
    color: #fff;
    border: 1px solid #fff;
    padding: 4px 10px;
    margin-right: 5px;
    cursor: pointer;
    border-radius: 4px;
}

/* Mode Kontras Tinggi (High Contrast Mode - WCAG 2.1 AAA/AA Requirement) */
body.high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}

body.high-contrast header,
body.high-contrast footer,
body.high-contrast .card {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

body.high-contrast a {
    color: #00ffff !important;
    text-decoration: underline !important;
}

body.high-contrast button {
    background-color: #ffff00 !important;
    color: #000000 !important;
    font-weight: bold;
}

/* WIDGET AKSESIBILITAS MENGAMBANG (WCAG)*/
#accessibility-btn {
    position: fixed;
    right: 0;
    top: 30%;
    background-color: #1b4332;
    color: white;
    font-size: 28px;
    border: none;
    padding: 12px 15px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: -3px 0 10px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

#accessibility-btn:hover {
    background-color: #0d6efd;
}

#accessibility-panel {
    position: fixed;
    right: -320px;
    top: 15%;
    width: 280px;
    background: #ffffff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    padding: 20px;
    z-index: 9998;
    transition: right 0.3s ease-in-out;
    border-radius: 12px 0 0 12px;
    color: #333;
    max-height: 80vh;
    overflow-y: auto;
}

#accessibility-panel.open {
    right: 0;
}

#accessibility-panel h3 {
    margin-top: 0;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: 2px solid #1b4332;
    padding-bottom: 10px;
    color: #1b4332;
}

#accessibility-panel button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    font-weight: bold;
    transition: all 0.2s;
}

#accessibility-panel button:hover, #accessibility-panel button:focus {
    background: #e9ecef;
    border-color: #1b4332;
}

#accessibility-panel button.reset-btn {
    background: #dc3545;
    color: white;
    text-align: center;
    margin-top: 15px;
    border: none;
}

#accessibility-panel button.reset-btn:hover {
    background: #c82333;
}

/* Mode Abu-abu (Grayscale) Menggunakan Kaca Overlay */
body.grayscale::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: grayscale(100%);
    -webkit-backdrop-filter: grayscale(100%);
    pointer-events: none;
    z-index: 9997;
}

/* Font Ramah Disabilitas (Dyslexia Friendly) */
body.readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

/* Sorot Tautan (Highlight Links) agar link mudah terlihat */
body.highlight-links a {
    text-decoration: underline !important;
    text-decoration-thickness: 3px !important;
    background-color: #ffeb3b !important;
    color: #000 !important;
    font-weight: bold !important;
}

/* NAVIGASI RESPONSIF (HAMBURGER MENU) */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.nav-links a:hover, .nav-links a:focus {
    background-color: #2d6a4f;
}

.nav-links .login-btn {
    color: #ffc107;
}

/* Sembunyikan tombol garis tiga di layar besar (Laptop/PC) */
#menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 24px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

#menu-toggle:hover, #menu-toggle:focus {
    background-color: #2d6a4f;
}

/* Tampilan Layar HP/Tablet (Max 1024px) */
@media (max-width: 1024px) {
    #menu-toggle {
        display: block;
    }

    #main-nav {
        width: 100%;
        display: none;
        margin-top: 15px;
    }

    /* Saat menu diklik, class 'show' akan muncul */
    #main-nav.show {
        display: block; 
    }

    .nav-links {
        flex-direction: column;
        background-color: #081c15;
        padding: 15px;
        border-radius: 8px;
        gap: 10px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #1b4332;
    }
}

/* STICKY HEADER (HEADER MENGAMBANG) */
header[role="banner"] {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* DROPDOWN MENU (TENTANG & LAYANAN) */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #081c15;
    min-width: 220px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 10px 0;
    border-radius: 4px;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.dropdown-menu li {
    width: 100%;
    text-align: left;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-weight: normal;
    border-bottom: 1px solid #1b4332;
    border-radius: 0;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

/* Penyesuaian Dropdown untuk layar HP/Tablet */
@media (max-width: 1024px) {
    .dropdown-menu {
        position: static;
        background-color: #1b4332;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        display: block;
    }
}

/* SKIP LINK (SEMBUNYI SECARA VISUAL) */
.skip-link {
    position: absolute;
    top: -100px; /* Tarik ke atas agar keluar dari layar */
    left: 0;
    background-color: #000000;
    color: #ffffff;
    padding: 10px 15px;
    z-index: 9999;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.3s ease;
}

/* Hanya muncul ketika pengguna keyboard menekan tombol Tab */
.skip-link:focus {
    top: 0; 
}

/* PERBAIKAN KOTAK KONTEN BERITA AGAR FLEKSIBEL MENGIKUTI TEKS (ANTI KOPONG DI HP) */
.berita-card, 
.berita-card .card-body, 
.detail-container, 
.detail-container div {
    height: auto !important;
    min-height: fit-content !important;
}

/* PERBAIKAN JARAK KOPONG PADA FORMULIR & HALAMAN HUBUNGI KAMI */
form label, 
.kontak-card label, 
.hubungi-kami-form label {
    display: block;
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
}

form input, 
form textarea, 
form select,
.form-control,
.kontak-input,
.hubungi-input {
    height: auto !important;
    padding: 10px !important;
    margin-bottom: 15px !important;
}

form div, 
.kontak-group, 
.hubungi-group {
    margin-bottom: 8px !important;
}