/*
Theme Name: News Portal
Theme URI: https://example.com/news-portal
Author: Replit Agent
Author URI: https://replit.com
Description: A professional, ad-friendly, SEO-optimized WordPress news theme.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, three-column, right-sidebar, left-sidebar, custom-colors, featured-images, custom-menu
Text Domain: news-portal
*/

:root {
    --primary-red: #C41E3A; /* India Today Red */
    --accent-color: #C41E3A;
    --text-color: #333;
    --bg-color: #fff;
    --gray-light: #f5f5f5;
    --border-color: #ddd;
    --font-main: 'Inter', 'Roboto', system-ui, sans-serif;
    --highlight-yellow: #FFEB3B;
}

/* Reset & Basics */
* { box-sizing: border-box; }
body {
    font-family: var(--font-main);
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}
a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--accent-color); }
img { max-width: 100%; height: auto; display: block; }

/* Layout Grid - Desktop: Left Sidebar | Content | Right Sidebar (Ads) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.site-content {
    display: grid;
    grid-template-columns: 260px 1fr 300px; /* Left Sidebar, Main, Right/Ad Sidebar */
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding h1 { margin: 0; font-size: 24px; font-weight: 900; }
.site-branding a { color: #000; }

/* Navigation (Desktop) */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}
.main-navigation ul li { position: relative; }
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    min-width: 200px;
    z-index: 99;
}
.main-navigation ul li:hover > ul { display: block; }

/* Left Sidebar (Nav mostly) - India Today Style */
.left-sidebar {
    position: sticky;
    top: 100px; /* Offset for header */
    height: fit-content;
    background: #fff;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.sidebar-branding {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    text-align: center;
}
.sidebar-branding h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: 2px;
}
.sidebar-sign-in, .sidebar-subscribe {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.3s;
    font-size: 14px;
}
.sidebar-sign-in {
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    background: #fff;
}
.sidebar-sign-in:hover { background: #fff3f3; }
.sidebar-subscribe {
    background: var(--primary-red);
    color: #fff;
}
.sidebar-subscribe:hover { opacity: 0.9; }
.sidebar-edition {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    background: var(--gray-light);
}
.left-nav ul { list-style: none; padding: 0; margin: 0; }
.left-nav li { margin-bottom: 0; }
.left-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
    border-left: 3px solid transparent;
    transition: 0.2s;
}
.left-nav li a:hover {
    color: var(--primary-red);
    background: #f9f9f9;
    border-left-color: var(--primary-red);
}

/* Main Content Area */
.content-area { min-width: 0; /* Prevent grid blowout */ }

/* Article Card (Archive/Index) */
.post-card {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 30px;
}
.post-thumbnail { flex: 0 0 200px; }
.post-thumbnail img { border-radius: 4px; object-fit: cover; height: 100%; }
.post-summary { flex: 1; }
.post-meta { font-size: 0.85rem; color: #666; margin-bottom: 5px; }
.post-title { margin: 5px 0 10px; font-size: 1.5rem; line-height: 1.3; }

/* Single Post */
.single-post-header { margin-bottom: 20px; }
.breadcrumbs { font-size: 0.9rem; color: #666; margin-bottom: 15px; }
.breadcrumbs a { color: var(--primary-red); font-weight: 500; }
.entry-title { 
    font-size: 2.5rem; 
    font-weight: 800; 
    line-height: 1.2; 
    margin-bottom: 15px;
    word-spacing: 0.05em;
}
/* Yellow highlight for first word in headline */
.entry-title .highlight {
    background: var(--highlight-yellow);
    padding: 2px 6px;
}
.entry-meta { 
    display: flex; 
    gap: 15px; 
    font-size: 0.9rem; 
    color: #666; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}
.entry-content { font-size: 1.125rem; line-height: 1.8; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { margin-top: 2em; margin-bottom: 0.5em; }

/* Tags */
.post-tags { margin-top: 30px; }
.tag-cloud-link { 
    display: inline-block; 
    padding: 5px 10px; 
    background: var(--gray-light); 
    border-radius: 20px; 
    font-size: 0.85rem; 
    margin-right: 10px; 
    margin-bottom: 10px;
}

/* Related Posts */
.related-posts { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.related-item h4 { margin: 10px 0 0; font-size: 1rem; }

/* Sidebar / Ad Widget Area */
.right-sidebar .widget { margin-bottom: 40px; }
.widget-title { 
    border-bottom: 2px solid var(--accent-color); 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
    display: inline-block;
}

/* Ad Zones */
.ad-zone {
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    margin: 30px 0;
    min-height: 100px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.ad-header { margin-top: 20px; }
.ad-sidebar { min-height: 250px; }

/* Social Share */
.social-share { 
    margin: 20px 0; 
    display: flex; 
    gap: 10px;
    align-items: center;
}
.share-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 5px;
}
.share-btn { 
    padding: 10px 18px; 
    border-radius: 4px; 
    color: #fff; 
    font-weight: 600; 
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.share-whatsapp { 
    background: #25D366;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.share-whatsapp:hover { background: #20ba5f; }
.share-facebook { background: #1877F2; }
.share-facebook:hover { background: #165ec7; }
.share-twitter { background: #1DA1F2; }
.share-twitter:hover { background: #1a8cd8; }

/* Comments */
.comments-area { margin-top: 50px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { margin-bottom: 20px; border-bottom: 1px solid var(--gray-light); padding-bottom: 20px; }

/* Footer */
.site-footer {
    background: #222;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 50px;
}
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-bottom { border-top: 1px solid #444; padding-top: 20px; text-align: center; font-size: 0.9rem; color: #aaa; }

/* Mobile Menu & Responsive */
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
.mobile-share-bar { display: none; }

@media (max-width: 991px) {
    .site-content { grid-template-columns: 1fr 300px; }
    .left-sidebar { 
        display: none; 
    } /* Hidden on tablet/mobile as requested */
}

@media (max-width: 768px) {
    .site-content { display: block; }
    .right-sidebar { margin-top: 40px; }
    
    .menu-toggle { display: block; }
    .main-navigation { display: none; } /* Use JS to toggle */
    
    .post-card { display: block; }
    .post-thumbnail { margin-bottom: 15px; }
    
    .entry-title { font-size: 1.8rem; }
    
    .related-grid { grid-template-columns: 1fr; }
    .footer-widgets { grid-template-columns: 1fr; }
    
    /* Mobile Sticky Share */
    .mobile-share-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #ddd;
        padding: 10px;
        z-index: 9999;
        justify-content: space-around;
    }
    .mobile-share-bar .share-btn { flex: 1; margin: 0 5px; text-align: center; }
}
