/* 
    Kaaval Viraivu Seithi - Main Styles
    Brand Colors: Red (#D32F2F), White (#FFFFFF), Black (#212121)
*/

:root {
    --primary-color: #D32F2F;
    /* Brand Red */
    --secondary-color: #1a1a1a;
    /* Dark for top bar/footer */
    --accent-color: #FBC02D;
    --bg-color: #ffffff;
    /* Mockup is pure white bg */
    --text-color: #333;
    --white: #ffffff;
    --gray-light: #f4f4f4;
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

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

/* Header Styles - Mockup Alignment */
header {
    background: var(--primary-color);
    color: #fff;
    position: relative;
    z-index: 1000;
}

.top-bar {
    background: #f8f9fa;
    color: #666;
    border-bottom: 1px solid #eee;
}

.main-header {
    background: var(--primary-color);
    padding: 15px 0;
}

.nav-bar {
    background: rgba(0, 0, 0, 0.1);
    /* Slightly darker red overlay */
    padding: 2px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links li a {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 0;
}

.nav-links li a:hover {
    color: rgba(255, 255, 255, 0.8);
    border-bottom: none;
}

.header-search input {
    background: #fff !important;
    border: none;
    color: #333;
}

/* Breaking News Ticker */
.ticker-wrap {
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 35s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 40px;
    font-weight: 600;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(100%, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Hero Section */
.hero {
    margin: 20px 0;
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 20px;
}

.hero-sidebar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    height: 100%;
    border: 1px solid #eee;
}

.category-block-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 20px;
}

.category-block-header h2 {
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
}

.category-line {
    height: 2px;
    background: #eee;
    flex-grow: 1;
    position: relative;
}

.category-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 100%;
    background: var(--primary-color);
}

.hero-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: auto;
}

.hero-main img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: #fff;
}

/* Live TV */
.live-tv {
    margin: 40px 0;
    background: #000;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.live-tv iframe {
    width: 100%;
    aspect-ratio: 16/9;
}

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

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.news-card img {
    width: 100%;
    height: auto;
    display: block;
}

.news-card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-body h3 {
    margin: 8px 0;
    line-height: 1.4;
    font-size: 1rem;
    flex-grow: 1;
}

.breaking-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff1744, #d50000);
    color: #fff;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(213, 0, 0, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breaking-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: flashDot 1.5s ease-in-out infinite;
}

@keyframes flashDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

/* Removed Theme Switch Styles */

/* Responsive */
@media (max-width: 992px) {
    .header-banner {
        display: none;
    }
}

@media (max-width: 768px) {
    .high-impact-header {
        flex-direction: column;
        text-align: center;
    }

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

    .nav-links {
        display: none;
    }
}