/* ==========================================================================
   BHARAT EXPOSE - MASTER FRONTEND STYLESHEET
   Font: Mukta (Hindi & English Optimized)
   Features: Light/Dark Mode, Mobile-First Grid, No-Zoom Forms, Ad Slots, TTS
   ========================================================================== */

/* 1. CSS VARIABLES (THEME CONFIGURATION) */
:root {
  --font-main: 'Mukta', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Brand Colors */
  --color-primary: #dc2626;        /* गहरा लाल (News Red) */
  --color-primary-hover: #b91c1c;
  --color-secondary: #0f172a;      /* गहरा नेवी (Dark Slate) */
  --color-accent: #f59e0b;         /* एम्बर / गोल्ड */

  /* Light Theme (Default) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Ad & Status Badges */
  --ad-bg: #f8fafc;
  --badge-breaking: #ef4444;
  --badge-trending: #f59e0b;

  /* Shadows & Layout Dimensions */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-width: 1240px;
}

/* 2. DARK THEME OVERRIDES */
body.dark-theme {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #1e293b;
  --bg-card-hover: #172033;
  --border-color: #1f2937;
  --border-subtle: #1e293b;

  --text-primary: #f3f4f6;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --ad-bg: #111827;
}

/* 3. GLOBAL RESET & BASE RULES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

/* 4. CONTAINER & GRID SYSTEM */
.site-container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  margin-top: 20px;
  margin-bottom: 40px;
}
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* 5. TOP BAR & BRAND HEADER */
.site-topbar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  padding: 6px 0;
  color: var(--text-muted);
}
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.weather-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  font-weight: 600;
}

.site-header-main {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}
.brand-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.header-brand img {
  max-height: 46px;
  object-fit: contain;
}
.header-brand span {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}
.header-ad-banner {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 768px) {
  .header-ad-banner { display: none; }
}

/* 6. NAVIGATION & CATEGORY SCROLLER */
.main-nav-wrap {
  background: var(--color-secondary);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
.nav-flex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.category-scroller {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.category-scroller::-webkit-scrollbar { display: none; }

.cat-nav-link {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-nav-link:hover, .cat-nav-link.active {
  background: var(--color-primary);
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
}
.btn-nav-action {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.2s;
}
.btn-nav-action:hover {
  background: var(--color-primary);
}

/* 7. LIVE BREAKING TICKER */
.breaking-bar-wrap {
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
}
.breaking-badge {
  background: #991b1b;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.breaking-ticker-content {
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.ticker-slide-text {
  white-space: nowrap;
  display: inline-block;
  animation: ticker-slide 22s linear infinite;
}
.ticker-slide-text:hover { animation-play-state: paused; }
@keyframes ticker-slide {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* 8. TRENDING TOPICS CAPSULES BAR */
.trending-bar-wrap {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
}
.trending-flex {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.trending-flex::-webkit-scrollbar { display: none; }
.trending-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.trending-tag-pill {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: 0.2s;
}
.trending-tag-pill:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* 9. HOMEPAGE LEAD STORY (HERO SECTION) */
.hero-news-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  margin-bottom: 30px;
}
@media (max-width: 820px) {
  .hero-news-grid { grid-template-columns: 1fr; }
}

.main-lead-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.main-lead-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.main-lead-card:hover img {
  transform: scale(1.03);
}
.main-lead-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(15,23,42,0.95) 85%);
  padding: 24px 20px;
  color: #ffffff;
}
.lead-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  margin-top: 6px;
}
.main-lead-card:hover .lead-title {
  color: #fef08a;
}

.sub-lead-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sub-lead-card {
  display: flex;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  transition: 0.2s;
}
.sub-lead-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.sub-lead-thumb {
  width: 115px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.sub-lead-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sub-lead-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 10. CATEGORY SECTION BLOCK & POST CARDS */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.section-title-tag {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
  position: relative;
  display: inline-block;
}
.section-title-tag::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
}
.section-more-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}
.section-more-link:hover { color: var(--color-primary); }

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
@media (max-width: 768px) {
  .cards-grid-3 { grid-template-columns: 1fr; }
}

.news-standard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.news-standard-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.standard-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.standard-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-category-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.standard-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.post-meta-row {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 11. ARTICLE SINGLE PAGE (DETAIL VIEW) */
.article-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) {
  .article-container { padding: 16px 12px; }
}

.article-headline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .article-headline { font-size: 1.5rem; }
}

.article-byline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  gap: 10px;
}
.author-byline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* TTS ऑडियो प्लेयर विजेट */
.tts-player-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.tts-play-btn {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}
.tts-play-btn:hover { background: var(--color-primary-hover); }

.article-featured-image {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.article-content-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.article-content-body p {
  margin-bottom: 18px;
}
.article-content-body img {
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

/* सोशल शेयरिंग स्ट्रिप */
.share-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.share-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.share-wa { background: #22c55e; }
.share-fb { background: #1877f2; }
.share-x  { background: #000000; }
.share-tg { background: #0088cc; }

/* 12. SIDEBAR WIDGETS */
.sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.sidebar-box-head {
  font-size: 1.15rem;
  font-weight: 800;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.viral-list-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.viral-list-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.viral-rank-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  width: 24px;
}

/* 13. ADVERTISING SLOTS */
.ad-slot-wrapper {
  background: var(--ad-bg);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  margin: 20px 0;
  overflow: hidden;
}
.ad-label-tag {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* 14. FOOTER & COMPLIANCE */
.site-footer {
  background: var(--color-secondary);
  color: #cbd5e1;
  padding-top: 45px;
  padding-bottom: 25px;
  margin-top: auto;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 35px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
.footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
  padding-bottom: 4px;
}
.footer-links-list {
  list-style: none;
}
.footer-links-list li {
  margin-bottom: 8px;
}
.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* 15. FLOATING WHATSAPP BUTTON */
.float-wa-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 54px;
  height: 54px;
  background: #22c55e;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  z-index: 9999;
  transition: transform 0.2s;
}
.float-wa-btn:hover {
  transform: scale(1.1);
  color: #ffffff;
}

/* 16. MOBILE-FIRST ANTI-ZOOM INP RULES */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  font-size: 16px !important; /* iOS/Android पर ऑटो-ज़ूम रोकता है */
  font-family: inherit;
}
