/* ========== VARIABLES & RESETS ========== */
:root {
    --primary-color: #c62828; /* Red for highlights/tags */
    --primary-hover: #b71c1c;
    --secondary-color: #1a1a1a; /* Dark almost black for clean headers/nav */
    --accent-color: #0d47a1; /* Blue for links/accents */
    
    --text-main: #2b2b2b;
    --text-muted: #757575;
    --bg-main: #f8f9fa; /* Light grey backdrop */
    --bg-surface: #ffffff;
    --border-color: #eaeaea;
    
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif; 
    
    --transition-speed: 0.25s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-main);
    background-color: #f4f6f8; /* very light grey for UI depth */
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
}

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

/* ========== HEADER ========== */
.top-bar {
    background-color: #f5f5f5;
    color: #555;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 1px solid #eaeaea;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-switcher a {
    color: #aaa;
    margin-left: 15px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed);
}

.language-switcher a:hover,
.language-switcher a.active {
    color: #fff;
}

.main-header {
    background-color: var(--bg-surface);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.main-header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .main-header-inner {
        justify-content: space-between;
    }
}

.logo img {
    max-width: 240px;
    height: auto;
}

/* ========== NAVIGATION ========== */
.main-nav {
    background-color: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
    position: relative;
    z-index: 100;
}

.main-nav.sticky.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .nav-container {
        justify-content: space-between;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: var(--secondary-color);
    display: block;
    padding: 16px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.25s ease;
    transform-origin: center;
}

.nav-menu li a:hover::after {
    transform: scaleX(1);
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--secondary-color);
    margin-bottom: 5px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bg-surface);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .nav-menu.active {
        display: flex;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

/* ========== BREAKING NEWS TICKER ========== */
.breaking-news-ticker {
    background-color: var(--bg-surface);
    border-bottom: 1px solid #e5e5e5;
    overflow: hidden;
}

.ticker-wrap {
    display: flex;
    align-items: center;
    position: relative;
    height: 40px;
}

.ticker-label {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    position: relative;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-right: 15px;
}

.ticker-label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 10px solid var(--primary-color);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ticker-list {
    list-style: none;
    display: flex;
    height: 100%;
    margin: 0;
    padding: 0;
    align-items: center;
    animation: ticker 25s linear infinite;
}

.ticker-list:hover {
    animation-play-state: paused;
}

.ticker-list li {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 30px;
    white-space: nowrap;
}

.ticker-list li a {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.ticker-list li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

/* ========== MAIN LAYOUT & Grids ========== */
.main-content {
    padding: 0 0 50px 0;
}

/* Hero Section */
.hero-section {
    margin-bottom: 40px;
}

.hero-article {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    display: block;
    aspect-ratio: 16/7;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

@media (min-width: 992px) {
    .hero-article {
        border-radius: 10px;
        margin-top: 30px;
    }
}

.hero-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-article:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 40px;
        max-width: 700px;
    }
}

.hero-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero-content h1 {
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.25;
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

.hero-content .meta {
    color: #ddd;
    font-size: 0.85rem;
}

/* 70/30 Grid */
.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .home-grid {
        grid-template-columns: 7fr 3fr;
        gap: 50px;
    }
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    font-weight: 800;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background-color: var(--primary-color);
    margin-right: 12px;
    border-radius: 2px;
}

.news-section {
    margin-bottom: 50px;
}

/* News Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    overflow: hidden;
    transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transform: translateY(-4px);
}

.article-card .img-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.article-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .img-wrapper img {
    transform: scale(1.05);
}

.article-card .content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-tag {
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.article-card h3 {
    font-size: 1.25rem;
    line-height: 1.45;
    margin-bottom: 15px;
    font-weight: 700;
}

.article-card h3 a {
    color: var(--secondary-color);
}

.article-card h3 a:hover {
    color: var(--primary-color);
}

.article-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Sidebar Variants */
.sidebar-widget {
    background: var(--bg-surface);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.sidebar-widget .section-title {
    font-size: 1.3rem;
}

.sidebar-widget .section-title::before {
    height: 20px;
}

.sidebar-list-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-list-item .img-wrapper {
    width: 90px;
    flex-shrink: 0;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
}

.sidebar-list-item .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sidebar-list-item:hover .img-wrapper img {
    transform: scale(1.08);
}

.sidebar-list-item .content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-list-item h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 5px;
    font-weight: 600;
}

.sidebar-list-item h4 a {
    color: var(--secondary-color);
}

.sidebar-list-item h4 a:hover {
    color: var(--primary-color);
}

/* ========== ARTICLE PAGE ========== */
.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.25;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--secondary-color);
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-featured-img {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.article-featured-img img {
    width: 100%;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.article-body p {
    margin-bottom: 25px;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--secondary-color);
    font-weight: 700;
}

.article-body h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    font-weight: 600;
}

/* ========== CATEGORY PAGE ========== */
.category-header {
    background: var(--bg-surface);
    padding: 30px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.category-header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
}

/* ========== FOOTER ========== */
.site-footer {
    background-color: var(--secondary-color);
    color: #ccc;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
}

.site-footer h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 600;
}

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

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #aaa;
}

.footer-links ul li a:hover {
    color: #fff;
}

.social-icons a {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px 18px;
    margin: 0 8px 8px 0;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background var(--transition-speed);
}

.social-icons a:hover {
    background: var(--primary-color);
}

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