/* --- INTER FONT --- */

/* Inter Regular (400) */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/inter-v19-latin-regular.woff2') format('woff2');
}

/* Inter Medium (500) */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/inter-v19-latin-500.woff2') format('woff2');
}

/* Inter Semi-Bold (600) */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/inter-v19-latin-600.woff2') format('woff2');
}

/* Inter Bold (700) */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/inter-v19-latin-700.woff2') format('woff2');
}


/* --- MERRIWEATHER FONT --- */

/* Merriweather Regular (400) */
@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/merriweather-v32-latin-regular.woff2') format('woff2');
}

/* Merriweather Bold (700) */
@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/merriweather-v32-latin-700.woff2') format('woff2');
}

/* Merriweather Black (900) */
@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 900;
  src: url('../fonts/merriweather-v32-latin-900.woff2') format('woff2');
}


/* ==========================================
   1. VARIABEL & DASAR
   ========================================== */
:root {
    /* Colors */
    --color-primary: #1a56db;
    --color-primary-dark: #1e429f;
    --color-primary-light: #3b82f6;
    --color-light-bg: #f9fafb;
    --color-light-accent: rgba(255, 255, 255, 0.1);
    --color-dark-bg: #18181b;
    --color-dark-accent: #27272a;
    --color-text-light: #d9d9d9;
    --color-text-light: #4b5563;
    --color-text-inverse: #f9fafb;
    --color-border: #e5e7eb;
    --color-border-dark: #374151;
    --active-menu-border: rgba(59, 130, 246, 0.5);
    --color-lightlite: 245, 247, 250;
    --ornament-paper: 25px;
    --color-white: 255, 255, 255;
    --color-primary-rgb: 26, 86, 219; /* Nilai RGB dari warna primer #1a56db */
    --text-color-dark: #fff;
    
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;      /* Font utama untuk semua teks paragraf. */
    --font-heading: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-secondary: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Header Heights (untuk perhitungan sticky) */
    --header-height: 55px;           /* Ditingkatkan sedikit untuk spacing */
    --mobile-header-height: 45px;
    --mobile-menu-height: 35px;    /* Ditingkatkan sedikit untuk spacing */
    --breaking-height: 40px;
    --mobile-breaking-height: 40px;
    --desktop-menu-height: 40px;     /* Ditingkatkan agar menu lebih longgar */
    --total-header-height: calc(var(--header-height) + var(--desktop-menu-height) + var(--breaking-height));
    --total-mobile-header-height: calc(var(--mobile-header-height) + var(--mobile-menu-height) + var(--mobile-breaking-height));
    
    /* Other */
    --container-max: 1024px;
    --marquee-color: 244, 244, 244;
    
}


/* Reset dan Base Styles */
html, body {
    min-height: 100%;
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    color: var(--color-text);
}

body {
    line-height: 1.5;
    transition: opacity ease-in 0.2s;
    background-color: #fff;
}

img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover;
    position: relative;
    display: inline-block;
    color: transparent;
    vertical-align: middle;
}

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

a:hover {
    color: var(--color-primary-dark);
}

button, input, select, textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ==========================================
   2. LAYOUT UMUM
   ========================================== */
/* Containers */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem; /* Ditingkatkan padding untuk spacing */
    box-sizing: border-box;
}

/* Apply font to article title */
.post-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Apply font to all content text */
.post-content {
    font-family: var(--font-body);
}

/* Apply body font to meta info, excerpt */
.post-meta,
.post-excerpt,
.post-tags,
.post-share,
.latest-news-list,
.related-tags-list,
.post-author-info {
    font-family: var(--font-body);
}

/* Make sure headings in content use Merriweather */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Apply Merriweather to other section titles */
.section-title,
.post-author-box__heading, .modern-popular-title, .zonamerdeka-tags-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

a.skip-link.screen-reader-text {
    display: none;
}

/* Adjust body padding */
body {
    padding-top: var(--total-header-height);
}

/* Utility classes */
.hidden {
    display: none !important;
}

.mobile-only {
    display: flex;
}

.desktop-only {
    display: none;
}


/* ==========================================
   3. HEADER & NAVIGASI
   ========================================== */
/* Site Header - Base Styling */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    will-change: transform, opacity;
    transform: translateY(0);
    backface-visibility: hidden;
    perspective: 1000px;
    padding-top: 3px; /* Jarak atas header */
    opacity: 1;
    visibility: visible;
}

/* Header components */
.header-navbar-wrapper {
    position: relative;
    z-index: 1001;
    background-color: #fff;
    will-change: transform;
    height: var(--header-height);
}

.menu-wrapper {
    background-color: #fff;
    z-index: 999;
    position: relative;
    will-change: transform;
    height: var(--desktop-menu-height);
}

/* Header visibility class untuk desktop */
.site-header.hide-navbar .header-navbar-wrapper {
    transform: translateY(-120%);
}

/* --- Styling untuk Logo Teks (Versi Baru) --- */

/* Menghapus dekorasi default dari link pembungkus */
.header-navbar-logo .text-logo {
    text-decoration: none;
    color: inherit;
}

/* Penataan untuk pembungkus teks yang baru */
.site-branding-text {
    display: flex;
    flex-direction: column; /* Menyusun judul di atas, deskripsi di bawah */
    line-height: 1.2;
}

/* Styling untuk Judul Situs (Baik H1 maupun DIV) */
.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

/* Styling untuk Deskripsi Situs */
.site-description {
    font-size: 0.55rem;
    font-weight: 400;
    color: #555;
    margin: 1px 0 0 0; /* Memberi sedikit jarak dari judul */
}


/* Menu dan breaking news sticky saat header hilang pada desktop */
.site-header.hide-navbar .menu-wrapper {
    position: fixed;
    top: 5px;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 4px; /* Tambah padding bawah saat sticky */
}

/* Style untuk menyembunyikan navbar di desktop */
.hide-navbar {
    transform: translateY(-100%);
    opacity: 0;
}

.site-header.hide-navbar .breaking-news {
    position: fixed;
    top: calc(var(--desktop-menu-height) + 10px); /* Tambahkan 5px untuk jarak */
    left: 0;
    right: 0;
    box-shadow: var(--shadow-sm);
}

/* Header Navbar */
.header-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-navbar-logo {
    display: flex;
    transform-origin: left;
    padding: 0px 0; /* Tambahan padding logo */
}

.logo img, .custom-logo {
        height: 35px;
        width: auto;
        object-fit: contain;
        max-height: 35px;
    }

.text-logo {
    font-weight: bold;
    font-size: 1.5rem;
}

.header-navbar-right {
    display: flex;
    align-items: center;
}

/* VERSI EXTRA COMPACT */
.search-form {
    height: 32px !important;
    max-height: 32px !important;
    border-radius: 16px !important;
}

.search-input {
    padding: 4px 10px !important;
    font-size: 13px !important;
}

.search-button {
    padding: 4px 10px !important;
    border-radius: 0 16px 16px 0 !important;
    min-height: 32px !important;
}

.search-icon {
    width: 16px !important;
    height: 16px !important;
}

/* Search Form Styling */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px; /* Kurangi dari 25px */
    padding: 0;
    transition: all 0.3s ease;
    height: 40px; /* Set tinggi tetap */
    max-height: 40px; /* Pastikan tidak melebihi */
}

.search-form:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Fix untuk menghilangkan background autofill */
.search-input {
    border: none;
    outline: none;
    background: transparent !important;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    flex: 1;
    min-width: 180px;
    height: 100%;
    line-height: 1.2;
    
    /* PERBAIKAN: Override autofill styling */
    -webkit-autofill: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: #333;
    background-clip: text;
    transition: background-color 5000s ease-in-out 0s;
}

/* Override semua state autofill */
.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus,
.search-input:-webkit-autofill:active {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: #333 !important;
    color: #333 !important;
    box-shadow: 0 0 0 30px transparent inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Override internal autofill styling */
.search-input:-internal-autofill-selected {
    appearance: none !important;
    background-image: none !important;
    background-color: transparent !important;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}

/* Additional override untuk browser lain */
.search-input:-moz-autofill {
    background-color: transparent !important;
    background-image: none !important;
    color: #333 !important;
}

.search-input:-ms-autofill {
    background-color: transparent !important;
    background-image: none !important;
    color: #333 !important;
}

.search-input::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

/* Untuk dark mode jika ada */
[data-theme="dark"] .search-input,
.dark .search-input {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

[data-theme="dark"] .search-input:-webkit-autofill,
[data-theme="dark"] .search-input:-webkit-autofill:hover,
[data-theme="dark"] .search-input:-webkit-autofill:focus,
[data-theme="dark"] .search-input:-webkit-autofill:active,
.dark .search-input:-webkit-autofill,
.dark .search-input:-webkit-autofill:hover,
.dark .search-input:-webkit-autofill:focus,
.dark .search-input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    box-shadow: 0 0 0 30px transparent inset !important;
}

.search-input::placeholder {
    color: #6c757d;
}

.search-button {
    background: none;
    border: none;
    padding: 8px 12px; /* Kurangi padding vertikal */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
    border-radius: 0 20px 20px 0; /* Sesuaikan dengan border radius form */
    height: 100%; /* Full height dari parent */
    min-height: 40px; /* Sama dengan tinggi form */
}

.search-button:hover {
    color: #007cba;
}

.search-button:focus {
    outline: none;
    color: #007cba;
}

.search-button:active {
    transform: scale(0.95);
}

.search-icon {
    width: 20px;
    height: 20px;
    pointer-events: none;
}



/* Theme Switcher */
.theme-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.theme-switch-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.2s ease-in-out;
}

.theme-switch-button:hover {
    transform: scale(1.1);
}

.theme-switch-button:active {
    transform: scale(0.95);
}

@keyframes theme-switch-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.theme-switch-active {
    animation: theme-switch-pulse 0.5s ease-out;
}

.theme-switch-button svg {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.theme-options {
    display: block;
    position: absolute;
    right: 0;
    top: 100%;
    width: 12rem;
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 0.25rem 0;
    box-shadow: var(--shadow-md);
    z-index: 1001;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform-origin: top right;
    transform: scale(0.95);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0.3s;
}

.theme-options.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.theme-options.closing {
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
    pointer-events: none;
}

.theme-options .theme-option-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    transition-delay: 0s;
}

.theme-options.open .theme-option-item {
    opacity: 1;
    transform: translateY(0);
}

.theme-options.open .theme-option-item:nth-child(1) {
    transition-delay: 0.05s;
}

.theme-options.open .theme-option-item:nth-child(2) {
    transition-delay: 0.1s;
}

.theme-options.open .theme-option-item:nth-child(3) {
    transition-delay: 0.15s;
}

.theme-option-item {
    padding: 0;
    margin: 0;
}

.theme-option-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-option-item.active {
    font-weight: 600;
}

.theme-option-link {
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 14px;
    text-decoration: none;
    color: inherit;
}

.theme-option-link:hover .theme-icon svg {
    transform: scale(1.15);
    transition: transform 0.2s ease;
}

.theme-icon {
    margin-right: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.theme-icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

/* Desktop Menu Navigation */
.desktop-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 97%;
    padding: 0;
}

.desktop-nav {
    flex: 1;
}

.desktop-menu-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.desktop-menu-actions .live-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.80rem;
    color: var(--color-primary);
    background-color: rgb(223 239 255 / 80%);
    border-radius: 0.375rem;
    padding: 0.3rem 0.5rem;
}

.live-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--color-primary);
    background-color: rgb(223 239 255 / 80%)!important;
    border-radius: 0.375rem;
    padding: 0.200rem 0.5rem;
}

.live-button svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0;
}

/* Horizontal Menu - Desktop */
.horizontal-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem; /* Increased gap between menu items */
    height: 100%;
    align-items: center;
}

.horizontal-menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.horizontal-menu > li > a {
    display: flex;
    align-items: center;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem; /* Sedikit lebih besar */
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.horizontal-menu > li > a:hover,
.horizontal-menu > li > a.active {
    color: var(--color-primary);
}

.horizontal-menu > li > a.active::after {
    content: '';
    position: absolute;
    bottom: -12px; /* Disesuaikan agar indikator di bawah */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
}

/* Dropdown with click behavior */
.horizontal-menu > li.dropdown-parent > a {
    position: relative;
    padding-right: 16px;
    cursor: pointer;
}


.horizontal-menu > li.dropdown-parent > a::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>');
    -webkit-mask-size: cover;
    mask-size: cover;
    mask-size: cover;
    position: absolute;
    right: -4px;
    top: 48%;
    margin-top: -8px;
    transition: transform 0.2s;
}

/* Jangan lupa tambahkan style untuk rotasi saat dropdown terbuka */
.horizontal-menu > li.dropdown-parent.dropdown-open > a::after {
    transform: rotate(-180deg);
}


/* Submenu dropdown */
.horizontal-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    z-index: 50;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.horizontal-menu > li.dropdown-parent.dropdown-open .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.horizontal-menu .sub-menu li {
    display: block;
}

.horizontal-menu .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.horizontal-menu .sub-menu a:hover {
    background-color: #f9fafb;
    color: var(--color-primary);
}

/* Mobile Navigation */
.hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.hamburger-menu.is-active {
    color: var(--color-primary);
}

.hamburger-menu svg {
    transition: transform 0.3s ease;
}

.hamburger-menu.is-active svg {
    transform: rotate(90deg);
}

/* Mobile Horizontal Menu */
.mobile-horizontal-menu {
    background-color: #fff;
    height: var(--mobile-menu-height);
    position: relative;
    z-index: 998;
    will-change: transform;
    overflow: hidden;
}

.scrollable-menu {
    overflow-x: overlay;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    height: 100%;
    display: flex;
    align-items: center;
}

/* VERSI LEBIH KETAT */
.mobile-horizontal-menu * {
    touch-action: pan-x !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.scrollable-menu {
    overflow: hidden !important;
    overflow-x: auto !important;
    position: relative !important;
    height: 100% !important;
}

.horizontal-menu-mobile {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.scrollable-menu::-webkit-scrollbar {
    display: none;
}

.horizontal-menu-mobile {
    display: flex;
    white-space: nowrap;
    height: 100%;
    align-items: center;
}

.horizontal-menu-mobile > li {
    padding: 0 0.75rem; /* Sedikit lebih besar */
    display: flex;
    align-items: center;
    height: 100%;
}

.horizontal-menu-mobile > li:first-child {
    padding-left: 0;
}

.horizontal-menu-mobile > li > a {
    display: block;
    color: var(--color-text);
    font-family: var(--font-primary);
    text-decoration: none;
    font-size: 0.85rem; /* Sedikit lebih besar */
    font-weight: 600;
    padding: 0;
    position: relative;
    line-height: 1.2;
}

/* Menggunakan class WordPress yang sudah ada */
.horizontal-menu-mobile > li.current-post-ancestor > a,
.horizontal-menu-mobile > li.current-menu-parent > a,
.horizontal-menu-mobile > li.current-post-parent > a,
.horizontal-menu-mobile > li.current-menu-item > a,
.horizontal-menu-mobile > li.current-menu-ancestor > a {
    position: relative;
    color: var(--color-primary, #007cba);
    font-weight: 600;
}

.horizontal-menu-mobile > li.current-post-ancestor > a::after,
.horizontal-menu-mobile > li.current-menu-parent > a::after,
.horizontal-menu-mobile > li.current-post-parent > a::after,
.horizontal-menu-mobile > li.current-menu-item > a::after,
.horizontal-menu-mobile > li.current-menu-ancestor > a::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary, #007cba);
}

/* Pastikan hanya satu yang aktif jika ada multiple */
.horizontal-menu-mobile > li:not(.current-post-ancestor):not(.current-menu-parent):not(.current-post-parent):not(.current-menu-item):not(.current-menu-ancestor) > a::after {
    display: none;
}


/* ==========================================
   4. BREAKING NEWS
   ========================================== */
.breaking-news {
    background-color: rgb(243 244 246);
    height: var(--breaking-height);
    width: 100%;
    max-width: var(--container-max);
    overflow: hidden;
    display: flex;
    align-items: center;
    margin: 0px auto 10px auto;
    position: relative;
    z-index: 998;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.breaking-news::before,
.breaking-news::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 100vw;
    background-color: inherit;
    z-index: -1;
}

.breaking-news::before {
    right: 100%;
}

.breaking-news::after {
    left: 100%;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.breaking-news-title {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.6rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.25rem;
    line-height: 1;
    white-space: nowrap;
    margin-right: 1rem;
    flex-shrink: 0;
    height: fit-content;
}

.breaking-news-marquee {
    overflow: hidden;
    flex: 1;
    top:-1px;
    height: 100%;
    position: relative;
    -webkit-mask-image: -webkit-linear-gradient(left, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.breaking-news-wrapper {
    white-space: nowrap;
    display: inline-block;
    height: 100%;
    animation: marqueeContinuous var(--breaking-news-speed, 20s) linear infinite;
    transform-origin: center left;
    will-change: transform;
}

@keyframes marqueeContinuous {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.breaking-news-list {
    display: inline-block;
    height: 100%;
    padding-right: 50px;
    font-size: 0.875rem;
    line-height: 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.breaking-news-list li {
    display: inline-block;
    margin-right: 30px;
    position: relative;
    line-height: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.breaking-news-list li:after {
    content: '•';
    position: absolute;
    right: -16px;
    color: var(--color-primary);
}

.breaking-news-list li:last-child:after {
    display: none;
}

.breaking-news-list li a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
}

.breaking-news-list li a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ==========================================
   5. KONTEN UTAMA
   ========================================== */
.site-main {
    padding: 1rem 0;
}

.page-title {
    font-family: var(--font-secondary);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.entry-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.entry-title a {
    color: var(--color-text);
}

.entry-title a:hover {
    color: var(--color-primary);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: inherit;
}

.entry-meta a:hover {
    color: var(--color-primary);
}

.post-thumbnail {
    margin-bottom: 1rem;
}

.post-thumbnail img {
    border-radius: 0.5rem;
    width: 100%;
    height: auto;
}

.entry-content {
    margin-bottom: 1.5rem;
}


/**
 * ===============================================
 * STYLING FINAL UNTUK PAGINATION
 * Rapi, Responsif, dan Modern
 * ===============================================
 */

/* Kontainer utama pagination */
.pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.navigation .nav-links {
    display: flex;
    flex-wrap: wrap; /* Tombol akan turun baris di layar kecil */
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* Jarak antar tombol */
}

/* Styling untuk setiap tombol (angka dan panah) */
.page-numbers {
    /* [KUNCI] Gunakan flexbox untuk menengahkan konten di dalam tombol */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background-color: #fff;
    color: var(--color-primary);
    transition: all 0.2s ease-in-out;
    min-width: 44px;  /* Ukuran minimal untuk target sentuh */
    min-height: 44px;
    padding: 0.25em 0.5em; /* Padding horizontal dan vertikal */
}

/* Aturan khusus untuk tombol panah agar tidak ada padding horizontal berlebih */
.page-numbers.prev,
.page-numbers.next {
    padding: 0.25em;
}

/* Styling untuk ikon SVG di dalam tombol panah */
.page-numbers svg {
    width: 1.2em;
    height: 1.2em;
}

/* Efek saat kursor di atas tombol (kecuali tombol '...') */
.page-numbers:not(.dots):not(.current):hover {
    border-color: var(--color-primary);
    background-color: #f0f8ff; /* Warna biru sangat muda */
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Tombol untuk halaman aktif */
.page-numbers.current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    cursor: default;
    transform: none;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

/* Titik-titik elipsis (...) */
.page-numbers.dots {
    border: none;
    background-color: transparent;
    box-shadow: none;
}

/* Teks untuk screen reader, disembunyikan secara visual */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.category-section-content a {
    color: var(--color-text);
}

/* ==========================================
   6. WIDGET & SIDEBAR
   ========================================== */
/* Sidebar */
.sidebar {
    position: relative;
}

/* Widget styling */
.widget {
    margin-bottom: 1.75rem;
}

.widget-title {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    display: inline-block;
}

.widget-title .category-section-title-underline, .category-section-title-underline {
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 50px;
    height: 4px;
    /* background-color: #007cba; */
    border-bottom: 4px solid var(--color-primary, #1a56db);
}

/* Dark mode widget styling */
html[theme="darkmode"] .widget,
html.dark .widget {
    border-radius: 5px;
}

html[theme="darkmode"] .widget-title,
html.dark .widget-title {
    border-bottom-color: var(--color-border-dark);
}

/* Popular Posts Widget */
.zonamerdeka-popular-posts-widget {
    position: relative;
    margin-bottom: 2rem;
    margin-left: 2rem;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.zonamerdeka-popular-label {
    position: absolute;
    top: 0;
    left: -3.1rem;
    font-size: 3.5rem;
    font-weight: 700;
    white-space: nowrap;
    transform: rotate(180deg);
    writing-mode: vertical-rl;
    z-index: 5;
    color: var(--color-primary, #007bff);
    font-family: var(--font-secondary);
}

.zonamerdeka-popular-container {
    position: relative;
    background-color: rgb(217 231 251 / 61%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    padding-bottom: 0.75rem;
    overflow: hidden;
    z-index: 10;
}

.zonamerdeka-popular-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.zonamerdeka-popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: popularposts;
}

.zonamerdeka-popular-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.25rem;
    counter-increment: popularposts;
}

.zonamerdeka-popular-item::before {
    content: counter(popularposts);
    position: absolute;
    top: 3px;
    left: 0;
    width: 1.50rem;
    height: 1.50rem;
    border-radius: 50%;
    background-color: var(--color-dark-bg, #007bff);
    color: #fff;
    font-size: 0.870rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zonamerdeka-popular-post-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

a.zonamerdeka-popular-title-link {
    color: var(--color-text);
}

.zonamerdeka-popular-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Popular Tags Widget */
.zonamerdeka-popular-tags-widget {
    position: relative;
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.zonamerdeka-tags-label {
    position: absolute;
    top: 0rem;
    left: -3.4rem;
    font-size: 3.30rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    white-space: nowrap;
    transform: rotate(180deg);
    writing-mode: vertical-rl;
    z-index: 5;
    color: var(--color-primary);
}

.zonamerdeka-tags-container {
    position: relative;
    background-color: rgb(217 231 251 / 61%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    padding-bottom: 0.75rem;
    margin-left: -5px;
    overflow: hidden;
    min-height: 20rem;
    z-index: 10;
}

.zonamerdeka-tags-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.zonamerdeka-tags-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 600;
    font-size: 0.875rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.zonamerdeka-tags-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.zonamerdeka-tags-item:last-child {
    border-bottom: none;
}

.zonamerdeka-tags-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    text-decoration: none;
    color: var(--color-text);
}

.zonamerdeka-tags-link:hover {
    color: var(--color-primary);
}

.zonamerdeka-tags-icon {
    flex-shrink: 0;
    color: var(--color-primary);
}

/* Mobile widget containers */
.mobile-popular-posts-container,
.mobile-popular-tags-container {
    width: 100%;
    margin: 0 auto 2rem;
}

.mobile-popular-posts-container .widget,
.mobile-popular-tags-container .widget {
    display: block !important;
    height: auto !important;
}

/* ==========================================
   REKOMENDASI ZONAMERDEKA WIDGET
   ========================================== */
.zonamerdeka-recommendations-widget {
    margin-bottom: 2.5rem;
    margin-top: 2.5rem;
}

.zonamerdeka-recommendations-title {
    position: relative;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    margin-bottom: 1.45rem;
}

.zonamerdeka-recommendations-underline {
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 4rem;
    border-bottom: 4px solid var(--color-primary);
}

.zonamerdeka-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.zonamerdeka-recommendations-item {
    margin: 0;
    padding: 0;
}

.zonamerdeka-rec-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.zonamerdeka-rec-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 6rem;
    height: 6rem;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.zonamerdeka-rec-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zonamerdeka-rec-thumbnail-border {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(229, 231, 235, 1);
    pointer-events: none;
}

.zonamerdeka-rec-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* Target #1: Link Kategori */
.zonamerdeka-rec-category {
    position: relative;
    display: inline-block;
    text-decoration: none;
    padding: 4px 8px 0px 0px;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    border-radius: 4px;
    line-height: 1;
}

/* Inilah 'papan sentuh transparan' kita */
.zonamerdeka-rec-category::before {
    content: '';
    position: absolute;
    
    /* Posisikan di tengah dan perbesar area */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Ukuran minimal yang direkomendasikan Google (44px sudah cukup untuk lolos tes) */
    width: 44px;
    height: 44px;

    /* Tidak terlihat oleh mata */
    background: transparent;
}

.zonamerdeka-rec-category:hover {
    background-color: rgba(26, 86, 219, 0.1); /* Efek hover tetap ada */
}


/* Target #2: Link Judul */
/* Judul biasanya sudah cukup besar, kita hanya perlu memastikan ada sedikit ruang vertikal */
.zonamerdeka-rec-title-link {
    display: block;
    text-decoration: none;
    padding-top: 2px;
    padding-bottom: 2px;
    line-height: 1.2rem;
}

.zonamerdeka-rec-title {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color: var(--color-text);
}

.zonamerdeka-rec-title-link:hover .zonamerdeka-rec-title {
    color: var(--color-primary);
}

.zonamerdeka-rec-date {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.widget_zonamerdeka_popular_posts{
    position: sticky;
    position: -webkit-sticky;
    top: 110px;
}

/* Dark mode styles */
html[theme="darkmode"] .zonamerdeka-rec-thumbnail-border,
html.dark .zonamerdeka-rec-thumbnail-border {
    border-color: rgba(255, 255, 255, 0.1);
}

html[theme="darkmode"] .zonamerdeka-rec-title,
html.dark .zonamerdeka-rec-title {
    color: var(--color-text-inverse);
}

html[theme="darkmode"] .zonamerdeka-rec-title-link:hover .zonamerdeka-rec-title,
html.dark .zonamerdeka-rec-title-link:hover .zonamerdeka-rec-title {
    color: var(--color-primary-light);
}

html[theme="darkmode"] .zonamerdeka-recommendations-underline,
html.dark .zonamerdeka-recommendations-underline {
    border-bottom-color: var(--color-primary-light);
}

/* ==========================================
   ZONAMERDEKA FOOTER - COMPLETE & CUSTOMIZABLE
   ========================================== */

.zonamerdeka-footer {
    width: 100%;
    background: rgb(238, 244, 249);
    margin-top: 40px;
    padding: 40px 0;
    color: #6c757d;
    font-size: 14px;
    clear: both;
}

.zonamerdeka-footer-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 15px;
}

.zonamerdeka-footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* === BRAND SECTION === */
.zonamerdeka-footer-brand {
    text-align: center;
}

.zonamerdeka-brand-text {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #6c757d;
}

.zonamerdeka-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.zonamerdeka-logo a {
    text-decoration: none;
    color: var(--color-primary, #007cba);
}

.zonamerdeka-logo img {
    max-width: 210px;
    height: auto;
    display: block;
}

.zonamerdeka-logo a:not(:first-child) img {
    max-width: 40px;
}

.zonamerdeka-site-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary, #007cba);
    text-decoration: none;
}

/* === SOCIAL MEDIA === */
.zonamerdeka-social {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.zonamerdeka-social-link {
    display: block;
    width: 40px;
    height: 40px;
    text-decoration: none;
    transition: transform 0.2s;
}

.zonamerdeka-social-link:hover {
    transform: translateY(-2px);
}

.zonamerdeka-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #939393;
    border-radius: 50%;
    filter: grayscale(1);
    transition: all 0.2s;
    background: white;
    display: block;
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    margin: 2px auto;
}

.zonamerdeka-social-link:hover .zonamerdeka-icon {
    filter: grayscale(0);
    border-color: var(--color-primary, #007cba);
}

/* Light Mode SVG backgrounds */
.zonamerdeka-icon-facebook {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231877F2' d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
}

.zonamerdeka-icon-twitter {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}

.zonamerdeka-icon-instagram {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E4405F' d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z'/%3E%3C/svg%3E");
}

.zonamerdeka-icon-youtube {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF0000' d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E");
}

.zonamerdeka-icon-tiktok {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z'/%3E%3C/svg%3E");
}

/* Sembunyikan SVG karena pakai background */
.zonamerdeka-icon svg {
    display: none;
}

/* === COPYRIGHT === */
.zonamerdeka-copyright {
    font-size: 12px;
    line-height: 1.5;
    color: #6c757d;
    font-weight: 500;
}

/* === MENU SECTIONS === */
.zonamerdeka-footer-menu {
    position: relative;
}

.zonamerdeka-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.zonamerdeka-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zonamerdeka-menu-list a {
    display: block;
    padding: 4px 0;
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: color 0.2s;
}

.zonamerdeka-menu-list a:hover {
    color: var(--color-primary, #007cba);
}

/* === MENU COLUMNS === */
.zonamerdeka-menu-columns-2 {
    column-count: 2;
    column-gap: 20px;
}

.zonamerdeka-menu-columns-3 {
    column-count: 3;
    column-gap: 20px;
}

.zonamerdeka-menu-columns-4 {
    column-count: 4;
    column-gap: 20px;
}

.zonamerdeka-menu-columns-5 {
    column-count: 5;
    column-gap: 20px;
}

.zonamerdeka-menu-list li {
    break-inside: avoid;
    margin-bottom: 0;
}

/* === BORDER UNTUK KOLOM TENGAH === */
.zonamerdeka-menu-with-border {
    border-left: 1px solid var(--color-border, #dee2e6);
    border-right: 1px solid var(--color-border, #dee2e6);
    padding-left: 20px;
    padding-right: 20px;
}

.zonamerdeka-menu-with-border::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--color-border, #dee2e6) 20%, 
        var(--color-border, #dee2e6) 80%, 
        transparent 100%
    );
}

.zonamerdeka-menu-with-border::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--color-border, #dee2e6) 20%, 
        var(--color-border, #dee2e6) 80%, 
        transparent 100%
    );
}

/* === RESPONSIVE UTILITIES === */
.zonamerdeka-desktop-only {
    display: block;
}

.zonamerdeka-mobile-only {
    display: none;
}

/* === TABLET RESPONSIVE === */
@media (max-width: 1024px) {
    .zonamerdeka-footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .zonamerdeka-footer-brand {
        grid-column: 1 / -1;
        margin-bottom: 20px;
    }
    
    .zonamerdeka-menu-with-border {
        border: none;
        padding-left: 0;
        padding-right: 0;
    }
    
    .zonamerdeka-menu-with-border::before,
    .zonamerdeka-menu-with-border::after {
        display: none;
    }
    
    .zonamerdeka-menu-columns-3,
    .zonamerdeka-menu-columns-4,
    .zonamerdeka-menu-columns-5 {
        column-count: 2;
    }
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .zonamerdeka-desktop-only {
        display: none;
    }
    
    .zonamerdeka-mobile-only {
        display: block;
    }
    
    .zonamerdeka-footer {
        padding: 30px 0;
    }
    
    .zonamerdeka-footer-content {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
    }
    
    .zonamerdeka-footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        grid-column: 1;
    }
    
    .zonamerdeka-brand-text {
        order: 1;
        margin-bottom: 10px;
    }
    
    .zonamerdeka-logo {
        order: 2;
        margin-bottom: 15px;
    }
    
    .zonamerdeka-footer-menu {
        order: 3;
        margin-bottom: 15px;
    }
    
    .zonamerdeka-social {
        order: 4;
        margin-bottom: 15px;
    }
    
    .zonamerdeka-copyright {
        order: 5;
    }
    
    /* Mobile Menu Horizontal */
    .zonamerdeka-menu-horizontal {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
    }
    
    .zonamerdeka-menu-horizontal li {
        position: relative;
        margin: 0 10px;
    }
    
    .zonamerdeka-menu-horizontal li:not(:last-child):after {
        content: "•";
        position: absolute;
        right: -14px;
        top: 46%;
        transform: translateY(-50%);
        color: #6c757d;
    }
    
    .zonamerdeka-menu-horizontal a {
        padding: 8px 0;
        font-size: 12px;
    }
}

/* === SMALL MOBILE === */
@media (max-width: 480px) {
    .zonamerdeka-footer-container {
        padding: 0 10px;
    }
    
    .zonamerdeka-footer {
        padding: 20px 0;
    }
    
    .zonamerdeka-logo img {
        max-width: 180px;
    }
    
    .zonamerdeka-icon {
        width: 32px;
        height: 32px;
        background-size: 18px 18px;
    }
    
    .zonamerdeka-menu-horizontal li {
        margin: 0 10px;
    }
    
    .zonamerdeka-menu-horizontal li:not(:last-child):after {
        right: -14px;
    }
    
    .zonamerdeka-menu-horizontal a {
        font-size: 11px;
    }
}

/* === DARK MODE MENGGUNAKAN CUSTOM THEME === */
html.dark .zonamerdeka-footer {
    background: var(--color-dark-bg, #18181b);
    color: var(--color-text-light, #d9d9d9);
}

html.dark .zonamerdeka-brand-text,
html.dark .zonamerdeka-copyright {
    color: var(--color-text-light, #d9d9d9);
}

html.dark .zonamerdeka-menu-title {
    color: var(--text-color-dark, #fff);
}

html.dark .zonamerdeka-menu-list a {
    color: var(--color-text-light, #d9d9d9);
}

html.dark .zonamerdeka-menu-list a:hover {
    color: var(--color-primary-light, #3b82f6);
}

html.dark .zonamerdeka-icon {
    border-color: var(--color-border-dark, #374151);
    background-color: var(--color-dark-accent, #27272a);
}

html.dark .zonamerdeka-social-link:hover .zonamerdeka-icon {
    border-color: var(--color-primary-light, #3b82f6);
}

html.dark .zonamerdeka-menu-with-border {
    border-left-color: var(--color-border-dark, #374151);
    border-right-color: var(--color-border-dark, #374151);
}

html.dark .zonamerdeka-menu-with-border::before,
html.dark .zonamerdeka-menu-with-border::after {
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--color-border-dark, #374151) 20%, 
        var(--color-border-dark, #374151) 80%, 
        transparent 100%
    );
}

html.dark .zonamerdeka-menu-horizontal li:not(:last-child):after {
    color: var(--color-text-light, #d9d9d9);
}

/* DARK MODE - IKON PUTIH UNTUK YANG HITAM */
html.dark .zonamerdeka-icon-twitter {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFFFFF' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}

html.dark .zonamerdeka-icon-tiktok {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFFFFF' d='M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z'/%3E%3C/svg%3E");
}

/* === PRINT STYLES === */
@media print {
    .zonamerdeka-footer {
        background: transparent !important;
        color: #000 !important;
    }
    
    .zonamerdeka-social {
        display: none !important;
    }
    
    .zonamerdeka-menu-with-border {
        border: none !important;
    }
    
    .zonamerdeka-menu-with-border::before,
    .zonamerdeka-menu-with-border::after {
        display: none !important;
    }
}

/* === ACCESSIBILITY === */
.zonamerdeka-social-link:focus,
.zonamerdeka-menu-list a:focus {
    outline: 2px solid var(--color-primary, #007cba);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .zonamerdeka-social-link,
    .zonamerdeka-menu-list a,
    .zonamerdeka-icon {
        transition: none !important;
    }
}


/*
=========================================
  404 Page Styles
=========================================
*/

/* --- Struktur & Layout Utama --- */
.error-404-section {
    text-align: center;
    padding: 4rem 1rem; /* Padding atas-bawah lebih besar */
}

.error-404-content {
    max-width: 600px; /* Lebar maksimal konten tengah */
    margin: 0 auto;
}

/* --- Styling Teks & Judul --- */
.error-404-header {
    margin-bottom: 2.5rem;
}

.error-404-title {
    font-size: 6rem; /* Ukuran angka 404 */
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary); /* Menggunakan warna primer tema */
    margin: 0 0 1rem 0;
}

.error-404-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333; /* Warna teks standar */
}

/* --- Daftar Postingan Terbaru --- */
.error-404-recent-posts {
    margin-top: 3rem;
    text-align: justify;
}

.recent-posts-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}
.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a {
    text-decoration: none;
    color: var(--color-primary);
}
.recent-posts-list a:hover {
    text-decoration: underline;
}


/* --- Tombol Kembali ke Beranda --- */
.error-404-actions {
    margin-top: 3rem;
}

.error-404-home-link {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}
.error-404-home-link:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}


/*
=========================================
  Dark Mode & Responsif
=========================================
*/

/* --- Dark Mode --- */
html.dark .error-404-subtitle,
html.dark .recent-posts-title,
html.dark .error-404-content p {
    color: var(--color-text-inverse); /* Menggunakan variabel warna teks untuk dark mode */
}

html.dark .recent-posts-list a {
    color: var(--color-primary-light);
}

html.dark .recent-posts-list li {
    border-color: var(--color-border-dark);
}


/* --- Responsif untuk Mobile --- */
@media (max-width: 768px) {
    .error-404-section {
        padding: 2.5rem 1rem;
    }
    .error-404-title {
        font-size: 4.5rem; /* Perkecil ukuran 404 di mobile */
    }
    .error-404-subtitle {
        font-size: 1.2rem;
    }
}

/* ==========================================
   8. UTILITAS
   ========================================== */
/* WordPress Admin Bar Adjustments */
body.admin-bar .site-header {
    top: 46px;
}

body.admin-bar .mobile-horizontal-menu {
    top: 91px;
}

body.admin-bar .breaking-news {
    margin-top: 152px;
}

body.admin-bar .mobile-menu {
    top: 46px;
    height: calc(100% - 46px);
}

body.admin-bar .breaking-news.news-fixed {
    top: calc(var(--desktop-menu-height) + 46px);
}

body.admin-bar .desktop-menu.menu-fixed {
    top: 46px;
}

body.menu-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.is-mobile .site-header.header-hidden {
    -webkit-transform: translateY(-10px);
    transform: translateY(-10px);
}
    
/* Visible state */
.site-header:not(.hide-header) {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

.hide-mobile-header {
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }
    
    /* Saat class dihapus, header akan kembali dengan animasi */
    #site-header {
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }

.mobile-menu {
    display: none;
}

/**
     * ===============================================
     * STYLES UNTUK SLOT IKLAN HOMEPAGE
     * ===============================================
     */
    .homepage-ad-slot {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 2rem;
        margin-bottom: 2rem;
        overflow: hidden;
    }
    
    /* Penyesuaian jika diperlukan */
    .ad-slot--above-pilihan {
        /* Style khusus jika perlu */
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 2rem;
        margin-bottom: 2rem;
        overflow: hidden;
    }
    
    .ad-slot--below-pilihan {
        /* Style khusus jika perlu */
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 2rem;
        margin-bottom: 2rem;
        overflow: hidden;
    }
    

/* ==========================================
   9. MEDIA QUERIES
   ========================================== */

@media (min-width: 768px) {
    /* Desktop specific margins */
    .site-main {
        margin-top: 150px;
    }
}
   
/* Small screens and mobile */
@media screen and (max-width: 782px) {
    
    header#site-header {
      height: auto;
      max-height: 60px;
    box-sizing: border-box;
    }
    
    .live-button {
    margin-right: 10px;
    }
    
    .header-navbar-right {
        margin-bottom: 5px;
    }
    
    .site-main {
        padding: 0rem 0 !important;
    }
    
    .container {
        padding: 0 1rem;
    }

    /* Kontainer Utama Menu Mobile */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--color-primary);
        z-index: 1010;
        display: flex;
        flex-direction: column;
        transform: translateX(100%);
        /* Transisi untuk overlay utama saat membuka dan menutup */
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        visibility: hidden;
        color: white;
    }
    
    .mobile-menu.open {
        transform: translateX(0);
        visibility: visible;
    }
    
    /* State untuk animasi menutup overlay utama */
    .mobile-menu.is-closing {
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335); /* Easing berbeda untuk keluar */
    }
    
    
    /* Header Menu (Tidak ada perubahan) */
    .mobile-menu-header {
        flex-shrink: 0;
        height: 56px;
        position: relative;
        z-index: 1011;
    }
    .mobile-search-form {
        display: flex;
        width: 100%;
        height: 100%;
        background-color: #fff;
    }
    .mobile-search-input {
        flex: 1;
        height: 100%;
        padding: 0 16px;
        border: none;
        background: transparent;
        font-size: 16px;
        outline: none;
        color: var(--color-text);
    }
    .search-button, .menu-close-button {
        height: 56px;
        width: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .search-button { color: var(--color-text); }
    .menu-close-button { background-color: var(--color-dark-bg); color: #fff; }
    
    
    /* Body Menu (Konten) - INI PERUBAHAN PENTING */
    .mobile-menu-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 0;
        /* Kita HAPUS transisi opacity dari sini untuk menghindari konflik.
           Transparansi akan dikontrol oleh item di dalamnya. */
    }
    
    /* List Item Menu Utama */
    .mobile-menu-list-main {
        list-style: none;
        margin: 0;
        padding: 0 1.25rem;
    }
    
    /* State default item (tersembunyi) */
    .mobile-menu-list-main > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        transform: translateY(15px);
        /* Transisi untuk animasi MASUK */
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .mobile-menu-list-main > li:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-list-main > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.85rem 0;
        color: inherit;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.125rem;
    }
    
    /* Staggered animation (animasi beruntun) saat MEMBUKA */
    .mobile-menu.open .mobile-menu-list-main > li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(1) { transition-delay: 0.25s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(2) { transition-delay: 0.3s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(3) { transition-delay: 0.35s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(4) { transition-delay: 0.4s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(5) { transition-delay: 0.45s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(6) { transition-delay: 0.5s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(7) { transition-delay: 0.55s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(8) { transition-delay: 0.6s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(9) { transition-delay: 0.65s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(10) { transition-delay: 0.7s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(11) { transition-delay: 0.75s; }
    .mobile-menu.open .mobile-menu-list-main > li:nth-child(12) { transition-delay: 0.8s; }
    
    
    /* ==========================================================
       CSS TAMBAHAN UNTUK ANIMASI MENU MENUTUP
       ========================================================== */
    
    /* 1. Memicu animasi keluar pada kontainer utama */
    .mobile-menu.is-closing {
        transform: translateX(100%);
        /* Durasi transisi sama dengan saat membuka */
        transition: transform 0.3s cubic-bezier(0.7, 0, 0.84, 0); 
    }
    
    /* 2. Menghilangkan body menu saat proses menutup */
    .mobile-menu.is-closing .mobile-menu-body {
        opacity: 0;
        transition: opacity 0.2s ease; /* Fade out lebih cepat */
        transition-delay: 0s;
    }
    
    /* Aturan baru yang eksplisit untuk animasi MENUTUP */
    .mobile-menu.is-closing .mobile-menu-list-main > li {
        opacity: 0;
        transform: translateY(15px);
        /* Animasi keluar berjalan lebih cepat dan serentak */
        transition: opacity 0.3s ease, transform 0.3s ease;
        /* Pastikan tidak ada delay saat menutup */
        transition-delay: 0s !important;
    }
    
    /* 4. Menutup submenu yang mungkin sedang terbuka */
    .mobile-menu.is-closing .mobile-menu-list-main li.submenu-open > .nav-sub,
    .mobile-menu.is-closing .mobile-menu-list-main li.submenu-open > .sub-menu {
        max-height: 0;
        transition: max-height 0.3s ease-out;
    }
    
    /* Tombol pembungkus ikon panah */
    .submenu-toggle-button {
        position: absolute;
        top: 0;
        right: 0;
        height: 48px; /* [PERBAIKAN] Beri tinggi tetap. Sesuaikan '48px' jika perlu agar pas di tengah. */
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    /* Mobile Submenu */
    .mobile-menu-list-main .nav-sub {
        /* padding-left: 15px; */
        /* margin-top: 5px; */
        /* margin-bottom: 5px; */
        position: relative;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-out;
        /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
        /* padding-top: 0.5rem; */
    }
    
    /* Jadikan item menu <li> sebagai flex container */
    .mobile-menu-list-main .menu-item-has-children {
        display: flex;
        flex-wrap: wrap; /* Izinkan submenu untuk turun ke bawah */
        justify-content: space-between; /* Mendorong link dan panah ke sisi berlawanan */
        align-items: center; /* Membuat teks dan panah sejajar secara vertikal */
        position: relative;
    }
    
    /* Saat item menu dibuka (memiliki class .submenu-open) */
    .mobile-menu-list-main .menu-item-has-children.submenu-open > .sub-menu {
        max-height: 1000px; /* Atur tinggi maksimal yang cukup */
    }
    
    /* Ikon panah itu sendiri */
    .submenu-arrow-icon {
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease-in-out;
    }
    
    /* [BARU] Aturan untuk item <li> di dalam submenu */
    .mobile-menu-list-main .sub-menu li {
        opacity: 0;
        transform: translateX(-15px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    /* [BARU] Animasi staggered saat submenu terbuka */
    .mobile-menu-list-main .menu-item-has-children.submenu-open .sub-menu li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .mobile-menu-list-main .menu-item-has-children.submenu-open .sub-menu li:nth-child(1) { transition-delay: 0.05s; }
    .mobile-menu-list-main .menu-item-has-children.submenu-open .sub-menu li:nth-child(2) { transition-delay: 0.1s; }
    .mobile-menu-list-main .menu-item-has-children.submenu-open .sub-menu li:nth-child(3) { transition-delay: 0.15s; }
    /* ... tambahkan lagi jika perlu ... */
    
    /* [BARU] Aturan untuk link <a> di dalam submenu agar terlihat */
    .mobile-menu-list-main .sub-menu li a {
        display: block;
        padding: 10px 15px;
        color: rgb(255 255 255 / 94%); /* Warna teks agar terlihat di background gelap */
        text-decoration: none;
        font-size: 0.9em;
        border-radius: 4px;
    }
    
    .mobile-menu-list-main .sub-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    /* Animasi putar untuk ikon panah saat submenu terbuka */
    .mobile-menu-list-main .menu-item-has-children.submenu-open .submenu-arrow-icon {
        transform: rotate(180deg);
    }
    
    .mobile-menu-list-main .sub-menu {
        flex-basis: 100%; /* Pastikan submenu mengambil lebar penuh di bawah parent */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out, margin 0.4s ease-in-out;
        border-left: 2px solid rgba(255, 255, 255, 0.1);
        list-style: none; /* Hilangkan bullet points */
    }
    
    
    /* Styling untuk submenu link */
    .mobile-menu-list-main .nav-sub li a {
        display: block;
        padding: 8px 10px;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }
    
    .mobile-menu-list-main .nav-sub li a:hover,
    .mobile-menu-list-main .nav-sub li a:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Indikator submenu aktif */
    .mobile-menu-list-main .nav-sub li.current-menu-item > a {
        background-color: rgba(255, 255, 255, 0.15);
        font-weight: 600;
    }
    
    /* Indikator untuk parent menu dengan submenu */
    .mobile-menu-list-main .menu-item-has-children > a {
        display: flex; /* Menggunakan flexbox untuk mensejajarkan teks dan panah */
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-right: 50px;
        flex-grow: 1; /* Biarkan link teks memanjang mengisi ruang kosong */
    }
    
    .mobile-menu-list-main .menu-item-has-children > a svg {
        transition: transform 0.3s ease;
    }
    
  
    /* Pastikan menu item dengan submenu memiliki pointer */
    .mobile-menu-list-main li.menu-item-has-children > a {
        cursor: pointer;
    }
    
    .mobile-menu-list-main li.submenu-open > .nav-sub,
    .mobile-menu-list-main li.dropdown-open > .sub-menu {
        max-height: 1000px;
    }
    
    /* Rotasi ikon dropdown */
    .mobile-menu-list-main li > a svg {
        transition: transform 0.3s ease;
    }
    
    .mobile-menu-list-main li.submenu-open > a svg,
    .mobile-menu-list-main li.dropdown-open > a svg {
        transform: rotate(180deg);
    }
    
    /* Mobile widget containers adjustments */
    .mobile-popular-posts-container,
    .mobile-popular-tags-container {
        padding: 0rem;
    }
    
    /* Mobile footer adjustments */
    .footer-widget-title {
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-main {
        padding: 1.5rem 0;
    }
    
    .header-navbar {
        height: 60px;
        margin-right: -10px;
    }
    
    /* Menu dropdown styling */
    .horizontal-menu-mobile {
    display: none;
    }
    
    /* Mobile widget adjustments */
    .sidebar .widget_modern_popular_posts,
    .sidebar .widget_scapedia_popular_tags {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }
    
    /* Layout structure in mobile */
    .main-content-layout {
        flex-direction: column !important;
    }
    
    .main-content-layout .content-area {
        width: 100% !important;
        flex-basis: auto !important;
        max-width: none !important;
    }
    
    .main-content-layout > * {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    .mobile-popular-posts-container .widget, 
    .mobile-popular-tags-container .widget {
        margin-bottom: 0 !important;
    }
    
    .widget {
        padding: 0 !important;
    }
    
    .footer-contact-text {
        margin: -13px 0 0.75rem 0;
    }
    .site-footer {
        margin-top: 3rem;
    }
    .search-form {
        display: none !important;
    }

    .widget_zonamerdeka_popular_posts {
        position: unset;
    }
    
    .logo img, .custom-logo {
        height: 35px;
        width: auto;
        object-fit: contain;
        max-height: 29px;
        top: -3px;
    }
    
}

/* WordPress admin bar breakpoint (783px) */
@media screen and (min-width: 783px) {
    body.admin-bar .site-header {
        top: 32px;
    }
    
    body.admin-bar .desktop-menu {
        top: calc(var(--header-height) + 32px);
    }
    
    body.admin-bar .desktop-menu.menu-fixed {
        top: 32px;
    }
    
    body.admin-bar .breaking-news {
        margin-top: 130px;
    }
    
    body.admin-bar .mobile-menu {
        top: 32px;
        height: calc(100% - 32px);
    }
    
    body.admin-bar .breaking-news.news-fixed {
        top: calc(var(--desktop-menu-height) + 32px);
    }
    
    body.admin-bar .site-header.hide-header ~ .desktop-menu.menu-fixed {
        top: 32px;
    }
    
    body.admin-bar .site-header.hide-header ~ .breaking-news.news-fixed {
        top: calc(var(--desktop-menu-height) + 32px);
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    /* Header and logo */
    .header-navbar-logo {
        transform: scale(1.1);
    }
    
    .header-navbar {
        height: 70px;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: flex !important;
    }
    
    .main-content-layout .sidebar {
        width: 300px !important;
        box-sizing: border-box;
        flex-shrink: 0;
        margin-top: 30px;
    }
    
    #primary.site-main {
		display: block !important;
		grid-template-columns: none !important;
	}
	
	.site-main {
		display: block !important;
	}
    
    .main-content-layout{
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100%;
        max-width: var(--container-max);
        margin: 20px auto;
        /* padding-left: 1.25rem; */
        /* padding-right: 1.25rem; */
        box-sizing: border-box;
        gap: 60px;
    }
    
    .main-content-layout .content-area {
        flex: 1 !important;
        box-sizing: border-box;
        margin: 0px auto !important;
        display: block !important;
    }
    
    .header-navbar-wrapper {
        margin-bottom: 20px; /* Jarak antara header dan menu */
    }
    
    .menu-wrapper {
        margin-bottom: 6px;
        height: var(--desktop-menu-height);
    }
    
    /* Display toggles */
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: flex;
    }
    
    /* Main content layout */
    .site-main {
        margin-top: 5px;
        padding-top: 1rem;
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
    
    /* Footer layout */
    .footer-widgets-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .footer-main {
        padding: 3rem 0;
    }
    
    .footer-bottom .container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: 1rem;
    }
    
    .footer-secondary-menu {
        justify-content: flex-end;
    }
    
    /* Meningkatkan height menu untuk lebih longgar */
    :root {
        --desktop-menu-height: 46px;
    }
    
    /* Styling tambahan untuk menu agar terlihat lebih rapi */
    .horizontal-menu > li > a {
        padding: 0.75rem 0;
    }
    
    /* Memperbaiki posisi indikator menu aktif */
    .horizontal-menu > li > a.active::after {
        bottom: -7px;
    }
    
    .site-header.hide-navbar .menu-wrapper {
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .content-area {
        width: 66.666667%;
        flex: 0 0 66.666667%; /* Ini penting: fixed width, tidak mengembang */
    }
    
}

/* Conditional styles - tanpa breaking news */
@media (min-width: 1024px) {
    .no-breaking-news .site-main {
        margin-top: -35px; /* Adjust sesuai kebutuhan */
    }
    
    /* Optional: Smooth transition */
    .site-main {
        transition: margin-top 0.3s ease-in-out;
    }
}
/* Mobile responsive */
@media (max-width: 1023px) {
    .no-breaking-news .site-main {
        margin-top: -20px !important; /* Reset untuk mobile */
    }
        .site-main {
        margin-top: 0;
    }
        body {
        padding-top: var(--total-mobile-header-height);
    }
    
    :root {
        --total-mobile-header-height: calc(var(--mobile-header-height) + var(--mobile-menu-height) + var(--breaking-height) - 5px);
    }
    
    .site-header {
        padding-top: 0;
    }

}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .no-breaking-news .site-main {
        margin-top: -20px; /* Smaller adjustment untuk tablet */
    }
}

/* Quick fix untuk semua page types */
@media (min-width: 1024px) {
    /* Homepage */
    .no-breaking-news .site-main {
        margin-top: -35px;
    }
    
    /* Single Posts */
    .no-breaking-news .main-content-layout {
        margin: -40px auto !important;
    }
}

/* Tablet responsive */
@media (min-width: 768px) and (max-width: 1023px) {
    .no-breaking-news .site-main {
        margin-top: -20px;
    }
    
    .no-breaking-news .main-content-layout {
        margin: -20px auto !important;
    }
}

/* Mobile reset */
@media (max-width: 767px) {
    .no-breaking-news .site-main {
        margin-top: 25px !important;
    }
    
    .no-breaking-news .main-content-layout {
        margin: -45px auto !important;
    }
}


/* ==========================================
   10. DARK MODE
   ========================================== */
html[theme="darkmode"],
html.dark {
    color-scheme: dark;
}

html[theme="darkmode"] body,
html.dark body {
    background-color: var(--color-dark-bg);
    color: var(--color-text-inverse);
}

/* Text and menu items in dark mode */
html[theme="darkmode"] .horizontal-menu-mobile > li > a,
html.dark .horizontal-menu-mobile > li > a,
html[theme="darkmode"] .horizontal-menu > li > a,
html.dark .horizontal-menu > li > a, html[theme="darkmode"] .search-button, html[theme="darkmode"] .horizontal-menu .sub-menu a {
    color: #ffffff;
}

html[theme="darkmode"] .post-featured-image__picture::before, html[theme="darkmode"] .post-author-box__heading span, html[theme="darkmode"] .featured-post .featured-post-thumbnail::before, html[theme="darkmode"] .berita-pilihan-item-first .berita-pilihan-thumbnail::before {
    background-color: rgb(24 24 27);
}

html[theme="darkmode"] .modern-popular-date, html[theme="darkmode"] .zonamerdeka-rec-date, html[theme="darkmode"] .modern-popular-tag, html[theme="darkmode"] .zonamerdeka-rec-category, html[theme="darkmode"] .category-section-item:not(.category-section-item-featured) .category-section-tag, html[theme="darkmode"] .berita-pilihan-category, html[theme="darkmode"] .post-meta .post-category, html[theme="darkmode"] .post-featured-image__caption, html[theme="darkmode"] .post-meta, html[theme="darkmode"] .post-author-info__desc .label, html[theme="darkmode"] .related-post-content .related-post-excerpt, html[theme="darkmode"] .related-post-category {
    color: #898989;
}

html[theme="darkmode"] .related-tags-list__item a {
    display: block;
    background-color: rgb(46 102 155);
}

html[theme="darkmode"] .horizontal-menu-mobile > li > a.active,
html.dark .horizontal-menu-mobile > li > a.active,
html[theme="darkmode"] .horizontal-menu > li > a.active,
html.dark .horizontal-menu > li > a.active,
html[theme="darkmode"] .horizontal-menu > li > a:hover,
html.dark .horizontal-menu > li > a:hover,
html[theme="darkmode"] .horizontal-menu-mobile > li > a:hover,
html.dark .horizontal-menu-mobile > li > a:hover {
    color: #60a5fa;
}

/* Border active with glow in dark mode */
html[theme="darkmode"] .horizontal-menu > li > a.active::after,
html.dark .horizontal-menu > li > a.active::after,
html[theme="darkmode"] .horizontal-menu-mobile > li > a.active::after,
html.dark .horizontal-menu-mobile > li > a.active::after {
    background-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

html[theme="darkmode"] .mobile-horizontal-menu, html.dark .mobile-horizontal-menu, html[theme="darkmode"] .site-header,
html.dark .site-header, html[theme="darkmode"] .menu-wrapper,
html.dark .menu-wrapper, html[theme="darkmode"] .breaking-news,
html.dark .breaking-news, html[theme="darkmode"] .header-navbar-wrapper,
html.dark .header-navbar-wrapper, html[theme="darkmode"] .horizontal-menu .sub-menu,
html.dark .horizontal-menu .sub-menu {
    background-color: #212529;
}

html[theme="darkmode"] .horizontal-menu .sub-menu a:hover,
html.dark .horizontal-menu .sub-menu a:hover {
    background-color: var(--color-dark-accent);
}

/* Forms and inputs in dark mode */
html[theme="darkmode"] .search-form,
html.dark .search-form,
html[theme="darkmode"] .mobile-search-form,
html.dark .mobile-search-form {
    background-color: var(--color-dark-accent);
    border-color: var(--color-border-dark);
}

html[theme="darkmode"] .mobile-search-input,
html.dark .mobile-search-input {
    color: #fff;
}

/* Breaking news in dark mode */
html[theme="darkmode"] .featured-post, html[theme="darkmode"] .featured-post-title a, html[theme="darkmode"] .grid-post-title a, html[theme="darkmode"] .berita-pilihan-heading, html[theme="darkmode"] .category-section-content a, html[theme="darkmode"] input.search-input {
    background-color: #18181b;
    color: #f9fafb;
}

html[theme="darkmode"] .breaking-news-list li a,
html.dark .breaking-news-list li a {
    color: #f9fafb;
}

/* Theme options in dark mode */
html[theme="darkmode"] .desktop-menu-actions .live-button,
html.dark .desktop-menu-actions .live-button {
    background-color: rgba(39, 39, 42, 0.8);
}

html[theme="darkmode"] .desktop-menu-actions .theme-switch-button:hover,
html.dark .desktop-menu-actions .theme-switch-button:hover {
    background-color: rgba(255, 255, 255, 0);
}

html[theme="darkmode"] .theme-options,
html.dark .theme-options {
    background-color: #27272a;
    border: 1px solid #374151;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,0.25);
}

html[theme="darkmode"] .theme-option-item:hover,
html.dark .theme-option-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

html[theme="darkmode"] .theme-option-link,
html.dark .theme-option-link {
    color: #f9fafb;
}

/* Content elements in dark mode */
html[theme="darkmode"] .page-numbers,
html.dark .page-numbers {
    background-color: var(--color-dark-accent);
    border-color: var(--color-border-dark);
}

html[theme="darkmode"] .page-numbers:hover:not(.current),
html.dark .page-numbers:hover:not(.current),  {
    background-color: var(--color-dark-bg);
}

html[theme="darkmode"] .site-footer,
html.dark .site-footer {
    background-color: var(--color-dark-accent);
}

html[theme="darkmode"] .entry-title a,
html.dark .entry-title a {
    color: var(--color-text-inverse);
}

/* Widget styling in dark mode */
html[theme="darkmode"] .zonamerdeka-popular-container,
html.dark .zonamerdeka-popular-container,
html[theme="darkmode"] .zonamerdeka-tags-container,
html.dark .zonamerdeka-tags-container,
html[theme="darkmode"] .modern-popular-container,
html.dark .modern-popular-container {
    background-color: rgb(30 46 68 / 61%);
}

html[theme="darkmode"] .zonamerdeka-popular-item::before,
html.dark .zonamerdeka-popular-item::before,
html[theme="darkmode"] .modern-popular-item::before,
html.dark .modern-popular-item::before {
    background-color: var(--color-primary);
    color: #fff;
}

html[theme="darkmode"] .zonamerdeka-popular-post-title,
html.dark .zonamerdeka-popular-post-title,
html[theme="darkmode"] .modern-popular-post-title,
html.dark .modern-popular-post-title,
html[theme="darkmode"] a.modern-popular-title-link,
html.dark a.modern-popular-title-link {
    color: #fff;
}

html[theme="darkmode"] .zonamerdeka-popular-date,
html.dark .zonamerdeka-popular-date {
    color: rgba(255, 255, 255, 0.6);
}

html[theme="darkmode"] .zonamerdeka-tags-list,
html.dark .zonamerdeka-tags-list {
    color: #fff;
    border-top-color: rgba(255, 255, 255, 0.1);
}

html[theme="darkmode"] .zonamerdeka-tags-item,
html.dark .zonamerdeka-tags-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[theme="darkmode"] .zonamerdeka-tags-link,
html.dark .zonamerdeka-tags-link {
    color: #f9fafb;
}

html[theme="darkmode"] .zonamerdeka-tags-link:hover,
html.dark .zonamerdeka-tags-link:hover {
    color: var(--color-primary-light);
}

/* Footer dark mode styles */
html.dark .site-footer,
html[theme="darkmode"] .site-footer {
    background-color: #212529;
    color: #ced4da;
}

html.dark .footer-widget-title,
html[theme="darkmode"] .footer-widget-title,
html.dark .footer-logo-link.text,
html[theme="darkmode"] .footer-logo-link.text {
    color: #f8f9fa;
}

html.dark .footer-menu li a,
html[theme="darkmode"] .footer-menu li a {
    color: #ced4da;
}

html.dark .footer-menu li a:hover,
html[theme="darkmode"] .footer-menu li a:hover {
    color: #0d6efd;
}

html.dark .social-icon,
html[theme="darkmode"] .social-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

html[theme="darkmode"] .post-date, html.dark .footer-bottom,
html[theme="darkmode"] .footer-bottom, html[theme="darkmode"] .developer-credit, html[theme="darkmode"] .berita-pilihan-date, html[theme="darkmode"] .category-section-item:not(.category-section-item-featured) .category-section-date, html[theme="darkmode"] .featured-post-excerpt {
    color: #adb5bd;
}

html.dark .footer-secondary-menu li a,
html[theme="darkmode"] .footer-secondary-menu li a {
    color: #adb5bd;
}

html.dark .footer-main,
html[theme="darkmode"] .footer-main {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Mobile submenu in dark mode */
html[theme="darkmode"] .horizontal-menu-mobile .sub-menu, 
html.dark .horizontal-menu-mobile .sub-menu {
    border-left-color: var(--color-border-dark);
}

/* Dark mode adjustments for fixed elements */
html.dark .desktop-menu.menu-fixed,
html[theme="darkmode"] .desktop-menu.menu-fixed,
html.dark .breaking-news.news-fixed,
html[theme="darkmode"] .breaking-news.news-fixed {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dark mode support for mobile-specific classes */
html.dark body.hide-mobile-header .site-header,
html[theme="darkmode"] body.hide-mobile-header .site-header,
html.dark body.hide-mobile-header .mobile-horizontal-menu,
html[theme="darkmode"] body.hide-mobile-header .mobile-horizontal-menu,
html.dark body.hide-mobile-header .breaking-news,
html[theme="darkmode"] body.hide-mobile-header .breaking-news {
    transform: translateY(-100%);
}

/* ==========================================
   11. IOS SPECIFIC FIXES
   ========================================== */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific fixes */
    .site-header,
    .header-navbar-wrapper,
    .menu-wrapper,
    .breaking-news,
    .mobile-horizontal-menu {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* For iOS mobile header visibility */
    .site-header.hide-mobile-header {
        opacity: 0;
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    /* iOS specific - prevent text size adjustment */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* iOS Breaking News fixes */
    .breaking-news {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000px;
        perspective: 1000px;
    }
    
    .breaking-news-wrapper {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    .breaking-news-list, 
    .breaking-news-list li, 
    .breaking-news-list li a {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
    }
    
    /* Fix mobile menu position in iOS */
    .mobile-horizontal-menu {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for Safari/iOS scroll chaining */
    .scrollable-menu {
        overscroll-behavior-x: contain;
    }
    
    /* Fix overlay positioning */
    .mobile-menu {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for theme switcher on iOS */
    .theme-options {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* iOS-specific dark mode */
@supports (-webkit-touch-callout: none) {
    html.dark .site-header,
    html[theme="darkmode"] .site-header,
    html.dark .desktop-menu,
    html[theme="darkmode"] .desktop-menu,
    html.dark .mobile-horizontal-menu,
    html[theme="darkmode"] .mobile-horizontal-menu,
    html.dark .breaking-news,
    html[theme="darkmode"] .breaking-news {
        -webkit-transform: translateZ(0);
    }
}

/* ==========================================
   12. ANDROID SPECIFIC FIXES
   ========================================== */
@supports (-webkit-appearance:none) and (not (-webkit-touch-callout:none)) {
    /* Android specific fixes */
    .site-header.hide-mobile-header,
    .site-header.hide-header {
        transform: translateY(-100%) !important;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s !important;
        opacity: 0 !important;
    }
    
    .site-header {
        will-change: transform;
        transition: transform 0.3s ease;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* Force hardware acceleration */
    .header-navbar-wrapper,
    .menu-wrapper,
    .breaking-news {
        will-change: transform;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}
/* Fix untuk iOS */
.ios-device .site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}
}