/* ==========================================================================
   Bimmerhead Theme CSS
   ========================================================================== */

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.posts-grid article {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.posts-grid article:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.posts-grid .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.posts-grid .entry-title {
    font-size: 1.1rem;
    padding: 1rem 1rem 0;
}

.posts-grid .entry-meta {
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.posts-grid .entry-excerpt {
    padding: 0 1rem 1rem;
    color: var(--text-light);
}

/* Single Post */
.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.entry-meta {
    color: var(--text-light);
    font-size: 0.875rem;
}

.entry-meta span {
    margin-right: 1rem;
}

.post-thumbnail {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.entry-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Archive */
.archive-header {
    margin-bottom: 2rem;
}

.archive-title {
    font-size: 1.75rem;
}

.archive-description {
    margin-top: 0.5rem;
    color: var(--text-light);
}

/* Search */
.search-header {
    margin-bottom: 2rem;
}

.search-title {
    font-size: 1.5rem;
}

.search-title span {
    color: var(--primary-color);
}

.search-results article {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* 404 */
.error-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.error-404 h1 {
    font-size: 8rem;
    color: var(--primary-color);
    line-height: 1;
}

.error-404 h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-404 p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.error-actions {
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-author {
    font-weight: 600;
}

.comment-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.page-numbers:hover,
/* ... existing code ... */
.page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==========================================================================
   Global / Reset
   ========================================================================== */
body {
    margin: 0;
    font-family: 'Nunito', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: #f9f9f9;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #061A40;
    /* Dark Blue from header gradient */
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #B00B1E;
    /* Red from header gradient */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Nunito', sans-serif;
    color: #111;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
}

.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section[class^="section-"] {
    margin-bottom: 4rem;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.bmw-stripe {
    display: inline-block;
    width: 20px;
    height: 12px;
    background: linear-gradient(90deg, #5ABCEB 33%, #003667 33%, #003667 66%, #DF1F26 66%);
    transform: skew(-20deg);
}

/* Featured Section */
.featured-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .featured-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.featured-hero .post-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    min-height: 400px;
}

.featured-hero .post-hero .post-thumbnail {
    display: block;
    height: 100%;
}

.featured-hero .post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-hero .post-hero:hover img {
    transform: scale(1.05);
}

.post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.post-overlay .entry-title {
    color: #fff;
    font-size: 1.75rem;
    margin-top: 0.5rem;
}

.featured-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Trending Section */
.trending-hero {
    margin-bottom: 2rem;
}

.trending-hero .post-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 300px;
}

.trending-hero .post-hero img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.trending-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Latest Grid */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.latest-more {
    text-align: center;
    margin-top: 2rem;
}

.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.2s;
}

.btn-more:hover {
    background: var(--bg-light);
    border-color: var(--text-color);
}

/* Community / Newsletter */
.section-community {
    background-image: url('../images/community-bg.jpg');
    /* Ensure this image exists or is handled */
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    /* Fallback */
    color: #fff;
    padding: 4rem 2rem;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.section-community::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.community-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.community-logo {
    margin-bottom: 1.5rem;
}

.bmw-logo-large {
    /* Placeholder for the large logo icon */
    display: inline-block;
    width: 60px;
    height: 36px;
    background: linear-gradient(90deg, #5ABCEB 33%, #003667 33%, #003667 66%, #DF1F26 66%);
    transform: skew(-20deg);
}

.community-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.community-content p {
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    background: #fff;
    padding: 0.25rem;
    border-radius: 4px;
}

.newsletter-form input {
    flex: 1;
    border: none;
    padding: 0.5rem 1rem;
    outline: none;
}

/* ... existing styles ... */
.newsletter-form button {
    background: transparent;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    color: #333;
}

/* ==========================================================================
   Global Header Styles (Compiled)
   ========================================================================== */
.site-header {
    background: #0b0b0b;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header .header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-header .site-branding .logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.site-header .site-branding .logo-link .site-logo {
    max-height: 40px;
    width: auto;
}

.site-header .site-branding .logo-link .site-title-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-header .site-branding .logo-link .site-title-text .vn {
    font-weight: 300;
    color: #aaa;
}

.site-header .main-navigation .menu-toggle {
    display: none;
}

.site-header .main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.site-header .main-navigation ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.site-header .main-navigation ul li a:hover,
.site-header .main-navigation ul li.current-menu-item a {
    color: #fff;
}

.site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header .header-actions .action-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.site-header .header-actions .action-btn:hover {
    color: #ddd;
}

.site-header .header-actions .btn-subscribe {
    background: #fff;
    color: #000;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.site-header .header-actions .btn-subscribe:hover {
    background: #ddd;
}

/* ==========================================================================
   Global Footer Styles (Compiled)
   ========================================================================== */
.site-footer {
    background: #000;
    color: #fff;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    border-top: 1px solid #222;
}

.site-footer .footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (max-width: 992px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
    }
}

.site-footer .footer-col .footer-logo {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.site-footer .footer-col .footer-logo .vn {
    color: #888;
    font-weight: 300;
}

.site-footer .footer-col .footer-desc {
    color: #999;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.site-footer .footer-col .social-links {
    display: flex;
    gap: 1rem;
}

.site-footer .footer-col .social-links a {
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.site-footer .footer-col .social-links a:hover {
    opacity: 1;
}

.site-footer .footer-col .footer-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.site-footer .footer-col .footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-col .footer-menu li {
    margin-bottom: 0.75rem;
}

.site-footer .footer-col .footer-menu li a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer .footer-col .footer-menu li a:hover {
    color: #fff;
}

.site-footer .site-info {
    border-top: 1px solid #222;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .site-footer .site-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.site-footer .site-info .footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.site-footer .site-info .footer-bottom-links a {
    color: #666;
    text-decoration: none;
}

.site-footer .site-info .footer-bottom-links a:hover {
    color: #fff;
}


/* ==========================================================================
   News Header Styles
   ========================================================================== */

.news-header {
    background: linear-gradient(135deg, #061A40 0%, #B00B1E 100%);
    color: #fff;
    padding: 4rem 1rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.news-header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.news-header h1.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bmw-logo-small {
    /* Small M stripe logo */
    display: inline-block;
    width: 30px;
    height: 18px;
    background: linear-gradient(90deg, #5ABCEB 33%, #003667 33%, #003667 66%, #DF1F26 66%);
    transform: skew(-20deg);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.news-search-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-search-form {
    display: flex;
    margin-bottom: 1rem;
}

.header-search-form .search-field {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.header-search-form .search-submit {
    background: #fff;
    border: none;
    border-left: 1px solid #ddd;
    padding: 0 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.header-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}