/* ==========================================================================
   News Detail Page Styles (news-detail.css)
   ========================================================================== */

/* --- Layout --- */
.race-title-bar {
    margin-bottom: 2rem;
}

/* Back Button */
.btn-quick-link {
    background-color: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* --- Main Card --- */
.news-detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
    padding: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Article Header --- */
.featured-article-img-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    background-color: #f9f9f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.featured-article__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* --- Article Body --- */
.featured-article__body {
    max-width: 850px;
    margin: 0 auto;
}

.featured-article__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.featured-article__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.featured-article__date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.featured-article__author {
    font-weight: 700;
    color: var(--color-primary);
}

/* --- Share Section (UPDATED POSITION) --- */
.share-section {
    margin-bottom: 2.5rem;
    /* Space before content */
    padding-bottom: 1.5rem;
    /* Internal breathing room */
    border-bottom: 1px solid #eee;
    /* Separator line */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #555;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #555;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.share-btn.copied {
    background-color: var(--color-green);
    color: white;
}

/* --- Content Typography --- */
.featured-article__content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 4rem;
    font-family: 'Roboto', sans-serif;
}

.featured-article__content p {
    margin-bottom: 1.5rem;
}

.featured-article__content h2,
.featured-article__content h3 {
    color: var(--color-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.featured-article__content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0 auto;
    /* Removed top/bottom margin as figure handles it */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Captions (Figure/Figcaption) --- */
.featured-article__content figure {
    margin: 2.5rem 0;
    text-align: center;
}

.featured-article__content figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    padding: 0 1rem;
}

/* Featured Image Caption */
.featured-article__caption {
    margin-top: 1rem;
    font-size: 1rem;
    color: #555;
    font-style: italic;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    display: block;
}

.featured-article__content blockquote {
    border-left: 4px solid var(--color-secondary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background: #fcfcfc;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* =========================================
   MORE NEWS SECTION
   ========================================= */
.more-news-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #f5f5f5;
}

.section-divider {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.section-divider span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    padding-right: 1.5rem;
    white-space: nowrap;
}

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

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

/* More News Card */
.more-news-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.more-thumb-wrapper {
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

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

.more-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.more-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.more-link {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
}

/* Helpers */
.hidden {
    display: none !important;
}

/* Skeletons */
.skeleton-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-image-rect {
    width: 100%;
    height: 400px;
    background: #eee;
}

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

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

.medium-height {
    height: 40px;
}

.full-width {
    width: 100%;
}

.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%);
    }
}

@media (max-width: 768px) {
    .news-detail-card {
        padding: 1.5rem;
    }

    .featured-article__title {
        font-size: 1.8rem;
    }
}