:root {
    /* BBC-Inspired Color Palette */
    --primary-color: #D32F2F;
    --primary-dark: #B71C1C;
    --secondary-color: #121212;
    --text-color: #222222;
    --text-light: #545454;
    --bg-color: #FFFFFF;
    --bg-light: #F9F9F9;
    --border-color: #EEEEEE;
    --hover-bg: #F5F5F5;

    /* Typography - BBC Style */
    --font-primary: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-nepali: 'Khand', 'Noto Sans Devanagari', sans-serif;

    /* Grid System */
    --grid-columns: 12;
    --grid-gap: 20px;
    --container-max: 1280px;
    --primary-color-rgb: 211, 47, 47;
}

/* Base Dropdown (Shared Logic) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0;
}

/* Nav Menu specific dropdown positioning */
.nav-menu .dropdown-content {
    right: auto;
    left: 0;
    top: 100%;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333 !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: none !important;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color) !important;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-nepali,
body.nepali-mode,
body.nepali-mode h1,
body.nepali-mode h2,
body.nepali-mode h3,
body.nepali-mode h4,
body.nepali-mode h5,
body.nepali-mode h6,
body.nepali-mode p,
body.nepali-mode a,
body.nepali-mode span,
body.nepali-mode div {
    font-family: var(--font-nepali) !important;
}

.btn-toggle-cute {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
}

.btn-toggle-cute:hover {
    background: var(--primary-color);
    color: white;
}

/* Active State (Nepali) */
body.nepali-mode .btn-toggle-cute {
    background: var(--primary-color);
    color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fixed dimensions for homepage images */
.article-card img {
    width: 350px;
    max-width: 100%;
    object-fit: cover;
}

.hero-featured img {
    width: 800px;
    max-width: 100%;
    object-fit: cover;
}

.widget img {
    max-width: 100%;
    object-fit: cover;
}

/* ============================================
   CONTAINER & GRID SYSTEM
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.main-container {
    padding-top: 20px;
    padding-bottom: 40px;
}

/* Main Content Layout */
.grid {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 30px;
    align-items: flex-start;
}

/* Main content area - 66% width */
.col-8 {
    flex: 2;
    /* Grow to 2 parts */
    min-width: 0;
    /* Prevent flex overflow */
    word-wrap: break-word;
    /* Prevent text overflow */
}

/* Sidebar - 33% width */
.col-4 {
    flex: 1;
    /* Grow to 1 part */
    min-width: 280px;
    /* Minimum sidebar width */
    word-wrap: break-word;
}

@media (max-width: 900px) {
    .grid {
        flex-direction: column;
    }

    .col-8,
    .col-4 {
        width: 100%;
        flex: auto;
    }
}

/* Other grid columns (for other pages) */
.col-1 {
    width: 8.333%;
}

.col-2 {
    width: 16.666%;
}

.col-3 {
    width: 25%;
}

.col-5 {
    width: 41.666%;
}

.col-6 {
    width: 50%;
}

.col-7 {
    width: 58.333%;
}

.col-9 {
    width: 75%;
}

.col-10 {
    width: 83.333%;
}

.col-11 {
    width: 91.666%;
}

.col-12 {
    width: 100%;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo img {
    height: 55px;
    width: auto;
    display: inline-block;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.logo img:hover {
    transform: scale(1.02);
}

.logo-dark {
    display: none;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color);
    padding: 8px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ============================================
   BREAKING NEWS BANNER (BBC-Style)
   ============================================ */
.breaking-news-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 10px 0;
    border-bottom: 2px solid var(--primary-dark);
    overflow: hidden;
}

.breaking-news-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-news-label {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    white-space: nowrap;
    animation: pulse 2s ease-in-out infinite;
}

.breaking-news-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* Sidebar Scroll Animation */
.sidebar {
    position: sticky;
    top: 200px;
    animation: fadeInUp 0.6s ease;
    align-self: flex-start;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dynamic Ad Placement */
.dynamic-ad {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    border: 1px dashed var(--border-color);
}

/* Specific Ad Sizes */
.ad-leaderboard {
    width: 728px;
    height: 90px;
    max-width: 100%;
    object-fit: contain;
    /* Keeps aspect ratio */
    display: inline-block;
}

.ad-rectangle {
    width: 300px;
    height: 250px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.ad-responsive {
    width: 100%;
    max-width: 728px;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.header-ad .ad-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent spillover */
}

/* ============================================
   TYPOGRAPHY - BBC STYLE
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 16px;
    line-height: 1.7;
}

/* ============================================
   HERO SECTION (BBC-Style)
   ============================================ */
.hero-section {
    margin-bottom: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.hero-featured {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-featured img {
    width: 800px;
    max-width: 100%;
    height: 450px;
    object-fit: cover;
    opacity: 0.88;
    transition: opacity 0.3s ease;
}

.hero-featured:hover img {
    opacity: 0.7;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
}

.hero-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-radius: 2px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-summary {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.hero-meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Latest Headlines Sidebar */
.latest-headlines {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.latest-headlines h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.headline-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.headline-item:last-child {
    border-bottom: none;
}

.headline-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.headline-item:hover h4 {
    color: var(--primary-color);
}

.headline-time {
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================
   SECTION ROWS (BBC-Style Modules)
   ============================================ */
.section-row {
    margin-bottom: 48px;
}

/* Category Icons */
.cat-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.section-header:hover .cat-icon {
    transform: scale(1.2) rotate(5deg);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    display: flex;
    align-items: center;
}

.section-link {
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Article Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================
   ARTICLE CARD COMPONENT
   ============================================ */
.article-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.article-card-image {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.article-card-image img {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 4px 4px 0 0;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

/* Card scroll animation: visible by default, one-time fade-in when in view */
.article-card.card-animate-on-scroll {
    opacity: 1;
}

.article-card.card-animate-on-scroll:not(.card-animated) {
    animation: none;
}

.article-card.card-animate-on-scroll.card-animated {
    animation: cardFadeInUp 0.5s ease forwards;
}

@keyframes cardFadeInUp {
    from {
        opacity: 0.6;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Language toggle: both buttons always visible (fix Nepali disappearing in EN mode) */
.lang-toggle-nav {
    display: inline-flex !important;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 28px;
    min-width: 64px;
    overflow: visible;
}

.lang-toggle-nav .lang-btn {
    min-width: 32px;
    flex: 0 0 auto;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.lang-toggle-nav .lang-btn:last-child {
    border-right: none;
}

.lang-toggle-nav .lang-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.lang-toggle-nav .lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-toggle-nav .lang-btn-np {
    font-family: 'Noto Sans Devanagari', 'Mukta', sans-serif;
}

.article-card-content {
    padding: 16px;
}

.article-category {
    display: inline-block;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.article-summary {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 12px;
}

.article-meta {
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar {
    position: sticky;
    top: 180px;
}

.widget {
    background: var(--bg-light);
    padding: 20px;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

/* Most Read Widget */
.most-read-list {
    list-style: none;
    counter-reset: most-read-counter;
}

.most-read-item {
    counter-increment: most-read-counter;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.most-read-item:last-child {
    border-bottom: none;
}

.most-read-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 30px;
}

.most-read-number::before {
    content: counter(most-read-counter);
}

.most-read-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.most-read-content:hover h4 {
    color: var(--primary-color);
}

.most-read-time {
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================
   SEARCH BAR (Enhanced from previous)
   ============================================ */
.search-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.search-container {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================
   NEW FEATURES (TICKER & HERO LAYOUTS)
   ============================================ */
.breaking-news-ticker {
    background: #222;
    color: white;
    font-size: 14px;
    border-bottom: 1px solid #333;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--primary-color);
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    z-index: 10;
}

.ticker-content {
    flex-grow: 1;
    overflow: hidden;
    padding: 10px 0;
}

.ticker-item {
    margin-right: 40px;
    position: relative;
    display: inline-block;
}

.ticker-item::before {
    content: "•";
    color: var(--primary-color);
    margin-right: 10px;
}

.ticker-item a {
    color: white;
    text-decoration: none;
}

.ticker-item a:hover {
    text-decoration: underline;
}

/* 2. Modern Grid Hero (1 Big, 2 Small) */
.hero-modern-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    background: #fff;
}

@media (max-width: 768px) {
    .hero-modern-grid {
        grid-template-columns: 1fr;
    }
}

.hero-main-card {
    position: relative;
}

.hero-side-cards {
    display: flex;
    flex-direction: column;
}

.hero-sub-card {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.hero-sub-card img {
    transition: transform 0.3s;
}

.hero-sub-card:hover img {
    transform: scale(1.05);
}

/* 3. Full Overlay Hero */
.hero-full-overlay {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-top: -20px;
}

.hero-full-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.9));
}

.hero-content-bottom {
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
    color: white;
    max-width: 800px;
}

.hero-content-bottom h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content-bottom a {
    color: white;
}

.hero-cat-tag {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 15px;
}

/* 4. UTILITY HELPERS (Tailwind-like) */
.block {
    display: block;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.flex {
    display: flex;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.h-96 {
    height: 24rem;
}

.w-32 {
    width: 8rem;
}

.h-24 {
    height: 6rem;
}

.object-cover {
    object-fit: cover;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-b-lg {
    border-radius: 0 0 0.5rem 0.5rem;
}

.rounded {
    border-radius: 0.25rem;
}

.text-white {
    color: white !important;
}

.text-gray-200 {
    color: #e5e7eb;
}

.text-gray-500 {
    color: #6b7280;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.uppercase {
    text-transform: uppercase;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.pt-4 {
    padding-top: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.border-t {
    border-top: 1px solid #e5e7eb;
}

.border-b {
    border-bottom: 1px solid #e5e7eb;
}

.border-gray-100 {
    border-color: #f3f4f6;
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-gradient-to-t {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group:hover .group-hover\:text-primary {
    color: var(--primary-color);
}

.group:hover .group-hover\:text-primary-light {
    color: #ff6b6b;
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.search-form input {
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    width: 200px;
    transition: width 0.3s ease;
}

.search-form input:focus {
    width: 250px;
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.search-dropdown.active {
    display: block;
    animation: slideDown 0.3s ease;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 4px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    /* Adjust main grid for tablets */
    .col-8 {
        flex: 0 0 calc(60% - 15px);
        max-width: calc(60% - 15px);
    }

    .col-4 {
        flex: 0 0 calc(40% - 15px);
        max-width: calc(40% - 15px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Stack layout vertically on mobile */
    .grid {
        flex-direction: column;
        gap: 20px;
    }

    .col-8,
    .col-4 {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 100%;
    }

    .top-bar {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .logo img {
        height: 45px;
    }

    .main-nav {
        flex-direction: column;
        gap: 15px;
    }

    /* Dynamic Theme Backgrounds */
    body {
        background-color: var(--body-bg, #ffffff) !important;
    }

    header,
    .site-header {
        background-color: var(--header-bg, #ffffff) !important;
    }

    footer {
        background-color: var(--footer-bg, #111827) !important;
        color: white !important;
    }

    footer a {
        color: rgba(255, 255, 255, 0.8);
    }

    footer a:hover {
        color: white;
    }

    .nav-menu {
        overflow-x: auto;
        white-space: nowrap;
        gap: 16px;
        width: 100%;
        justify-content: flex-start;
    }

    .search-wrapper {
        width: 100%;
        margin-left: 0;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        width: 100%;
        flex: 1;
    }

    .hero-featured img {
        height: 280px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    /* Breaking News Mobile */
    .breaking-news-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .breaking-news-label {
        width: 100%;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CATEGORY PAGE LAYOUTS
   ============================================ */

/* 1. Card Grid */
.cat-layout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.cat-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cat-card-img {
    overflow: hidden;
    background: #f0f0f0;
}

.cat-card-img img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cat-card:hover .cat-card-img img {
    transform: scale(1.05);
}

.cat-card-body {
    padding: 16px;
}

.cat-card-body .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
}

.cat-card-body p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* 2. List View */
.cat-layout-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cat-list-item {
    display: flex;
    gap: 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow 0.2s ease;
}

.cat-list-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cat-list-img {
    flex: 0 0 200px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.cat-list-img img {
    width: 200px;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cat-list-item:hover .cat-list-img img {
    transform: scale(1.05);
}

.cat-list-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cat-list-body .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 6px 0 8px;
}

.cat-list-body p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* 3. Magazine Layout */
.cat-layout-magazine {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cat-mag-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.cat-mag-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cat-mag-hero:hover img {
    transform: scale(1.03);
}

.cat-mag-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
}

.cat-mag-hero-overlay .card-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 8px 0;
    color: #fff;
}

.cat-mag-hero-overlay .card-meta {
    color: rgba(255, 255, 255, 0.7);
}

.cat-mag-hero-overlay p {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
    font-size: 0.95rem;
}

.cat-mag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.cat-mag-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-mag-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.cat-mag-card-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.cat-mag-card-body {
    padding: 14px;
}

.cat-mag-card-body .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 4px;
}

/* 4. Compact Layout */
.cat-layout-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-compact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cat-compact-item:hover {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: inherit;
}

.cat-compact-img {
    flex: 0 0 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}

.cat-compact-img img {
    width: 60px;
    height: 45px;
    object-fit: cover;
}

.cat-compact-body {
    flex: 1;
    min-width: 0;
}

.cat-compact-body .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-compact-body .card-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* 5. Block Overlay Layout */
.cat-layout-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cat-block-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.cat-block-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cat-block-item:hover img {
    transform: scale(1.03);
}

.cat-block-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.cat-block-overlay .card-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-top: 6px;
}

.cat-block-overlay .card-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* ============================================
   INFINITE SCROLL
   ============================================ */
.infinite-scroll-trigger {
    text-align: center;
    padding: 30px 20px;
}

.load-more-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.no-more-posts {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive category layouts */
@media (max-width: 768px) {
    .cat-layout-cards {
        grid-template-columns: 1fr;
    }

    .cat-list-item {
        flex-direction: column;
    }

    .cat-list-img {
        flex: none;
    }

    .cat-list-img img {
        width: 100%;
        height: 200px;
    }

    .cat-mag-hero img {
        height: 250px;
    }

    .cat-mag-hero-overlay .card-title {
        font-size: 1.3rem;
    }

    .cat-mag-grid {
        grid-template-columns: 1fr;
    }

    .cat-block-item img {
        height: 180px;
    }

    .cat-compact-body .card-title {
        white-space: normal;
    }
}

/* ============================================
   NEWSLETTER STYLES
   ============================================ */
.newsletter-col p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.newsletter-wrapper {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    padding: 3px;
}

.newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    color: inherit;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.newsletter-input::placeholder {
    color: inherit;
    opacity: 0.6;
}

.newsletter-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.3s;
}

.newsletter-btn:hover {
    background: var(--primary-dark);
}

/* Update Footer Grid to 4 Columns on Large Screens */
@media (min-width: 992px) {
    .footer-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

@media (max-width: 991px) {
    .footer-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}