/* =========================================
   NEWS PAGE V2 STYLES
   ========================================= */

/* --- Layout Wrapper (Sidebar Layout) --- */
.news-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    /* Main Content | Sidebar */
    gap: 3rem;
    align-items: start;
}

.news-main-column {
    min-width: 0;
    /* Prevents grid blowout */
}

/* --- Title Bar --- */
/* Ensure the bar has a background so white text is visible */
.race-title-bar {
    background-color: var(--color-primary);
    /* Force Dark Green background */
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.race-title {
    color: #fff;
    margin: 0;
    /* Reset margins if needed */
}

/* UPDATED TAGLINE STYLING */
.header-tagline {
    font-family: 'Montserrat', serif;
    /* Ensure you have this font or use sans-serif */
    font-style: italic;
    font-size: 1.1rem;
    /* Slightly larger */
    font-weight: 600;
    /* Bolder */
    color: var(--color-secondary);
    /* Gold/Yellow for high contrast */
    opacity: 1;
    /* Full opacity */
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    /* Softer border color */
    padding-left: 1.25rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    /* Shadow for lift */
}

/* =========================================
   1. FEATURED HERO CARD
   ========================================= */
.news-hero-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* Image wider than text */
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    margin-bottom: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-height: 400px;
}

.news-hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-image-wrap {
    position: relative;
    height: 100%;
    min-height: 350px;
    overflow: hidden;
}

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

.news-hero-card:hover .hero-img {
    transform: scale(1.05);
}

.hero-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-badge {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-meta {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-excerpt {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read-more {
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-top: auto;
}

.btn-read-more i {
    transition: transform 0.2s;
}

.news-hero-card:hover .btn-read-more i {
    transform: translateX(5px);
}

/* =========================================
   2. RECENT NEWS GRID
   ========================================= */
.section-divider {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.section-divider span {
    font-size: 1.25rem;
    font-weight: 800;
    color: #333;
    padding-right: 1rem;
    white-space: nowrap;
}

.section-divider::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: #f0f0f0;
}

.news-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--color-secondary);
}

.card-thumb-wrap {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-thumb {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;

    /* Clamp title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;

    /* Clamp excerpt to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

/* =========================================
   3. PAGINATION / LOAD MORE
   ========================================= */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.btn-load-more {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 71, 42, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-load-more:hover {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-load-more:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========================================
   4. SIDEBAR (ARCHIVE)
   ========================================= */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    overflow: hidden;
}

.widget-header {
    background: var(--color-primary);
    padding: 1rem 1.5rem;
}

.widget-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.widget-body {
    padding: 1.5rem;
}

.widget-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.4rem;
}

.custom-select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 0.95rem;
    cursor: pointer;
}

.custom-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Archive List Results */
.archive-results {
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.archive-item-link {
    display: block;
    padding: 0.5rem 0;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #f9f9f9;
    transition: color 0.2s;
}

.archive-item-link:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.archive-empty {
    font-size: 0.9rem;
    color: #999;
    text-align: center;
    padding: 1rem 0;
}

/* =========================================
   LOADERS & SKELETONS
   ========================================= */
.skeleton-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-image {
    height: 100%;
    min-height: 350px;
    background: #eee;
}

.skeleton-image-small {
    height: 180px;
    background: #eee;
}

.skeleton-text-block {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-line {
    height: 15px;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 5px;
}

.full-width {
    width: 100%;
}

.three-quarter-width {
    width: 75%;
}

.half-width {
    width: 50%;
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 992px) {
    .news-layout-wrapper {
        grid-template-columns: 1fr;
        /* Stack Sidebar below content */
    }

    .news-hero-card {
        grid-template-columns: 1fr;
        /* Stack Image on top of Text */
    }

    .hero-image-wrap {
        height: 250px;
        min-height: 0;
    }

    .hero-content {
        padding: 1.5rem;
    }

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

    .news-sidebar {
        margin-top: 2rem;
    }
}