/* 
 * Jan Samvad Samachar - Blue & Golden Theme
 * A beautiful Hindi news portal stylesheet
 */

/* ========================================
   CSS Variables - Blue & Golden Theme
======================================== */
:root {
    /* Primary Colors - Royal Blue */
    --primary: #1e3a8a;
    --primary-dark: #1e2f5e;
    --primary-light: #3b5bdb;
    
    /* Accent Colors - Golden */
    --gold: #d4a72c;
    --gold-light: #f0c84d;
    --gold-dark: #b8860b;
    
    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Status Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    
    /* Typography */
    --font-primary: 'Noto Sans Devanagari', sans-serif;
    
    /* Spacing */
    --container-max: 1280px;
    --header-height: 140px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ========================================
   Base Styles
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f8fafc 0%, #e8eef5 100%);
    overflow-x: hidden; /* Prevent horizontal scroll */
    min-height: 100vh;
}

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

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

ul, ol {
    list-style: none;
}

/* ========================================
   Container
======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding: 0 20px;
}

/* ========================================
   Header Styles
======================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1000;
}

/* Header Top Bar */
.header-top {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 8px 0;
    overflow: hidden; /* Prevent overflow */
}

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

.date-time {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 500;
    flex-wrap: wrap;
}

.reg-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#weather-widget {
    display: inline-block;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    color: var(--white);
    opacity: 0.8;
    transition: all 0.2s ease;
}

.social-links a:hover {
    opacity: 1;
    color: var(--gold-light);
    transform: translateY(-2px);
}

/* Header Main */
.header-main {
    padding: 0px 0;
    border-bottom: 3px solid var(--gold);
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 110px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 40px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold-dark);
    letter-spacing: 2px;
}

/* Search Form */
.search-form {
    display: flex;
    background: var(--gray-100);
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.search-form input {
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 15px;
    width: 280px;
    font-family: inherit;
    outline: none;
}

.search-form button {
    background: var(--primary);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--white);
    transition: background 0.2s ease;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Navigation */
.nav-main {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-menu li a {
    display: block;
    padding: 14px 20px;
    color: var(--white);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--gold);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========================================
   Breaking News Ticker
======================================== */
.breaking-ticker {
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    padding: 10px 0;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticker-label {
    background: var(--danger);
    color: var(--white);
    padding: 6px 16px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
}

.ticker-items {
    display: flex;
    gap: 60px;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    color: var(--gray-900);
    font-weight: 600;
    white-space: nowrap;
    font-size: 15px;
}

.ticker-item:hover {
    color: var(--primary);
}

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

/* Mobile fixes for breaking news ticker */
@media (max-width: 768px) {
    .ticker-label {
        padding: 4px 10px;
        font-size: 11px;
        flex-shrink: 0;
    }
    
    .ticker-items {
        animation-duration: 15s; /* Faster on mobile */
    }
    
    .ticker-item {
        font-size: 13px;
    }
    
    .ticker-content {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ticker-label {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .ticker-items {
        animation-duration: 10s; /* Even faster on small screens */
    }
    
    .ticker-item {
        font-size: 12px;
    }
}

/* Promotional Scrolling Ticker */
.promo-ticker {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 12px 0;
    overflow: hidden;
    border-bottom: 2px solid var(--gold);
}

.promo-ticker-content {
    /* overflow: hidden; */
    white-space: nowrap;
    display: flex;
}

.promo-ticker-text {
    display: inline-block;
    color: var(--gold-light);
    font-size: 15px;
    font-weight: 500;
    padding-right: 60px;
    white-space: nowrap;
    flex-shrink: 0;
}

.promo-ticker-content {
    animation: promo-scroll 25s linear infinite;
}

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

/* Mobile adjustments for promotional ticker */
@media (max-width: 767px) {
    .promo-ticker-content {
        animation-duration: 18s;
    }
}

@media (max-width: 480px) {
    .promo-ticker-content {
        animation-duration: 14s;
    }
}

/* ========================================
   Main Content Layout
======================================== */
    .main-content {
        padding: 30px 0 60px;
    }
    
    /* Reduce main content padding on mobile */
    @media (max-width: 768px) {
        .main-content {
            padding: 15px 0 30px;
        }
    }

.home-layout,
.category-layout,
.search-layout,
.page-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* ========================================
   Featured Section
======================================== */
.featured-section {
    margin-bottom: 40px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.featured-main {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.featured-main:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-main:hover .featured-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: var(--white);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
}

.featured-content {
    padding: 25px;
}

.featured-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    margin-bottom: 12px;
}

.featured-content p {
    color: var(--gray-600);
    font-size: 15px;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--gray-500);
}

/* Featured Sidebar */
.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-small {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
}

.featured-small:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.featured-small-image {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
}

.featured-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.featured-small-content {
    padding: 10px 15px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-badge-small {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
    width: fit-content;
}

.featured-small-content h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.time-ago {
    font-size: 12px;
    color: var(--gray-500);
}

/* ========================================
   Section Headers
======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--gold);
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon {
    font-size: 24px;
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.view-all:hover {
    color: var(--gold-dark);
}

/* ========================================
   News Grid & Cards
======================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.news-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.news-card:hover .news-card-image img {
    transform: scale(1.08);
}

.placeholder-image-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.category-badge-card {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
}

.news-card-content {
    padding: 20px;
}

.news-card-content h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--gray-800);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-content p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray-400);
}

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

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 20px;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post a {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 12px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.popular-post a:hover {
    background: var(--gray-50);
}

.post-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    min-width: 40px;
}

.popular-post-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.4;
    margin-bottom: 4px;
}

.popular-post-content .views {
    font-size: 12px;
    color: var(--gray-400);
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar for Category List */
.category-list::-webkit-scrollbar {
    width: 6px;
}

.category-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.category-list li a:hover,
.category-list li.active a {
    background: var(--primary);
    color: var(--white);
    border-left-color: var(--gold);
}

.cat-name {
    font-weight: 500;
}

.cat-count {
    background: var(--white);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Social Widget */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    transition: all 0.2s ease;
}

.social-btn:hover {
    transform: translateX(5px);
}

.social-btn .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.social-btn.facebook { background: #1877f2; }
.social-btn.twitter { background: #000; }
.social-btn.youtube { background: #ff0000; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-btn.whatsapp { background: #25d366; }

/* ========================================
   Single Post Styles
======================================== */
.single-post {
    padding: 20px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .current {
    color: var(--gray-700);
}

/* Banner Ads Section */
.banner-ads-section {
    margin: 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.banner-item {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
}

.banner-item:last-child {
    margin-bottom: 0;
}

.banner-link {
    display: block;
    width: 100%;
    transition: opacity 0.2s ease;
}

.banner-link:hover {
    opacity: 0.9;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: contain;
    background: var(--gray-50);
}

/* Desktop: Show multiple banners side by side */
@media (min-width: 768px) {
    .banner-ads-section {
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .banner-item {
        flex: 0 0 auto;
        width: auto;
        max-width: 728px; /* Standard leaderboard size */
        margin-bottom: 0;
    }
    
    .banner-item:only-child {
        width: 100%;
        max-width: 100%;
    }
    
    /* If 2 banners, each takes ~48% */
    .banner-ads-section:has(.banner-item:nth-child(2):last-child) .banner-item {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    
    /* If 3+ banners, show in row with auto width */
    .banner-ads-section:has(.banner-item:nth-child(3)) .banner-item {
        flex: 0 0 auto;
        max-width: 300px; /* Standard medium rectangle */
    }
}

/* Mobile: One banner per section (full width) */
@media (max-width: 767px) {
    .banner-ads-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .banner-item {
        width: 100%;
        max-width: 100%;
    }
    
    .banner-image {
        max-height: 200px;
        object-fit: contain;
    }
}

.post-header {
    margin-bottom: 30px;
}

.post-category {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.post-meta-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 20px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
}

.post-date {
    font-size: 13px;
    color: var(--gray-500);
}

.post-stats {
    font-size: 14px;
    color: var(--gray-500);
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
}

.post-content {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    font-size: 17px;
    line-height: 1.9;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h2, 
.post-content h3 {
    color: var(--primary);
    margin: 30px 0 15px;
}

.post-content img {
    border-radius: var(--radius);
    margin: 20px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--gold);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: var(--gray-600);
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
}

.share-label {
    font-weight: 600;
    color: var(--gray-700);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy-btn { 
    background: var(--primary); 
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.share-btn.copy-btn:active {
    transform: scale(0.98);
}

.share-icon {
    font-weight: bold;
    margin-right: 5px;
}

/* Mobile Share Bar - Above Title */
.mobile-share-bar {
    display: none; /* Hidden on desktop */
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 12px 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow-md);
}

.mobile-share-label {
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 600;
}

.mobile-share-buttons {
    display: flex;
    gap: 10px;
}

.mobile-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-share-btn:hover {
    transform: scale(1.1);
}

.mobile-share-btn.facebook { background: #1877f2; }
.mobile-share-btn.twitter { background: #000; }
.mobile-share-btn.whatsapp { background: #25d366; }
.mobile-share-btn.copy-link { 
    background: var(--primary); 
    border: none;
    cursor: pointer;
}
.mobile-share-btn.copy-link:active {
    transform: scale(0.95);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    max-width: 48%;
}

.post-navigation a:hover {
    background: var(--primary);
    color: var(--white);
}

.post-navigation .nav-previous {
    align-items: flex-start;
}

.post-navigation .nav-next {
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
}

.post-navigation .nav-subtitle {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 5px;
}

.post-navigation a:hover .nav-subtitle {
    color: var(--gold-light);
}

.post-navigation .nav-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Category More Posts */
.category-more-posts {
    margin-top: 40px;
    padding: 25px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.category-more-posts .section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-post-item a {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: var(--white);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.category-post-item a:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.category-post-item .post-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-200);
}

.category-post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-post-item .thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--gray-200);
}

.category-post-item .post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-post-item .post-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.4;
    margin-bottom: 5px;
}

.category-post-item .post-time {
    font-size: 12px;
    color: var(--gray-500);
}

.view-all-category {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-all-category:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* AdSense Containers - Only show when ad loads */
.ad-container {
    margin: 20px 0;
    text-align: center;
    min-height: 0; /* No minimum height - prevents empty gaps */
    overflow: hidden;
}

/* Only show container styling when ad is present */
.ad-container:has(.adsbygoogle[data-ad-status="filled"]) {
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

/* Hide empty ad containers completely */
.ad-container:empty,
.ad-container:has(.adsbygoogle:empty),
.ad-container:has(.adsbygoogle[data-ad-status="unfilled"]) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

/* Fallback for browsers without :has() support - hide label */
.ad-container::before {
    display: none; /* Remove "विज्ञापन" label that shows even without ads */
}

.ad-in-article {
    margin: 15px 0;
}

.ad-home-banner {
    margin: 20px 0;
}

.ad-after-content {
    margin-top: 20px;
}

.ad-sidebar {
    margin-bottom: 15px;
}

/* Ensure adsbygoogle element doesn't create gaps when empty */
.adsbygoogle:empty {
    display: none !important;
}

.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Related Posts */
.related-posts {
    margin-top: 50px;
}

.related-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--gold);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.related-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-related {
    width: 100%;
    height: 100%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.related-card h3 {
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.related-date {
    display: block;
    padding: 0 15px 15px;
    font-size: 12px;
    color: var(--gray-400);
}

/* ========================================
   Category Page
======================================== */
.category-header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    color: var(--white);
}

.category-title {
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.category-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}

.category-description {
    margin-top: 10px;
    opacity: 0.9;
}

.post-count {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.8;
}

/* ========================================
   Search Page
======================================== */
.search-header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.search-query {
    margin-top: 10px;
    color: var(--gray-600);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.search-result-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.search-result-card a {
    display: flex;
    gap: 25px;
}

.result-image {
    width: 250px;
    height: 160px;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-search {
    width: 100%;
    height: 100%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.result-content {
    padding: 20px 20px 20px 0;
    flex: 1;
}

.result-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.result-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.result-content p {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 12px;
}

.result-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--gray-400);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
}

.no-results-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 24px;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--gray-500);
    margin-bottom: 25px;
}

.btn-home {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-home:hover {
    background: var(--primary-dark);
}

/* ========================================
   Pagination
======================================== */
.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper nav {
    display: flex;
    gap: 8px;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 10px 16px;
    background: var(--white);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-wrapper a:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination-wrapper .active span {
    background: var(--primary);
    color: var(--white);
}

/* ========================================
   Footer
======================================== */
.footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
}

.footer-logo-image {
    height: 180px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

.footer-logo .logo-icon {
    font-size: 30px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.7;
}

.footer-links h4,
.footer-categories h4,
.footer-contact h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gold);
}

.footer-links ul,
.footer-categories ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-categories a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-categories a:hover {
    color: var(--gold);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    color: var(--gold);
    font-size: 14px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .home-layout,
    .category-layout,
    .search-layout,
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Make header not sticky on mobile - saves space */
    .header {
        position: relative;
    }
    
    /* Fix header-top layout on mobile */
    .header-top-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    /* Hide date on mobile */
    .header-top #current-date {
        display: none;
    }
    
    /* Registration number - hide on mobile */
    .header-top .reg-number {
        display: none;
    }
    
    /* Weather widget - center on mobile */
    .header-top .date-time {
        width: auto;
        flex: none;
    }
    
    .header-top #weather-widget {
        margin-left: 0;
    }

    /* Social links - compact row on mobile */
    .header-top .social-links {
        display: flex;
        gap: 6px;
        justify-content: center;
        order: -1; /* Move social icons to top */
        width: 100%;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 4px;
    }
    
    .header-top .social-links a {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.15);
        border-radius: 50%;
        padding: 0;
    }
    
    .header-top .social-links svg {
        width: 14px;
        height: 14px;
    }
    
    /* Hide language switcher on mobile header - too cramped */
    .header-top .lang-switcher {
        display: none;
    }
    
    /* Reduce header-main padding */
    .header-main {
        padding: 10px 0;
    }
    
    /* Make logo smaller on mobile */
    .logo-image {
        height: 60px;
    }
    
    /* Hide search form on mobile */
    .search-form {
        display: none;
    }
    
    /* Center logo on mobile */
    .header-main-content {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
    
    /* Reduce promotional ticker */
    .promo-ticker {
        padding: 8px 0;
    }
    
    .promo-ticker-text {
        font-size: 12px;
    }
    
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 101;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .nav-main .container {
        position: relative;
        padding: 12px 20px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 10px 0;
        z-index: 100;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li a {
        padding: 12px 20px;
        border-bottom: none;
        font-size: 13px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-sidebar {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
    }
    
    .featured-small {
        min-width: 280px;
    }
    
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-content {
        padding: 20px;
        font-size: 16px;
    }
    
    .search-result-card a {
        flex-direction: column;
    }
    
    .result-image {
        width: 100%;
        height: 180px;
    }
    
    .result-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Even smaller logo on very small screens */
    .logo-image {
        height: 150px;
    }
    
    .logo-title {
        font-size: 20px;
    }
    
    .logo-subtitle {
        font-size: 12px;
    }
    
    /* Further reduce header padding */
    .header-main {
        padding: 0;
    }
    
    .promo-ticker {
        padding: 6px 0;
    }
    
    .promo-ticker-text {
        font-size: 11px;
    }
    
    .featured-content h2 {
        font-size: 20px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .post-meta-full {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .share-section {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Show mobile share bar on mobile */
    .mobile-share-bar {
        display: flex;
    }
    
    /* Hide desktop share section on mobile (optional - keep both visible) */
    /* .desktop-share { display: none; } */
}

/* ========================================
   Utility Classes
======================================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gold { color: var(--gold); }
.bg-primary { background: var(--primary); }
.bg-gold { background: var(--gold); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.py-20 { padding-top: 20px; padding-bottom: 20px; }

/* ========================================
   Image Loading Optimization
======================================== */
/* Lazy load fade-in effect */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* Image placeholder background */
.news-card-image,
.featured-image,
.featured-small-image,
.post-featured-image,
.banner-item {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    position: relative;
    overflow: hidden;
}

/* Loading shimmer effect */
.news-card-image::before,
.featured-image::before,
.post-featured-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.news-card-image img,
.featured-image img,
.post-featured-image img {
    position: relative;
    z-index: 2;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Remove shimmer when image loaded */
.news-card-image.loaded::before,
.featured-image.loaded::before,
.post-featured-image.loaded::before {
    display: none;
}

/* ========================================
   Back to Top Button
======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.5);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   View All Posts Button
======================================== */
.view-all-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.view-all-btn svg {
    transition: transform 0.3s ease;
}

.view-all-btn:hover svg {
    transform: translateX(4px);
}

@media (max-width: 576px) {
    .view-all-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .view-all-btn-wrapper {
        padding: 0 1rem;
    }
}

