/* =========================================================
   1. TOP BAR PENGUMUMAN & JAM
   ========================================================= */
.top-bar {
    background: linear-gradient(90deg, #04392a 0%, #045a40 55%, #066b4c 100%);
    color: var(--white);
    font-size: 11px;
    line-height: 1.4;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 28px;
}

.top-ticker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: var(--gold-light);
}

.top-sep {
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

.top-ticker-viewport {
    position: relative;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.top-ticker-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: pabjnTicker 40s linear infinite;
}

.top-ticker-viewport:hover .top-ticker-track {
    animation-play-state: paused;
}

.top-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 40px;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.18s ease;
}

.top-ticker-item:hover {
    color: var(--gold-light);
}

.ticker-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold-light);
    flex-shrink: 0;
}

@keyframes pabjnTicker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.top-clock-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.78);
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   2. HEADER IDENTITAS PENGADILAN
   ========================================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--brand-100);
    box-shadow: 0 2px 10px rgba(4, 57, 42, 0.07);
    position: relative;
    z-index: 90;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 96px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 8px rgba(4, 57, 42, 0.18));
}

.brand-logo img {
    max-width: 74px;
    max-height: 74px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.brand-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
}

.brand-logo-placeholder {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: var(--gold-light);
    font-weight: 800;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
}

.brand-text {
    min-width: 0;
    line-height: 1.2;
}

.brand-parent {
    display: block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-dark);
    margin-bottom: 2px;
}

.brand-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-dark);
    letter-spacing: -0.01em;
}

.brand-address {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--gray-500);
    margin-top: 3px;
}

.brand-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--gray-500);
}

.brand-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.18s ease;
}

.brand-contact-link:hover {
    color: var(--brand);
}

.contact-icon-circle {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand);
    flex-shrink: 0;
}

.contact-divider {
    width: 1px;
    height: 12px;
    background: var(--gray-200);
    flex-shrink: 0;
}

.header-badges {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.badge-berakhlak-box {
    text-align: right;
    line-height: 1.15;
}

.berakhlak-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0f4c81;
    letter-spacing: -0.02em;
}

.berakhlak-title strong {
    color: #c81e1e;
    font-weight: 800;
}

.berakhlak-sub {
    display: block;
    font-size: 7.5px;
    color: var(--gray-500);
    margin-top: 2px;
}

.badge-zi-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1.5px solid var(--brand-100);
    background: var(--brand-50);
    line-height: 1.2;
}

.zi-top {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand);
}

.zi-bottom {
    font-size: 10px;
    font-weight: 800;
    color: var(--brand-dark);
}

/* =========================================================
   3. NAVIGASI UTAMA, MEGA MENU 3 TINGKAT, & SCROLL WRAP
   ========================================================= */
.nav-placeholder {
    height: 0;
}

.main-nav {
    background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 50%, var(--brand-mid) 100%);
    color: var(--white);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 999;
    transition: border-radius 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    position: relative;
    gap: 8px;
}

.nav-sticky-brand {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-right: 6px;
}

.sticky-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    padding: 2px;
    display: block;
}

.sticky-logo-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold-light);
    color: var(--brand-dark);
    font-weight: 800;
    font-size: 12px;
    display: grid;
    place-items: center;
}

.sticky-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.sticky-brand-text strong {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--white);
    white-space: nowrap;
}

.sticky-brand-text small {
    font-size: 10px;
    font-weight: 600;
    color: var(--gold-light);
}

.nav-menu-wrapper {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
}

.nav-top-item {
    position: static;
    display: flex;
    align-items: stretch;
}

.nav-top-item > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-top-item > a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    border-radius: 9999px 9999px 0 0;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.nav-top-item:hover > a,
.nav-top-item:focus-within > a {
    background: rgba(255, 255, 255, 0.10);
    color: var(--white);
}

.nav-top-item:hover > a::after,
.nav-top-item:focus-within > a::after {
    opacity: 1;
}

.nav-home-icon {
    flex-shrink: 0;
}

.nav-chevron {
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.nav-top-item:hover > a .nav-chevron,
.nav-top-item:focus-within > a .nav-chevron {
    transform: rotate(180deg);
}

/* Mega Menu Panel */
.mega-menu-outer {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}

.nav-top-item.has-mega-menu:hover > .mega-menu-outer,
.nav-top-item.has-mega-menu:focus-within > .mega-menu-outer {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-panel {
    margin-top: 1px;
    border-radius: 0 0 12px 12px;
    border-top: 3px solid var(--gold);
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-card-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
    color: var(--ink);
}

.mega-menu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
}

.mega-menu-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 4px;
}

.mega-grid-item {
    position: relative;
}

.mega-grid-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-600);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mega-item-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mega-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mega-dot-green {
    background: var(--brand-light);
}

.mega-dot-gold {
    background: var(--gold);
}

.mega-sub-arrow {
    flex-shrink: 0;
    transform: rotate(-90deg);
    opacity: 0.6;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.mega-grid-item > a:hover,
.mega-grid-item.has-sub-flyout:hover > a {
    background: var(--brand-50);
    color: var(--brand-dark);
}

.mega-grid-item.has-sub-flyout:hover > a .mega-sub-arrow {
    opacity: 1;
    color: var(--brand);
}

/* Flyout Tingkat 3 */
.mega-sub-flyout-wrap {
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 1050;
    width: 260px;
    padding-left: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}

.mega-grid-item.flip-left > .mega-sub-flyout-wrap {
    left: auto;
    right: 100%;
    padding-left: 0;
    padding-right: 4px;
}

.mega-grid-item.has-sub-flyout:hover > .mega-sub-flyout-wrap,
.mega-grid-item.has-sub-flyout:focus-within > .mega-sub-flyout-wrap {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-sub-flyout-box {
    overflow: hidden;
    border-radius: 12px;
    border-left: 3px solid var(--gold);
    background: var(--white);
    padding: 8px 0;
    box-shadow: var(--shadow-card-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.mega-flyout-header {
    margin: 0;
    padding: 2px 16px 6px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(6, 120, 86, 0.72);
}

.mega-sub-flyout {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-flyout-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-600);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mega-flyout-item a:hover {
    background: var(--brand-50);
    color: var(--brand-dark);
}

.mega-flyout-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-light);
    flex-shrink: 0;
}

/* Aksi Kanan Navigasi: Pencarian & Translator */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    align-self: center;
}

.nav-search-btn {
    align-self: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.92);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.nav-search-btn:hover,
.nav-search-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.14);
}

.nav-search-btn .icon-search-open {
    display: block;
}

.nav-search-btn .icon-search-close {
    display: none;
}

.nav-search-btn[aria-expanded="true"] .icon-search-open {
    display: none;
}

.nav-search-btn[aria-expanded="true"] .icon-search-close {
    display: block;
}

.nav-search-drawer {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1010;
    background: var(--white);
    border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow-card-lg);
}

.search-drawer-inner {
    padding-top: 16px;
    padding-bottom: 16px;
}

.pabjn-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pabjn-search-field-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--paper);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    padding: 10px 20px;
    color: var(--brand);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.pabjn-search-field-wrap:focus-within {
    background: var(--white);
    box-shadow: 0 0 0 2px var(--brand);
}

.pabjn-search-field-wrap input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
}

.pabjn-search-submit {
    background: var(--brand);
    color: var(--white);
    border: none;
    border-radius: 9999px;
    padding: 11px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pabjn-search-submit:hover {
    background: var(--brand-dark);
}

.search-quick-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.search-tags-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
}

.search-quick-tags a {
    background: var(--brand-50);
    color: var(--brand-dark);
    padding: 4px 12px;
    border-radius: 9999px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.search-quick-tags a:hover {
    background: var(--brand);
    color: var(--white);
}

/* Pemilih Bahasa (Translator) */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 12px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.24);
    border-color: var(--gold-light);
}

.lang-globe-icon {
    color: var(--gold-light);
    flex-shrink: 0;
}

.lang-caret {
    transition: transform 0.18s ease;
    opacity: 0.85;
}

.lang-btn[aria-expanded="true"] .lang-caret {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 175px;
    background: var(--white);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-top: 3px solid var(--gold);
    box-shadow: var(--shadow-card-lg);
    padding: 6px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-option:hover,
.lang-option.is-active {
    background: var(--brand-50);
    color: var(--brand-dark);
}

.lang-option.is-active {
    font-weight: 700;
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 15px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.lang-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Sembunyikan toolbar & popup bawaan Google Translate */
.pabjn-gt-hidden,
.goog-te-banner-frame,
.skiptranslate > iframe,
#goog-gt-tt,
.goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
    display: none !important;
    visibility: hidden !important;
}

/* Mode Floating Wrap Kapsul saat Scroll */
.main-nav.is-scrolled {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1280px;
    border-radius: 9999px;
    border-bottom: 2px solid var(--gold);
    background: linear-gradient(90deg, rgba(4, 57, 42, 0.96) 0%, rgba(6, 120, 86, 0.96) 50%, rgba(4, 90, 64, 0.96) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 16px 36px -8px rgba(4, 57, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    padding: 2px 10px;
}

body.admin-bar .main-nav.is-scrolled {
    top: 44px;
}

.main-nav.is-scrolled .nav-inner {
    padding: 0 8px;
}

.main-nav.is-scrolled .nav-sticky-brand {
    display: inline-flex;
    animation: pabjnFadeIn 0.22s ease forwards;
}

.main-nav.is-scrolled .nav-menu-wrapper {
    justify-content: center;
}

.main-nav.is-scrolled .nav-top-item > a {
    padding: 10px 13px;
    font-size: 13px;
}

.main-nav.is-scrolled .nav-top-item > a::after {
    left: 12px;
    right: 12px;
}

.main-nav.is-scrolled .mega-menu-outer {
    top: calc(100% + 10px);
}

.main-nav.is-scrolled .mega-menu-outer .container {
    padding: 0;
}

.main-nav.is-scrolled .mega-menu-panel {
    border-radius: 14px;
}

.main-nav.is-scrolled .nav-search-drawer {
    top: calc(100% + 10px);
    border-radius: 14px;
    border-top: 3px solid var(--gold);
    border-bottom: none;
}

@keyframes pabjnFadeIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.mobile-menu-toggle {
    display: none;
    background: var(--brand);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* Responsif Header & Navigasi */
@media (max-width: 1100px) {
    .mega-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sticky-brand-text { display: none; }
}

@media (max-width: 992px) {
    .header-badges { display: none; }
}

@media (max-width: 860px) {
    .top-ticker-label, .top-sep, .top-clock-wrap { display: none; }
    .brand-contacts { display: none; }
    .brand-title { font-size: 18px; }
    .brand-logo-link { width: 56px; height: 56px; }
    .brand-logo-img { width: 54px; height: 54px; }
    .mobile-menu-toggle { display: grid; }
    .main-nav { display: none; }
    .main-nav.is-mobile-visible {
        display: block;
        position: static;
        transform: none;
        width: 100%;
        border-radius: 0;
        padding: 0;
    }
    .nav-inner { flex-direction: column; align-items: stretch; padding: 10px 16px; }
    .nav-sticky-brand, .nav-search-btn { display: none !important; }
    .nav-list { flex-direction: column; }
    .nav-top-item { flex-direction: column; }
    .nav-top-item > a { justify-content: space-between; width: 100%; }
    .nav-top-item > a::after { display: none; }
    .nav-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .lang-dropdown { right: 0; }
    .mega-menu-outer {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        display: none;
    }
    .nav-top-item.is-mobile-open > .mega-menu-outer { display: block; }
    .mega-menu-outer .container { padding: 0; }
    .mega-menu-panel { border-radius: 10px; margin: 4px 0 8px; padding: 14px; }
    .mega-menu-grid { grid-template-columns: 1fr; }
    .mega-sub-flyout-wrap {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 4px 0 4px 12px;
    }
    .mega-sub-flyout-box { box-shadow: none; background: var(--paper); }
}