/*
Theme Name: NewzQuest_Theme
Theme URI: https://newzquest.in
Author: NewzQuest Engineering
Author URI: https://newzquest.in
Description: World-Class Enterprise Digital News Portal Theme with Light/Dark Mode Toggle, Pinned Tickers, Featured Post Slider, NShorts Reel, Hyperlocal Desks, Clean Single Post Paragraph Formatting, and 95+ Mobile Performance Score.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: newzquest-theme
*/

/* ==========================================================================
   1. DESIGN TOKENS & COLOR PALETTE (DEFAULT LIGHT THEME)
   ========================================================================== */
:root {
  --nq-primary: #dc2626;
  --nq-primary-hover: #b91c1c;
  --nq-secondary: #0f172a;
  --nq-accent: #d97706;
  --nq-success: #10b981;
  --nq-info: #0284c7;

  /* LIGHT MODE DEFAULT */
  --nq-bg-page: #f8fafc;
  --nq-card-bg: #ffffff;
  --nq-card-border: #e2e8f0;

  --nq-text-heading: #0f172a;
  --nq-text-body: #1e293b;
  --nq-text-muted: #4b5563;
  --nq-text-light: #64748b;

  --nq-header-bg: #ffffff;
  --nq-header-border: #e2e8f0;

  --nq-container: 1280px;
  --nq-radius: 10px;
  --nq-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --nq-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.12);

  --nq-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nq-font-heading: 'Playfair Display', Georgia, serif;
}

/* DARK MODE OVERRIDE (WHEN TOGGLED) */
body.dark-mode, html[data-theme="dark"] body {
  --nq-bg-page: #0f172a;
  --nq-card-bg: #1e293b;
  --nq-card-border: #334155;

  --nq-text-heading: #ffffff;
  --nq-text-body: #f1f5f9;
  --nq-text-muted: #cbd5e1;
  --nq-text-light: #94a3b8;

  --nq-header-bg: #1e293b;
  --nq-header-border: #334155;
}

/* ==========================================================================
   2. FAIL-SAFE RESET & STRICT MEDIA CONTAINMENT
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  background-color: var(--nq-bg-page);
  color: var(--nq-text-body);
  font-family: var(--nq-font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Strict SVG & Media Restrictions — Prevents Giant Icon Overflows */
svg {
  max-width: 28px !important;
  max-height: 28px !important;
  height: auto !important;
  display: inline-block !important;
}

.entry-content svg, article svg {
  max-width: 100% !important;
  max-height: 400px !important;
}

img, picture, video, iframe, figure {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover !important;
}

.nq-container {
  width: 100%;
  max-width: var(--nq-container);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* ==========================================================================
   3. NAVIGATION HEADER, LOGO & TAGLINE
   ========================================================================== */
.nq-main-header {
  background: var(--nq-header-bg) !important;
  border-bottom: 1px solid var(--nq-header-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--nq-shadow);
}

.nq-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nq-logo {
  font-family: var(--nq-font-heading);
  font-weight: 900;
  font-size: 1.8rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nq-logo .logo-newz { color: var(--nq-text-heading); font-weight: 900; }
.nq-logo .logo-quest { color: var(--nq-primary); font-weight: 900; }

.nq-tagline {
  font-size: 10px;
  color: var(--nq-text-light);
  font-weight: 600;
  display: block;
  margin-top: -2px;
}

/* CLEAN NAV MENU DROPDOWNS */
.nq-nav-menu, .sub-menu, .nq-dropdown-menu { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex; gap: 18px; align-items: center; }
.nq-nav-link { color: var(--nq-text-heading) !important; text-decoration: none; font-weight: 700; font-size: 13px; padding: 6px 0; transition: color 0.2s; }
.nq-nav-link:hover { color: var(--nq-primary) !important; }

.nq-nav-menu > li, .nq-dropdown { position: relative; }
.nq-nav-menu .sub-menu, .nq-dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--nq-card-bg) !important; border: 1px solid var(--nq-card-border) !important; border-radius: var(--nq-radius); box-shadow: var(--nq-shadow-lg); min-width: 200px; display: none; flex-direction: column; padding: 8px 0 !important; z-index: 1000; }
.nq-nav-menu li:hover > .sub-menu, .nq-dropdown:hover > .nq-dropdown-menu { display: flex; }
.nq-nav-menu .sub-menu a, .nq-dropdown-menu a { display: block; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--nq-text-heading) !important; text-decoration: none; white-space: nowrap; }
.nq-nav-menu .sub-menu a:hover, .nq-dropdown-menu a:hover { background: rgba(220, 38, 38, 0.08); color: var(--nq-primary) !important; }

.nq-header-actions { display: flex; align-items: center; gap: 10px; }
.nq-btn-icon { background: rgba(0,0,0,0.04); border: 1px solid var(--nq-card-border); border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: var(--nq-text-heading); }

/* ==========================================================================
   4. TICKERS & HEADER HERO BANNER STRIP
   ========================================================================== */
.nq-hero-strip {
  width: 100%;
  max-width: var(--nq-container);
  margin: 14px auto 0;
  border-radius: var(--nq-radius);
  overflow: hidden !important;
  box-shadow: var(--nq-shadow);
  position: relative;
  background: #0f172a;
}

.nq-hero-strip-banner {
  width: 100% !important;
  max-height: 125px !important;
  object-fit: cover !important;
  display: block !important;
}

.nq-hero-strip-overlay {
  background: #0f172a;
  padding: 8px 16px;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nq-hero-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
}

.nq-hero-strip-tag {
  background: var(--nq-primary);
  color: #ffffff;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
}

.nq-top-bar {
  background: #0f172a !important;
  color: #ffffff !important;
  height: 38px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden !important;
}

.nq-ticker-badge {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
  z-index: 5;
}

.nq-ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
  padding-left: 10px;
}

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.nq-market-ticker {
  background: #070a10 !important;
  border-bottom: 1px solid var(--nq-card-border);
  font-size: 11px;
  height: 32px;
  display: flex;
  align-items: center;
  color: #9ca3af !important;
  overflow-x: auto;
  white-space: nowrap;
}

.nq-market-ticker-inner { display: flex; gap: 18px; align-items: center; }
.nq-market-item { display: inline-flex; align-items: center; gap: 4px; }
.nq-market-tag { font-size: 9px; font-weight: 800; background: rgba(255,255,255,0.12); color: #cbd5e1; padding: 2px 4px; border-radius: 3px; }
.nq-market-up { color: #10b981 !important; font-weight: 700; }
.nq-market-down { color: #ef4444 !important; font-weight: 700; }

/* ==========================================================================
   5. FEATURED POST TOUCH SLIDER
   ========================================================================== */
.nq-compact-post-slider {
  position: relative;
  overflow: hidden !important;
  border-radius: var(--nq-radius);
  width: 100%;
  margin-bottom: 24px;
  border: 1px solid var(--nq-card-border);
  box-shadow: var(--nq-shadow);
  background: #0f172a;
}

.nq-compact-slider-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
}

.nq-compact-slider-slide {
  min-width: 100%;
  box-sizing: border-box !important;
  position: relative;
  height: 280px;
  overflow: hidden !important;
}

.nq-compact-slider-media {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.nq-compact-slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.95) 80%);
  color: #ffffff;
}

/* ==========================================================================
   6. MSN/INSHORTS ULTRA-COMPACT CARDS
   ========================================================================== */
.nq-msn-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.nq-card, .nq-msn-card {
  background: var(--nq-card-bg);
  border: 1px solid var(--nq-card-border);
  border-radius: var(--nq-radius);
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  box-shadow: var(--nq-shadow);
  box-sizing: border-box !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nq-card:hover, .nq-msn-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--nq-shadow-lg);
}

.nq-card-media, .nq-msn-card-media {
  position: relative;
  width: 100%;
  height: 165px;
  overflow: hidden !important;
  background: #0f172a;
}

.nq-card-media img, .nq-msn-card-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.nq-msn-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nq-msn-card-title {
  font-family: var(--nq-font-heading);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.nq-msn-card-title a {
  color: var(--nq-text-heading);
  text-decoration: none;
}

.nq-msn-card-title a:hover {
  color: var(--nq-primary);
}

.nq-msn-card-excerpt {
  font-size: 12px;
  line-height: 1.5;
  color: var(--nq-text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nq-msn-card-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--nq-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--nq-text-light);
}

/* ==========================================================================
   7. SINGLE POST PARAGRAPH FORMATTING & COMMENTS SECTION
   ========================================================================== */
.entry-content p {
  font-size: 1.1rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  color: var(--nq-text-body);
}

.entry-content h2, .entry-content h3 {
  font-family: var(--nq-font-heading);
  color: var(--nq-text-heading);
  margin: 1.8rem 0 0.8rem;
  font-weight: 800;
}

#comments {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--nq-card-border);
}

.comment-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 20px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-body {
  background: var(--nq-bg-page);
  border: 1px solid var(--nq-card-border);
  padding: 16px;
  border-radius: var(--nq-radius);
}

/* ==========================================================================
   8. FOOTER (CLEAN & NO OVERLAPS)
   ========================================================================== */
.nq-footer-section {
  background: #0b0f19 !important;
  color: #94a3b8 !important;
  padding: 40px 0 20px;
  border-top: 3px solid var(--nq-primary);
  margin-top: 50px;
}

.nq-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.nq-footer-heading {
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--nq-primary);
}

.nq-footer-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nq-footer-list a {
  color: #cbd5e1 !important;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.nq-footer-list a:hover {
  color: #ffffff !important;
  padding-left: 4px;
}

.nq-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8 !important;
}

.nq-footer-bottom a { color: #cbd5e1 !important; text-decoration: none; }
