/**
 * NepalNewsPro OK Style - Online Khabar Inspired
 * Clean, professional, maintainable
 */

/* ==========================================================================
   Variables - Online Khabar Colors
   ========================================================================== */
:root {
    --primary: #d32027;
    --primary-dark: #b51c22;
    --text: #333;
    --text-light: #666;
    --border: #e0e0e0;
    --bg: #fff;
    --bg-gray: #f5f5f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-gray);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.layout-grid { display: grid; grid-template-columns: 1fr 300px; gap: 30px; margin-top: 20px; }
.main-content { background: var(--bg); padding: 20px; border-radius: 4px; }
.sidebar { position: sticky; top: 80px; }

/* ==========================================================================
   Top Bar
   ========================================================================== */
.top-bar { background: var(--bg-gray); border-bottom: 1px solid var(--border); padding: 8px 0; font-size: 14px; }
.top-bar-content { display: flex; justify-content: space-between; align-items: center; }
.english-link { color: var(--primary); font-weight: 600; }

/* ==========================================================================
   Header - Online Khabar Style
   ========================================================================== */
.site-header { background: var(--bg); border-bottom: 2px solid var(--primary); position: sticky; top: 0; z-index: 999; }
.header-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.mobile-toggle { display: none; background: none; border: none; flex-direction: column; gap: 4px; cursor: pointer; }
.mobile-toggle span { width: 25px; height: 3px; background: var(--text); transition: .3s; }

.site-branding a { font-size: 32px; font-weight: 700; color: var(--primary); text-decoration: none; }
.custom-logo-link img { max-height: 50px; }

.header-right { display: flex; gap: 15px; }
.search-toggle { background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; }
.search-toggle:hover { color: var(--primary); }

/* Navigation */
.main-nav { border-top: 1px solid var(--border); }
.nav-menu { list-style: none; display: flex; gap: 30px; padding: 12px 0; margin: 0; }
.nav-menu a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; transition: .3s; }
.nav-menu a:hover { color: var(--primary); }

/* Search Modal */
.search-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); z-index: 9999; align-items: center; justify-content: center; }
.search-modal.active { display: flex; }
.search-modal-inner { width: 90%; max-width: 600px; position: relative; }
.search-close { position: absolute; top: -50px; right: 0; background: none; border: none; color: #fff; font-size: 40px; cursor: pointer; }
.search-form { display: flex; background: var(--bg); border-radius: 4px; overflow: hidden; }
.search-form input { flex: 1; padding: 15px 20px; border: none; font-size: 16px; }
.search-form button { padding: 15px 25px; background: var(--primary); color: #fff; border: none; cursor: pointer; }

/* Mobile Sidebar */
.mobile-sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100vh; background: var(--bg); box-shadow: 2px 0 10px rgba(0,0,0,0.1); z-index: 9999; transition: .3s; overflow-y: auto; }
.mobile-sidebar.active { left: 0; }
.mobile-sidebar-inner { padding: 20px; }
.sidebar-close { background: none; border: none; font-size: 30px; float: right; cursor: pointer; margin-bottom: 20px; }
.sidebar-menu { list-style: none; }
.sidebar-menu li { border-bottom: 1px solid var(--border); }
.sidebar-menu a { display: block; padding: 12px 0; color: var(--text); text-decoration: none; }
.sidebar-social { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.sidebar-social a { display: block; padding: 8px 0; color: var(--primary); }

/* ==========================================================================
   Hero Section - Online Khabar Layout
   ========================================================================== */
.hero-section { margin: 20px 0; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.hero-main { position: relative; overflow: hidden; border-radius: 4px; }
.hero-main img { width: 100%; height: 400px; object-fit: cover; }
.hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 25px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); color: #fff; }
.cat-badge { background: var(--primary); padding: 4px 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; border-radius: 3px; display: inline-block; margin-bottom: 10px; }
.hero-content h2 { font-size: 28px; margin: 0 0 10px 0; }
.hero-content h2 a { color: #fff; text-decoration: none; }
.hero-content .meta { font-size: 13px; opacity: 0.9; }

.hero-side { display: grid; gap: 15px; }
.hero-side-item { background: var(--bg); padding: 15px; border-radius: 4px; display: grid; grid-template-columns: 120px 1fr; gap: 15px; }
.hero-side-item img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; }
.hero-side-item h3 { font-size: 15px; margin: 0; }
.hero-side-item a { color: var(--text); text-decoration: none; }
.hero-side-item a:hover { color: var(--primary); }

/* ==========================================================================
   Category Sections
   ========================================================================== */
.category-section { margin: 30px 0; padding: 20px; background: var(--bg); border-radius: 4px; }
.section-title { font-size: 24px; color: var(--primary); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 3px solid var(--primary); }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: var(--bg); border-radius: 4px; overflow: hidden; transition: .3s; }
.post-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.post-thumb img { width: 100%; height: 180px; object-fit: cover; }
.post-body { padding: 15px; }
.post-cat { font-size: 12px; color: var(--primary); font-weight: 600; text-transform: uppercase; }
.post-title { font-size: 16px; margin: 8px 0; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { color: var(--primary); }
.post-meta { font-size: 13px; color: var(--text-light); }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar-widget { background: var(--bg); padding: 20px; border-radius: 4px; margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 18px; color: var(--primary); margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }

.trending-list { }
.trending-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.trending-item:last-child { border: none; }
.trend-num { background: var(--primary); color: #fff; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-weight: 700; }
.trending-item h4 { font-size: 14px; margin: 0 0 5px 0; }
.trending-item a { color: var(--text); text-decoration: none; }
.trending-item a:hover { color: var(--primary); }
.trending-item .meta { font-size: 12px; color: var(--text-light); }

/* ==========================================================================
   Single Post
   ========================================================================== */
.single-post header h1 { font-size: 36px; color: var(--text); margin-bottom: 15px; }
.single-post .meta { font-size: 14px; color: var(--text-light); margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.featured-img { margin: 20px 0; }
.featured-img img { width: 100%; height: auto; border-radius: 4px; }
.entry-content { font-size: 18px; line-height: 1.8; }
.entry-content p { margin-bottom: 20px; }
.entry-content h2 { font-size: 28px; margin: 30px 0 15px; }
.entry-content h3 { font-size: 24px; margin: 25px 0 12px; }
.entry-content img { max-width: 100%; height: auto; margin: 20px 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #2c2c2c; color: #fff; margin-top: 40px; }
.footer-widgets { padding: 40px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer-col h3 { color: var(--primary); margin-bottom: 15px; }
.footer-col a { color: #ccc; text-decoration: none; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { background: #1a1a1a; padding: 20px 0; text-align: center; font-size: 14px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .layout-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .nav-menu { display: none; }
    .posts-grid { grid-template-columns: 1fr; }
    .hero-side-item { grid-template-columns: 100px 1fr; }
    .single-post header h1 { font-size: 28px; }
    .entry-content { font-size: 16px; }
    .footer-grid { grid-template-columns: 1fr; }
}
