/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
   :root {
    /* Color Palette */
    --clr-primary: #0B2447;      /* Deep Blue */
    --clr-secondary: #D72323;    /* Bright Red */
    --clr-accent: #F5E11D;       /* Golden Yellow */
    
    /* Light Mode (Default) */
    --bg-main: #F4F7F6;
    --bg-card: #FFFFFF;
    --text-main: #1A1A1A;
    --text-muted: #555555;
    --border-clr: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 24px rgba(0,0,0,0.15);
    
    /* Typography */
    --font-hindi: 'Noto Sans Devanagari', sans-serif;
    --font-en: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-main: #121212;
    --bg-card: #1E1E1E;
    --text-main: #E0E0E0;
    --text-muted: #A0A0A0;
    --border-clr: #333333;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
    --shadow-hover: 0 12px 24px rgba(0,0,0,0.8);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-en);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-hindi);
    font-weight: 700;
    line-height: 1.3;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.top-bar {
    background-color: var(--clr-primary);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
}

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

.social-links a {
    color: #fff;
    margin-left: 15px;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
    color: var(--clr-accent);
}

/* ==========================================================================
   Header
   ========================================================================== */
.main-header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    display: none; /* Hide text if we only want image, but for SEO it's better to use an img tag inside the a tag */
}

.site-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

body.dark-mode .site-logo {
    /* If the logo has a dark background or needs inversion, we can add filters, but assuming it works on both or has transparency */
    filter: drop-shadow(0px 0px 2px rgba(255,255,255,0.2));
}

.logo .highlight {
    color: var(--clr-secondary);
}

/* Navigation */
.main-nav .nav-links {
    display: flex;
    gap: 20px;
}

.main-nav a {
    font-family: var(--font-hindi);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 5px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--clr-secondary);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid var(--border-clr);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-hindi);
    width: 150px;
    transition: width 0.3s;
}

.search-box input:focus {
    width: 200px;
}

.search-box button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.theme-toggle, .mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--clr-accent);
}

.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   News Ticker
   ========================================================================== */
.ticker-section {
    background-color: var(--clr-secondary);
    color: #fff;
    padding: 0;
    border-bottom: 3px solid var(--clr-primary);
}

.ticker-container {
    display: flex;
    align-items: center;
}

.ticker-label {
    background-color: var(--clr-primary);
    padding: 8px 15px;
    font-family: var(--font-hindi);
    font-weight: 700;
    white-space: nowrap;
    z-index: 2;
}

.ticker-wrap {
    overflow: hidden;
    width: 100%;
    padding-left: 20px;
}

.ticker-move {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker 50s linear infinite;
}

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

.ticker-item {
    margin-right: 50px;
    font-family: var(--font-hindi);
    font-size: 1.05rem;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 40px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.hero-card, .hero-card-small {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.hero-card .img-wrapper img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-card-small .img-wrapper img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-card:hover .img-wrapper img,
.hero-card-small:hover .img-wrapper img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--clr-secondary);
    color: #fff;
    padding: 5px 12px;
    font-family: var(--font-hindi);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 2;
}

.hero-card-content, .hero-card-small .hero-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
    z-index: 2;
}

.hero-card h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero-card p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card-small h3 {
    font-size: 1.3rem;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.content-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-clr);
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--clr-primary);
}

body.dark-mode .section-header h2 {
    color: var(--clr-accent);
}

.section-header h2 span {
    font-family: var(--font-en);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.view-all {
    font-family: var(--font-hindi);
    color: var(--clr-secondary);
    font-weight: 600;
}

.view-all:hover {
    text-decoration: underline;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-clr);
    position: relative;
    cursor: pointer;
}

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

.news-card .img-wrapper {
    position: relative;
    overflow: hidden;
}

.news-card .img-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.news-card:hover h3 {
    color: var(--clr-secondary);
}

.excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-family: var(--font-hindi);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-clr);
    padding-top: 15px;
}

.btn-read-more {
    display: inline-block;
    color: var(--clr-secondary);
    font-weight: 600;
    font-family: var(--font-en);
}

.hero-card .btn-read-more {
    background-color: var(--clr-secondary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
}

.hero-card .btn-read-more:hover {
    background-color: var(--clr-primary);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-clr);
}

.widget-header h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.widget-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background-color: var(--clr-secondary);
    border-radius: 2px;
}

.trending-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-clr);
}

.trending-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trending-list .rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--border-clr);
    margin-right: 15px;
    width: 25px;
}

.trending-list a {
    font-family: var(--font-en);
    font-weight: 600;
    color: var(--text-main);
}

.trending-list a:hover {
    color: var(--clr-secondary);
}

.newsletter-widget p {
    font-family: var(--font-hindi);
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid var(--border-clr);
    border-radius: 4px;
    background-color: var(--bg-main);
    color: var(--text-main);
}

.newsletter-form button {
    padding: 12px;
    background-color: var(--clr-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--clr-secondary);
}

.ad-placeholder {
    width: 100%;
    height: 250px;
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-clr);
    color: var(--text-muted);
    font-family: var(--font-en);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background-color: var(--clr-primary);
    color: #fff;
    padding-top: 60px;
}

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

.footer-about h2 {
    font-family: var(--font-en);
    font-size: 2rem;
    margin-bottom: 15px;
}

.footer-about h2 .highlight {
    color: var(--clr-accent);
}

.footer-about p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--clr-accent);
}

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

.footer-links a {
    color: #ccc;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--clr-secondary);
    padding-left: 5px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #ccc;
    font-size: 0.95rem;
}

.contact-details i {
    color: var(--clr-accent);
    font-size: 1.2rem;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-sidebar {
        flex-direction: row;
    }
    
    .hero-card-small {
        flex: 1;
    }
    
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 15px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-clr);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-box input {
        width: 100px;
    }
    
    .search-box input:focus {
        width: 150px;
    }
    
    .hero-sidebar {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
