/* Modern News Portal - Main Styles */
/* Hindi News Portal Design */

:root {
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --accent-color: #f1faee;
    --text-color: #333;
    --bg-color: #fff;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Devanagari', 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
}

.top-links a {
    color: inherit;
    font-size: 0.85rem;
}

.top-links a:hover {
    color: var(--primary-color);
}

/* Header */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.logo-text .text-primary {
    color: var(--primary-color);
}

/* Navigation */
.main-nav .nav {
    justify-content: center;
    gap: 2rem;
}

.main-nav .nav-link {
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
    padding: 0.5rem 0;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary-color);
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 100%;
}

/* Breaking News Ticker */
.breaking-news {
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.breaking-label {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
}

.ticker {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Main Content */
#main-content {
    min-height: 60vh;
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    margin-bottom: 2rem;
}

.hero-slider .carousel-item {
    height: 500px;
    position: relative;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    max-width: 80%;
}

.hero-content h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.hero-content .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
}

/* News Grid */
.news-grid {
    gap: 2rem;
}

.news-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.news-card .card-img-top {
    height: 250px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 1.5rem;
}

.news-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    min-height: 3.6rem;
}

.news-card .card-text {
    color: #666;
    font-size: 0.95rem;
    min-height: 4.5rem;
}

.news-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

/* Category Section */
.category-section {
    padding: 3rem 0;
    background: var(--light-bg);
}

.category-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.category-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.category-card .card-body {
    padding: 1.5rem;
}

/* Trending Section */
.trending-section {
    padding: 3rem 0;
}

.trending-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.trending-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.trending-content .meta {
    font-size: 0.85rem;
    color: #666;
}

/* Sidebar */
.sidebar-widget {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--secondary-color), #2c4e75);
    color: white;
}

.newsletter-section h2 {
    color: white;
}

.newsletter-section .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.newsletter-section .btn-primary {
    background: var(--primary-color);
    border: none;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
}

.footer h4,
.footer h5 {
    color: white;
    position: relative;
    padding-bottom: 1rem;
}

.footer h4::after,
.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer a:hover {
    color: white;
    padding-left: 5px;
}

.footer .social-links a {
    font-size: 1.2rem;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Article Page */
.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 2rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

/* Comments Section */
.comments-section {
    margin-top: 3rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.comment-content .comment-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Search Modal */
.search-modal .modal-content {
    border-radius: 10px;
}

.search-modal .form-control {
    font-size: 1.2rem;
    padding: 1rem;
}

/* Mobile Menu */
.offcanvas {
    background: var(--bg-color);
}

.offcanvas-header {
    background: var(--secondary-color);
    color: white;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-slider .carousel-item {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .hero-slider .carousel-item {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .main-nav .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .breaking-label {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}
