/*
Theme Name: Hard News WP
Theme URI: https://hardnews.in
Author: Hard News Team
Author URI: https://hardnews.in
Description: A custom WordPress theme optimized for a professional 'hard news' publishing platform, featuring a YouTube-style grid and horizontal carousel.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hardnews
Tags: blog, news, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, flexible-header, translation-ready
*/

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Google Sans', 'Noto Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.grid-item a:hover .grid-title,
.carousel-card a:hover .carousel-title {
    text-decoration: underline;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    padding: 24px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 32px;
}

.site-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    border-bottom: 2px solid #000;
    display: inline-block;
    padding-bottom: 4px;
}

/* Header Search */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 99px;
    padding: 4px 4px 4px 16px;
    border: 1px solid #eaeaea;
    transition: border-color 0.2s ease;
}

.search-form:focus-within {
    border-color: #000;
    background: #fff;
}

.search-field {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    width: 200px;
    font-family: inherit;
}

.search-submit {
    background: #e60000;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-submit:hover {
    background: #cc0000;
}

/* Category Hero */
.category-hero {
    background: #000;
    color: #fff;
    padding: 64px 0;
    margin-bottom: 32px;
    text-align: center;
    border-bottom: 4px solid #e60000;
}

.category-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.category-count {
    font-size: 1.125rem;
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Category Pills */
.category-pills {
    margin-bottom: 48px;
}

.category-pills ul {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-pills a {
    display: block;
    padding: 8px 20px;
    background: #f5f5f5;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #000;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-pills a:hover,
.category-pills .current-cat a {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Featured Category Post */
.featured-category-post {
    margin-bottom: 48px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 48px;
}

.featured-category-post a {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .featured-category-post a {
        grid-template-columns: 2fr 1fr;
        align-items: center;
    }
}

.featured-category-post .featured-image {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
}

.featured-category-post .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-category-post:hover .featured-image img {
    transform: scale(1.02);
}

.featured-category-post .featured-title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 16px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.featured-category-post .featured-excerpt {
    font-size: 1.125rem;
    color: #444;
    margin-bottom: 24px;
}

/* Search Results Header */
.search-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid #000;
}

.search-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.search-title span {
    color: #e60000;
}

.search-count {
    color: #666;
    font-weight: 500;
}

/* Video Embeds */
.responsive-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
}

.responsive-video-container iframe,
.responsive-video-container object,
.responsive-video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-image {
    position: relative;
}

.play-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.play-badge.large-badge {
    width: 64px;
    height: 64px;
    bottom: 24px;
    right: 24px;
}

/* Trending Widget */
.trending-widget {
    margin-bottom: 48px;
}

.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #eaeaea;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-rank {
    font-size: 2rem;
    font-weight: 900;
    color: #ccc;
    line-height: 1;
    min-width: 32px;
}

.trending-rank.top-rank {
    color: #e60000;
}

.trending-info {
    flex: 1;
}

.trending-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 4px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.trending-item a:hover .trending-title {
    color: #e60000;
}

.trending-meta {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
}

.mt-48 {
    margin-top: 48px;
}

/* Main News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 32px 24px;
    margin-bottom: 64px;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.grid-item {
    display: flex;
    flex-direction: column;
}

/* Full-card clickable link — makes title, image, and meta all open the post */
.grid-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.grid-card-link:hover .grid-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.grid-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    background-color: #f5f5f5;
}

.grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-image img {
    transform: scale(1.05);
}

.grid-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.grid-title {
    font-size: 1.125rem;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-excerpt {
    font-size: 0.875rem;
    color: #333;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-excerpt p {
    margin: 0;
}

.grid-meta {
    margin-top: auto;
    font-size: 0.75rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.grid-meta .author {
    color: #000;
}

.grid-meta .dot::before {
    content: "•";
    margin: 0 4px;
}

/* Single Post Layout */
.single-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

@media (min-width: 1024px) {
    .single-layout {
        grid-template-columns: 1fr 400px;
    }
}

/* Single Header & Meta */
.single-header {
    margin-bottom: 32px;
}

.single-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.single-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-meta .author {
    color: #000;
    font-weight: 600;
}

/* Social Share */
.social-share {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.social-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    color: #000;
    transition: all 0.2s ease;
}

.social-share a:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.social-share svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}

/* Single Content */
.single-featured-image {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.single-content {
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: #1a1a1a;
    text-shadow: 0 0 1px rgba(0,0,0,0.05);
}

.single-content p {
    margin-bottom: 2em;
    font-size: 1.125rem; /* 18px */
    line-height: 1.9;
    color: #222;
}

.single-content h2 {
    font-size: 2rem;
    margin-top: 2.5em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.single-content h3 {
    font-size: 1.75rem;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.single-content img {
    border-radius: 8px;
    margin: 2.5em 0;
    max-width: 100%;
    height: auto;
}

.single-content blockquote {
    border-left: 4px solid #000;
    padding-left: 1.25em;
    font-style: italic;
    margin: 2.5em 0;
    color: #444;
    font-size: 1.35rem;
    line-height: 1.7;
}

.single-content ul, .single-content ol {
    margin-bottom: 2em;
    padding-left: 1.5em;
    font-size: 1.125rem; /* 18px */
    line-height: 1.9;
    color: #222;
}

.single-content li {
    margin-bottom: 0.5em;
}

/* Sidebar & Sticky */
.single-sidebar {
    display: none; /* Hide on mobile */
}

@media (min-width: 1024px) {
    .single-sidebar {
        display: block;
    }
}

.sticky-sidebar {
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding-bottom: 32px;
}

/* Hide scrollbar for cleaner look */
.sticky-sidebar::-webkit-scrollbar {
    width: 4px;
}
.sticky-sidebar::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.sidebar-title {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 24px;
}

/* Newsletter Widget */
.newsletter-desc {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-form input:focus {
    border-color: #000;
}

.btn-subscribe {
    background: #e60000;
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-subscribe:hover {
    background: #cc0000;
}

/* Social Widget */
.social-icons-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    transition: all 0.2s ease;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-2px);
}

.social-icon.facebook:hover { background: #1877F2; }
.social-icon.twitter:hover { background: #000000; }
.social-icon.instagram:hover { background: #E4405F; }
.social-icon.youtube:hover { background: #FF0000; }

.related-article-item {
    margin-bottom: 24px;
}

.related-article-item:last-child {
    margin-bottom: 0;
}

.related-article-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease;
}

.related-article-link:hover {
    transform: translateY(-4px);
}

.related-thumbnail {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-article-link:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-info {
    display: flex;
    flex-direction: column;
}

.related-title {
    font-size: 1.125rem;
    line-height: 1.4;
    margin-bottom: 6px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.related-article-link:hover .related-title {
    color: #e60000;
}

.related-meta {
    font-size: 0.75rem;
    color: #606060;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: #000;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: #ccc;
}

.breadcrumbs .current {
    color: #666;
}

/* Tags */
.post-tags {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #eaeaea;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.tags-label {
    font-weight: 800;
    font-size: 0.875rem;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-tags a {
    background: #fff;
    color: #000;
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #000;
    transition: all 0.2s ease;
}

.post-tags a:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Author Box */
.author-box {
    margin-top: 48px;
    padding: 32px;
    background: #f9f9f9;
    border-radius: 16px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    border: 1px solid #eaeaea;
}

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.author-desc {
    font-size: 0.95rem;
    color: #4a4a4a;
    margin-bottom: 12px;
    line-height: 1.6;
}

.author-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #000;
}

.author-link:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 48px 0;
    width: 100%;
}

.pagination-wrapper .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pagination-wrapper .page-numbers:hover {
    background: #e5e5e5;
}

.pagination-wrapper .page-numbers.current {
    background: #000;
    color: #fff;
    border-color: #000;
}

.pagination-wrapper .dots {
    background: transparent;
    color: #666;
}

/* Post Navigation */
.post-navigation {
    margin-top: 64px;
    border-top: none;
    padding-top: 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.nav-previous, .nav-next {
    flex: 1;
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-previous a, .nav-next a {
    display: block;
    padding: 24px;
    height: 100%;
}

.nav-previous:hover, .nav-next:hover {
    background: #fff;
    border-color: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.nav-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin-bottom: 12px;
    font-weight: 700;
}

.nav-next .nav-subtitle {
    justify-content: flex-end;
}

.nav-title {
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.4;
    color: #000;
    display: block;
}

/* Ad Containers */
.ad-container {
    margin: 32px 0;
    text-align: center;
}

.responsive-ad-container.placeholder {
    background: #f9f9f9;
    padding: 20px;
    border: 1px dashed #ccc;
    color: #999;
    font-size: 14px;
    margin: 32px 0;
    text-align: center;
    border-radius: 8px;
}

.sidebar-placeholder {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comments Area */
.comments-area {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 2px solid #000;
}

.comments-title, .comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.comment-body {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eaeaea;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-meta {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 12px;
}

.comment-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.reply {
    margin-top: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Comment Form Styles */
.comment-respond {
    margin-top: 48px;
    background: #f9f9f9;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 24px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    outline: none;
    border-color: #000;
}

.submit-button {
    background: #000;
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.submit-button:hover {
    background: #333;
}

.related-date {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
}

/* Footer */
.site-footer {
    background: #000;
    color: #fff;
    padding: 64px 0 24px;
    margin-top: 64px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.footer-info {
    max-width: 400px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #fff;
}

.footer-desc {
    color: #aaa;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer-menu {
        flex-direction: row;
        gap: 32px;
    }
}

.footer-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.footer-menu a:hover {
    color: #e60000;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        text-align: left;
    }
}

.copyright {
    color: #666;
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HARDNEWS — NEW FEATURE CSS
   Added: sticky header, primary nav, mobile hamburger, category badges,
          load more button, OG/meta support, 404 page, author archive,
          page.php, newsletter feedback, lazy-load fade-in
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sticky Header ─────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    transition: box-shadow 0.25s ease;
}
.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,.12);
}
.header-spacer {
    /* compensates for sticky height so first content isn't hidden */
    height: 0;
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.site-logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Primary Navigation Bar ────────────────────────────────────────────── */
.primary-nav {
    background: #111;
    border-top: 1px solid #222;
}
.primary-nav .container {
    display: flex;
    align-items: center;
}
.primary-menu-list,
.primary-menu-fallback {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.primary-menu-list li a,
.primary-menu-fallback li a {
    display: block;
    padding: 10px 16px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.primary-menu-list li a:hover,
.primary-menu-list li.current-menu-item > a,
.primary-menu-fallback li a:hover {
    background: var(--cat-color, #e60000);
    color: #fff;
}
/* Dropdown sub-menus */
.primary-menu-list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    min-width: 200px;
    list-style: none;
    padding: 4px 0;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.primary-menu-list li {
    position: relative;
}
.primary-menu-list li:hover > .sub-menu {
    display: block;
}
.primary-menu-list .sub-menu li a {
    padding: 8px 18px;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid #2a2a2a;
}

/* ── Hamburger Button (mobile) ─────────────────────────────────────────── */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.menu-toggle:hover { border-color: #999; }
.hamburger-bar {
    display: block;
    height: 2px;
    background: #222;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav collapse */
@media (max-width: 767px) {
    .menu-toggle { display: flex; }
    .primary-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .primary-nav.nav-open { max-height: 600px; }
    .primary-menu-list,
    .primary-menu-fallback { flex-direction: column; }
    .primary-menu-list li a,
    .primary-menu-fallback li a { padding: 12px 18px; border-bottom: 1px solid #2a2a2a; }
    .primary-menu-list .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: #222;
        padding-left: 16px;
    }
    .primary-menu-list li.focus > .sub-menu,
    .primary-menu-list li:focus-within > .sub-menu { display: block; }
}

/* ── Category Colour Badge ──────────────────────────────────────────────── */
.cat-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff !important;
    text-decoration: none;
    margin-bottom: 6px;
    transition: opacity 0.15s;
}
.cat-badge:hover { opacity: 0.85; }

/* Category hero bar uses the CSS custom property --cat-color */
.category-hero {
    background: var(--cat-color, #e60000);
    color: #fff;
    padding: 32px 0;
    margin-bottom: 32px;
}
.category-title  { color: #fff; font-size: 2rem; font-weight: 900; }
.category-count  { color: rgba(255,255,255,.8); margin-top: 6px; }

/* ── Load More Button ───────────────────────────────────────────────────── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 40px 0 24px;
}
.load-more-btn {
    padding: 13px 40px;
    background: var(--cat-color, #e60000);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.load-more-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.load-more-btn:disabled { background: #ccc; cursor: not-allowed; }
.load-more-btn.no-more  { background: #888; }

/* Fade-in for AJAX-loaded items */
.grid-item { opacity: 1; transition: opacity 0.3s ease; }
.grid-item:not(.loaded) { opacity: 0; animation: fadeInCard 0.4s ease forwards; }
@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 404 Page ───────────────────────────────────────────────────────────── */
.error-404-wrap {
    text-align: center;
    padding: 80px 24px;
    max-width: 560px;
    margin: 0 auto;
}
.error-404-number {
    font-size: 8rem;
    font-weight: 900;
    color: var(--cat-color, #e60000);
    line-height: 1;
    margin-bottom: 16px;
}
.error-404-title { font-size: 2rem; margin-bottom: 16px; }
.error-404-desc  { color: #666; margin-bottom: 32px; line-height: 1.6; }
.btn-home {
    display: inline-block;
    padding: 12px 28px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 32px;
    transition: background 0.2s;
}
.btn-home:hover { background: var(--cat-color, #e60000); }
.error-search { max-width: 340px; margin: 0 auto; }

/* ── Author Archive ─────────────────────────────────────────────────────── */
.author-archive-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 40px 0 32px;
    border-bottom: 2px solid #eee;
    margin-bottom: 32px;
}
.author-archive-avatar img { border-radius: 50%; }
.author-archive-name  { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
.author-archive-bio   { color: #555; line-height: 1.6; margin-bottom: 8px; }
.author-archive-count { font-size: 0.85rem; color: #999; }

/* ── page.php layout ────────────────────────────────────────────────────── */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 40px 0;
}
.page-header  { margin-bottom: 24px; }
.page-title   { font-size: 2rem; font-weight: 900; }
.page-body    { line-height: 1.8; }
.page-body p  { margin-bottom: 1.2em; }
@media (max-width: 900px) {
    .page-layout { grid-template-columns: 1fr; }
}

/* ── Newsletter feedback message ─────────────────────────────────────────── */
.newsletter-msg {
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 1.2em;
    font-weight: 600;
}
