/* ============================================
   AutoBlog Pro - Main Stylesheet
   Optimized for: SEO, AdSense, Speed, Responsive
   ============================================ */

/* CSS Variables */
:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --accent: #457b9d;
    --text: #1a1a2e;
    --text-light: #6c757d;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --border: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.25s ease;
    --container: 1200px;
    --sidebar: 340px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.25rem;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: var(--secondary);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-social {
    display: flex;
    gap: 12px;
}

.top-bar-social a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.top-bar-social a:hover {
    color: #fff;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.site-title a {
    color: var(--secondary);
}

.site-title a:hover {
    color: var(--primary);
}

.site-logo img {
    max-height: 45px;
    width: auto;
}

/* Navigation */
.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Search */
.header-search {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form-wrapper {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

.search-form-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form-wrapper form {
    display: flex;
    gap: 8px;
}

.search-form-wrapper input[type="search"] {
    flex-grow: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
}

.search-form-wrapper button {
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
}

/* ============================================
   ADSENSE AREAS
   ============================================ */
.header-ad-area,
.footer-ad-area {
    background: var(--bg-light);
    padding: 20px 0;
    text-align: center;
}

.header-ad-area .container,
.footer-ad-area .container {
    display: flex;
    justify-content: center;
}

.sidebar-ad {
    margin: 24px 0;
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-in-article {
    margin: 32px 0;
    text-align: center;
    clear: both;
}

.ad-multiplex {
    margin: 24px 0;
    text-align: center;
    grid-column: 1 / -1;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-nav {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    font-size: 0.85rem;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-list a {
    color: var(--text-light);
}

.breadcrumb-list a:hover {
    color: var(--primary);
}

.breadcrumb-list span {
    color: var(--text);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    padding: 40px 0 20px;
}

.hero-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image {
    overflow: hidden;
    height: 100%;
}

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

.hero-post:hover .hero-image img {
    transform: scale(1.03);
}

.hero-content {
    padding: 40px 40px 40px 0;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.category-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge:hover {
    background: var(--primary-dark);
    color: #fff;
}

.hero-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
    line-height: 1.2;
}

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

.hero-title a:hover {
    color: var(--primary);
}

.hero-excerpt {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
}

.read-more:hover {
    gap: 12px;
}

/* ============================================
   POSTS SECTION & GRID
   ============================================ */
.posts-section {
    padding: 40px 0 60px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar);
    gap: 40px;
}

.content-layout-single,
.content-layout-page {
    grid-template-columns: 1fr 320px;
}

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* Post Card */
.post-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.post-card-image {
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

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

.post-card-content {
    padding: 24px;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.reading-time {
    color: var(--text-light);
}

.post-card-title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

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

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

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.read-more-link {
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post {
    background: var(--bg);
}

.post-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.post-meta {
    display: flex;
    align-items: center;
}

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

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

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.post-date-info {
    font-size: 0.85rem;
    color: var(--text-light);
}

.updated-text {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--border);
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.post-featured-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 12px;
    background: var(--bg-light);
    font-style: italic;
}

/* Post Content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 48px;
    margin-bottom: 20px;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-top: 36px;
    margin-bottom: 16px;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

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

.post-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
}

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

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.post-content th,
.post-content td {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-light);
    font-weight: 700;
}

/* Post Tags */
.post-tags {
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tags-label {
    font-weight: 700;
    margin-right: 8px;
}

.post-tags a {
    display: inline-block;
    background: var(--bg-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 4px;
    color: var(--text);
    border: 1px solid var(--border);
}

.post-tags a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Share Buttons */
.post-share {
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 700;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }

.share-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin: 40px 0;
}

.author-box-avatar {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box-name {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.author-box-name a {
    color: var(--text);
}

.author-box-bio {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Related Posts */
.related-posts {
    margin: 48px 0;
}

.related-title {
    font-size: 1.4rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.related-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.related-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-card-title {
    font-size: 1rem;
    padding: 16px;
    margin: 0;
    line-height: 1.4;
}

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

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

/* ============================================
   SIDEBAR & WIDGETS
   ============================================ */
.widget-area {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.widget {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text);
    display: flex;
    justify-content: space-between;
}

.widget ul li a:hover {
    color: var(--primary);
}

.widget_recent_entries .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================
   ARCHIVE & PAGE HEADERS
   ============================================ */
.archive-header,
.page-header {
    margin-bottom: 40px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.archive-title,
.page-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.archive-description {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.error-title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
}

.error-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.error-desc {
    color: var(--text-light);
    margin-bottom: 32px;
}

.error-home {
    margin-top: 32px;
}

.btn-primary {
    display: inline-flex;
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.4rem;
    margin-bottom: 32px;
}

.comment-list {
    list-style: none;
}

.comment-list ol {
    list-style: none;
    margin-left: 24px;
}

.comment-body {
    display: flex;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.comment-author .avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-meta {
    margin-bottom: 8px;
}

.comment-author-name {
    font-weight: 700;
    color: var(--text);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 8px;
}

.comment-content {
    font-size: 0.95rem;
}

.comment-reply-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

/* Comment Form */
.comment-form {
    margin-top: 32px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 16px;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

.comment-form input[type="submit"]:hover {
    background: var(--primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-title a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-description {
    color: rgba(255,255,255,0.7);
    margin-top: 12px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.footer-heading {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: rgba(255,255,255,0.7);
}

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

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links a {
    color: rgba(255,255,255,0.7);
}

.social-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.copyright {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .content-layout,
    .content-layout-single,
    .content-layout-page {
        grid-template-columns: 1fr;
    }

    .widget-area {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .sidebar-ad {
        grid-column: 1 / -1;
    }

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

    .hero-content {
        padding: 32px;
    }

    .hero-image {
        aspect-ratio: 16/9;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-hover);
        gap: 16px;
    }

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

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .widget-area {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .post-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form-wrapper {
        width: 280px;
        right: -20px;
    }

    .error-title {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .hero-content {
        padding: 24px;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .share-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .top-bar,
    .site-header,
    .breadcrumb-nav,
    .sidebar-ad,
    .header-ad-area,
    .footer-ad-area,
    .widget-area,
    .post-share,
    .site-footer,
    .menu-toggle,
    .search-toggle,
    .header-search {
        display: none !important;
    }

    .post-content {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    .post-featured-image img {
        max-width: 100%;
    }
}

/* ============================================
   VEHICLE REVIEW TEMPLATE STYLES
   ============================================ */

.vehicle-review .vehicle-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.vehicle-specs-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.spec-item {
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.spec-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.spec-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.spec-price .spec-value {
    color: var(--primary);
}

/* Vehicle Rating */
.vehicle-rating-bar {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    color: #fff;
    text-align: center;
}

.rating-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rating-score {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.rating-stars {
    display: flex;
    gap: 4px;
    font-size: 1.5rem;
}

.rating-stars .star {
    color: rgba(255,255,255,0.3);
}

.rating-stars .star.filled {
    color: #ffd700;
}

.rating-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Vehicle Specs Table */
.vehicle-specs-table-wrapper {
    margin: 48px 0;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.vehicle-specs-table-wrapper h2 {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.vehicle-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.vehicle-specs-table th,
.vehicle-specs-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.vehicle-specs-table th {
    width: 35%;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg);
}

.vehicle-specs-table td {
    font-weight: 700;
    color: var(--text);
}

.vehicle-specs-table tr:last-child th,
.vehicle-specs-table tr:last-child td {
    border-bottom: none;
}

.vehicle-specs-table tr:hover th,
.vehicle-specs-table tr:hover td {
    background: var(--bg);
}

/* Author Header Styles */
.author-header {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.author-profile {
    display: flex;
    align-items: center;
    gap: 24px;
}

.author-profile-avatar {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--bg);
    box-shadow: var(--shadow);
}

.author-profile-info .archive-title {
    margin-bottom: 8px;
}

.author-profile-bio {
    color: var(--text-light);
    margin: 0;
    font-size: 1rem;
}

/* Responsive for Vehicle Template */
@media (max-width: 768px) {
    .vehicle-specs-bar {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 12px;
    }

    .spec-item {
        padding: 10px;
    }

    .spec-value {
        font-size: 1rem;
    }

    .vehicle-rating-bar {
        padding: 24px;
    }

    .rating-score {
        font-size: 2.5rem;
    }

    .vehicle-specs-table-wrapper {
        padding: 20px;
        overflow-x: auto;
    }

    .vehicle-specs-table th,
    .vehicle-specs-table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .author-profile {
        flex-direction: column;
        text-align: center;
    }

    .author-profile-avatar {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .vehicle-specs-bar {
        grid-template-columns: 1fr 1fr;
    }

    .vehicle-specs-table th {
        width: 45%;
    }
}
