/* ==========================================
   BBC-Style News Layout
   ========================================== */

/* ---- Page Layout ---- */
.bbc-page {
    width: 100%;
}

.bbc-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Sections ---- */
.bbc-section {
    padding: 32px 0;
    border-bottom: 1px solid #e2e8f0;
}

.bbc-section-alt {
    background: #f5f3ef;
}

.bbc-section:nth-child(even):not(.bbc-most-read-section) {
    background: #fafaf8;
}

.bbc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    padding-left: 14px;
    border-bottom: 3px solid #d97706;
    border-left: 4px solid #b91c1c;
}

.bbc-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bbc-see-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: #d97706;
    text-decoration: none;
}

.bbc-see-all:hover {
    text-decoration: underline;
}

/* ---- Category Label ---- */
.bbc-cat-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #b91c1c;
    padding: 2px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.bbc-cat-label-sm {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #b91c1c;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

/* ---- Meta ---- */
.bbc-meta {
    font-size: 0.75rem;
    color: #78716c;
    margin-top: 4px;
}

/* ═══════════════════════════════════
   TOP STORIES — Hero Grid
   ═══════════════════════════════════ */
.bbc-top-stories {
    padding-top: 0;
    border-bottom: none;
}

.bbc-hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
}

.bbc-hero-main {
    border-right: 1px solid #e2e8f0;
    padding-right: 24px;
}

.bbc-hero-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.bbc-hero-link:hover .bbc-hero-title {
    text-decoration: underline;
}

.bbc-hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.bbc-hero-content {
    padding: 16px 0;
}

.bbc-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin: 6px 0 8px;
}

.bbc-hero-excerpt {
    font-size: 0.9rem;
    color: #57534e;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero side */
.bbc-hero-side {
    display: flex;
    flex-direction: column;
}

.bbc-side-item {
    display: flex;
    gap: 12px;
    padding: 16px 0 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    color: inherit;
    text-decoration: none;
    align-items: flex-start;
}

.bbc-side-item:last-child {
    border-bottom: none;
}

.bbc-side-item:hover .bbc-side-title {
    text-decoration: underline;
}

.bbc-side-text {
    flex: 1;
    min-width: 0;
}

.bbc-side-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    margin: 2px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbc-side-img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
}

/* ═══════════════════════════════════
   MORE STORIES — Card Grid
   ═══════════════════════════════════ */
.bbc-stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bbc-card {
    display: block;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.bbc-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.bbc-card:hover .bbc-card-title {
    text-decoration: underline;
}

.bbc-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.bbc-card-body {
    padding: 12px 14px 16px;
}

.bbc-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    margin: 4px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbc-card-excerpt {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #78716c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* ═══════════════════════════════════
   CATEGORY SECTIONS — Featured + List
   ═══════════════════════════════════ */
.bbc-cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bbc-featured-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.bbc-featured-link:hover .bbc-featured-title {
    text-decoration: underline;
}

.bbc-featured-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

.bbc-featured-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 10px 0 6px;
    line-height: 1.3;
}

.bbc-featured-excerpt {
    font-size: 0.85rem;
    color: #78716c;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Category list items */
.bbc-cat-list {
    display: flex;
    flex-direction: column;
}

.bbc-list-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    color: inherit;
    text-decoration: none;
    align-items: flex-start;
}

.bbc-list-item:first-child {
    padding-top: 0;
}

.bbc-list-item:last-child {
    border-bottom: none;
}

.bbc-list-item:hover .bbc-list-title {
    text-decoration: underline;
}

.bbc-list-text {
    flex: 1;
    min-width: 0;
}

.bbc-list-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbc-list-img {
    width: 140px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
}

/* ═══════════════════════════════════
   MOST READ — Strip
   ═══════════════════════════════════ */
.bbc-most-read-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: none;
}

.bbc-most-read-section .bbc-section-title {
    color: #fff;
    border-bottom-color: #fff;
    padding-bottom: 12px;
    border-bottom: 2px solid #d97706;
    margin-bottom: 16px;
}

.bbc-most-read-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.bbc-mr-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #334155;
    transition: background 0.15s;
}

.bbc-mr-item:hover {
    background: rgba(217, 119, 6, 0.35);
    border-radius: 4px;
}

.bbc-mr-item:hover .bbc-mr-title {
    text-decoration: underline;
    color: #d97706;
}

.bbc-mr-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: #d97706;
    line-height: 1;
    min-width: 28px;
    flex-shrink: 0;
}

.bbc-mr-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════
   NO IMAGE PLACEHOLDER
   ═══════════════════════════════════ */
.bbc-no-img {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
}

/* ═══════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════ */
.bbc-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.bbc-empty h2 {
    font-size: 1.5rem;
    color: #475569;
    margin-bottom: 8px;
}

/* ═══════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 1024px) {
    .bbc-hero-grid {
        grid-template-columns: 1fr;
    }

    .bbc-hero-main {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 16px;
    }

    .bbc-hero-side {
        margin-top: 0;
    }

    .bbc-side-item {
        padding-left: 0;
    }

    .bbc-cat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bbc-stories-grid {
        grid-template-columns: 1fr;
    }

    .bbc-hero-title {
        font-size: 1.3rem;
    }

    .bbc-most-read-grid {
        grid-template-columns: 1fr;
    }

    .bbc-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bbc-side-img {
        width: 100px;
        height: 66px;
    }

    .bbc-list-img {
        width: 100px;
        height: 66px;
    }
}

/* Dark theme removed — site does not have full dark mode support.
   The partial dark mode was making text invisible in browsers (like Opera)
   that detect prefers-color-scheme: dark, since it changed text to light
   colors but the page background remained white. */


/* Hide old layout elements */
.news-grid,
.main-col,
.news-sidebar,
.date-stripe,
.hero,
.cat-section,
.sidebar-block,
#hero,
#most-read-list,
#latest-feed {
    display: none;
}