/*
Theme Name: alfajri.info
Theme URI: https://ahmadalfajri.com
Author: Ahmad Alfajri
Description: Tema WordPress eksklusif, super ringan, SEO-friendly, dan Mobile-First. Dioptimalkan penuh untuk pembaca HP. Widget sidebar selalu terlihat di HP.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: alfajri-info
*/

/* =============================================
   CSS VARIABLES & RESET
   ============================================= */
:root {
    --bg-color: #f4f6f9;
    --surface-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #5a626a;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --ad-bg-color: #f8fafc;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px -4px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

img { max-width: 100%; height: auto; display: block; }

table { width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }
th, td { padding: 10px 12px; border: 1px solid var(--border-color); text-align: left; }

pre { overflow-x: auto; white-space: pre; }
code { font-size: 14px; word-break: break-all; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 20px; } }


/* =============================================
   HEADER & NAVIGATION
   ============================================= */
.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 58px;
    gap: 12px;
}
@media (min-width: 768px) { .header-container { padding: 0 20px; height: 64px; } }

.site-branding { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1; }
.site-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .site-title { font-size: 20px; } }
.site-title a { color: var(--text-primary); }
.site-tagline { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
@media (min-width: 900px) { .site-tagline { display: block; } }

.main-navigation { display: none; }
@media (min-width: 768px) {
    .main-navigation {
        display: flex;
        align-items: center;
        flex: 1;
        justify-content: flex-end;
    }
    .main-navigation ul {
        list-style: none; margin: 0; padding: 0;
        display: flex; gap: 4px; align-items: center; flex-wrap: nowrap;
    }
    .main-navigation li { position: relative; }
    .main-navigation a {
        display: block;
        color: var(--text-secondary);
        font-weight: 500; font-size: 14px;
        padding: 8px 12px; border-radius: 7px;
        transition: background 0.15s, color 0.15s; white-space: nowrap;
    }
    .main-navigation a:hover,
    .main-navigation .current-menu-item > a,
    .main-navigation .current_page_item > a {
        background: rgba(37,99,235,0.08); color: var(--primary-color);
    }
}

.nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 42px; height: 42px;
    background: none; border: 1px solid var(--border-color);
    border-radius: 8px; cursor: pointer; padding: 0; flex-shrink: 0;
    transition: background 0.15s; touch-action: manipulation;
}
.nav-toggle:hover { background: var(--bg-color); }
.hamburger-bar {
    display: block; width: 20px; height: 2px;
    background-color: var(--text-primary); border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease; transform-origin: center;
}
.nav-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 768px) { .nav-toggle { display: none; } }

.mobile-menu {
    position: fixed;
    top: 58px; left: 0; bottom: 0;
    width: min(300px, 85vw);
    background: var(--surface-color);
    z-index: 199;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-color);
    box-shadow: 6px 0 30px rgba(0,0,0,0.1);
}
@media (min-width: 768px) { .mobile-menu { top: 64px; } }
.mobile-menu.is-open { transform: translateX(0); }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }

.mobile-menu-section { padding: 0 0 8px 0; }
.mobile-menu-section + .mobile-menu-section { border-top: 6px solid var(--bg-color); }
.mobile-menu-section-header {
    display: flex; align-items: center; gap: 7px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--text-secondary);
    padding: 16px 20px 8px; background: var(--bg-color);
}

.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--border-color); }
.mobile-nav li:last-child { border-bottom: none; }
.mobile-nav a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    color: var(--text-primary); font-weight: 500; font-size: 15px;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    touch-action: manipulation;
}
.mobile-nav a:hover,
.mobile-nav .current-menu-item > a,
.mobile-nav .current_page_item > a {
    background: rgba(37,99,235,0.06); color: var(--primary-color); padding-left: 24px;
}
.mobile-nav a::after { content: '›'; font-size: 18px; color: var(--border-color); line-height: 1; }
.mobile-nav a:hover::after,
.mobile-nav .current-menu-item > a::after { color: var(--primary-color); }

.mobile-nav-cats ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 16px; }
.mobile-nav-cats li { border-bottom: none !important; }
.mobile-nav-cats a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 14px !important; min-height: 36px;
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 100px; font-size: 13px; font-weight: 500;
    color: var(--text-secondary) !important; transition: all 0.15s !important;
}
.mobile-nav-cats a::after { display: none !important; }
.mobile-nav-cats a:hover,
.mobile-nav-cats .current-menu-item > a,
.mobile-nav-cats .current_page_item > a {
    background: var(--primary-color) !important;
    color: #fff !important; border-color: var(--primary-color) !important;
    padding-left: 14px !important;
}
.mobile-cat-count {
    background: rgba(0,0,0,0.08); color: var(--text-secondary);
    font-size: 11px; font-weight: 700;
    padding: 1px 6px; border-radius: 100px; line-height: 1.4;
}
.mobile-nav-cats a:hover .mobile-cat-count { background: rgba(255,255,255,0.2); color: #fff; }

.nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 198;
    backdrop-filter: blur(2px);
    opacity: 0; transition: opacity 0.3s ease;
}
.nav-overlay.is-visible { display: block; opacity: 1; }
@media (min-width: 768px) { .nav-overlay { display: none !important; } }

/* =============================================
   CATEGORY NAV BAR (Desktop only)
   ============================================= */
.category-nav-bar {
    background: linear-gradient(90deg, #1e3a5f 0%, #2563eb 100%);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: none;
}
@media (min-width: 768px) { .category-nav-bar { display: block; } }

.category-navigation ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 0; align-items: center;
    flex-wrap: nowrap; overflow-x: auto;
}
.category-navigation ul::-webkit-scrollbar { display: none; }
.category-navigation li { position: relative; flex-shrink: 0; }
.category-navigation a {
    display: block; color: rgba(255,255,255,0.85);
    font-size: 13px; font-weight: 500;
    padding: 10px 16px;
    transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.category-navigation a:hover,
.category-navigation .current-menu-item > a,
.category-navigation .current_page_item > a {
    background: rgba(255,255,255,0.15); color: #ffffff;
}

/* =============================================
   ADSENSE SLOTS — AdSense Friendly
   ============================================= */
.adsense-header-wrap { margin-top: 12px; }

.adsense-slot {
    background-color: var(--ad-bg-color);
    border: 1px dashed var(--border-color);
    border-radius: 8px; padding: 4px; text-align: center;
    margin: 16px 0;
    display: block;
    overflow: hidden;
    width: 100%;
}

/* Slot khusus HP — responsif penuh */
.adsense-mobile-inline {
    display: block;
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
    text-align: center;
    background: transparent;
}
.adsense-mobile-inline ins.adsbygoogle {
    display: block !important;
    width: 100% !important;
}

/* Label "Iklan" untuk transparansi AdSense */
.ad-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
    display: block;
}

/* =============================================
   LAYOUT UTAMA — Mobile-First Grid
   ============================================= */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 20px;
    margin-bottom: 40px;
}
@media (min-width: 900px) {
    .main-layout {
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        margin-top: 30px;
        margin-bottom: 50px;
    }
}

/* =============================================
   POST GRID (index.php)
   ============================================= */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 600px) {
    .post-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.post-card {
    background-color: var(--surface-color); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    transition: transform 0.2s ease;
}
.post-card:hover { transform: translateY(-3px); }
.post-thumbnail img { width: 100%; height: 180px; object-fit: cover; display: block; }
@media (min-width: 600px) { .post-thumbnail img { height: 200px; } }

.post-content { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
@media (min-width: 600px) { .post-content { padding: 20px; } }
.post-content h2 { margin: 0 0 8px 0; font-size: 16px; line-height: 1.4; }
@media (min-width: 600px) { .post-content h2 { font-size: 18px; } }
.post-content h2 a { color: var(--text-primary); }
.post-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.post-excerpt { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; flex-grow: 1; }

/* =============================================
   SINGLE ARTICLE
   ============================================= */
.single-article {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.entry-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #3b82f6 100%);
    padding: 24px 20px 20px;
    position: relative; overflow: hidden;
}
@media (min-width: 600px) { .entry-header { padding: 32px 32px 28px; } }
@media (min-width: 900px) { .entry-header { padding: 36px 40px 32px; } }
.entry-header::before {
    content: ''; position: absolute;
    top: -50%; right: -10%; width: 200px; height: 200px;
    background: rgba(255,255,255,0.05); border-radius: 50%; pointer-events: none;
}

.post-meta-top {
    font-size: 12px; color: rgba(255,255,255,0.7);
    margin-bottom: 10px; text-transform: uppercase;
    letter-spacing: 0.8px; font-weight: 600;
}
.post-meta-top a { color: rgba(255,255,255,0.85); }
.post-meta-top a:hover { color: #fff; }

.entry-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800; line-height: 1.25;
    margin: 0 0 14px; letter-spacing: -0.3px;
}
@media (min-width: 600px) { .entry-title { font-size: 26px; } }
@media (min-width: 900px) { .entry-title { font-size: 30px; letter-spacing: -0.4px; } }

.post-author-bar {
    display: flex; align-items: center;
    gap: 10px; flex-wrap: wrap;
}
@media (min-width: 600px) { .post-author-bar { gap: 16px; } }
.post-author-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: rgba(255,255,255,0.75);
}
@media (min-width: 600px) { .post-author-item { font-size: 13px; } }

.adsense-below-title-wrap { padding: 12px 16px 0; }
@media (min-width: 600px) { .adsense-below-title-wrap { padding: 16px 20px 0; } }

.single-featured-image { width: 100%; overflow: hidden; }
.single-featured-image img {
    width: 100%; height: 220px; object-fit: cover; display: block;
}
@media (min-width: 600px) { .single-featured-image img { height: 320px; } }
@media (min-width: 900px) { .single-featured-image img { height: 420px; } }

.entry-content {
    padding: 20px 16px 24px;
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--text-primary);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}
@media (min-width: 600px) { .entry-content { padding: 28px 28px 32px; font-size: 16px; } }
@media (min-width: 900px) { .entry-content { padding: 36px 40px 40px; font-size: 16.5px; } }

.entry-content h2 {
    font-size: 19px; font-weight: 700;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px; margin: 28px 0 12px;
}
@media (min-width: 600px) { .entry-content h2 { font-size: 21px; margin: 32px 0 14px; padding-left: 14px; } }

.entry-content h3 {
    font-size: 17px; font-weight: 600;
    border-left: 3px solid #93c5fd;
    padding-left: 12px; margin: 22px 0 10px;
}
@media (min-width: 600px) { .entry-content h3 { font-size: 18px; } }

.entry-content p { margin-bottom: 16px; }
.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 16px; }
.entry-content li { margin-bottom: 7px; }

.entry-content blockquote {
    background: #f0f6ff; border-left: 4px solid var(--primary-color);
    padding: 14px 16px; border-radius: 0 8px 8px 0;
    margin: 20px 0; font-style: italic; color: var(--text-secondary);
}
@media (min-width: 600px) { .entry-content blockquote { padding: 18px 20px; } }

.entry-content img {
    max-width: 100%; height: auto;
    border-radius: 10px; margin: 16px auto;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(37,99,235,0.3);
    text-underline-offset: 3px;
}
.entry-content a:hover { text-decoration-color: var(--primary-color); }

.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object {
    max-width: 100%;
}

.entry-content .wp-block-embed__wrapper {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
}
.entry-content .wp-block-embed__wrapper iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* =============================================
   SIDEBAR — SELALU TAMPIL DI HP (Mobile-First)
   ============================================= */
.site-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Sidebar tampil di HP — di bawah konten utama */
}
@media (min-width: 900px) {
    .site-sidebar {
        gap: 24px;
        /* Di desktop: di kanan konten, sticky */
    }
}

/* Sticky sidebar di desktop */
@media (min-width: 900px) {
    .site-sidebar {
        position: sticky;
        top: 84px; /* Header height + gap */
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .site-sidebar::-webkit-scrollbar { display: none; }
}

/* Judul seksi sebelum sidebar di HP */
.sidebar-mobile-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    padding: 0;
}
.sidebar-mobile-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
@media (min-width: 900px) {
    .sidebar-mobile-heading { display: none; }
}

.widget {
    background-color: var(--surface-color);
    padding: 18px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
@media (min-width: 900px) { .widget { padding: 22px 20px; } }

.widget-title {
    margin-top: 0; margin-bottom: 14px;
    font-size: 13px; text-transform: uppercase;
    position: relative; padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.8px; font-weight: 700;
}
@media (min-width: 900px) { .widget-title { font-size: 14px; margin-bottom: 15px; } }
.widget-title::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 40px; height: 2px; background-color: var(--primary-color);
}

/* Widget ul/li styling */
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-primary); transition: color 0.15s, padding-left 0.15s; display: block; }
.widget ul li a:hover { color: var(--primary-color); padding-left: 6px; }

/* Widget AdSense di dalam sidebar */
.widget-adsense {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* =============================================
   WIDGET HORIZONTAL SCROLL (mobile khusus)
   Untuk widget Kategori / Tag / Artikel Terkait
   ============================================= */
.widget-scroll-mobile {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}
.widget-scroll-mobile::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
    .widget-scroll-mobile {
        display: block;
        overflow-x: visible;
    }
}

/* =============================================
   RELATED POSTS WIDGET (untuk sidebar HP)
   ============================================= */
.related-posts-widget { }
.related-post-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}
.related-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-post-item:hover { color: var(--primary-color); }
.related-post-thumb {
    width: 60px; height: 60px;
    object-fit: cover; border-radius: 8px;
    flex-shrink: 0;
}
.related-post-title {
    font-size: 13px; font-weight: 500;
    line-height: 1.4; flex: 1;
}
.related-post-date {
    font-size: 11px; color: var(--text-secondary);
    margin-top: 4px;
}

/* =============================================
   PAGE.PHP
   ============================================= */
.page-article {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color); margin-bottom: 24px;
}

.page-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #3b82f6 100%);
    padding: 24px 20px 20px;
    position: relative; overflow: hidden;
}
@media (min-width: 600px) { .page-hero { padding: 32px 32px 28px; } }
@media (min-width: 900px) { .page-hero { padding: 40px 40px 35px; } }
.page-hero::before {
    content: ''; position: absolute;
    top: -50%; right: -10%; width: 300px; height: 300px;
    background: rgba(255,255,255,0.05); border-radius: 50%; pointer-events: none;
}

.page-breadcrumb {
    font-size: 12px; color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
}
.page-breadcrumb a { color: rgba(255,255,255,0.85); }
.page-breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { color: rgba(255,255,255,0.5); }

.page-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800; line-height: 1.25;
    margin: 0 0 14px 0; letter-spacing: -0.3px;
}
@media (min-width: 600px) { .page-title { font-size: 28px; } }
@media (min-width: 900px) { .page-title { font-size: 34px; letter-spacing: -0.5px; } }

.page-meta-bar {
    display: flex; align-items: center;
    gap: 12px; flex-wrap: wrap;
}
.page-meta-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: rgba(255,255,255,0.75);
}

.page-featured-image { width: 100%; overflow: hidden; }
.page-thumbnail {
    width: 100%; height: 220px; object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
@media (min-width: 600px) { .page-thumbnail { height: 320px; } }
@media (min-width: 900px) { .page-thumbnail { height: 420px; } }
.page-article:hover .page-thumbnail { transform: scale(1.01); }

.page-body { padding: 20px 16px 24px; }
@media (min-width: 600px) { .page-body { padding: 28px 28px 32px; } }
@media (min-width: 900px) { .page-body { padding: 40px; } }

.page-content {
    font-size: 15.5px; line-height: 1.85;
    color: var(--text-primary); max-width: 100%;
    overflow-wrap: break-word; word-wrap: break-word;
}
@media (min-width: 600px) { .page-content { font-size: 16.5px; } }

.page-content h2 {
    font-size: 19px; font-weight: 700;
    border-left: 4px solid var(--primary-color);
    padding-left: 14px; margin-top: 28px; margin-bottom: 12px;
}
@media (min-width: 600px) { .page-content h2 { font-size: 22px; margin-top: 36px; } }

.page-content h3 {
    font-size: 17px; font-weight: 600;
    border-left: 3px solid #93c5fd;
    padding-left: 12px; margin-top: 22px;
}
@media (min-width: 600px) { .page-content h3 { font-size: 18px; margin-top: 28px; } }

.page-content p { margin-bottom: 16px; }
.page-content ul, .page-content ol { padding-left: 22px; margin-bottom: 16px; }
.page-content li { margin-bottom: 8px; }

.page-content blockquote {
    background: #f0f6ff; border-left: 4px solid var(--primary-color);
    padding: 14px 16px; border-radius: 0 8px 8px 0;
    margin: 20px 0; font-style: italic; color: var(--text-secondary);
}
@media (min-width: 600px) { .page-content blockquote { padding: 18px 20px; } }

.page-content img {
    max-width: 100%; height: auto;
    border-radius: 10px; margin: 16px 0;
}
.page-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(37,99,235,0.3);
    text-underline-offset: 3px;
}
.page-content a:hover { text-decoration-color: var(--primary-color); }

/* =============================================
   CATEGORY.PHP
   ============================================= */
.category-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    margin-bottom: 20px;
    position: relative; overflow: hidden;
}
@media (min-width: 600px) { .category-hero { padding: 36px 32px; margin-bottom: 24px; } }
@media (min-width: 900px) { .category-hero { padding: 44px 40px; margin-bottom: 30px; } }
.category-hero::before {
    content: ''; position: absolute;
    top: -40px; right: -40px; width: 200px; height: 200px;
    border: 40px solid rgba(255,255,255,0.05); border-radius: 50%;
}

.category-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.9); padding: 5px 14px;
    border-radius: 100px; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.category-title {
    color: #ffffff;
    font-size: 24px; font-weight: 800;
    margin: 0 0 10px 0; letter-spacing: -0.3px; line-height: 1.2;
}
@media (min-width: 600px) { .category-title { font-size: 30px; } }
@media (min-width: 900px) { .category-title { font-size: 36px; } }

.category-description {
    color: rgba(255,255,255,0.75);
    font-size: 14px; line-height: 1.6;
    margin: 0 0 14px 0; max-width: 600px;
}
@media (min-width: 600px) { .category-description { font-size: 15px; } }

.category-stats {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85);
    padding: 5px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    border: 1px solid rgba(255,255,255,0.15);
}

.category-post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 600px) {
    .category-post-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.post-card-featured {
    grid-column: 1 / -1;
    display: flex !important;
    flex-direction: column;
}
@media (min-width: 768px) {
    .post-card-featured {
        display: grid !important;
        grid-template-columns: 1.2fr 1fr;
        flex-direction: unset;
        align-items: stretch;
    }
}

.post-thumbnail-featured { overflow: hidden; }
.post-thumbnail-featured a { display: block; }
.post-thumbnail-featured img {
    width: 100%; height: 220px; object-fit: cover; display: block;
}
@media (min-width: 768px) { .post-thumbnail-featured img { height: 100%; max-height: 340px; } }

.post-content-featured {
    padding: 20px;
    display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 768px) { .post-content-featured { padding: 28px; gap: 10px; } }
.post-content-featured h2 { font-size: 18px; line-height: 1.3; margin: 0; }
@media (min-width: 600px) { .post-content-featured h2 { font-size: 20px; } }
@media (min-width: 900px) { .post-content-featured h2 { font-size: 22px; } }
.post-content-featured h2 a { color: var(--text-primary); }
.post-content-featured .post-excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.7; flex-grow: 1; }

.post-cat-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; color: var(--primary-color);
}
.post-cat-label a { color: var(--primary-color) !important; }

.read-more-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background-color: var(--primary-color); color: #ffffff !important;
    padding: 10px 18px; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    transition: background-color 0.2s, transform 0.15s;
    align-self: flex-start; margin-top: 4px;
    touch-action: manipulation; min-height: 44px;
}
.read-more-btn:hover { background-color: var(--primary-hover); transform: translateX(2px); color: #ffffff !important; }

.read-more-link {
    display: inline-block; font-size: 13px; font-weight: 600;
    color: var(--primary-color); margin-top: 6px; transition: var(--transition);
}
.read-more-link:hover { color: var(--primary-hover); letter-spacing: 0.3px; }

.no-content-notice {
    background: var(--surface-color); border-radius: var(--radius-lg);
    padding: 40px 24px; text-align: center;
    border: 1px solid var(--border-color); grid-column: 1 / -1;
}
@media (min-width: 600px) { .no-content-notice { padding: 60px 40px; } }
.no-content-icon { font-size: 48px; margin-bottom: 16px; }
.no-content-notice h2 { margin: 0 0 10px; }
.no-content-notice p { color: var(--text-secondary); margin-bottom: 24px; }

/* =============================================
   PAGINATION
   ============================================= */
.navigation.pagination { margin: 24px 0; }
@media (min-width: 600px) { .navigation.pagination { margin: 30px 0; } }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-links a, .nav-links .current {
    padding: 8px 14px; border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    font-size: 14px; min-height: 40px;
    display: flex; align-items: center;
    touch-action: manipulation;
}
.nav-links .current {
    background-color: var(--primary-color);
    color: white; border-color: var(--primary-color);
}

/* =============================================
   HTML SITEMAP
   ============================================= */
.html-sitemap h2 {
    color: var(--text-primary); border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px; margin-top: 28px; font-size: 18px;
    position: relative;
}
@media (min-width: 600px) { .html-sitemap h2 { font-size: 20px; margin-top: 35px; } }
.html-sitemap h2::after {
    content: ""; position: absolute; bottom: -2px; left: 0;
    width: 60px; height: 2px; background-color: var(--primary-color);
}
.html-sitemap ul { list-style-type: none; padding-left: 0; margin-top: 14px; }
.html-sitemap ul li { margin-bottom: 10px; position: relative; padding-left: 22px; }
.html-sitemap ul li::before {
    content: "»"; position: absolute; left: 0; color: var(--primary-color);
    font-weight: bold; font-size: 16px; line-height: 1; top: 3px;
}
.html-sitemap ul li a { color: var(--text-secondary); font-size: 15px; transition: var(--transition); }
.html-sitemap ul li a:hover { color: var(--primary-hover); padding-left: 5px; }

/* =============================================
   SINGLE POST LAYOUT (fallback compat)
   ============================================= */
.single-post-layout {
    background-color: var(--surface-color);
    padding: 20px 16px;
    border-radius: var(--radius); box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
@media (min-width: 600px) { .single-post-layout { padding: 28px; } }
@media (min-width: 900px) { .single-post-layout { padding: 35px; } }
.single-post-layout h1 { font-size: 22px; line-height: 1.3; margin-top: 0; margin-bottom: 12px; }
@media (min-width: 600px) { .single-post-layout h1 { font-size: 28px; } }
@media (min-width: 900px) { .single-post-layout h1 { font-size: 32px; } }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background-color: #0f172a; border-top: none;
    padding: 36px 0 24px;
    color: rgba(255,255,255,0.7); font-size: 14px; margin-top: auto;
}
@media (min-width: 600px) { .site-footer { padding: 50px 0 28px; } }

.footer-pages-nav, .footer-categories-nav { margin-bottom: 28px; }
@media (min-width: 600px) { .footer-pages-nav, .footer-categories-nav { margin-bottom: 36px; } }

.footer-nav-title {
    color: rgba(255,255,255,0.5);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    margin: 0 0 14px 0; padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-pages-list { display: flex; flex-wrap: wrap; gap: 8px 12px; }
@media (min-width: 600px) { .footer-pages-list { gap: 10px 16px; } }
.footer-page-link {
    color: rgba(255,255,255,0.75); font-size: 13px;
    padding: 6px 12px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    transition: all 0.2s; white-space: nowrap;
    touch-action: manipulation; min-height: 36px;
    display: flex; align-items: center;
}
@media (min-width: 600px) { .footer-page-link { font-size: 14px; padding: 6px 14px; } }
.footer-page-link:hover { color: #ffffff; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }

.footer-categories-list { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-cat-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: rgba(255,255,255,0.7); font-size: 12px;
    padding: 5px 12px; border-radius: 100px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s; touch-action: manipulation; min-height: 34px;
}
@media (min-width: 600px) { .footer-cat-link { font-size: 13px; } }
.footer-cat-link:hover { color: #fff; background: rgba(37,99,235,0.4); border-color: rgba(37,99,235,0.6); }
.footer-cat-count {
    background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8);
    padding: 1px 7px; border-radius: 100px;
    font-size: 11px; font-weight: 600;
}

.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 0 0 20px; }
@media (min-width: 600px) { .footer-divider { margin: 0 0 24px; } }

.footer-bottom {
    display: flex; align-items: center;
    flex-direction: column; text-align: center; gap: 6px;
}
@media (min-width: 600px) {
    .footer-bottom {
        flex-direction: row; justify-content: space-between;
        flex-wrap: wrap; text-align: left;
    }
}
.footer-copyright { color: rgba(255,255,255,0.6); font-size: 13px; }
.footer-copyright a { color: rgba(255,255,255,0.85); }
.footer-copyright a:hover { color: #ffffff; }
.footer-credit { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-credit a { color: rgba(255,255,255,0.55); }
.footer-credit a:hover { color: rgba(255,255,255,0.8); }

/* =============================================
   SEARCH TOGGLE BUTTON
   ============================================= */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    color: var(--text-primary);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    touch-action: manipulation;
}
.search-toggle:hover,
.search-toggle.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.search-toggle svg { pointer-events: none; }

/* =============================================
   SEARCH OVERLAY
   ============================================= */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
@media (min-width: 768px) { .search-overlay { padding-top: 90px; } }

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    animation: searchSlideDown 0.25s ease both;
}
@keyframes searchSlideDown {
    from { transform: translateY(-12px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* Form */
.search-overlay-form { width: 100%; }

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border-radius: 14px;
    padding: 10px 12px 10px 16px;
    gap: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.search-input-wrap:focus-within {
    border-color: var(--primary-color);
}

.search-input-icon {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.search-overlay-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    color: var(--text-primary);
    line-height: 1.4;
    min-width: 0;
    padding: 4px 0;
}
@media (min-width: 600px) { .search-overlay-input { font-size: 19px; } }
.search-overlay-input::placeholder { color: var(--text-secondary); opacity: 0.7; }

.search-submit-btn {
    flex-shrink: 0;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    touch-action: manipulation;
    min-height: 40px;
    font-family: inherit;
}
.search-submit-btn:hover { background: var(--primary-hover); }

/* Suggestions */
.search-suggestions {
    margin-top: 12px;
    background: var(--surface-color);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
@media (min-width: 600px) { .search-suggestions { padding: 20px; } }

.search-suggestions-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.search-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    color: var(--text-primary);
    transition: background 0.15s;
    text-decoration: none;
    touch-action: manipulation;
}
.search-suggestion-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.suggestion-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.suggestion-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
