/*
Theme Name: Budepedia
Theme URI: https://budepedia.my.id
Author: Tim Redaksi Budepedia
Author URI: https://budepedia.my.id
Description: Tema Portal Ensiklopedia Wawasan, Edukasi, Finansial & Gaya Hidup Cerdas keluarga modern. Mengusung tipografi editorial klasik-modern Lora dipadu Plus Jakarta Sans berlatar cream paper yang teduh, anggun, dan nyaman dibaca.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: budepedia
*/

/* ==========================================================================
   1. DESIGN TOKENS & TYPOGRAPHY
   ========================================================================== */
:root {
    --bp-primary: #064e3b;
    --bp-primary-dark: #022c22;
    --bp-primary-light: #0f766e;
    --bp-accent: #d97706;
    --bp-accent-hover: #b45309;
    --bp-accent-light: rgba(217, 119, 6, 0.12);
    --bp-cream: #faf8f5;
    --bp-card-bg: #ffffff;
    --bp-card-border: #e7e5e4;
    --bp-text-main: #111827;
    --bp-text-body: #374151;
    --bp-text-muted: #6b7280;
    --bp-radius-sm: 6px;
    --bp-radius-md: 10px;
    --bp-radius-lg: 16px;
    --bp-radius-full: 9999px;
    --bp-shadow-sm: 0 1px 3px rgba(6, 78, 59, 0.05);
    --bp-shadow-md: 0 4px 16px -2px rgba(6, 78, 59, 0.08);
    --bp-font-serif: 'Lora', Georgia, 'Times New Roman', serif;
    --bp-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Category Badges */
    --cat-edukasi: #059669;
    --cat-gayahidup: #7c3aed;
    --cat-finansial: #047857;
    --cat-kuliner: #d97706;
    --cat-keluarga: #be185d;
    --cat-kesehatan: #0f766e;
    --cat-ragam: #4b5563;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--bp-font-sans);
    background-color: var(--bp-cream);
    color: var(--bp-text-body);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--bp-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.bp-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. TOPBAR & EDITORIAL MASTHEAD
   ========================================================================== */
.bp-topbar {
    background: var(--bp-primary-dark);
    color: #a7f3d0;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bp-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.bp-topbar-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fef3c7;
    font-weight: 600;
}

.bp-topbar-tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
}

.bp-topbar-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bp-topbar-links a {
    color: #e2e8f0;
}

.bp-topbar-links a:hover {
    color: var(--bp-accent);
}

/* Centered Editorial Masthead */
.bp-masthead {
    background: #ffffff;
    border-bottom: 1px solid var(--bp-card-border);
    padding: 24px 0 20px;
    text-align: center;
}

.bp-masthead-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bp-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.bp-brand-logo {
    height: 76px;
    width: 76px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: drop-shadow(0 3px 10px rgba(6, 78, 59, 0.15));
}

.bp-brand-text {
    text-align: left;
}

.bp-brand-title {
    font-family: var(--bp-font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--bp-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.bp-brand-desc {
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Editorial Navigation */
.bp-navbar {
    background: var(--bp-primary);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.bp-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
}

.bp-nav-menu li a {
    display: inline-block;
    padding: 13px 18px;
    color: #ffffff;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
}

.bp-nav-menu li.active a,
.bp-nav-menu li a:hover {
    background: var(--bp-primary-dark);
    color: #fef3c7;
}

/* Category Dropdown (Budepedia Editorial Style) */
.bp-cat-dropdown {
    position: relative;
}

.bp-dropdown-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 7px !important;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    padding: 13px 18px;
    color: #f8fafc;
    transition: all 0.2s ease;
}

.bp-dropdown-toggle .bp-arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.bp-cat-dropdown:hover .bp-dropdown-toggle,
.bp-cat-dropdown.is-open .bp-dropdown-toggle {
    background: var(--bp-primary-dark) !important;
    color: #fef3c7 !important;
}

.bp-cat-dropdown:hover .bp-arrow,
.bp-cat-dropdown.is-open .bp-arrow {
    transform: rotate(180deg);
}

.bp-cat-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 600px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(6, 78, 59, 0.2);
    border: 1px solid #d1fae5;
    padding: 16px 18px;
    z-index: 9999;
}

.bp-cat-dropdown:hover .bp-cat-dropdown-panel,
.bp-cat-dropdown.is-open .bp-cat-dropdown-panel {
    display: block;
    animation: bpDropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bpDropdownFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bp-cat-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid #ecfdf5;
}

.bp-cat-dropdown-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #064e3b;
    font-family: var(--bp-font-serif);
}

.bp-cat-dropdown-title i {
    color: var(--bp-accent);
}

.bp-cat-count-badge {
    background: #ecfdf5;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: var(--bp-font-sans);
}

.bp-cat-search-wrap {
    position: relative;
    width: 220px;
}

.bp-cat-search-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
}

.bp-cat-search-input {
    width: 100%;
    padding: 6px 10px 6px 30px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8fafc;
    color: #0f172a;
}

.bp-cat-search-input:focus {
    border-color: var(--bp-accent);
    background: #ffffff;
}

.bp-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.bp-cat-grid::-webkit-scrollbar {
    width: 5px;
}

.bp-cat-grid::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}

.bp-cat-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px !important;
    border-radius: 6px;
    background: #faf8f5 !important;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.15s ease;
}

.bp-cat-item:hover {
    background: #ecfdf5 !important;
    border-color: #6ee7b7;
    transform: translateX(2px);
}

.bp-cat-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bp-accent);
    flex-shrink: 0;
}

.bp-cat-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b !important;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-cat-item:hover .bp-cat-name {
    color: var(--bp-primary) !important;
}

.bp-cat-num {
    font-size: 11px;
    font-weight: 700;
    color: #047857;
    background: #ffffff;
    border: 1px solid #d1fae5;
    padding: 1px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .bp-cat-dropdown-panel {
        width: 460px;
    }
    .bp-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bp-cat-dropdown-panel {
        position: static;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        padding: 10px 0;
        border-radius: 0;
    }
    .bp-cat-dropdown-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .bp-cat-search-wrap {
        width: 100%;
    }
    .bp-cat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .bp-cat-grid {
        grid-template-columns: 1fr;
    }
}

/* Category Badges */
.bp-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: var(--bp-radius-full);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #ffffff !important;
    background: var(--bp-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    line-height: 1.4;
}

.badge-edukasi    { background: var(--cat-edukasi); }
.badge-gayahidup  { background: var(--cat-gayahidup); }
.badge-finansial  { background: var(--cat-finansial); }
.badge-kuliner    { background: var(--cat-kuliner); }
.badge-keluarga   { background: var(--cat-keluarga); }
.badge-kesehatan  { background: var(--cat-kesehatan); }
.badge-ragam      { background: var(--cat-ragam); }
.badge-hukum      { background: #7c3aed; }
.badge-nasional   { background: #b91c1c; }
.badge-teknologi  { background: #0f766e; }

/* ==========================================================================
   3. HERO EDITORIAL SPOTLIGHT
   ========================================================================== */
.bp-hero-section {
    margin: 28px auto 36px;
}

.bp-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.bp-hero-lead {
    background: #ffffff;
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-lg);
    overflow: hidden;
    box-shadow: var(--bp-shadow-md);
    display: flex;
    flex-direction: column;
}

.bp-hero-thumb {
    height: 320px;
    position: relative;
    overflow: hidden;
    background: var(--bp-primary-dark);
}

.bp-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bp-hero-lead:hover .bp-hero-thumb img {
    transform: scale(1.05);
}

.bp-hero-lead-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bp-hero-lead-title {
    font-family: var(--bp-font-serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--bp-primary-dark);
    margin: 10px 0 12px;
}

.bp-hero-lead:hover .bp-hero-lead-title {
    color: var(--bp-accent);
}

.bp-hero-excerpt {
    font-size: 14.5px;
    color: var(--bp-text-body);
    line-height: 1.65;
    margin-bottom: 16px;
}

.bp-hero-meta {
    font-size: 12px;
    color: var(--bp-text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.bp-hero-meta i {
    color: var(--bp-accent);
}

/* Side Curated Stories */
.bp-hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bp-curated-card {
    background: #ffffff;
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-md);
    padding: 14px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: var(--bp-shadow-sm);
    transition: all 0.25s ease;
}

.bp-curated-card:hover {
    transform: translateX(4px);
    border-color: #cbd5e1;
    box-shadow: var(--bp-shadow-md);
}

.bp-curated-thumb {
    width: 110px;
    height: 85px;
    border-radius: var(--bp-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bp-primary);
}

.bp-curated-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-curated-body {
    flex-grow: 1;
}

.bp-curated-title {
    font-family: var(--bp-font-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bp-text-main);
    margin: 4px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-curated-card:hover .bp-curated-title {
    color: var(--bp-accent);
}

/* ==========================================================================
   4. EDITORIAL 2-COLUMN LAYOUT & SECTIONS
   ========================================================================== */
.bp-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    margin-bottom: 50px;
}

.bp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--bp-primary);
    margin-bottom: 22px;
    padding-bottom: 8px;
}

.bp-section-title {
    font-family: var(--bp-font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--bp-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-section-title i {
    color: var(--bp-accent);
}

/* 3-Column Card Grid */
.bp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.bp-card {
    background: #ffffff;
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-md);
    overflow: hidden;
    box-shadow: var(--bp-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bp-shadow-md);
    border-color: #cbd5e1;
}

.bp-card-thumb {
    height: 155px;
    position: relative;
    overflow: hidden;
    background: var(--bp-primary-dark);
}

.bp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.bp-card:hover .bp-card-thumb img {
    transform: scale(1.07);
}

.bp-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bp-card-meta {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--bp-text-muted);
    margin-bottom: 6px;
}

.bp-card-meta i {
    color: var(--bp-accent);
}

.bp-card-title {
    font-family: var(--bp-font-serif);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--bp-text-main);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-card:hover .bp-card-title {
    color: var(--bp-accent);
}

/* ==========================================================================
   5. SIDEBAR WIDGETS
   ========================================================================== */
.bp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.bp-widget {
    background: #ffffff;
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-md);
    overflow: hidden;
    box-shadow: var(--bp-shadow-sm);
}

.bp-widget-header {
    background: var(--bp-primary);
    color: #ffffff;
    padding: 12px 18px;
    font-family: var(--bp-font-serif);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-widget-body {
    padding: 18px;
}

.bp-quote-card {
    background: var(--bp-cream);
    border-left: 4px solid var(--bp-accent);
    padding: 14px 16px;
    font-style: italic;
    font-size: 13.5px;
    color: #4b5563;
    border-radius: 0 var(--bp-radius-sm) var(--bp-radius-sm) 0;
}

/* Popular Rank List */
.bp-rank-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.bp-rank-item:last-child {
    border-bottom: none;
}

.bp-rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bp-cream);
    color: var(--bp-primary);
    border: 1px solid var(--bp-card-border);
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bp-rank-item:first-child .bp-rank-num {
    background: var(--bp-accent);
    color: #ffffff;
    border-color: var(--bp-accent);
}

.bp-rank-title {
    font-family: var(--bp-font-serif);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--bp-text-main);
}

.bp-rank-title:hover {
    color: var(--bp-accent);
}

/* ==========================================================================
   6. SINGLE ARTICLE & COMMENTS
   ========================================================================== */
.bp-single-wrapper {
    background: #ffffff;
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-lg);
    box-shadow: var(--bp-shadow-sm);
    padding: 36px 44px;
    margin: 28px auto 40px;
    max-width: 960px;
}

.bp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--bp-text-muted);
    margin-bottom: 18px;
}

.bp-single-title {
    font-family: var(--bp-font-serif);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--bp-primary-dark);
    margin: 12px 0 16px;
}

.bp-single-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--bp-text-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bp-card-border);
    margin-bottom: 24px;
}

.bp-single-featured {
    border-radius: var(--bp-radius-md);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--bp-shadow-sm);
}

.bp-entry-content {
    font-size: 16.5px;
    line-height: 1.85;
    color: #1f2937;
}

.bp-entry-content p {
    margin-bottom: 20px;
}

.bp-author-box {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--bp-cream);
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-md);
    padding: 20px;
    margin: 32px 0;
}

.bp-author-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid var(--bp-accent);
    overflow: hidden;
    flex-shrink: 0;
}

.bp-comments-area {
    clear: both;
    width: 100%;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--bp-card-border);
}

.comment-respond {
    background: var(--bp-cream);
    border: 1px solid var(--bp-card-border);
    border-radius: var(--bp-radius-md);
    padding: 24px 28px;
    margin-top: 24px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: var(--bp-radius-sm);
    background: #ffffff;
    margin-bottom: 12px;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--bp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.15);
}

.bp-submit-btn {
    background: var(--bp-primary);
    color: #ffffff;
    font-weight: 700;
    padding: 11px 26px;
    border-radius: var(--bp-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.bp-submit-btn:hover {
    background: var(--bp-primary-dark);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.bp-footer {
    background: #022c22;
    color: #cbd5e1;
    padding: 48px 0 24px;
    margin-top: 50px;
    border-top: 4px solid var(--bp-accent);
}

.bp-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}

.bp-footer-title {
    font-family: var(--bp-font-serif);
    font-size: 16px;
    font-weight: 700;
    color: #fef3c7;
    margin-bottom: 16px;
}

.bp-footer-links {
    list-style: none;
}

.bp-footer-links li {
    margin-bottom: 8px;
}

.bp-footer-links a {
    color: #94a3b8;
}

.bp-footer-links a:hover {
    color: #fef3c7;
}

.bp-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    text-align: center;
    font-size: 12.5px;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 991px) {
    .bp-hero-grid { grid-template-columns: 1fr; }
    .bp-main-layout { grid-template-columns: 1fr; }
    .bp-footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .bp-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .bp-brand-logo { height: 56px; width: 56px; }
    .bp-grid-3 { grid-template-columns: 1fr; }
    .bp-single-wrapper { padding: 20px 16px; }
    .bp-single-title { font-size: 22px; }
}
