/* ==========================================
   PrabhatTime - Main Stylesheet
   ========================================== */

:root {
  --primary: #c0392b;
  --primary-dark: #922b21;
  --primary-light: #e74c3c;
  --secondary: #2c3e50;
  --accent: #f39c12;
  --bg: #f4f6f8;
  --white: #ffffff;
  --text: #2d3436;
  --text-muted: #636e72;
  --border: #dee2e6;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --font: 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* ========== TOP BAR ========== */
.top-bar {
  background: var(--secondary);
  color: #ccc;
  font-size: 12px;
  padding: 5px 0;
}
.top-bar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.date-time { color: #aaa; }
.social-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px;
  font-weight: 600; color: white; text-transform: uppercase;
}
.social-btn.whatsapp { background: #25d366; }
.social-btn.telegram { background: #0088cc; }
.social-btn:hover { opacity: 0.9; color: white; }
.search-form-top { display: flex; align-items: center; }
.search-input-top {
  border: none; border-radius: 20px 0 0 20px;
  padding: 5px 14px; font-size: 12px; width: 200px;
  background: rgba(255,255,255,0.15); color: white;
  outline: none;
}
.search-input-top::placeholder { color: rgba(255,255,255,0.5); }
.search-form-top button {
  background: var(--primary); border: none; color: white;
  padding: 5px 12px; border-radius: 0 20px 20px 0; cursor: pointer;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--primary);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.site-logo { display: inline-flex; align-items: center; gap: 10px; }
.text-logo { line-height: 1.2; }
.logo-main {
  display: block; font-size: 24px; font-weight: 800;
  color: white; letter-spacing: -0.5px;
}
.logo-sub { display: block; font-size: 11px; color: rgba(255,255,255,0.8); }
.navbar-toggler {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  color: white; border-radius: 6px; padding: 6px 10px; font-size: 20px; cursor: pointer;
}

/* ========== HEADER AD ========== */
.header-ad { background: #fff; border-bottom: 1px solid var(--border); padding: 8px 0; text-align: center; }
.ad-container { overflow: hidden; }

/* ========== BREAKING NEWS ========== */
.breaking-news {
  background: var(--secondary); color: white;
  padding: 7px 0; font-size: 13px;
}
.breaking-label {
  background: var(--primary); color: white;
  padding: 4px 14px; font-weight: 700; font-size: 12px;
  white-space: nowrap; flex-shrink: 0; border-radius: 3px;
  margin-right: 10px; letter-spacing: 0.5px;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker { display: flex; gap: 30px; animation: ticker 30s linear infinite; white-space: nowrap; }
.ticker:hover { animation-play-state: paused; }
.ticker-item a { color: rgba(255,255,255,0.9); }
.ticker-item a:hover { color: var(--accent); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ========== NAV ========== */
.main-nav {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky; top: 60px; z-index: 999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.nav-list { display: flex; flex-wrap: wrap; list-style: none; gap: 0; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link-item {
  display: block; padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: var(--secondary); white-space: nowrap; transition: all 0.2s;
}
.nav-item:hover .nav-link-item, .nav-item.active .nav-link-item {
  color: var(--primary); background: rgba(192,57,43,0.06);
}
.nav-item.active .nav-link-item { border-bottom: 2px solid var(--primary); }

/* ========== MOBILE MENU ========== */
.mobile-menu {
  position: fixed; top: 0; left: -300px; width: 290px; height: 100%;
  background: var(--secondary); z-index: 9999; transition: left 0.3s ease;
  overflow-y: auto;
}
.mobile-menu.open { left: 0; }
.mobile-menu-header {
  background: var(--primary); padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center; color: white; font-weight: 700;
}
.mobile-menu-header button { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }
.mobile-search { padding: 12px; display: flex; gap: 6px; }
.mobile-search input {
  flex: 1; border: none; border-radius: 6px; padding: 8px 12px; font-size: 13px;
}
.mobile-search button {
  background: var(--primary); border: none; border-radius: 6px; padding: 8px 12px; color: white; cursor: pointer;
}
.mobile-nav-list { list-style: none; padding: 10px 0; }
.mobile-nav-list li a {
  display: block; padding: 12px 20px; color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 14px;
}
.mobile-nav-list li a:hover { background: rgba(255,255,255,0.08); color: var(--accent); }
.mobile-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 9998; display: none;
}
.mobile-overlay.open { display: block; }

/* ========== MAIN CONTENT ========== */
.main-content { padding: 20px 0 30px; }
.content-area { flex: 1; min-width: 0; }

/* Layout grid */
.page-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
@media (max-width: 991px) { .page-grid { grid-template-columns: 1fr; } }

/* ========== CARDS ========== */
.post-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.post-card-img { position: relative; overflow: hidden; }
.post-card-img img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 14px; }
.post-category {
  display: inline-block; background: var(--primary); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 3px; text-transform: uppercase; margin-bottom: 8px;
}
.post-card-title {
  font-size: 14px; font-weight: 700; line-height: 1.4;
  color: var(--text); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title:hover { color: var(--primary); }
.post-meta { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.post-meta i { color: var(--primary); }

/* Breaking badge */
.badge-breaking {
  position: absolute; top: 8px; left: 8px;
  background: var(--primary); color: white;
  font-size: 10px; padding: 2px 8px; border-radius: 3px; font-weight: 700;
}

/* ========== FEATURED / HERO SECTION ========== */
.hero-section { margin-bottom: 20px; }
.hero-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--white); box-shadow: var(--card-shadow);
}
.hero-card img { width: 100%; height: 380px; object-fit: cover; }
.hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 30px 20px 20px;
}
.hero-cat { background: var(--primary); color: white; font-size: 11px; padding: 2px 10px; border-radius: 3px; font-weight: 700; }
.hero-title { font-size: 20px; font-weight: 800; color: white; line-height: 1.3; margin-top: 8px; }
.hero-title a { color: white; }
.hero-title a:hover { color: var(--accent); }
.hero-meta { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 6px; }

/* ========== SECTION HEADINGS ========== */
.section-title {
  font-size: 16px; font-weight: 800; color: var(--secondary);
  padding: 8px 0 8px 14px;
  border-left: 4px solid var(--primary);
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title a { font-size: 12px; font-weight: 500; color: var(--primary); text-transform: none; }

/* ========== SINGLE POST ========== */
.single-post-header { margin-bottom: 20px; }
.single-post-title { font-size: 26px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.single-post-meta { display: flex; gap: 16px; color: var(--text-muted); font-size: 13px; flex-wrap: wrap; margin-bottom: 16px; }
.single-post-meta i { color: var(--primary); }
.single-post-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.single-post-img img { width: 100%; max-height: 450px; object-fit: cover; }
.post-img-caption { font-size: 12px; color: var(--text-muted); text-align: center; padding: 6px 0; }

/* Post content */
.post-content { font-size: 16px; line-height: 1.9; color: #333; }
.post-content h1, .post-content h2, .post-content h3 {
  font-weight: 800; color: var(--secondary); margin: 24px 0 12px;
}
.post-content h2 { font-size: 20px; border-left: 4px solid var(--primary); padding-left: 12px; }
.post-content h3 { font-size: 17px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 16px; }
.post-content li { margin-bottom: 8px; }
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.post-content table th { background: var(--primary); color: white; padding: 10px; text-align: left; }
.post-content table td { border: 1px solid var(--border); padding: 9px 10px; }
.post-content table tr:nth-child(even) td { background: #f9f9f9; }
.post-content img { border-radius: 6px; max-width: 100%; height: auto; margin: 10px 0; }
.post-content a { color: var(--primary); }
.post-content blockquote {
  border-left: 4px solid var(--primary); background: #fef9f9;
  padding: 16px 20px; margin: 20px 0; border-radius: 0 8px 8px 0;
  font-style: italic; color: #555;
}
.post-content .important-box {
  background: #fff3cd; border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0;
}

/* Social Share */
.share-box { background: var(--white); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; box-shadow: var(--card-shadow); }
.share-title { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
  color: white; cursor: pointer; border: none; transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.9; color: white; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.copy { background: #636e72; }
.share-btn.whatsapp-web { background: #128c7e; }

/* Related Posts */
.related-posts { margin-top: 30px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 576px) { .related-grid { grid-template-columns: 1fr; } }

/* Tags */
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.post-tag {
  background: #f0f0f0; color: var(--text-muted); padding: 4px 12px;
  border-radius: 20px; font-size: 12px; transition: all 0.2s;
}
.post-tag:hover { background: var(--primary); color: white; }

/* ========== SIDEBAR ========== */
.sidebar { /* sticky handled per-widget */ }
.sidebar-widget {
  background: var(--white); border-radius: var(--radius);
  padding: 18px; margin-bottom: 20px; box-shadow: var(--card-shadow);
}
.widget-title {
  font-size: 14px; font-weight: 800; color: var(--secondary);
  padding-bottom: 10px; border-bottom: 2px solid var(--primary);
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px;
}
.widget-title i { color: var(--primary); margin-right: 5px; }

/* Join channels sidebar */
.join-channels { background: linear-gradient(135deg, #1a252f, #2c3e50); }
.join-channels .widget-title { color: white; border-color: var(--accent); }
.channel-btns { display: flex; flex-direction: column; gap: 10px; }
.channel-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 8px; color: white; font-size: 13px;
  transition: transform 0.2s, opacity 0.2s;
}
.channel-btn:hover { transform: translateX(4px); opacity: 0.95; color: white; }
.whatsapp-channel { background: #25d366; }
.telegram-channel { background: #0088cc; }
.channel-btn i { font-size: 22px; flex-shrink: 0; }
.channel-btn strong { display: block; font-size: 13px; }
.channel-btn span { font-size: 11px; opacity: 0.85; }

/* Popular Posts */
.popular-list { list-style: none; }
.popular-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.popular-item:last-child { border-bottom: none; }
.pop-num { background: var(--primary); color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; margin-top: 2px; }
.pop-info { flex: 1; min-width: 0; }
.pop-img { width: 70px; height: 48px; object-fit: cover; border-radius: 4px; float: right; margin-left: 8px; }
.pop-title { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pop-title:hover { color: var(--primary); }
.pop-date { font-size: 11px; color: var(--text-muted); display: block; margin-top: 4px; }

/* Categories widget */
.cat-list { list-style: none; }
.cat-list li { border-bottom: 1px solid var(--border); }
.cat-list li:last-child { border-bottom: none; }
.cat-list li a { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 13px; color: var(--text); }
.cat-list li a:hover { color: var(--primary); }
.cat-count { background: var(--primary); color: white; font-size: 10px; padding: 1px 7px; border-radius: 10px; }

/* Sticky ad */
.sticky-ad { position: sticky; top: 120px; }

/* ========== FOOTER ========== */
.site-footer { background: var(--secondary); color: rgba(255,255,255,0.8); padding: 40px 0 0; margin-top: 30px; }
.footer-widget { margin-bottom: 10px; }
.footer-title { color: white; font-size: 15px; font-weight: 800; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid rgba(255,255,255,0.1); }
.footer-desc { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.65); margin-bottom: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: white; font-size: 16px; transition: background 0.2s; }
.footer-social a:hover { background: var(--primary); }
.footer-links { list-style: none; }
.footer-links li { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.footer-links li:last-child { border-bottom: none; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.65); }
.footer-links a:hover { color: var(--accent); }
.footer-links i { font-size: 10px; margin-right: 4px; }
.join-btn { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; color: white; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.join-btn:hover { color: white; opacity: 0.92; }
.whatsapp-btn { background: #25d366; }
.telegram-btn { background: #0088cc; }
.footer-hr { border-color: rgba(255,255,255,0.1); margin: 20px 0 0; }
.footer-bottom { padding: 14px 0; background: rgba(0,0,0,0.2); }
.copyright { font-size: 12px; color: rgba(255,255,255,0.5); margin: 0; }
.powered { font-size: 12px; color: rgba(255,255,255,0.4); }
.powered a { color: rgba(255,255,255,0.6); }

/* ========== FLOAT BUTTONS ========== */
.whatsapp-float {
  position: fixed; bottom: 70px; right: 20px; z-index: 1000;
  background: #25d366; color: white; width: 50px; height: 50px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  animation: pulse 2s infinite;
}
.whatsapp-float:hover { color: white; transform: scale(1.1); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); } 70% { box-shadow: 0 0 0 10px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.back-to-top {
  position: fixed; bottom: 16px; right: 20px; z-index: 1000;
  background: var(--primary); color: white; width: 40px; height: 40px;
  border: none; border-radius: 50%; cursor: pointer; display: none;
  font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.back-to-top.show { display: flex; align-items: center; justify-content: center; }

/* ========== PAGINATION ========== */
.pagination { gap: 4px; }
.page-link { color: var(--primary); border-color: var(--border); border-radius: 6px !important; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link:hover { color: var(--primary-dark); }

/* ========== BREADCRUMB ========== */
.breadcrumb { font-size: 12px; padding: 8px 0; margin-bottom: 16px; }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: var(--text-muted); }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ========== SEARCH PAGE ========== */
.search-hero { background: var(--primary); padding: 30px; border-radius: var(--radius); margin-bottom: 24px; text-align: center; }
.search-hero h1 { color: white; font-size: 20px; margin-bottom: 14px; }
.search-form { display: flex; max-width: 500px; margin: 0 auto; }
.search-input { flex: 1; border: none; border-radius: 6px 0 0 6px; padding: 12px 16px; font-size: 15px; }
.search-submit { background: var(--secondary); color: white; border: none; padding: 12px 20px; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 15px; }

/* ========== ALERT / NOTICE BOX ========== */
.alert-important { background: #fff3cd; border: 1px solid #ffc107; border-left: 4px solid #ffc107; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0; font-size: 14px; }

/* ========== AD PLACEHOLDER ========== */
.ad-widget { text-align: center; background: #f9f9f9; }
.ad-placeholder { background: #eee; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #999; font-size: 12px; }

/* ========== QUICK INFO TABLE ========== */
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.info-table td { padding: 9px 12px; border: 1px solid var(--border); }
.info-table td:first-child { font-weight: 700; background: #f8f9fa; width: 35%; }

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) { .main-nav { display: none; } }
@media (max-width: 767px) {
  .hero-card img { height: 220px; }
  .hero-title { font-size: 16px; }
  .single-post-title { font-size: 20px; }
  .page-title { font-size: 20px; }
}
@media (max-width: 575px) {
  .share-btns { flex-direction: column; }
  .share-btn { justify-content: center; }
}

/* ========== UTILITY ========== */
.text-primary-red { color: var(--primary) !important; }
.bg-primary-red { background: var(--primary) !important; }
.label-new { background: #27ae60; color: white; font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 700; }
.label-hot { background: var(--primary); color: white; font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 700; }
