/* Custom Properties / Variables */
:root {
    /* Colors */
    --primary-color: #1a1a1a;
    --secondary-color: #2b2b2b;
    --accent-color: #c90000; /* Classic news red */
    --text-main: #333333;
    --text-muted: #666666;
    --bg-main: #ffffff;
    --bg-secondary: #f4f4f4;
    --border-color: #e0e0e0;
    
    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #ffffff;
    --secondary-color: #f0f0f0;
    --accent-color: #ff3333;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --bg-main: #121212;
    --bg-secondary: #1e1e1e;
    --border-color: #333333;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-color);
}

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(--primary-color);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 8px 0;
    transition: background-color var(--transition), color var(--transition);
}

[data-theme="dark"] .top-bar {
    background-color: #000000;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-links a {
    color: #ffffff;
}

.top-bar-links a:hover {
    color: var(--accent-color);
}

#theme-toggle {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: transform var(--transition);
}

#theme-toggle:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Header */
.main-header {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-main);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0;
    color: var(--primary-color);
}

[data-theme="dark"] .logo h1 {
    color: #ffffff;
}

.search-container {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px 15px;
    background-color: var(--bg-secondary);
}

.search-container input {
    border: none;
    background: transparent;
    padding: 5px;
    outline: none;
    color: var(--text-main);
    width: 200px;
}

.search-container button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

[data-theme="dark"] .mobile-menu-btn {
    color: #ffffff;
}

/* Navigation */
.main-nav {
    border-bottom: 2px solid var(--primary-color);
    background-color: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

[data-theme="dark"] .main-nav {
    border-bottom: 2px solid #ffffff;
}


.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav-links li {
    padding: 15px 0;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Breaking News Ticker */
.breaking-news-section {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.breaking-container {
    display: flex;
    align-items: center;
}

.breaking-label {
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
    padding: 8px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    z-index: 2;
    position: relative;
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    padding-left: 20px;
}

.ticker {
    display: flex;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
}

.ticker:hover {
    animation-play-state: paused;
}

.ticker__item {
    padding: 0 2rem;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

.ticker__item::after {
    content: '•';
    margin-left: 2rem;
    color: var(--accent-color);
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Main Content Layout */
.main-content {
    padding: 40px 20px;
}

/* Typography elements */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    display: inline-block;
}

[data-theme="dark"] .section-title {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    display: inline-block;
}

/* Tag colors - Light mode */
.category-tag.technology { background-color: #e3f2fd; color: #1976d2; }
.category-tag.politics { background-color: #fce4ec; color: #c2185b; }
.category-tag.world { background-color: #e8f5e9; color: #388e3c; }
.category-tag.sports { background-color: #fff3e0; color: #f57c00; }
.category-tag.business { background-color: #e8eaf6; color: #3f51b5; }
.category-tag.science { background-color: #e0f7fa; color: #0097a7; }
.category-tag.health { background-color: #f1f8e9; color: #689f38; }
.category-tag.entertainment { background-color: #f3e5f5; color: #7b1fa2; }

/* Tag colors - Dark mode */
[data-theme="dark"] .category-tag.technology { background-color: #1565c0; color: #fff; }
[data-theme="dark"] .category-tag.politics { background-color: #ad1457; color: #fff; }
[data-theme="dark"] .category-tag.world { background-color: #2e7d32; color: #fff; }
[data-theme="dark"] .category-tag.sports { background-color: #ef6c00; color: #fff; }
[data-theme="dark"] .category-tag.business { background-color: #283593; color: #fff; }
[data-theme="dark"] .category-tag.science { background-color: #006064; color: #fff; }
[data-theme="dark"] .category-tag.health { background-color: #33691e; color: #fff; }
[data-theme="dark"] .category-tag.entertainment { background-color: #4a148c; color: #fff; }


.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.article-meta a {
    font-weight: 600;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.featured-article {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .featured-article {
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.featured-article .img-container {
    height: 400px;
    overflow: hidden;
}

.featured-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-article:hover img {
    transform: scale(1.05);
}

.featured-content {
    padding: 25px;
}

.featured-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.featured-content .excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Hero Sidebar - Trending */
.hero-sidebar {
    background-color: var(--bg-secondary);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.trending-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trending-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--border-color);
    line-height: 1;
}

[data-theme="dark"] .trending-number {
    color: #444;
}

.trending-details h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Latest News Grid */
.latest-news {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 25px;
}

[data-theme="dark"] .section-header {
    border-bottom: 2px solid #ffffff;
}

.section-header .section-title {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 10px;
}

/* Article Modal Styles */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    z-index: 2000;
    display: none;
    overflow-y: auto;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

.modal-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    z-index: 10;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .close-btn { color: white; }

.header-actions button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 20px;
    cursor: pointer;
}

.modal-body .article-hero-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modal-body h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--primary-color);
}

[data-theme="dark"] .modal-body h1 { color: white; }

.modal-body .article-meta {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-body .article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
}

.modal-body .article-content p {
    margin-bottom: 20px;
}

/* Enhanced Animations */
.news-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.featured-article .img-container img {
    transition: transform 0.8s ease;
}

.featured-article:hover .img-container img {
    transform: scale(1.08);
}

/* Glassmorphism for Ticker */
.breaking-news-section {
    background: rgba(244, 244, 244, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .breaking-news-section {
    background: rgba(30, 30, 30, 0.8);
}

.ticker__item {
    transition: color 0.3s ease;
    cursor: pointer;
}

.ticker__item:hover {
    color: var(--accent-color);
}

/* Scroll lock when modal open */
body.modal-open {
    overflow: hidden;
}

.modal-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.refresh-btn:hover {
    background-color: #a00000;
}

.refresh-btn i {
    font-size: 0.8rem;
}

/* Loading Placeholder */
.loading-placeholder {
    padding: 50px;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Odia Font Specifics */
[lang="or"] body {
    line-height: 1.8;
}

.ticker__item {
    font-family: 'Noto Sans Oriya', sans-serif;
}

.news-card h3 {
    line-height: 1.5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

[data-theme="dark"] .news-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.news-card .img-container {
    height: 180px;
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 10px;
    flex-grow: 1;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #000000 100%);
    color: white;
    padding: 60px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .newsletter-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 1px solid var(--border-color);
}

.newsletter-content {
    position: relative;
    z-index: 2;
}

.newsletter-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
}

.newsletter-content p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition);
}

.newsletter-form button:hover {
    background-color: #a00000;
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding-top: 60px;
    transition: background-color var(--transition);
}

[data-theme="dark"] .main-footer {
    background-color: #050505;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-about p {
    color: #b0b0b0;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: background-color var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #ffffff;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #b0b0b0;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    background-color: #111;
    padding: 20px 0;
    text-align: center;
    color: #777;
    font-size: 0.85rem;
}

[data-theme="dark"] .footer-bottom {
    background-color: #000;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-container {
        display: none; 
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}