/* ========================================
   TeknoHaber - Onedio Inspired Design
   Clean, White, Content-First Layout
   ======================================== */

/* --- Variables --- */
:root {
    --primary: #e8344e;
    --primary-dark: #c62b42;
    --primary-light: #ff4d6a;
    --accent-blue: #1a73e8;
    --accent-green: #00c853;
    --accent-orange: #ff9100;
    --accent-purple: #7c4dff;

    --bg-body: #f1f2f6;
    --bg-card: #ffffff;
    --bg-nav: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-footer: #1a1a2e;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #8c8c8c;
    --text-light: #b0b0b0;
    --text-inverse: #ffffff;

    --border-color: #e8e8e8;
    --border-light: #f0f0f0;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-nav: 0 1px 4px rgba(0,0,0,0.08);

    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.2s ease;

    --container-width: 1200px;
    --sidebar-width: 320px;
}

[data-theme="dark"] {
    --bg-body: #121218;
    --bg-card: #1e1e2a;
    --bg-nav: #1a1a26;
    --bg-sidebar: #1e1e2a;
    --bg-footer: #0d0d14;
    --text-primary: #e8e8f0;
    --text-secondary: #b0b0c0;
    --text-muted: #6a6a7a;
    --text-light: #4a4a5a;
    --border-color: #2a2a3a;
    --border-light: #222232;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-nav: 0 1px 4px rgba(0,0,0,0.3);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* --- Container --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 16px; }

/* ===== NAVBAR ===== */
.navbar {
    background: var(--bg-nav);
    box-shadow: var(--shadow-nav);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}
.navbar .container {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 16px;
}
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.navbar-brand i { font-size: 1.1rem; }
.navbar-menu {
    display: flex;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.navbar-menu::-webkit-scrollbar { display: none; }
.navbar-menu li a {
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 20px;
    white-space: nowrap;
    display: block;
    transition: var(--transition);
}
.navbar-menu li a:hover,
.navbar-menu li a.active {
    background: var(--primary);
    color: white;
}
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.navbar-search {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border-radius: 20px;
    padding: 6px 12px;
    gap: 6px;
    border: 1px solid var(--border-color);
}
.navbar-search i { color: var(--text-muted); font-size: 0.8rem; }
.navbar-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.82rem;
    width: 140px;
    color: var(--text-primary);
}
.theme-toggle, .mobile-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg-body);
}
.theme-toggle:hover, .mobile-toggle:hover { color: var(--primary); }
.mobile-toggle { display: none; }

/* ===== HERO SECTION ===== */
.hero-section {
    margin-bottom: 20px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.hero-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 320px;
}
.hero-card:first-child { grid-row: 1 / 3; min-height: 440px; }
.hero-card img, .hero-card .hero-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.hero-card:hover img { transform: scale(1.03); }
.hero-placeholder {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 3rem;
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}
.hero-cat {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.hero-overlay h2, .hero-overlay h1 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}
.hero-card:first-child .hero-overlay h2,
.hero-card:first-child .hero-overlay h1 {
    font-size: 1.6rem;
}
.hero-meta {
    display: flex;
    gap: 12px;
    font-size: 0.72rem;
    opacity: 0.8;
    margin-top: 4px;
}
.hero-meta i { margin-right: 3px; }

/* ===== MAIN LAYOUT (Content + Sidebar) ===== */
.homepage-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 20px;
    align-items: start;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}
.section-header h2 {
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}
.section-header h2 .section-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}
.section-header h2 .section-icon.red { background: var(--primary); }
.section-header h2 .section-icon.blue { background: var(--accent-blue); }
.section-header h2 .section-icon.green { background: var(--accent-green); }
.section-header h2 .section-icon.orange { background: var(--accent-orange); }
.section-header h2 .section-icon.purple { background: var(--accent-purple); }
.see-all-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 4px;
}
.see-all-link:hover { color: var(--primary); }

/* ===== CONTENT CARDS ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: block;
}
.content-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.content-card-img {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: var(--bg-body);
}
.content-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.content-card:hover .content-card-img img { transform: scale(1.05); }
.content-card-img .card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
    background: linear-gradient(135deg, var(--bg-body), var(--border-color));
}
.card-category {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.content-card-body {
    padding: 12px 14px 14px;
}
.content-card-body h3 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.content-card-body .card-meta {
    display: flex;
    gap: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.content-card-body .card-meta i { margin-right: 2px; }
.content-card-body .card-source {
    font-size: 0.7rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 4px;
}

/* Large featured card (first in grid) */
.content-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.content-card-featured .content-card-img { padding-top: 0; min-height: 260px; }
.content-card-featured .content-card-body { display: flex; flex-direction: column; justify-content: center; padding: 20px; }
.content-card-featured .content-card-body h3 { font-size: 1.1rem; -webkit-line-clamp: 4; }
.content-card-featured .content-card-body p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }

/* ===== LOAD MORE BUTTON ===== */
.load-more-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.load-more-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== SECTION WRAPPER ===== */
.content-section { margin-bottom: 24px; }

/* ===== TRENDING BAR ===== */
.trending-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-bottom: 20px;
}
.trending-bar .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.trending-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.trending-label i { font-size: 0.72rem; }
.trending-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.trending-scroll::-webkit-scrollbar { display: none; }
.trending-item {
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--bg-body);
    border-radius: 16px;
    font-weight: 500;
    flex-shrink: 0;
    transition: var(--transition);
}
.trending-item:hover { background: var(--primary); color: white; }

/* ===== RIGHT SIDEBAR ===== */
.sidebar-home {
    position: sticky;
    top: 76px;
}
.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    overflow: hidden;
}
.sidebar-widget-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-widget-header i { color: var(--primary); font-size: 0.8rem; }

/* Popular Headlines */
.popular-list { padding: 8px 0; }
.popular-item {
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    transition: var(--transition);
}
.popular-item:hover { background: var(--bg-body); }
.popular-item-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 24px;
    line-height: 1.2;
}
.popular-item-number.n1 { color: var(--primary); }
.popular-item-number.n2 { color: var(--accent-orange); }
.popular-item-number.n3 { color: var(--accent-blue); }
.popular-item-text {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.popular-item-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Latest List */
.latest-list { padding: 8px 0; }
.latest-item {
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    align-items: center;
    transition: var(--transition);
}
.latest-item:hover { background: var(--bg-body); }
.latest-item img {
    width: 70px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.latest-item-placeholder {
    width: 70px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}
.latest-item-text {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-item-cat {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

/* Tags Widget */
.sidebar-tags { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tags a {
    padding: 4px 10px;
    background: var(--bg-body);
    border-radius: 14px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
}
.sidebar-tags a:hover { background: var(--primary); color: white; }

/* ===== TAGS CLOUD (Homepage) ===== */
.tags-section { margin-bottom: 24px; }
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}
.tag-pill:hover { background: var(--primary); color: white; border-color: var(--primary); }
.tag-pill .tag-count {
    font-size: 0.65rem;
    background: var(--bg-body);
    padding: 1px 6px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 700;
}
.tag-pill:hover .tag-count { background: rgba(255,255,255,0.2); color: white; }

/* ===== LIST VIEW POSTS ===== */
.list-section { margin-bottom: 24px; }
.list-card {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 12px;
    transition: var(--transition);
}
.list-card:hover { box-shadow: var(--shadow-hover); }
.list-card-img {
    width: 220px;
    min-height: 150px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.list-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.list-card-img .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    color: var(--text-light);
    font-size: 1.5rem;
}
.list-card-body {
    padding: 14px 16px 14px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}
.list-card-body .list-cat {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.list-card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.list-card-body p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.list-card-body .card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.list-card-body .card-meta i { margin-right: 2px; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 20px 0;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition);
}
.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-footer);
    color: #ccc;
    padding: 40px 0 0;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-brand h3 i { color: var(--primary); }
.footer-brand p { font-size: 0.82rem; line-height: 1.6; color: #999; }
.footer h4 {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: #999;
    font-size: 0.82rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 8px; margin-top: 12px; }
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; }
.footer-bottom {
    text-align: center;
    padding: 16px 0;
    font-size: 0.75rem;
    color: #666;
}

/* ===== SINGLE POST ===== */
.reading-progress {
    position: fixed;
    top: 56px;
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 999;
    transition: width 0.1s linear;
    width: 0;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    font-size: 0.78rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-secondary); font-weight: 500; }
.breadcrumb i { font-size: 0.55rem; color: var(--text-light); }

.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 20px;
    align-items: start;
}
.main-content { min-width: 0; }

.single-post {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
}
.single-post-header {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}
.single-post-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}
.single-post .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
}
.single-post .overlay h1 {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
}
.post-category-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.single-post-meta {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    opacity: 0.8;
    flex-wrap: wrap;
}
.single-post-meta i { margin-right: 3px; }

.post-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-light);
}
.post-info-left { display: flex; align-items: center; gap: 10px; }
.post-info-right { display: flex; align-items: center; gap: 6px; }
.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.post-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-name {
    font-weight: 700;
    font-size: 0.82rem;
    display: block;
    color: var(--text-primary);
}
.post-author-name a { color: var(--accent-blue); }
.post-author-name a:hover { text-decoration: underline; }
.post-author-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}
.share-btn-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition);
    background: transparent;
}
.share-btn-mini:hover { background: var(--primary); color: white; border-color: var(--primary); }

.single-post-body {
    padding: 28px 28px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.single-post-body h2, .single-post-body h3 {
    color: var(--text-primary);
    margin: 24px 0 12px;
    font-weight: 700;
}
.single-post-body h2 { font-size: 1.3rem; }
.single-post-body h3 { font-size: 1.1rem; }
.single-post-body p { margin-bottom: 16px; }
.single-post-body img { border-radius: var(--radius); margin: 16px 0; }
.single-post-body a { color: var(--accent-blue); text-decoration: underline; }
.single-post-body ul, .single-post-body ol { padding-left: 24px; margin-bottom: 16px; }
.single-post-body li { margin-bottom: 6px; }
.single-post-body blockquote {
    border-left: 3px solid var(--primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--bg-body);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}
.single-post-body code {
    background: var(--bg-body);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.88rem;
}
.single-post-body pre {
    background: #1a1a2e;
    color: #e8e8e8;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
}

.post-bottom-section {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.post-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-tags-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.post-tags a {
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
    padding: 3px 8px;
    background: var(--bg-body);
    border-radius: 12px;
}
.post-tags a:hover { background: var(--primary); color: white; }
.share-buttons { display: flex; align-items: center; gap: 6px; }
.share-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    transition: var(--transition);
}
.share-btn:hover { opacity: 0.85; transform: scale(1.1); }
.share-btn.share-twitter { background: #1da1f2; }
.share-btn.share-facebook { background: #1877f2; }
.share-btn.share-linkedin { background: #0a66c2; }
.share-btn.share-whatsapp { background: #25d366; }
.share-btn.share-copy { background: var(--text-muted); cursor: pointer; border: none; font-family: var(--font); }

/* ===== AUTHOR BOX ===== */
.author-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 24px;
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}
.author-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box-info { flex: 1; }
.author-box-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.author-box-info h3 a { color: var(--accent-blue); }
.author-box-info h3 a:hover { text-decoration: underline; }
.author-box-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}
.author-social { display: flex; gap: 8px; }
.author-social a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition);
}
.author-social a:hover { background: var(--primary); color: white; }

/* ===== AUTHOR PROFILE PAGE ===== */
.author-profile-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 30px;
    text-align: center;
    margin-bottom: 24px;
}
.author-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 14px;
    overflow: hidden;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.5rem;
}
.author-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-profile-header h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.author-profile-header .author-role {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.author-profile-header .author-bio {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 14px;
    line-height: 1.6;
}
.author-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 14px;
}
.author-stat { text-align: center; }
.author-stat strong { display: block; font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.author-stat span { font-size: 0.72rem; color: var(--text-muted); }

/* ===== COMMENTS ===== */
.comments-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 20px;
}
.comments-section > .section-header { margin-top: 0; }
.comment-list { margin-top: 12px; }
.comment-entry {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.comment-entry:last-child { border-bottom: none; }
.comment-entry-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.comment-entry-body { flex: 1; min-width: 0; }
.comment-entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.comment-entry-header strong { font-size: 0.82rem; }
.comment-entry-header time { font-size: 0.7rem; color: var(--text-muted); }
.comment-entry-body p { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); }
.comment-reply-btn {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-top: 4px;
    cursor: pointer;
    background: none;
    border: none;
}
.comment-reply-btn:hover { text-decoration: underline; }

/* Nested comments */
.comment-replies {
    margin-left: 40px;
    padding-left: 16px;
    border-left: 2px solid var(--border-light);
}
.comment-replies .comment-entry { padding: 10px 0; }
.comment-replies .comment-entry-avatar img { width: 32px; height: 32px; }

.no-comments {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Comment form */
.comment-form-wrapper {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.comment-form-wrapper h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.comment-form-wrapper h3 i { color: var(--primary); }
.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.form-group { margin-bottom: 10px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== RELATED POSTS ===== */
.related-posts {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 20px;
    margin-bottom: 20px;
}
.related-posts .section-header { margin-top: 0; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.related-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-body);
}
.related-card-img {
    width: 100%;
    height: 130px;
    overflow: hidden;
}
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { padding: 10px 12px; }
.related-card-body h4 {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card-body .card-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== SIDEBAR (Post/Category pages) ===== */
.sidebar { position: sticky; top: 76px; }
.sidebar .sidebar-widget { margin-bottom: 16px; }
.widget-title {
    font-size: 0.88rem;
    font-weight: 800;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}
.widget-title i { color: var(--primary); font-size: 0.8rem; }

/* Sidebar Search */
.sidebar-search-widget { padding: 14px 16px; }
.sidebar-search { display: flex; gap: 6px; }
.sidebar-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.82rem;
    outline: none;
}
.sidebar-search input:focus { border-color: var(--primary); }
.sidebar-search button {
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.sidebar-search button:hover { background: var(--primary-dark); }

/* Category list */
.category-list { padding: 8px 16px; }
.category-list li { border-bottom: 1px solid var(--border-light); }
.category-list li:last-child { border-bottom: none; }
.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
}
.category-list a:hover { color: var(--primary); }
.category-name { display: flex; align-items: center; gap: 5px; }
.category-name i { font-size: 0.6rem; color: var(--text-light); }
.category-count {
    font-size: 0.68rem;
    background: var(--bg-body);
    color: var(--text-muted);
    padding: 1px 7px;
    border-radius: 8px;
    font-weight: 600;
}

/* Popular post items */
.popular-post-item {
    display: flex;
    gap: 10px;
    padding: 9px 16px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-light);
}
.popular-post-item:last-child { border-bottom: none; }
.popular-post-number {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 22px;
    line-height: 1;
}
.popular-post-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.popular-post-info { flex: 1; min-width: 0; }
.popular-post-info h4 { font-size: 0.78rem; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.popular-post-info h4 a { color: var(--text-primary); }
.popular-post-info h4 a:hover { color: var(--primary); }
.popular-post-meta { font-size: 0.68rem; color: var(--text-muted); }
.popular-post-meta i { margin-right: 2px; }

/* Tag cloud in sidebar */
.tag-cloud { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag-cloud a {
    padding: 3px 9px;
    background: var(--bg-body);
    border-radius: 12px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
}
.tag-cloud a:hover { background: var(--primary); color: white; }

/* Sidebar CTA */
.sidebar-cta {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(232,52,78,0.04), rgba(26,115,232,0.04));
}
.sidebar-cta-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}
.sidebar-cta h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; border-bottom: none; padding: 0; }
.sidebar-cta p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 10px; }

/* ===== POST CARD (for category/tag/search pages) ===== */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-hover); }
.post-card-image {
    position: relative;
    display: block;
}
.post-card-image img { width: 100%; height: 180px; object-fit: cover; }
.no-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    color: var(--text-light);
    font-size: 2rem;
}
.post-card-category {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
}
.post-card-reading {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
}
.post-card-body { padding: 12px 14px 14px; }
.post-card-body h3 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
}
.post-card-body h3 a { color: var(--text-primary); }
.post-card-body h3 a:hover { color: var(--primary); }
.post-card-excerpt {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}
.post-card-meta { display: flex; gap: 10px; font-size: 0.68rem; color: var(--text-muted); }
.post-card-meta i { margin-right: 2px; }
.post-card-readmore {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 3px;
}
.post-card-readmore:hover { gap: 6px; }

/* Posts grid */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.posts-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ===== CATEGORY/TAG/SEARCH PAGE HERO ===== */
.page-hero {
    background: linear-gradient(135deg, #1a1a2e, #2d1b69);
    padding: 40px 0;
    margin-bottom: 20px;
    color: white;
}
.page-hero-content { text-align: center; }
.page-hero h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.page-hero p { opacity: 0.7; font-size: 0.88rem; }
.page-hero-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.2rem;
}
.breadcrumb-light { padding-top: 0; }
.breadcrumb-light a, .breadcrumb-light span, .breadcrumb-light i { color: rgba(255,255,255,0.7); }
.breadcrumb-light a:hover { color: white; }

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.alert i { font-size: 0.9rem; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(232,52,78,0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; color: var(--text-light); }
.empty-state h3 { font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }

/* ===== SCHEDULED BADGE ===== */
.scheduled-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    background: #fff3cd;
    color: #856404;
}
[data-theme="dark"] .scheduled-badge { background: #332d0d; color: #e0c74f; }

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 20px;
    text-align: center;
}
.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: white;
    font-size: 1rem;
}
.stat-card-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.stat-card-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .homepage-layout { grid-template-columns: 1fr; }
    .sidebar-home { display: none; }
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-card:first-child { grid-row: auto; min-height: 300px; }
    .hero-card:not(:first-child) { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .navbar-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-nav);
        padding: 8px;
        box-shadow: var(--shadow-nav);
        border-top: 1px solid var(--border-light);
        z-index: 999;
    }
    .navbar-menu.active li a { padding: 10px 14px; border-radius: var(--radius-sm); }
    .mobile-toggle { display: flex; }
    .navbar-search { display: none; }
    .content-grid { grid-template-columns: 1fr; }
    .content-card-featured { grid-template-columns: 1fr; }
    .content-card-featured .content-card-img { min-height: 200px; padding-top: 56.25%; }
    .hero-card { min-height: 250px; }
    .hero-card:first-child { min-height: 300px; }
    .single-post-header { min-height: 250px; }
    .single-post-header img { min-height: 250px; }
    .single-post .overlay { padding: 20px; }
    .single-post .overlay h1 { font-size: 1.2rem; }
    .single-post-body { padding: 18px; }
    .post-bottom-section { padding: 14px 18px; flex-direction: column; }
    .comment-form-row { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .list-card { flex-direction: column; }
    .list-card-img { width: 100%; min-height: 180px; }
    .list-card-body { padding: 14px; }
    .author-box { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero-card:first-child { min-height: 240px; }
}
