:root {
    --primary-color: #E11D48;
    /* Red from reference */
    --primary-hover: #be123c;
    --dark-bg: #0F172A;
    /* Dark Blue/Slate */
    --light-bg: #F8FAFC;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: #fff;
    margin: 0;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

a:hover {
    color: var(--primary-color);
}

/* --- Layout Utility --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-8 {
    width: 66.666%;
    padding: 0 15px;
}

.col-4 {
    width: 33.333%;
    padding: 0 15px;
}

.col-12 {
    width: 100%;
    padding: 0 15px;
}

@media(max-width: 768px) {

    .col-8,
    .col-4 {
        width: 100%;
    }
}

/* --- Top Bar --- */
.top-bar {
    background: var(--dark-bg);
    color: white;
    font-size: 0.8rem;
    padding: 5px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 15px;
}

.top-links a:hover {
    color: white;
}

/* --- Header --- */
.main-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--dark-bg);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    gap: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.main-nav a {
    color: var(--dark-bg);
    text-transform: uppercase;
}

/* --- Components --- */
.badge-cat {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 5px;
}

.badge-cat.blue {
    background: #3b82f6;
}

.badge-cat.green {
    background: #10b981;
}

.badge-cat.orange {
    background: #f97316;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--dark-bg);
    margin-bottom: 20px;
    padding-bottom: 5px;
    margin-top: 30px;
}

.section-title {
    background: var(--dark-bg);
    color: white;
    padding: 5px 15px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
}

/* --- Hero Grid --- */
.hero-section {
    margin-top: 20px;
    margin-bottom: 30px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media(max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* Main Hero Item */
.hero-main {
    position: relative;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    color: white;
}

.hero-title-lg {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 10px 0;
}

/* Side List Items */
.hero-side-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.side-item img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.side-item-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.3;
}

.meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Post Grid (Standard) --- */
.post-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.post-img-wrap {
    position: relative;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.post-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 5px 0;
}

/* --- Footer --- */
.main-footer {
    background: var(--dark-bg);
    color: #cbd5e1;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-title {
    color: white;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* --- Mobile Styles Overhaul --- */

/* Mobile Top Header (Fixed) */
.mobile-top-header {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    padding: 12px 15px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    height: 64px;
}

/* Header Icons */
.mobile-header-icon {
    font-size: 1.5rem;
    color: #475569;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.mobile-search-btn {
    background: #eff6ff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.2rem;
    border-radius: 12px;
}

/* Center Logo */
.mobile-logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: #3b82f6;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
    margin: 0;
    flex-grow: 1;
}

/* Mobile Ticker (Top Strip) */
.mobile-ticker-wrap {
    display: none;
    background: white;
    padding: 10px 15px 0;
    align-items: center;
    font-size: 0.85rem;
    color: #64748b;
}

.mobile-ticker-icon {
    background: #ff4757;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.mobile-ticker-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Horizontal Scroll Categories */
.mobile-cat-scroll {
    display: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 15px;
    background: #fff;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 15px;
}

.mobile-cat-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-cat-card {
    display: inline-block;
    width: 120px;
    height: 160px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.mobile-cat-card:last-child {
    margin-right: 0;
}

.mobile-cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-cat-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Mobile Bottom Nav */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: none;
    justify-content: space-between;
    padding: 10px 25px;
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #94a3b8;
    font-size: 1.2rem;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-section-header {
    display: none;
    padding: 0 15px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 20px;
}

.mobile-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.mobile-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Mobile Hero Card Overrides */
/* Mobile Design Refinements */
@media(max-width: 768px) {

    .main-nav,
    .top-bar,
    .main-header {
        display: none !important;
    }

    .mobile-top-header {
        display: flex;
    }

    .mobile-ticker-wrap {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    .mobile-cat-scroll {
        display: flex;
    }

    .mobile-section-header {
        display: flex;
    }

    .mobile-cat-wrapper {
        display: flex;
    }

    .d-mobile-none {
        display: none !important;
    }

    body {
        padding-bottom: 80px;
        /* Space for bottom nav */
        background: #fff;
    }

    .container {
        padding: 0 20px;
    }

    .container.hero-section {
        margin-top: 10px;
    }

    /* Hero Card Style Makeover */
    .hero-main {
        height: 380px;
        border-radius: 30px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        overflow: hidden;
    }

    .hero-overlay {
        background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 10%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
        padding: 25px;
    }

    .hero-title-lg {
        font-size: 1.6rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .badge-cat {
        padding: 6px 14px;
        font-size: 0.8rem;
        border-radius: 6px;
        margin-bottom: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .meta {
        display: flex;
        align-items: center;
        gap: 15px;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
    }

    .meta i {
        color: #fbbf24;
        /* Yellow icons */
        margin-right: 5px;
    }

    /* Hide Side List on Mobile */
    .hero-side-list {
        display: none;
    }

    .hero-grid {
        display: block;
    }

    /* Unique "Top Categories" Section */
    .mobile-cat-wrapper {
        background: #fef9c3;
        /* Light yellow */
        background-image:
            radial-gradient(circle at 10% 20%, rgba(255, 165, 0, 0.1) 0%, transparent 20%),
            radial-gradient(circle at 90% 80%, rgba(255, 165, 0, 0.1) 0%, transparent 20%);
        padding: 30px 15px;
        /* Added horizontal padding */
        margin: 20px -20px;
        /* Bleed to edges */
        position: relative;
        overflow: hidden;
    }

    /* Vertical Text Strip */
    .mobile-cat-title-strip {
        padding: 0 5px;
        display: flex;
        align-items: center;
        /* Center it */
        justify-content: center;
        flex-shrink: 0;
        width: 50px;
    }

    .mobile-cat-title-rotated {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-family: var(--font-heading);
        font-weight: 900;
        font-size: 1.1rem;
        /* Slightly smaller to fit perfectly */
        color: rgba(15, 23, 42, 0.7);
        text-transform: uppercase;
        letter-spacing: 1px;
        white-space: nowrap;
        margin: auto;
    }

    /* Center Logo Bold */
    .mobile-logo-text {
        font-size: 1.6rem;
        font-weight: 900;
        letter-spacing: -1px;
    }

    /* Horizontal Scroll Categories */
    .mobile-cat-scroll {
        padding: 10px 20px 10px 0;
        gap: 15px;
        flex-grow: 1;
    }

    .mobile-cat-card {
        width: 140px;
        height: 200px;
        border-radius: 16px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .mobile-cat-badge {
        background: #f43f5e;
        /* Pink-ish red */
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-block;
    }

    /* Hide standard section headers on mobile if we use custom ones */
    .section-header {
        display: none;
    }

    /* Mobile Play Button Overlay */
    .play-btn-overlay {
        position: absolute;
        top: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        background: #f97316;
        /* Orange */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1rem;
        box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
        z-index: 2;
    }

    .bookmark-overlay {
        position: absolute;
        top: 20px;
        right: 20px;
        color: white;
        font-size: 1.4rem;
        z-index: 2;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Desktop Breaking News Ticker Animation */
@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.ticker-wrapper:hover {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .ticker-text {
        display: none;
    }

    .ticker-title i {
        margin-right: 0 !important;
    }
}