/*
Theme Name: Infinito
Description: A fast and modern WordPress theme with infinite scroll, optimized for news and blog websites
Version: 1.1.0
Author: Mastah SEO
Author URI: https://www.mastahseo.com/
Text Domain: infinito
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, featured-images, custom-menu, translation-ready
*/

/* --- Reset & Aturan Dasar --- */
:root {
    --primary-text: #1a1a1a;
    --secondary-text: #555;
    --accent-color: #4f46e5; /* Indigo */
    --background-color: #FFFFFF;
    --border-color: #e5e5e5;
    --gap: 20px;

    /* Ditambahkan: Variabel Font dengan fallback */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Screen Reader Text - WordPress accessibility requirement */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* HR styling to match border design */
hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    /* Diubah: Menggunakan font body */
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--primary-text);
    line-height: 1.7;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Diubah: border-radius dihapus dari global */
}

ul {
    list-style: none;
}

/* Elemen dengan font judul */
.hero-main-post .post-title,
.hero-secondary-post .post-title,
.section-title,
.post-card-horizontal .post-title,
.single-post .entry-title,
.widget-title,
.footer-logo,
.footer-widgets .widget-title {
    font-family: var(--font-heading);
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gap);
    padding-right: var(--gap);
    width: 100%;
    box-sizing: border-box;
}


.post-category {
    display: inline-block;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500; /* Disesuaikan dengan Roboto */
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--accent-color); /* Dibuat umum */
}

/* --- Header Situs --- */
.site-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 998;
}

/* Admin bar tidak diperlukan dengan sticky header */

/* Disable scroll when mobile menu is active */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: -60px; /* Kompensasi untuk fixed header saat menu open */
}

/* Admin bar mobile menu fixes */
.admin-bar body.menu-open {
    top: -92px; /* Desktop: header + admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar body.menu-open {
        top: -60px; /* Mobile: only header since admin bar scrolls away */
    }
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: relative;
}

.site-branding {
    flex-shrink: 0;
}

/* Ditambahkan: Styling untuk logo gambar */
.site-branding a img, .widget .footer-logo img {
	max-height: 35px;
	width: auto;
}

.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    contain: layout style;
}

.main-navigation ul {
    display: flex;
    gap: 15px;
}

.main-navigation a {
    font-weight: 500; /* Disesuaikan dengan Roboto */
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 6px;
}
.main-navigation a:hover {
    background-color: #f3f4f6;
    color: var(--primary-text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle, .menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--secondary-text);
    z-index: 1000;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}
.search-toggle:hover, .menu-toggle:hover {
    color: var(--primary-text);
}

.search-toggle svg, .menu-toggle svg {
    width: 24px;
    height: 24px;
}

.menu-toggle {
    display: none;
}

/* --- Fungsi Pencarian di Header --- */
.header-search-form {
    display: none;
    width: 100%;
}
.header-search-form input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0 15px;
    font-size: 16px;
    font-family: var(--font-body); /* Pastikan input menggunakan font body */
}
.site-header.search-active .main-navigation,
.site-header.search-active .site-branding {
    display: none;
}
@media (max-width: 768px) {
    .site-header.search-active .header-actions .menu-toggle {
        display: none;
    }
}
.site-header.search-active .header-search-form {
    display: block;
    flex-grow: 1;
    margin: auto;
}
.site-header.search-active .header-main {
    justify-content: center;
}


/* --- Hero Section --- */
.hero-container {
    background-color: #f5f5f7;
    padding: 20px 0;
}
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gap);
}
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.hero-main-post {
    display: flex;
    flex-direction: column;
}

.hero-main-post .post-image {
    margin-bottom: var(--gap);
}
.hero-main-post .post-image img {
    border-radius: 6px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
    height: auto;
}
.hero-main-post .post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}
.hero-main-post .post-meta {
    font-size: 13px;
    color: var(--secondary-text);
    margin-top: 10px;
}

.hero-secondary-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-secondary-post {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.hero-secondary-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-secondary-post .post-category-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-color); /* Dibuat umum */
    display: block;
    margin-bottom: 5px;
}

.hero-secondary-post .post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}
.hero-secondary-post .post-meta {
    font-size: 13px;
    color: var(--secondary-text);
    margin-top: 10px;
}

/* --- Main Content Area --- */
.main-content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 20px 0;
}

.single-content-area {
    padding: 20px 0;
    margin: auto;
    max-width: 800px;
}

.category-section {
    margin-bottom: 20px;
}
.category-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--gap) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--gap) 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Dihapus: .section-description */

.section-more-link {
    font-weight: 500;
    color: var(--primary-text);
    text-decoration: none;
    flex-shrink: 0;
}
.section-more-link:hover {
    color: var(--accent-color);
}

.post-list-style {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: var(--gap);
    /* Prevent layout shift dari dynamic content */
    min-height: 400px;
}
.post-card-horizontal {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: var(--gap);
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.post-card-horizontal:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-card-horizontal .post-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    width: 100%;
    height: auto;
}
.post-card-horizontal .post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}
.post-card-horizontal .post-meta {
    font-size: 13px;
    color: var(--secondary-text);
    margin-top: 10px;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    overflow: hidden;
    max-width: 100%;
}

.widget-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--gap);
}
.widget ul li {
    margin-bottom: 20px;
}
.widget ul li:last-child {
    margin-bottom: 0;
}
.widget-posts li a {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    align-items: flex-start;
}
.widget-posts li img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}
.widget-post-content {
    display: flex;
    flex-direction: column;
}
.widget-post-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    font-family: var(--font-heading);
}
.widget-posts .post-meta {
    font-size: 13px;
    color: var(--secondary-text);
    line-height: 1;
    margin-top: 10px;
}

/* --- Footer --- */
.site-footer {
    background-color: #111;
    color: #a0a0a0;
    padding: 20px 0;
    font-size: 15px;
}
.footer-about {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
}
.footer-about .widget h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    color: var(--background-color);
}
.footer-about .widget:first-child {
    flex: 2;
}
.footer-about .widget:last-child {
    flex: 1;
}
.footer-about .footer-logo {
    display: block;
    max-width: 180px;
    margin-bottom: 20px;
}
.footer-about .footer-logo img {
    filter: brightness(0) invert(1);
}
.footer-about .footer-description {
    margin-bottom: 20px;
    line-height: 1.6;
}
.footer-social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.footer-social-links a {
    color: #a0a0a0;
    transition: color 0.3s ease;
}
.footer-social-links a:hover {
    color: white;
}
.footer-social-links svg {
    width: 24px;
    height: 24px;
}
.footer-copyright {
    font-size: 13px;
}
.footer-widgets .widget-title {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}
.footer-widgets ul li {
    margin-bottom: 15px;
}
.footer-widgets a:hover {
    color: white;
}

/* --- Animasi Scroll --- */
.fade-up {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* --- Aturan Responsif --- */
@media (max-width: 1024px) {
    .main-content-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-main-post {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
    }
    .footer-about {
        flex-direction: column-reverse;
    }
}

@media (max-width: 768px) {
    .menu-toggle { 
        display: block; 
    }
    .main-navigation {
        display: flex;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--background-color);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        box-sizing: border-box;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        visibility: hidden;
        opacity: 0;
    }
    .main-navigation.is-active {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
    .main-navigation ul { 
        flex-direction: column; 
        gap: 0;
        width: 100%;
    }
    .main-navigation a { 
        display: block; 
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    .main-navigation a:hover { 
        background-color: #f3f4f6; 
    }

    .post-card-horizontal {
        grid-template-columns: 1fr;
    }

    .section-more-link {
        margin-left: 0;
    }
    .single-post .entry-title {
        font-size: 24px;
    }
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .author-box .author-avatar {
        align-self: center;
    }
    .author-box .author-social-links,
    .author-header .author-social-links {
        justify-content: center;
    }
    
    /* Sidebar specific mobile fixes */
    .sidebar {
        position: static;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .sidebar .widget {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .ad-wrapper-sidebar {
        margin: 15px 0;
        min-height: 150px;
    }
}

/* --- Single Post Styles from single.html --- */
.post-categories {
    margin-bottom: 10px;
}
.single-post .post-categories a,
.hero-secondary-post .post-categories a {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    display: inline-block;
}
.single-post .entry-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}
.single-post figure {
    margin-bottom: 20px;
}
.single-post .entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin: 20px auto;
}
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.single-post .author-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}
.meta-text {
    display: flex;
    flex-direction: column;
}
.author-name {
    font-weight: 400;
    color: var(--secondary-text);
    font-size: 13px;
}
.author-name a {
    color: var(--accent-color);
    font-weight: 500;
}
.author-name a:hover {
    text-decoration: underline;
}
.post-date {
    font-size: 13px;
    color: var(--secondary-text);
}
.post-meta {
    font-size: 13px;
    margin-top: 10px;
}
.post-meta a {
    color: var(--accent-color);
    font-weight: 500;
}
.post-meta a:hover {
    text-decoration: underline;
}
.share-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary-text);
    padding: 5px;
}
.share-button:hover {
    color: var(--primary-text);
}

.single-post .featured-image {
    margin-bottom: 20px;
}
.single-post .featured-image img {
    border-radius: 6px;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.single-post figure figcaption {
    font-size: 13px;
    color: var(--secondary-text);
    text-align: center;
    margin-top: 10px;
    font-style: italic; 
}

.entry-content-page {
    margin-top: 20px;
}

.single-post .entry-content {
    color: var(--primary-text);
}
.single-post .entry-content p {
    margin-bottom: 20px;
}
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 20px;
    line-height: 1.3;
}
.single-post .entry-content h2 { font-size: 24px; }
.single-post .entry-content h3 { font-size: 24px; }
.single-post .entry-content h4 { font-size: 20px; }

.single-post .entry-content blockquote {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 4px solid var(--accent-color);
    font-size: 20px;
    font-style: italic;
    color: #555;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    padding-left: 20px;
    margin-bottom: 20px;
}
.single-post .entry-content ul li {
    list-style-type: disc;
}
.single-post .entry-content ol li {
    list-style-type: decimal;
}
.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.single-post .entry-content th,
.single-post .entry-content td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}
.single-post .entry-content th {
    background-color: #f3f4f6;
    font-weight: 700;
}
.single-post .entry-content tr:nth-child(even) {
    background-color: #f9fafb;
}

.single-post .entry-footer {
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.single-post .entry-footer a {
    background-color: #f3f4f6;
    color: var(--secondary-text);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}
.single-post .entry-footer a:hover {
    background-color: var(--accent-color);
    color: white;
}

.author-box {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.author-box .author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}
.author-box .author-avatar {
    flex-shrink: 0;
}
.author-box .author-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}
.author-box .author-bio {
    font-size: 15px;
    color: var(--secondary-text);
    margin-bottom: 15px;
}
.author-box .author-social-links {
    display: flex;
    gap: 15px;
}
.author-box .author-social-links a {
    color: var(--secondary-text);
}
.author-box .author-social-links a:hover {
    color: var(--accent-color);
}
.author-box .author-social-links svg {
    width: 20px;
    height: 20px;
}

/* --- Additional styles from single.html --- */
.post-separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--secondary-text);
    margin: 20px 0;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.post-separator::before,
.post-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.post-separator span {
    padding: 0 20px;
}

#infinite-scroll-trigger {
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: none;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Performance Optimizations --- */
.post-image img,
.featured-image img,
.hero-main-post .post-image img {
    will-change: auto;
}

/* Optimize transitions for better performance */
a, button {
    will-change: auto;
}

.search-toggle, .menu-toggle, .share-button {
    will-change: auto;
}

/* --- Load More Button --- */
.load-more-container {
    text-align: center;
    padding-top: 20px;
    /* Reserve space untuk loading state */
    min-height: 60px;
}

#load-more-btn {
    background-color: var(--primary-text);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#load-more-btn:hover {
    background-color: #333;
}

#load-more-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

/* --- Category Page Styles --- */
.page-header {
    padding: 0 20px;
    text-align: center;
    max-width: 800px;
    margin: auto;
}

.page-header .page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header .page-description {
    color: var(--secondary-text);
    max-width: 600px;
    margin: 0 auto;
}

.page-subtitle {
    font-size: 24px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.category-description {
    color: var(--secondary-text);
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.no-posts-found {
    text-align: center;
    padding: 20px;
    color: var(--secondary-text);
}

.no-posts-found h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-text);
}

.no-posts-found .button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.no-posts-found .button:hover {
    background-color: #3730a3;
}

/* --- Pagination Styles --- */
.pagination-nav {
    margin-top: 20px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination .current {
    display: block;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-text);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* --- Top Category Posts Widget --- */
.top-category-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-category-posts li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.top-category-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.top-post-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.top-post-item:hover {
    opacity: 0.8;
}

.top-post-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.top-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-post-content {
    flex: 1;
    min-width: 0;
}

.top-post-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-post-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--secondary-text);
}

.post-views {
    color: var(--accent-color);
    font-weight: 500;
}

/* --- Author Header Styles --- */
.author-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin: auto;
    max-width: 800px;
}

.author-header .author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.author-header .page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.author-header .author-bio {
    color: var(--secondary-text);
    max-width: 600px;
    margin-bottom: 20px;
}

.author-header .author-social-links {
    display: flex;
    gap: 20px;
}

.author-header .author-social-links a {
    color: var(--secondary-text);
}

.author-header .author-social-links a:hover {
    color: var(--accent-color);
}

.author-header .author-social-links svg {
    width: 24px;
    height: 24px;
}

/* --- 404 Error Page Styles --- */
/* Special layout for 404 page only */
.error-404-page .site-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 160px 0; /* Use padding instead of calc */
    box-sizing: border-box;
}

.error-404 {
    text-align: center;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-404 .error-code {
    font-size: 120px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-color);
    line-height: 1;
}

.error-404 .page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    max-width: 600px;
}

.error-404 .page-description {
    color: var(--secondary-text);
    max-width: 500px;
    margin-bottom: 20px;
}

.error-404 .back-to-home {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.error-404 .back-to-home:hover {
    background-color: #3c33d3;
    color: white;
}

/* Responsive design for 404 page */
@media (max-width: 768px) {
    .error-404-page .site-content {
        min-height: 100vh;
        padding: 140px 0; /* Use padding instead of calc */
    }
    
    .error-404 .error-code {
        font-size: 80px;
    }
    
    .error-404 .page-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .error-404 .page-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
}

/* --- Advertisement Styles --- */
.ad-wrapper {
    margin: 20px auto;
    text-align: center;
    min-height: 250px;
}

.ad-wrapper-sidebar {
    margin: 20px 0;
    text-align: center;
    min-height: 200px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.ad-label {
    display: block;
    font-size: 13px;
    color: var(--secondary-text);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.wp-block-table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

@media screen and (max-width: 768px) {
  .wp-block-table {
    overflow-x: auto;
  }
}

.entry-footer .tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Load More Button Styling */
.load-more-container {
    text-align: center;
    padding: 20px;
}

.load-more-btn {
    background: transparent;
    border: 1px dashed #ccc;
    padding: 10px 20px;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 14px;
}

.load-more-btn:hover {
    border-color: #999;
    color: #666;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Load More Button States */
.load-more-btn.auto-mode {
    opacity: 0.7;
    font-size: 14px;
}

.load-more-btn.manual-mode {
    opacity: 1;
    font-size: 16px;
    background: #f8f9fa;
    border-style: solid;
    color: #333;
}

/* --- Skeleton Loading States --- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-post {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.skeleton-title {
    height: 24px;
    width: 80%;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-meta {
    height: 16px;
    width: 60%;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-excerpt {
    height: 16px;
    width: 90%;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-excerpt:last-child {
    width: 70%;
}

/* CLS Prevention - Essential fixes moved from critical.css */
.load-more-container {
    min-height: 80px;
    margin: 20px 0;
}

.sidebar {
    min-height: 400px;
}

.site-footer {
    min-height: 150px;
    padding: 20px 0;
}

.single-post {
    min-height: 400px;
}

#primary-content {
    min-height: 800px;
}

#infinite-scroll-trigger {
    min-height: 80px;
    margin: 15px 0;
}
