:root {
    --accent-color: #c8102e;
    --accent-hover: #a10a22;
    --navy-dark: #0f172a;
    --navy-soft: #1e293b;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --bg-subtle: #f8fafc;
    --border-color: #e2e8f0;
    --header-bg: #ffffff;
    --footer-bg: #0f172a;
}

[data-theme="dark"] {
    --bg-page: #0b1120;
    --bg-card: #111827;
    --bg-subtle: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --header-bg: #0f172a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    line-height: 1.65;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, .headline-font {
    font-family: 'Merriweather', 'Noto Sans Devanagari', Georgia, serif;
    color: var(--text-main);
    letter-spacing: -0.012em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

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

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 600;
}
.btn-accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.text-accent { color: var(--accent-color) !important; }

.badge-cat {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.28rem 0.62rem;
    border-radius: 3px;
    display: inline-block;
}

/* Reading Progress Bar */
#readingProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), #f59e0b);
    z-index: 1090;
    transition: width 0.1s linear;
}

/* Top Info Bar */
.top-info-bar {
    background: var(--navy-dark);
    color: #e2e8f0;
    font-size: 0.8rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-info-bar a { color: #cbd5e1; }
.top-info-bar a:hover { color: #ffffff; }

/* Main Sticky Header & Responsive Logo (Mobile Full Width, Desktop Max 250px) */
.main-header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.25s ease, padding 0.25s ease;
}

.site-logo-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (min-width: 992px) {
    .site-logo-img {
        width: auto;
        max-width: 250px;
        max-height: 62px;
    }
}

.brand-wordmark {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 900;
    font-size: 1.45rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation & Mega Dropdown */
.primary-nav-bar {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    padding: 0.4rem 0;
}

.nav-item-wrap {
    position: relative;
}

.nav-link-item {
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.42rem 0.72rem;
    white-space: nowrap;
    border-radius: 5px;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link-item:hover, .nav-link-item.active {
    background: rgba(200, 16, 46, 0.09);
    color: var(--accent-color);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    padding: 0.45rem 0;
    display: none;
    z-index: 1050;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.45rem 1rem;
    font-size: 0.84rem;
    font-weight: 500;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-subtle);
    color: var(--accent-color);
    padding-left: 1.2rem;
}

/* Breaking News Ticker */
.breaking-ticker {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.breaking-label {
    background: var(--accent-color);
    color: #fff;
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: pulse-ring 1.4s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.45; }
    100% { transform: scale(0.9); opacity: 1; }
}

.ticker-viewport { overflow: hidden; flex: 1; position: relative; }

.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    animation: ticker-scroll var(--ticker-duration, 35s) linear infinite;
}

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

.ticker-item {
    padding: 0.5rem 1.75rem;
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
}

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

/* Animated Cards, Reveal & Hero */
.reveal-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
    border-color: rgba(200, 16, 46, 0.35);
}

.news-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--bg-subtle);
}

.news-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
}

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

.hero-main-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    min-height: 420px;
    background: var(--navy-dark);
    color: #fff;
}

.hero-main-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    opacity: 0.74;
    transition: transform 0.5s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.08) 20%, rgba(15,23,42,0.93) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
}

.hero-overlay h1, .hero-overlay h2 { color: #ffffff; }

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.55rem;
    margin-bottom: 1.25rem;
}

.section-heading h2, .section-heading h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    position: relative;
}

.section-heading h2::after, .section-heading h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.62rem;
    width: 56px;
    height: 3px;
    background: var(--accent-color);
}

.meta-line {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.trending-rank {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
    min-width: 28px;
}

/* Social Share Pills & Floating Share Dock */
.share-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.72rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.share-pill:hover { transform: translateY(-2px); opacity: 0.92; }
.share-wa { background: #16a34a; }
.share-fb { background: #1877f2; }
.share-x  { background: #0f172a; }
.share-tg { background: #0284c7; }
.share-li { background: #0a66c2; }
.share-cp { background: #475569; }

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.93);
    z-index: 1080;
    display: none;
    align-items: flex-start;
    padding-top: 5.5rem;
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1040;
    cursor: pointer;
}

/* Toast Notification */
#copyToast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    z-index: 1100;
    display: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
    margin-top: 3.5rem;
}
.site-footer h5, .site-footer h6 { color: #ffffff; font-weight: 700; }
.site-footer a { color: #94a3b8; font-size: 0.88rem; }
.site-footer a:hover { color: #ffffff; }

/* Article Typography & Font Size Controls */
.article-body { font-size: 1.08rem; line-height: 1.85; }
.article-body.font-sm { font-size: 0.96rem; }
.article-body.font-lg { font-size: 1.22rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 1rem 0; }

@media print {
    .top-info-bar, .main-header, .breaking-ticker, .site-footer, #backToTop, .no-print {
        display: none !important;
    }
}
