/* =============================================================================
   YTCF Blog — blog.css
   Premium Blog styles with dynamic Customizer integration.
   ============================================================================= */

/* --- Base & Customizer Integration --- */
:root {
    --primary-color: #ff0000;
    --accent-color: #1a1a2e;
    --link-color: #cc0000;
    --heading-color: #1a1a2e;
    --text-color: #2d2d2d;
    --bg-color: #f8f9fa;
}

body {
    font-family: var(--body-font, 'Inter', system-ui, sans-serif);
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--bg-color) !important;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

html {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font, 'Inter', system-ui, sans-serif);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.25;
}

a { color: var(--link-color); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--primary-color); }

/* --- Layout --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

.blog-main { padding: 40px 0 60px; background-color: var(--bg-color); }
.blog-layout, .single-layout { display: grid; gap: 40px; align-items: start; }

.layout-right-sidebar .blog-layout, 
.layout-right-sidebar .single-layout { grid-template-columns: 1fr 320px; }

.layout-left-sidebar .blog-layout,
.layout-left-sidebar .single-layout { grid-template-columns: 320px 1fr; }
.layout-left-sidebar .blog-sidebar { order: -1; }

.layout-no-sidebar .blog-layout,
.layout-no-sidebar .single-layout { grid-template-columns: 1fr; }

/* Sticky Sidebar */
.sidebar--sticky { position: sticky; top: 100px; }

/* --- Hero Section --- */
.blog-hero {
    padding: 30px 0 60px;
    text-align: left; /* Ensure left alignment */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-bottom: 1px solid #e1e8ed;
    margin-bottom: 0;
}
.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--heading-color);
}
.blog-hero p {
    font-size: 1.15rem;
    color: #475569;
    max-width: 700px;
    margin: 0;
}

/* --- Navigation --- */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.navbar .container { display: flex; justify-content: space-between; align-items: center; }

.navbar .logo img { max-height: 45px; width: auto; display: block; }

.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #1a1a2e; }

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-weight: 600; color: #1a1a2e !important; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; }
.nav-links a i { font-size: 0.9rem; color: var(--primary-color); }
.nav-links a:hover { color: var(--primary-color) !important; }

/* Tools Dropdown */
.dropdown { position: relative; }
.dropbtn {
    background: none; border: none; font-weight: 600; font-size: 0.95rem; cursor: pointer;
    display: flex; align-items: center; gap: 6px; color: #1a1a2e; padding: 0;
}
.dropdown-content {
    display: none; position: absolute; top: 100%; right: 0; background: #fff;
    min-width: 250px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 10px 0; margin-top: 15px; z-index: 1001;
    border-top: 3px solid var(--primary-color);
}
.dropdown-content.show { display: block; animation: fadeInUp 0.3s ease; }
.dropdown-content a {
    padding: 12px 20px; display: flex; align-items: center; gap: 10px;
    color: #2d2d2d !important; font-size: 0.9rem; font-weight: 500;
}
.dropdown-content a:hover { background: #f8f9fa; color: var(--primary-color) !important; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Post Cards --- */
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.layout-no-sidebar .posts-grid { grid-template-columns: repeat(3, 1fr); }

.post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}
.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.post-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
    display: block;
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.post-card:hover .post-card-thumb img {
    transform: scale(1.1);
}

.post-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 3rem;
}

.post-card-body {
    padding: 25px 25px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-category-badge {
    background: rgba(255, 0, 0, 0.05);
    color: var(--primary-color);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 0, 0, 0.1);
}
.post-card-title {
    font-size: 1.35rem;
    margin-bottom: 15px;
    line-height: 1.4;
}
.post-card-title a {
    color: var(--heading-color);
}
.post-card-title a:hover {
    color: var(--primary-color);
}
.post-card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: #94a3b8;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}
.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-card-meta img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.post-card-meta i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.post-card-footer {
    padding: 0 25px 25px;
}
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: all 0.3s;
}
.read-more-link i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}
.read-more-link:hover {
    color: var(--accent-color);
}
.read-more-link:hover i {
    transform: translateX(5px);
}

/* --- Single Post --- */
.single-post-header {
    margin-bottom: 50px;
    text-align: left; /* Match user request for left alignment */
    max-width: 900px;
    margin-left: 0;
    margin-right: auto;
}
.single-post-cats {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}
.single-post-title {
    font-size: 3rem;
    margin: 0 0 25px;
    line-height: 1.15;
    color: var(--heading-color);
}
.single-post-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 30px;
}
.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 10px;
}
.single-post-meta a {
    color: var(--primary-color);
    font-weight: 700;
}
.meta-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.single-post-meta i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Share Bar */
.single-share-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}
.share-label {
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 1px;
}
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}
.share-twitter { background: #1da1f2; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0a66c2; }
.share-copy { background: #64748b; }
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    opacity: 0.9;
}

.single-featured-img {
    margin: 40px 0; /* Left align by removing auto margin */
    max-width: 100%; /* Fill the container width */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: block;
}
.single-featured-img img { 
    width: 100%; 
    height: auto;
    display: block; 
    object-fit: contain;
}

.post-content {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #334155;
    max-width: 850px; /* Comfortable reading width */
    margin-left: 0; /* Left align */
    margin-right: auto;
}
.post-content h2, .post-content h3 {
    margin: 50px 0 25px;
    color: var(--heading-color);
}
.post-content p { margin-bottom: 30px; }

/* --- Author Box --- */
.author-box {
    display: flex;
    gap: 35px;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    margin-top: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    align-items: center;
}
.author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
}
.author-info {
    flex: 1;
}
.author-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.author-info h4 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--heading-color);
}
.author-posts-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.author-info p {
    margin: 0 0 20px;
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
}
.author-socials {
    display: flex;
    gap: 15px;
}
.author-social {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.author-social:hover {
    background: var(--primary-color);
    color: #fff !important;
    transform: translateY(-2px);
}

/* --- Sidebar --- */
.sidebar-widget { 
    background: #ffffff !important; border-radius: 12px; padding: 25px; margin-bottom: 30px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #eee;
}
.sidebar-widget-title {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px;
    border-bottom: 2px solid var(--primary-color); padding-bottom: 12px; margin-bottom: 20px;
    color: #1a1a2e !important; font-weight: 800;
}

/* Sidebar Search */
.sidebar-search { display: flex; position: relative; }
.sidebar-search input {
    width: 100%; padding: 12px 45px 12px 15px; border: 2px solid #eee;
    border-radius: 8px; font-size: 0.9rem; outline: none; transition: border-color 0.3s;
    background: #fff; color: #2d2d2d;
}
.sidebar-search input:focus { border-color: var(--primary-color); }
.sidebar-search button {
    position: absolute; right: 5px; top: 5px; bottom: 5px; background: var(--primary-color);
    color: #fff; border: none; width: 35px; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.sidebar-tools-list { list-style: none; padding: 0; }
.sidebar-tools-list li { margin-bottom: 15px; }
.sidebar-tools-list a { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; font-weight: 600; color: #2d2d2d !important; }
.sidebar-tools-list a i { color: var(--primary-color); width: 20px; text-align: center; }
.sidebar-tools-list a:hover { color: var(--primary-color) !important; }

/* Recent Posts Widget */
.recent-post-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.recent-post-thumb img { border-radius: 8px; width: 65px; height: 50px; object-fit: cover; }
.recent-post-info a { font-size: 0.9rem; font-weight: 700; color: #1a1a2e; line-height: 1.3; display: block; margin-bottom: 5px; }
.recent-post-info span { font-size: 0.75rem; color: #888; display: flex; align-items: center; gap: 5px; }
.recent-post-info span i { color: var(--primary-color); }

/* Category Widget */
.cat-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px 0; border-bottom: 1px solid #f0f0f0; 
}
.cat-item:last-child { border-bottom: none; }
.cat-item a { font-size: 0.9rem; font-weight: 600; color: #2d2d2d; }
.cat-count { 
    background: #f0f0f0; color: #666; font-size: 0.75rem; 
    padding: 2px 8px; border-radius: 10px; font-weight: 700; 
}
.cat-item:hover a { color: var(--primary-color); }

/* --- Breadcrumbs --- */
.blog-breadcrumb { padding: 15px 0; background: #fff; border-bottom: 1px solid #eee; margin-bottom: 0; }
.blog-breadcrumb ol { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; font-size: 0.85rem; color: #888; }
.blog-breadcrumb li::after { content: '/'; margin-left: 10px; color: #ccc; }
.blog-breadcrumb li:last-child::after { content: none; }
.blog-breadcrumb ol { flex-wrap: wrap; } /* Ensure breadcrumbs wrap on mobile */
.blog-breadcrumb a { color: var(--primary-color); font-weight: 600; }

/* --- Footer --- */
.footer { background: #1a1a2e !important; color: #ffffff !important; padding-top: 60px; }
.footer-inner { padding-bottom: 40px; }
.footer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-section h3 { color: #ffffff !important; font-size: 1.1rem; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-section h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--primary-color); }
.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li { margin-bottom: 12px; }
.footer-section a { color: #b2bec3 !important; font-size: 0.9rem; }
.footer-section a:hover { color: #ffffff !important; padding-left: 5px; }

.footer-socials { display: flex; gap: 12px; margin-top: 20px; }
.social-icon {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; color: #fff !important; transition: all 0.3s;
}
.social-icon:hover { background: var(--primary-color); transform: translateY(-3px); }

.footer-bottom { background: rgba(0,0,0,0.2); padding: 20px 0; font-size: 0.85rem; color: #888; text-align: center; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }

/* Rank Math TOC Block */
.wp-block-rank-math-toc-block {
    background: #ffffff !important;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.wp-block-rank-math-toc-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}
.toc-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.wp-block-rank-math-toc-block h2 {
    font-size: 1.4rem;
    margin: 0 !important;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.wp-block-rank-math-toc-block h2::before {
    content: '\f0ca';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* TOC Toggle Button */
.toc-toggle-btn {
    background: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255,0,0,0.2);
}
.toc-toggle-btn:hover { background: var(--accent-color); transform: translateY(-1px); }
.toc-toggle-btn i { font-size: 0.75rem; transition: transform 0.3s; }
.toc-toggle-btn.active i { transform: rotate(180deg); }

.wp-block-rank-math-toc-block nav {
    display: none !important; /* Force hidden initially */
}
.wp-block-rank-math-toc-block.expanded nav {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wp-block-rank-math-toc-block nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wp-block-rank-math-toc-block nav ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}
.wp-block-rank-math-toc-block nav ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: all 0.3s;
}
.wp-block-rank-math-toc-block nav ul li:hover::before {
    background: var(--primary-color);
    transform: scale(1.3);
}
.wp-block-rank-math-toc-block nav ul li a {
    color: #475569;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s;
}
.wp-block-rank-math-toc-block nav ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}
.wp-block-rank-math-toc-block nav ul ul {
    margin-top: 10px;
    margin-left: 20px;
    border-left: 1px dashed #e2e8f0;
}

/* Rank Math FAQ Block */
.rank-math-list {
    margin: 40px 0;
}
.rank-math-list-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.rank-math-list-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}
.rank-math-question {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    color: var(--heading-color) !important;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.rank-math-question::before {
    content: 'Q';
    background: var(--primary-color);
    color: #fff;
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
}
.rank-math-answer {
    color: #475569 !important;
    line-height: 1.7 !important;
    font-size: 1rem !important;
    padding-left: 43px;
}
.rank-math-answer p:last-child {
    margin-bottom: 0;
}

/* Author Box */
.author-box {
    display: flex; gap: 20px; background: #ffffff !important; padding: 30px;
    border-radius: 12px; margin-top: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee; color: #2d2d2d !important;
}
.author-avatar img { width: 80px; height: 80px; border-radius: 50%; }
.author-info h4 { margin: 0 0 10px; font-size: 1.2rem; color: #1a1a2e !important; }
.author-info p { margin: 0; font-size: 0.95rem; color: #666 !important; line-height: 1.6; }

/* Post Tags */
.post-tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tags-label { font-size: 0.9rem; font-weight: 700; color: #1a1a2e; }
.post-tag { background: #f0f0f0; color: #666; padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.post-tag:hover { background: var(--primary-color); color: #fff; }

/* Post Navigation */
.post-navigation { display: flex; gap: 20px; margin-top: 50px; padding: 30px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.nav-post { flex: 1; padding: 20px; background: #fff; border: 1px solid #eee; border-radius: 10px; transition: all 0.3s; }
.nav-post:hover { border-color: var(--primary-color); transform: translateY(-3px); }
.nav-post-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 8px; }
.nav-post-title { font-size: 1rem; font-weight: 700; color: #1a1a2e; line-height: 1.4; }
.nav-post--disabled { opacity: 0.5; background: #fafafa; cursor: not-allowed; }

/* Comments Area */
.comments-area { margin-top: 60px; padding-top: 40px; border-top: 2px solid #eee; }
.comments-title { font-size: 1.5rem; margin-bottom: 30px; color: #1a1a2e; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 20px; border: 1px solid #eee; border-radius: 12px; margin-bottom: 20px; background: #fff; color: #2d2d2d; }
.comment-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.comment-author { font-weight: 700; color: var(--primary-color); }
.comment-metadata { font-size: 0.8rem; color: #888; }
.comment-content { font-size: 0.95rem; line-height: 1.6; color: #444; }
.reply { margin-top: 10px; font-weight: 700; font-size: 0.85rem; }

/* Comment Form */
#respond { margin-top: 50px; background: #f8f9fa; padding: 30px; border-radius: 12px; }
.comment-reply-title { font-size: 1.3rem; margin-bottom: 20px; display: block; color: #1a1a2e; }
.comment-form p { margin-bottom: 15px; }
.comment-form label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; color: #2d2d2d; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 0.95rem; background: #fff;
}
.submit { background: var(--primary-color); color: #fff; border: none; padding: 12px 25px; border-radius: 6px; font-weight: 700; cursor: pointer; transition: opacity 0.3s; }
.submit:hover { opacity: 0.9; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .layout-right-sidebar .blog-layout, 
    .layout-right-sidebar .single-layout,
    .layout-left-sidebar .blog-layout,
    .layout-left-sidebar .single-layout { grid-template-columns: 1fr; }
    
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .layout-no-sidebar .posts-grid { grid-template-columns: repeat(2, 1fr); }
    
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 850px) {
    .posts-grid { grid-template-columns: 1fr !important; }
    .layout-no-sidebar .posts-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
    .blog-hero { padding: 40px 0; text-align: left; }
    .blog-hero h1 { font-size: 1.8rem; }
    .blog-hero p { font-size: 1rem; margin: 0; }

    .posts-grid { grid-template-columns: 1fr !important; gap: 25px !important; }
    .layout-no-sidebar .posts-grid { grid-template-columns: 1fr !important; }
    
    .navbar .logo img { max-width: 130px; height: auto; }

    .menu-toggle { display: block; }
    .nav-links {
        display: none; flex-direction: column; width: 100%; background: #fff;
        position: absolute; top: 100%; left: 0; padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); z-index: 999;
    }
    .nav-links.active { display: flex; }
    .nav-links a { width: 100%; padding: 10px 0; border-bottom: 1px solid #eee; }
    
    .single-post-title { font-size: 1.75rem !important; line-height: 1.2; }
    
    .post-card { margin-bottom: 10px; }
    .post-card-body { padding: 20px 20px 10px !important; }
    .post-card-footer { padding: 0 20px 20px !important; }
    .post-card-title { font-size: 1.2rem !important; }
    
    .single-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
        background: #f8f9fa;
        border-radius: 12px;
        text-align: left;
    }
    .single-post-meta span {
        width: 100%;
        justify-content: flex-start;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    .single-post-meta span i { width: 20px; text-align: center; }

    .footer-content { grid-template-columns: 1fr; }
    .author-box { flex-direction: column; text-align: center; gap: 20px; padding: 25px !important; }
    .author-avatar { margin: 0 auto; }
    .author-avatar img { width: 100px; height: 100px; }
    .author-name-row { flex-direction: column; gap: 10px; }
    .post-navigation { flex-direction: column; }
    
    /* TOC Mobile Fixes */
    .wp-block-rank-math-toc-block { padding: 20px !important; }
    .wp-block-rank-math-toc-block h2 { font-size: 1.2rem !important; }
    .toc-toggle-btn { padding: 6px 12px !important; font-size: 0.75rem !important; }
}
