/* ===== CSS RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* South African Flag Colors + Modern Palette */
    --sa-green: #007a4d;
    --sa-gold: #ffb612;
    --sa-red: #de3831;
    --sa-blue: #002395;
    --sa-black: #000000;

    /* Extended Palette */
    --primary: #007a4d;
    --primary-light: #00a86b;
    --secondary: #ffb612;
    --accent: #de3831;
    --accent-blue: #002395;

    /* UI Colors */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-gray: #f1f5f9;
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;

    /* Category Colors */
    --crime: #dc2626;
    --politics: #7c3aed;
    --business: #0891b2;
    --disaster: #ea580c;
    --education: #16a34a;
    --community: #ec4899;
    --alert: #f59e0b;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* ===== BREAKING TICKER ===== */
.breaking-ticker {
    background: linear-gradient(90deg, var(--sa-red) 0%, #b91c1c 100%);
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
}

.ticker-label {
    background: #7f1d1d;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    flex-shrink: 0;
    animation: pulse-label 2s infinite;
}

@keyframes pulse-label {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 24px;
    animation: ticker-scroll 40s linear infinite;
    white-space: nowrap;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.ticker-sep {
    opacity: 0.5;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

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

/* ===== HEADER ===== */
.main-header {
    background: var(--bg-white);
    border-bottom: 3px solid var(--sa-green);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--sa-green);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-sub {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sa-gold);
    letter-spacing: 3px;
}

.main-nav {
    display: flex;
    gap: 8px;
}

.main-nav a {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-medium);
    border-radius: var(--radius-sm);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--sa-green);
    background: rgba(0, 122, 77, 0.08);
}

.header-date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.date-day {
    font-size: 0.85rem;
    color: var(--text-light);
}

.date-full {
    font-weight: 700;
    color: var(--text-dark);
}

/* ===== TOOLS BAR ===== */
.tools-bar {
    background: linear-gradient(135deg, var(--sa-green) 0%, #005a3c 100%);
    padding: 20px 0;
}

.tools-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tool-widget {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: white;
}

.widget-icon {
    font-size: 1.2rem;
}

.widget-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Weather Widget */
.weather-cities {
    display: flex;
    gap: 10px;
}

.weather-city {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.weather-city:hover,
.weather-city.active {
    background: rgba(255, 255, 255, 0.2);
}

.city-name {
    font-size: 0.75rem;
    display: block;
    opacity: 0.9;
}

.city-temp {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.city-desc {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Exchange Widget */
.exchange-rates {
    display: flex;
    gap: 10px;
}

.rate-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
    color: white;
}

.rate-currency {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
}

.rate-value {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}

.rate-change {
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
}

.rate-change.up {
    color: #86efac;
}

.rate-change.down {
    color: #fca5a5;
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 10px;
}

.quick-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.quick-link span:first-child {
    font-size: 1.3rem;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.quick-link.loadshedding {
    background: rgba(239, 68, 68, 0.3);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 30px 0;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HERO STORY ===== */
.hero-story {
    margin-bottom: 30px;
}

.top-story {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border-left: 6px solid var(--crime);
}

.story-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 16px;
}

.story-category.crime {
    background: var(--crime);
}

.story-category.politics {
    background: var(--politics);
}

.story-category.business {
    background: var(--business);
}

.story-category.disaster {
    background: var(--disaster);
}

.story-category.education {
    background: var(--education);
}

.story-category.community {
    background: var(--community);
}

.story-category.alert {
    background: var(--alert);
}

.top-story h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.story-lead {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 16px;
    line-height: 1.7;
}

.story-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.meta-author {
    color: var(--sa-green);
    font-weight: 600;
}

.meta-time {
    color: var(--text-light);
}

.story-content p {
    color: var(--text-medium);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.read-more {
    display: inline-block;
    padding: 12px 24px;
    background: var(--sa-green);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-top: 10px;
}

.read-more:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== NEWS GRID ===== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

.news-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== NEWS CARDS ===== */
.news-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.news-card.featured {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.card-image {
    min-height: 200px;
    background-size: cover;
    background-position: center;
}

.card-image.disaster {
    background: linear-gradient(45deg, var(--disaster) 0%, #dc2626 100%);
}

/* Mining Story Image */
.mining-story {
    border: 2px solid var(--politics);
}

.mining-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 20px;
}

.mining-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.story-lead {
    font-size: 1.05rem;
    color: var(--text-medium);
    margin-bottom: 12px;
}

/* Full Story Card */
.full-story {
    border-left: 4px solid var(--politics);
}

.full-story h3 {
    color: var(--politics);
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.full-story h3:first-child {
    margin-top: 0;
}

/* Quote Block */
.quote-block {
    background: var(--bg-gray);
    border-left: 4px solid var(--politics);
    padding: 20px 24px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-medium);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quote-source {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-weight: 600;
    color: var(--politics);
    font-size: 0.9rem;
}

.card-content {
    padding: 24px;
}

.news-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.news-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

/* ===== ANC SECTION ===== */
.anc-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--politics);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.view-all {
    color: var(--politics);
    font-weight: 600;
    font-size: 0.9rem;
}

.anc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.anc-card {
    border: 1px solid var(--border-color);
}

.anc-card .card-content {
    padding: 16px;
}

.anc-card h3 {
    font-size: 1rem;
}

/* ===== ALERT CARD ===== */
.alert-card {
    border: 2px solid var(--sa-gold);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.alert-banner {
    background: var(--sa-gold);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 1.3rem;
}

.alert-text {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.loadshedding-status {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.status-current,
.status-next {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-medium);
}

.status-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.status-value.stage-4 {
    color: var(--disaster);
}

/* ===== SIDEBAR ===== */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sa-green);
}

/* Weather Detailed */
.weather-detailed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weather-card {
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.weather-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.weather-card-header .city {
    font-weight: 700;
}

.weather-card-header .temp {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sa-green);
}

.weather-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Good News */
.good-news {
    border-top: 4px solid var(--education);
}

.sidebar-story {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-story:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-story h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.4;
}

.sidebar-story p {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-bottom: 8px;
}

/* Economy Widget */
.economy-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: var(--bg-gray);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-medium);
    display: block;
    margin-bottom: 4px;
}

.stat-item .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.stat-item .stat-value.red {
    color: var(--crime);
}

.stat-item .stat-value.green {
    color: var(--sa-green);
}

.economy-note {
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 122, 77, 0.08);
    border-radius: var(--radius-sm);
}

/* Trending */
.trending-list {
    list-style: none;
    counter-reset: trending;
}

.trending-list li {
    counter-increment: trending;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.trending-list li::before {
    content: counter(trending);
    width: 24px;
    height: 24px;
    background: var(--sa-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.trending-list li:nth-child(1)::before {
    background: var(--crime);
}

.trending-list li:nth-child(2)::before {
    background: var(--disaster);
}

.trending-list li:nth-child(3)::before {
    background: var(--alert);
}

.trending-list a {
    font-size: 0.9rem;
    font-weight: 500;
}

.trending-list a:hover {
    color: var(--sa-green);
}

/* ===== MORE STORIES ===== */
.more-stories {
    margin-top: 40px;
}

.more-stories h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--sa-green);
    display: inline-block;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.story-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.story-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.story-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.4;
}

.story-card p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 10px;
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--text-dark);
    color: white;
    margin-top: 50px;
    padding-top: 50px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
}

.footer-brand .logo-main {
    color: white;
}

.footer-brand .logo-sub {
    color: var(--sa-gold);
}

.footer-brand p {
    margin-top: 16px;
    color: #94a3b8;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--sa-gold);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .tools-container {
        grid-template-columns: 1fr 1fr;
    }

    .quick-widget {
        grid-column: span 2;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .anc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .news-card.featured {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .tools-container {
        grid-template-columns: 1fr;
    }

    .quick-widget {
        grid-column: auto;
    }

    .top-story {
        padding: 24px;
    }

    .top-story h1 {
        font-size: 1.8rem;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .weather-cities,
    .exchange-rates {
        flex-direction: column;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}