/*
Theme Name: eNewspapers V3 Premium
Theme URI: https://www.enewspapers.co.in
Description: Modern, lightning-fast, and AdSense & AMP optimized directory theme for eNewspapers.co.in.
Version: 3.6.0
Author: AI Architect
*/

:root {
    --primary: #2563eb;       /* Royal Blue CTA */
    --primary-hover: #1d4ed8;
    --navy: #0f172a;          /* Headers & Trust elements */
    --surface: #ffffff;
    --background: #f8fafc;    /* Soft off-white for contrast */
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.025);
}

/* Reset & Typography */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Merriweather', serif;
    color: var(--navy);
    line-height: 1.3;
}

a { color: var(--primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--primary-hover); }

.container {
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-branding a {
    font-size: 1.5rem;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-menu { display: flex; gap: 1.5rem; list-style: none; }
.primary-menu a { color: var(--text-main); font-weight: 500; font-size: 0.95rem; }
.primary-menu a:hover { color: var(--primary); }

.mobile-menu-toggle-input { display: none; }

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--navy);
    font-weight: 600;
}

/* Hero Section */
.hero-wrapper {
    background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(37,99,235,0.85)), url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?auto=format&fit=crop&q=80&w=2070') center/cover;
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
}
.hero-wrapper h1 { color: white; font-size: 3rem; margin-bottom: 1rem; }
.hero-wrapper p { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto; font-family: 'Inter', sans-serif;}

/* Ads */
.ad-slot {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 2rem 0;
    overflow: hidden;
}
.ad-leaderboard { width: 100%; height: 90px; max-width: 728px; margin: 2rem auto; }
.ad-native { height: 260px; /* matches grid card height roughly */ }
.ad-sidebar { width: 300px; height: 600px; position: sticky; top: 90px; margin: 0 auto;}

/* Newspaper Grid */
.newspaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* In-feed ads must span the full grid row, not sit inside a single column */
.newspaper-grid > .ad-zone--infeed {
    grid-column: 1 / -1;
}

.newspaper-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.newspaper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}
.newspaper-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.newspaper-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;}
.newspaper-card .tags { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.newspaper-card .tag { background: #eff6ff; color: var(--primary); font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: 50px; font-weight: 600;}

.read-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
}
.read-btn:hover { background: var(--primary-hover); color: white; }

/* Language Chips (Mobile Friendly Scroll) */
.language-chips-wrapper {
    margin-bottom: 3rem;
}
.language-chips-wrapper h2 { margin-bottom: 1rem; font-size: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
.language-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.chip {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }

/* Layout left-main-right */
.layout-split {
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
}
.main-column { flex: 1; min-width: 0; } /* min-width 0 prevents flex blowouts */
.sidebar-column { width: 300px; flex-shrink: 0; }

/* Single Page UI */
.single-header {
    margin-bottom: 2rem;
}
.single-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--primary); }

.single-content-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}
.big-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}
.big-read-btn:hover { transform: scale(1.05); color: white; }

/* Footer */
.site-footer {
    background: var(--navy);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}
.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: white; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .layout-split { flex-direction: column; }
    .sidebar-column { width: 100%; }
    .ad-sidebar { position: static; height: auto; min-height: 250px; width: 100%; max-width: 300px; }
}

@media (max-width: 768px) {
    .hero-wrapper h1 { font-size: 2rem; }
    
    .site-branding { flex-shrink: 0; }
    .site-header { position: relative; } /* Ensure absolute child aligns */
    .site-header .container { flex-wrap: wrap; }
    
    .mobile-menu-toggle { display: block; }
    
    .primary-menu-container {
        display: none;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: var(--surface);
        padding: 1rem 1.5rem;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border);
        z-index: 100;
    }
    
    .mobile-menu-toggle-input:checked ~ .primary-menu-container { display: block; }
    
    .primary-menu { flex-direction: column; gap: 0; }
    .primary-menu a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .primary-menu li:last-child a { border-bottom: none; }
    
    /* Horizontal scroll for Language chips - vital for mobile! */
    .language-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    .language-chips::-webkit-scrollbar { display: none; }
}
