/*
Theme Name: Moto Cilindrada Pista
Theme URI: https://motocilindrada.com/
Author: Antigravity
Author URI: https://motocilindrada.com/
Description: Racing-plate identity for Moto Cilindrada — near-white ground, black structural blocks, racing red + yellow accents, italic condensed display type. A tougher, motorsport-plate take on the site.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: motocilindrada-pista
*/

/* --- DESIGN SYSTEM & CSS VARIABLES (PISTA) --- */
:root {
    --bg-primary: #f4f4f2;
    --bg-secondary: transparent;
    --bg-tertiary: #ffffff;
    --accent: #121210;
    --accent-rgb: 18, 18, 16;
    --accent-hover: #d0102a;
    --racing-yellow: #ffd400;
    --text-primary: #121210;
    --text-secondary: #3d3d38;
    --text-muted: #6a6a66;
    --border-color: #dcdcd6;
    --border-hover: #121210;
    --shadow: none;
    --shadow-hover: none;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Consolas", "SFMono-Regular", Menlo, monospace;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 0;
    --border-radius-sm: 0;
    --border-radius-lg: 0;
}

/* --- PISTA DISPLAY TYPE: italic condensed headings for editorial titles --- */
.hero-title,
.post-main-title,
.card-title,
.related-posts-title {
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* --- CHECKERED ACCENT STRIP --- */
.checker-strip {
    height: 8px;
    background-image: repeating-conic-gradient(var(--text-primary) 0% 25%, transparent 0% 50%);
    background-size: 16px 16px;
}

/* --- RESET & BASIC STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

/* --- STRUCTURE --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 48px 0;
}

/* --- HEADER / NAVIGATION (PISTA: black structural block) --- */
.site-header {
    background: var(--text-primary);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    height: auto;
    gap: 20px;
}

.site-logo {
    display: block;
    margin-bottom: 0;
}

.site-logo-img {
    max-height: 64px;
    width: auto;
    display: block;
    background: #f4f4f2;
    padding: 4px 8px;
}

.site-navigation {
    display: block;
    border: none;
    background: transparent;
}

.nav-menu {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-menu a {
    color: #cfcfcf;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: var(--racing-yellow);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #f4f4f2;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-nav-toggle .icon-close {
    display: none;
}

.mobile-nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.mobile-nav-toggle[aria-expanded="true"] .icon-close {
    display: inline-flex;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 0;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        margin-bottom: 0;
    }

    .site-navigation {
        display: block;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
    }

    .nav-menu {
        display: none;
        /* Will be toggled with JS */
        flex-direction: column;
        background: var(--text-primary);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid #2a2a26;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        width: 100%;
    }

    .nav-menu.active {
        display: flex;
    }

    .header-search-form {
        order: 3;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .header-search-field {
        width: 100%;
    }
}

/* --- HERO SECTION --- */
.hero {
    padding: 64px 0;
    background: radial-gradient(circle at top right, rgba(208, 16, 42, 0.08), transparent 45%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.hero-tag {
    display: inline-block;
    background: rgba(208, 16, 42, 0.15);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.hero-search form {
    display: flex;
    gap: 12px;
    max-width: 450px;
}

.hero-search input[type="search"] {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.hero-search input[type="search"]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 10px rgba(208, 16, 42, 0.2);
}

.btn-primary {
    background: var(--accent-hover);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(208, 16, 42, 0.4);
}

/* --- HOME HERO WRAPPER --- */
.home-hero {
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0 32px;
    margin-bottom: 48px;
}


/* --- SCROLL REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- CATEGORIES PILLS --- */
.categories-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-pill {
    background: transparent;
    border: 1px solid #0f172a;
    padding: 8px 16px;
    border-radius: 0;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: none;
}

/* --- POSTS GRID --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    height: 100%;
    padding-bottom: 20px;
}

.post-card:hover {
    transform: translateY(-4px);
    border-bottom-color: var(--accent-hover);
}

.post-card:hover .card-image-wrapper {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #1a1c23;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card-image-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1b1d22, #0a0b0d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b4f58;
}

.card-image-fallback--large {
    background: linear-gradient(135deg, #1b1d22, #0a0b0d);
}

.featured-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-hover);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.post-card:hover .card-image-wrapper img {
    transform: scale(1.06);
}

.card-category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 0.75rem;
    font-weight: 800;
    font-style: italic;
    padding: 6px 14px;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    transform: skewX(-8deg);
}

.card-category-badge--featured {
    top: 24px;
    left: 24px;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
}

.card-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--text-primary);
}

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

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-readmore {
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
}

.card-readmore svg {
    transition: var(--transition);
}

.post-card:hover .card-readmore svg {
    transform: translateX(4px);
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 48px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    font-weight: 800;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.pagination .current {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
}

.pagination a:hover {
    background: var(--racing-yellow);
    border-color: var(--racing-yellow);
    color: var(--text-primary);
}

/* --- SINGLE POST --- */
.post-header {
    margin-bottom: 40px;
    text-align: center;
}

.post-header .hero-tag {
    margin-bottom: 16px;
}

.post-main-title {
    font-size: 2.8rem;
    max-width: 800px;
    margin: 0 auto 20px;
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    .post-main-title {
        font-size: 2.1rem;
    }
}

.post-header-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-featured-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 48px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.post-featured-image img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

.post-content-wrapper {
    max-width: 760px;
    margin: 0 auto;
}

.post-content {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content h2,
.post-content h3 {
    color: var(--text-primary);
    margin: 40px 0 20px;
}

.post-content h2 {
    font-size: 1.8rem;
}

.post-content h3 {
    font-size: 1.4rem;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    background: var(--bg-secondary);
    padding: 24px;
    margin: 32px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    color: var(--text-primary);
}

.post-content blockquote p {
    margin-bottom: 0;
}

.post-content figure {
    margin: 32px 0;
    text-align: center;
}

.post-content figure img {
    margin: 0 auto;
    border: 1px solid var(--border-color);
    max-width: 100%;
    height: auto;
}

.post-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* --- FOOTER --- */
.site-footer {
    background: var(--bg-tertiary);
    border-top: 3px solid var(--accent-hover);
    padding: 64px 0 32px;
}

.footer-brand-mark {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.footer-brand h3 {
    font-size: 1.4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.footer-widget h3 {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 8px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.footer-widget p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-widget ul a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input[type="email"] {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--accent);
    outline: none;
}

.footer-bottom {
    border-top: none;
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-socials-bottom {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-social-link {
    color: var(--text-secondary);
    display: flex;
}

.footer-socials-bottom a svg {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-socials-bottom a:hover svg {
    color: var(--accent-hover);
    transform: translateY(-2.5px);
}

.footer-bottom a {
    color: var(--text-muted);
}

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

/* --- NEWS PORTAL LAYOUT & SIDEBAR --- */
.news-portal-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
}

@media (max-width: 992px) {
    .news-portal-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

/* Breaking News Bar */
.breaking-news-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.breaking-news-badge {
    background: #0f172a;
    color: #fff;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breaking-news-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.breaking-news-title a {
    color: var(--text-primary);
}

.breaking-news-title a:hover {
    color: var(--accent-hover);
}

/* Sidebar Widgets */
.site-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sidebar-widget {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.sidebar-widget .widget-title {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: none;
}

/* Trending List Hover States */
.trending-list li h4 a:hover {
    color: var(--accent-hover) !important;
}

/* --- COMMENTS SECTION --- */
.comments-area {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-hover);
}

.comment-list,
.commentlist {
    list-style: none;
    margin: 0 0 48px 0;
    padding: 0;
}

/* Individual Comment Card */
.comment-list .comment,
.commentlist .comment {
    margin-bottom: 24px;
}

.comment-list .comment-body,
.commentlist .comment-body {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 24px;
    position: relative;
    transition: var(--transition);
}

.comment-list .comment-body:hover,
.commentlist .comment-body:hover {
    border-color: var(--text-muted);
}

/* Threaded comments indentation */
.comment-list .children,
.commentlist .children {
    list-style: none;
    margin: 16px 0 0 40px;
    padding: 0;
}

@media (max-width: 576px) {

    .comment-list .children,
    .commentlist .children {
        margin-left: 20px;
    }
}

/* Comment Meta & Author */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.comment-body:hover .comment-author .avatar {
    border-color: var(--accent-hover);
}

.comment-author .fn {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-style: normal;
}

.comment-author .says {
    display: none;
    /* Hide the default "diz:" */
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-metadata a {
    color: var(--text-muted);
}

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

/* Edit link style */
.comment-edit-link {
    margin-left: 12px;
    font-size: 0.8rem;
    color: var(--accent-hover);
}

/* Comment Content */
.comment-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Moderation Warning */
.comment-awaiting-moderation {
    font-size: 0.85rem;
    font-style: italic;
    color: #b45309;
    /* warm brown/orange for warnings */
    background: #fef3c7;
    padding: 8px 12px;
    border-left: 3px solid #f59e0b;
    margin-bottom: 16px;
    display: inline-block;
}

/* Reply Link Button */
.comment-body .reply {
    text-align: right;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: var(--accent);
    color: #ffffff !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.comment-reply-link:hover {
    background: var(--accent-hover);
}

/* --- COMMENT RESPOND (FORM) --- */
.comment-respond {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 32px;
    margin-top: 40px;
}

.comment-reply-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cancel-comment-reply-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #ef4444;
    text-decoration: underline;
}

#cancel-comment-reply-link:hover {
    color: #b91c1c;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-notes,
.logged-in-as {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.logged-in-as a {
    color: var(--accent-hover);
}

/* Fields labels and inputs */
.comment-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.comment-form label .required {
    color: var(--accent-hover);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    background: #ffffff;
    border-color: var(--accent-hover);
    outline: none;
    box-shadow: 0 0 0 3px rgba(208, 16, 42, 0.1);
}

/* Grid layout for name, email and website fields */
.comment-form-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .comment-form-fields-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Cookies consent checkbox alignment */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--accent-hover);
    cursor: pointer;
}

.comment-form-cookies-consent label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    cursor: pointer;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Submit Button Custom Styling */
.comment-form .form-submit {
    margin-top: 8px;
    margin-bottom: 0;
}

.comment-form .btn-primary,
.comment-form input[type="submit"] {
    background: var(--accent);
    color: #ffffff !important;
    border: none;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

/* --- ACCESSIBILITY: SKIP LINK & SCREEN READER TEXT --- */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link.screen-reader-text:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    clip: auto;
    z-index: 10000;
    background: var(--accent);
    color: #fff;
    padding: 12px 20px;
    font-weight: 700;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.mobile-nav-toggle:focus-visible {
    outline: 3px solid var(--accent-hover);
    outline-offset: 2px;
}

/* --- HEADER SEARCH --- */
.header-search-form {
    display: flex;
    align-items: stretch;
    margin-left: auto;
}

.header-search-field {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    width: 130px;
}

@media (max-width: 1100px) and (min-width: 769px) {
    .header-search-form {
        display: none;
    }
}

.header-search-submit {
    background: var(--accent-hover);
    color: #fff;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* --- BREADCRUMBS --- */
.breadcrumbs {
    padding: 16px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.breadcrumbs-item a {
    color: var(--text-muted);
    text-decoration: underline;
}

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

.breadcrumbs-item [aria-current="page"] {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumbs-separator {
    color: var(--border-color);
}

/* --- RELATED POSTS --- */
.related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.related-posts-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-post-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-post-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
}

.related-post-title {
    font-size: 1rem;
    line-height: 1.35;
}

.related-post-title a {
    color: var(--text-primary);
}

.related-post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- 404 PAGE --- */
.error-404-content {
    text-align: center;
    padding: 48px 0;
}

.error-404-content .search-form {
    max-width: 420px;
    margin: 24px auto;
}

.error-404-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.comment-form .btn-primary:hover,
.comment-form input[type="submit"]:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(208, 16, 42, 0.4);
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--text-primary);
    color: #f4f4f2;
    border-top: 3px solid var(--accent-hover);
    padding: 18px 24px;
}

.cookie-consent-banner[hidden] {
    display: none;
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-consent-inner p {
    margin: 0;
    font-size: 0.88rem;
    color: #d8d8d4;
    max-width: 70ch;
}

.cookie-consent-inner p a {
    color: var(--racing-yellow);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-consent-decline {
    background: transparent;
    border: 1px solid #55554e;
    color: #d8d8d4;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.cookie-consent-decline:hover {
    border-color: #f4f4f2;
    color: #f4f4f2;
}

.cookie-consent-accept.btn-primary {
    padding: 10px 22px;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}