/*
Theme Name: NewzQuest Master Edition
Theme URI: https://newzquest.in
Author: NewzQuest Engineering
Author URI: https://newzquest.in
Description: Lightning-fast, mobile-first, bilingual (English & Hindi) news media WordPress theme. No parent theme or third-party theme framework required. SEO, monetization, content automation, and hyperlocal taxonomy are provided by the companion "NewzQuest Toolkit" plugin (recommended) and are not required for the theme's core templates to render correctly on their own.
Version: 14.3.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newzquest
Tags: news, magazine, bilingual, hindi, english, adsense, fast, seo, pwa
*/

/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  --nq-primary:      #dc2626;
  --nq-primary-dk:   #b91c1c;
  --nq-dark:         #0b132b;
  --nq-dark2:        #111827;
  --nq-card-bg:      #ffffff;
  --nq-bg:           #f1f5f9;
  --nq-border:       #e2e8f0;
  --nq-text:         #1e293b;
  --nq-muted:        #64748b;
  --nq-shadow:       0 2px 10px rgba(0,0,0,.07);
  --nq-shadow-h:     0 8px 28px rgba(0,0,0,.13);
  --nq-radius:       8px;
  --nq-font:         'Inter','Noto Sans Devanagari',system-ui,sans-serif;
  --nq-hdr:          60px;
  --nq-tick:         34px;
  --nq-bnav:         58px;
}
[data-theme="dark"] {
  --nq-card-bg: #1e293b;
  --nq-bg:      #0f172a;
  --nq-border:  #334155;
  --nq-text:    #f1f5f9;
  --nq-muted:   #94a3b8;
  --nq-shadow:  0 2px 12px rgba(0,0,0,.4);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:var(--nq-font);
  font-size:16px;
  color:var(--nq-text);
  background:var(--nq-bg);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  width:100%;
}
@media(max-width:768px){body{padding-bottom:var(--nq-bnav)}}
a{color:inherit;text-decoration:none}
img,iframe,video{max-width:100%;height:auto;display:block}
h1,h2,h3,h4,h5,h6{line-height:1.25;font-weight:700;overflow-wrap:break-word;word-break:break-word}

/* ============================================================
   LAYOUT — Fluid Responsive Container
============================================================ */
.container{
  width:100%!important;
  max-width:1240px!important;
  margin:0 auto!important;
  padding:0 1.25rem!important;
  box-sizing:border-box!important;
}
@media(max-width:1240px){.container{max-width:100%!important;padding:0 1rem!important}}
@media(max-width:768px) {.container{padding:0 0.75rem!important}}

/* ============================================================
   TOPBAR
============================================================ */
.nq-topbar{
  background:#070d19;
  color:#94a3b8;
  font-size:.75rem;
  padding:.3rem 0;
  border-bottom:1px solid #1e293b;
}
.nq-topbar .container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:.5rem;
}
.nq-topbar-left{display:flex;align-items:center;gap:.85rem;flex-wrap:wrap}
.nq-topbar-right{display:flex;align-items:center;gap:.6rem}
.nq-topbar-right a{color:#94a3b8;font-size:.72rem;font-weight:700;transition:color .15s}
.nq-topbar-right a:hover{color:#fff}

/* ============================================================
   HEADER — Strictly bounded single-row navigation
============================================================ */
.nq-header{
  position:sticky;top:0;z-index:1000;
  background:var(--nq-dark);
  color:#fff;
  box-shadow:0 2px 16px rgba(0,0,0,.25);
  width:100%;
}
.nq-header-inner{
  display:flex;align-items:center;
  justify-content:space-between;
  height:var(--nq-hdr);
  gap:.75rem;
  overflow:hidden;
}

/* Logo */
.nq-logo{display:flex;align-items:center;gap:.5rem;flex-shrink:0;text-decoration:none}
.nq-logo img{max-height:44px;width:auto}
.nq-logo-badge{
  background:var(--nq-primary);color:#fff;
  width:34px;height:34px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:1.1rem;flex-shrink:0;
}
.nq-logo-text{font-size:1.45rem;font-weight:900;letter-spacing:-.5px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.25)}
.nq-logo-text span{color:#dc2626;font-weight:900}
body:not(.nq-dark-mode) .nq-header .nq-logo-text{color:#fff}

/* Primary Navigation — horizontal scroll */
.nq-nav{
  display:flex!important;flex-direction:row!important;
  align-items:center!important;
  flex:1!important;
  height:var(--nq-hdr)!important;
  max-height:var(--nq-hdr)!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  white-space:nowrap!important;
  scrollbar-width:none;-ms-overflow-style:none;
}
.nq-nav::-webkit-scrollbar{display:none}
.nq-nav ul{
  display:flex!important;flex-direction:row!important;
  flex-wrap:nowrap!important;align-items:center!important;
  gap:.2rem!important;list-style:none!important;
  margin:0!important;padding:0!important;
  height:var(--nq-hdr)!important;max-height:var(--nq-hdr)!important;
}
.nq-nav ul li{
  display:inline-flex!important;align-items:center!important;
  flex-shrink:0!important;position:relative!important;
  margin:0!important;padding:0!important;
  max-height:var(--nq-hdr)!important;
}
.nq-nav ul a{
  color:#cbd5e1!important;font-size:.82rem!important;font-weight:600!important;
  padding:.35rem .6rem!important;border-radius:4px!important;
  white-space:nowrap!important;display:inline-block!important;
  transition:color .15s,background .15s!important;
}
.nq-nav ul a:hover,.nq-nav ul li.current-menu-item>a{
  color:#fff!important;background:rgba(255,255,255,.12)!important;
}
.nq-nav ul ul,.nq-nav .sub-menu,.nq-nav .children{
  display:none!important;visibility:hidden!important;
  height:0!important;overflow:hidden!important;pointer-events:none!important;
}
/* Reveal-on-hover: the rule above hid submenus completely with no
   companion rule to ever show them again, so nested primary-nav
   items (depth > 1) were unreachable no matter how the menu was
   structured. This restores them as a hover/focus dropdown without
   touching the flat horizontal-scroll layout above. */
.nq-nav ul li:hover>.sub-menu,.nq-nav ul li:hover>.children,
.nq-nav ul li:focus-within>.sub-menu,.nq-nav ul li:focus-within>.children{
  display:block!important;visibility:visible!important;
  height:auto!important;overflow:visible!important;pointer-events:auto!important;
  position:absolute!important;top:100%!important;left:0!important;
  background:#0f172a!important;border:1px solid #1e293b!important;border-radius:6px!important;
  padding:.4rem!important;min-width:180px!important;z-index:50!important;
  box-shadow:0 8px 24px rgba(0,0,0,.35)!important;
}
.nq-nav ul li:hover>.sub-menu li,.nq-nav ul li:hover>.children li,
.nq-nav ul li:focus-within>.sub-menu li,.nq-nav ul li:focus-within>.children li{
  display:block!important;width:100%!important;
}
.nq-nav ul li:hover>.sub-menu a,.nq-nav ul li:hover>.children a{
  display:block!important;
}

/* Hyperlocal Nav Menu — auto-built by inc/nav-menu-manager.php from
   the nq_location taxonomy (Hyperlocal root -> State -> District). */
.nq-hyperlocal-menu-wrap{background:#070d19;border-bottom:1px solid #1e293b}
.nq-hyperlocal-menu-wrap .container{padding-top:.15rem;padding-bottom:.15rem}
.nq-hyperlocal-menu{list-style:none;margin:0;padding:0;display:flex;align-items:center}
.nq-hyperlocal-menu li{position:relative}
.nq-hyperlocal-menu>li>a{color:#f87171;font-weight:700;font-size:.78rem;padding:.3rem .6rem;display:inline-block}
.nq-hyperlocal-menu .sub-menu{
  display:none;position:absolute;top:100%;left:0;background:#0f172a;
  border:1px solid #1e293b;border-radius:6px;padding:.4rem;min-width:190px;
  z-index:60;box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.nq-hyperlocal-menu li:hover>.sub-menu,.nq-hyperlocal-menu li:focus-within>.sub-menu{display:block}
.nq-hyperlocal-menu .sub-menu a{color:#cbd5e1;font-size:.78rem;padding:.3rem .6rem;display:block;white-space:nowrap;border-radius:4px}
.nq-hyperlocal-menu .sub-menu a:hover{background:rgba(255,255,255,.08);color:#fff}
.nq-hyperlocal-menu .sub-menu .sub-menu{top:0;left:100%}
@media (max-width:900px){.nq-hyperlocal-menu-wrap{display:none}}

/* Header Tools */
.nq-header-tools{display:flex;align-items:center;gap:.4rem;flex-shrink:0}
.nq-header-tools a,
.nq-header-tools button{
  font-size:.8rem;font-weight:700;
  cursor:pointer;border:none;background:none;
  padding:.3rem .6rem;border-radius:4px;
  transition:all .15s;color:#cbd5e1;white-space:nowrap;
  line-height:1;
}
.nq-header-tools a:hover{color:#fff;background:rgba(255,255,255,.1)}
.nq-btn-subscribe{
  background:#fff!important;color:var(--nq-dark)!important;
  border-radius:20px!important;padding:.3rem .85rem!important;
  font-size:.75rem!important;
}
.nq-btn-app{
  background:var(--nq-primary)!important;color:#fff!important;
  border-radius:4px!important;font-size:.75rem!important;
}

/* Dark Mode Toggle */
#nq-theme-toggle{
  width:32px;height:32px;border-radius:50%;
  background:rgba(255,255,255,.1);
  display:flex;align-items:center;justify-content:center;
  font-size:1rem;cursor:pointer;border:none;color:#fff;
  transition:background .2s;
}
#nq-theme-toggle:hover{background:rgba(255,255,255,.2)}

/* GTranslate widget — sits in the top utility bar, replaces the old
   manual EN/HI toggle. GTranslate injects its own markup into
   .nq-gtranslate; these rules just keep it visually inline and
   sized to match the rest of the top bar.

   CLS FIX: the wrapper div is empty markup until the deferred
   gtranslate.net script runs and injects the actual dropdown/flag
   widget, often well after first paint. With no reserved size it
   sat at 0x0 and then popped in, shoving the entire top bar (and
   everything below it) down — an above-the-fold shift on every
   single pageview, which is consistent with a severe CLS score.
   Reserving the widget's approximate footprint up front means the
   space is already allocated before the script loads, so there's
   nothing left to shift. */
.nq-topbar .nq-gtranslate{
  display:inline-flex;align-items:center;
  flex-shrink:0;
  min-width:64px;min-height:22px;
}
.nq-topbar .gtranslate_wrapper select.gt-selected,
.nq-topbar .nq-gtranslate select{
  background:rgba(255,255,255,.1)!important;
  color:#fff!important;
  border:none!important;
  border-radius:4px!important;
  font-size:.72rem!important;
  padding:.2rem .4rem!important;
  min-width:64px;min-height:22px;
}

/* Breaking Ticker */
.nq-ticker-bar{
  background:var(--nq-primary-dk,#b91c1c);color:#fff;
  font-size:.78rem;font-weight:700;
  height:var(--nq-tick);
  display:flex;align-items:center;
  overflow:hidden;
  border-top:1px solid rgba(255,255,255,.08);
}
.nq-ticker-label{
  background:#7f1d1d;
  padding:0 .75rem;height:100%;
  display:flex;align-items:center;gap:.4rem;
  flex-shrink:0;font-size:.7rem;text-transform:uppercase;
  white-space:nowrap;
}
.nq-ticker-outer{overflow:hidden;flex:1;height:var(--nq-tick);display:flex;align-items:center}
.nq-ticker-track{
  display:flex;align-items:center;
  white-space:nowrap;
  animation:nq-marquee var(--nq-ticker-speed,40s) linear infinite;
  will-change:transform;
}
.nq-ticker-track:hover{animation-play-state:paused}
.nq-ticker-track a{color:#fff;margin-right:2.5rem;opacity:.92;font-size:.78rem}
.nq-ticker-track a:hover{opacity:1;text-decoration:underline}
@keyframes nq-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* Hyperlocal Bar */
.nq-hyperlocal-bar{
  background:#0f172a;color:#cbd5e1;
  padding:.35rem 0;font-size:.75rem;
  border-bottom:1px solid #1e293b;
  overflow:hidden;
}
.nq-hyperlocal-bar .container{
  display:flex;align-items:center;gap:.6rem;
  overflow-x:auto;white-space:nowrap;scrollbar-width:none;
}
.nq-hyperlocal-bar .container::-webkit-scrollbar{display:none}

/* Market Ticker (moved below hyperlocal, now live) */
.nq-ticker-market .nq-ticker-track{animation:nq-marquee 35s linear infinite}
.nq-ticker-market a,
.nq-ticker-market span{color:#fff}

/* NSE/BSE Live Index Chart (TradingView ticker-tape embed) */
.nq-indices-chart{
  background:#0b132b;border-bottom:1px solid #1e293b;
  padding:.15rem 0;
}
.nq-indices-chart .tradingview-widget-container{width:100%;}

/* Homepage Digital E-Paper promo card */
.nq-epaper-promo{
  display:flex;align-items:center;gap:.75rem;
  background:linear-gradient(135deg,#0b132b,#1e293b);
  color:#fff;border-radius:10px;padding:.9rem 1rem;
  text-decoration:none;margin:1.25rem 0;
  border:1px solid #334155;transition:transform .15s;
}
.nq-epaper-promo:hover{transform:translateY(-2px)}
.nq-epaper-promo-icon{font-size:1.8rem;flex-shrink:0}
.nq-epaper-promo-title{font-weight:800;font-size:.95rem;color:#fff}
.nq-epaper-promo-sub{font-size:.75rem;color:#f87171;font-weight:700}

/* HERO GRID */
.nq-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr);
  align-items:start;
  gap:1rem;margin-bottom:1.5rem;
}
.nq-hero-lead{
  position:relative;border-radius:var(--nq-radius);
  overflow:hidden;background:#0f172a;
  box-shadow:var(--nq-shadow);display:block;
  min-height:360px;
}
.nq-hero-lead img{width:100%;height:360px;object-fit:cover;opacity:.85}
.nq-hero-lead-overlay{
  position:absolute;bottom:0;left:0;right:0;
  padding:1.2rem;
  background:linear-gradient(to top,rgba(0,0,0,.9) 0%,rgba(0,0,0,.3) 60%,transparent 100%);
  color:#fff;z-index:2;
}
.nq-hero-lead-overlay h2{
  font-size:1.4rem;font-weight:800;line-height:1.25;
  margin:.4rem 0;color:#fff;
  overflow-wrap:break-word;word-break:break-word;
}
.nq-hero-stack{display:flex;flex-direction:column;gap:.75rem}
.nq-hero-mini{
  display:flex;gap:.75rem;
  background:var(--nq-card-bg);
  border:1px solid var(--nq-border);
  border-radius:var(--nq-radius);
  padding:.75rem;box-shadow:var(--nq-shadow);flex:1;
  overflow:hidden;
}
.nq-hero-mini img{
  width:88px;height:68px;object-fit:cover;
  border-radius:5px;flex-shrink:0;
}
.nq-hero-mini h4{font-size:.88rem;font-weight:700;line-height:1.3;margin:.2rem 0}
.nq-hero-mini h4 a{color:var(--nq-text)}
.nq-badge{
  display:inline-block;background:var(--nq-primary);color:#fff;
  font-size:.65rem;font-weight:800;padding:.15rem .45rem;
  border-radius:3px;text-transform:uppercase;letter-spacing:.3px;
  line-height:1.2;
}
.nq-meta-line{font-size:.72rem;color:var(--nq-muted);margin-top:.2rem}

/* MID GRID */
.nq-mid-grid{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:1rem;margin-bottom:1.5rem;
}

/* CARDS */
.nq-card{
  background:var(--nq-card-bg);
  border:1px solid var(--nq-border);
  border-radius:var(--nq-radius);
  overflow:hidden;box-shadow:var(--nq-shadow);
  transition:transform .2s ease,box-shadow .2s ease;
  display:flex;flex-direction:column;
}
.nq-card:hover{transform:translateY(-3px);box-shadow:var(--nq-shadow-h)}
.nq-card-img-wrap{position:relative;overflow:hidden;padding-top:60%}
.nq-card-img{
  position:absolute;top:0;left:0;width:100%;height:100%;
  object-fit:cover;transition:transform .3s ease;
}
.nq-card:hover .nq-card-img{transform:scale(1.04)}
.nq-card-body{padding:.9rem 1rem;flex:1;display:flex;flex-direction:column}
.nq-card-body h3{font-size:1rem;font-weight:800;line-height:1.3;margin:.4rem 0 .3rem}
.nq-card-body h3 a{color:var(--nq-text)}
.nq-card-body h3 a:hover{color:var(--nq-primary)}
.nq-card-body p{font-size:.82rem;color:var(--nq-muted);line-height:1.45;flex:1;margin-bottom:.5rem}

/* MAIN STREAM + SIDEBAR LAYOUT */
.nq-layout{
  display:grid;grid-template-columns:minmax(0,2.3fr) minmax(0,1fr);
  gap:1.5rem;margin-bottom:2rem;
}
.nq-section-title{
  font-size:1.1rem;font-weight:900;text-transform:uppercase;
  letter-spacing:-.2px;margin-bottom:1rem;
  padding-bottom:.4rem;border-bottom:2px solid var(--nq-primary);
  display:flex;align-items:center;justify-content:space-between;
}
.nq-stream{display:flex;flex-direction:column;gap:1rem}
.nq-stream-item{
  display:flex;gap:1rem;
  background:var(--nq-card-bg);
  border:1px solid var(--nq-border);
  border-radius:var(--nq-radius);
  padding:.85rem;box-shadow:var(--nq-shadow);
  transition:transform .15s ease;
}
.nq-stream-item:hover{transform:translateX(3px)}
.nq-stream-item img{
  width:110px;height:80px;object-fit:cover;
  border-radius:6px;flex-shrink:0;
}
.nq-stream-item h4{font-size:.95rem;font-weight:800;line-height:1.3;margin:.25rem 0}
.nq-stream-item h4 a{color:var(--nq-text)}

/* SIDEBAR WIDGETS */
.nq-sidebar-block{
  background:var(--nq-card-bg);
  border:1px solid var(--nq-border);
  border-radius:var(--nq-radius);
  padding:1rem;margin-bottom:1.25rem;
  box-shadow:var(--nq-shadow);
}
.nq-sidebar-list{display:flex;flex-direction:column;gap:.75rem}
.nq-sidebar-item{display:flex;gap:.65rem;align-items:center}
.nq-sidebar-item img{width:65px;height:52px;object-fit:cover;border-radius:4px;flex-shrink:0}
.nq-sidebar-item h5{font-size:.82rem;font-weight:700;line-height:1.3}
.nq-sidebar-item h5 a{color:var(--nq-text)}

/* NSHORT / QUOTE CARDS (previously unstyled — caused oversized/overflowing
   images and unpositioned text overlay bleeding outside the card box) */
.nq-short-card{
  position:relative;overflow:hidden;border-radius:var(--nq-radius);
  aspect-ratio:4/5;background:var(--nq-card-bg);box-shadow:var(--nq-shadow);
}
.nq-short-card img{
  position:absolute;top:0;left:0;width:100%;height:100%;
  object-fit:cover;display:block;
}
.nq-short-overlay{
  position:absolute;left:0;right:0;bottom:0;
  padding:1rem .9rem;
  background:linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 60%, transparent 100%);
  color:#fff;
}

/* GLOBAL IMAGE SAFETY NET — ensures any image without an explicit
   width/height attribute (legacy templates, third-party embeds) still
   reserves layout space to reduce Cumulative Layout Shift, and never
   overflows its container. */
img{max-width:100%;height:auto;}
.nq-card img, .nq-stream-item img, .nq-sidebar-item img,
.nq-search-thumb img, .nq-nav-thumb, .nq-mega-thumb img{
  background:var(--nq-border,#e5e7eb);
}
.nq-nav-thumb{width:90px;height:60px;object-fit:cover;border-radius:6px;flex-shrink:0;}

/* ADS */
.nq-ad-slot{margin:1rem 0;text-align:center;overflow:hidden}

/* FOOTER */
.nq-footer{
  background:#070d19;color:#94a3b8;
  padding:3rem 0 1rem;font-size:.85rem;
  border-top:2px solid var(--nq-primary);
}
.nq-footer-grid{
  display:grid;grid-template-columns:1.5fr 1fr 1fr 1.2fr;
  gap:2rem;margin-bottom:2rem;
}
@media(max-width:900px){.nq-footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:550px){.nq-footer-grid{grid-template-columns:1fr}}
.nq-footer h4{color:#fff;font-size:.95rem;font-weight:800;margin-bottom:1rem;text-transform:uppercase}
.nq-footer ul{list-style:none;padding:0;margin:0}
.nq-footer ul li{margin-bottom:.5rem}
.nq-footer ul a{color:#94a3b8;transition:color .15s}
.nq-footer ul a:hover{color:#fff}
.nq-footer-social{display:flex;gap:.5rem;margin-top:.75rem}
.nq-footer-social a{
  display:flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:6px;
  font-size:1rem;font-weight:700;
  background:rgba(255,255,255,.08);color:#94a3b8;
  transition:background .15s,color .15s;
  text-decoration:none;
}
.nq-footer-social a:hover{background:var(--nq-primary);color:#fff}

/* Footer Bottom */
.nq-footer-bottom{
  border-top:1px solid #1e293b;
  padding-top:1rem;
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:.5rem;font-size:.75rem;color:#64748b;
}
.nq-footer-bottom a{color:#64748b;transition:color .15s}
.nq-footer-bottom a:hover{color:#e2e8f0}

/* SCROLL TO TOP BUTTON */
#nq-scroll-top{
  position:fixed;right:1.1rem;bottom:1.1rem;z-index:1900;
  width:42px;height:42px;border-radius:50%;border:none;
  background:var(--nq-primary,#dc2626);color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 14px rgba(0,0,0,.25);cursor:pointer;
  opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity .2s,transform .2s,visibility .2s;
}
#nq-scroll-top.is-visible{opacity:1;visibility:visible;transform:translateY(0)}
#nq-scroll-top:hover{filter:brightness(1.1)}
@media(max-width:768px){
  #nq-scroll-top{bottom:calc(var(--nq-bnav) + .75rem)}
}

/* MOBILE BOTTOM NAV */
.nq-bottom-nav{
  display:none;
  position:fixed;bottom:0;left:0;right:0;
  background:var(--nq-dark);
  border-top:1px solid #1e293b;
  z-index:2000;height:var(--nq-bnav);
}
@media(max-width:768px){
  .nq-bottom-nav{display:flex}
  .nq-nav{display:none!important}
  .nq-hero-grid{grid-template-columns:1fr}
  .nq-hero-lead{min-height:240px}
  .nq-hero-lead img{height:240px}
  .nq-hero-lead-overlay h2{font-size:1.1rem}
  .nq-mid-grid{grid-template-columns:1fr}
  .nq-layout{grid-template-columns:1fr}
  .nq-btn-subscribe,.nq-btn-app{display:none}
}
.nq-bottom-item{
  flex:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:2px;color:#64748b;font-size:.62rem;font-weight:600;
  text-decoration:none;
}
.nq-bottom-item span:first-child{font-size:1.1rem}
.nq-bottom-item.active{color:#f87171}

/* ============================================================
   SEARCH OVERLAY & WIDGET GUARDS (PREVENTS BOTTOM-LEFT SPILLOVER)
============================================================ */
.nq-search-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important;
  background: rgba(11, 19, 43, 0.96) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 999999 !important;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overflow-y: auto; padding: 10vh 2rem 2rem;
}
.nq-search-overlay.nq-active,
.nq-search-overlay.is-active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  justify-content: center;
  align-items: flex-start;
}
.nq-search-close {
  position: absolute !important;
  top: 25px !important; right: 35px !important;
  background: transparent !important;
  border: none !important; color: #fff !important;
  font-size: 36px !important; cursor: pointer;
}
.nq-font-size-widget {
  display: none !important;
}
body.single .nq-font-size-widget {
  display: flex !important;
  position: fixed !important;
  bottom: 24px !important; right: 24px !important;
  z-index: 99999 !important;
  background: var(--nq-card-bg) !important;
  border: 1px solid var(--nq-border) !important;
  border-radius: 30px !important;
  padding: 4px 10px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18) !important;
}

/* ============================================================
   SINGLE POST TEMPLATE STYLES
   Moved here from a trailing <style> block at the bottom of
   single.php (~80% through the file, after the article body,
   sidebar, and related posts). That block contained the ONLY
   rule constraining .nq-single-hero's height (max-height:480px;
   object-fit:cover). Because it loaded after all that content,
   the browser had to parse the entire page before the rule took
   effect — so on initial paint the hero image rendered at its
   native, unconstrained size (a full-resolution AI-generated
   image can be 1024px+ tall) before snapping down once the
   trailing <style> tag was finally reached. That's the reported
   image "bleed": not a missing rule, a load-order bug. Living in
   the main enqueued stylesheet means it's in <head> and applies
   before the browser paints anything.
============================================================ */
.nq-single-header { margin-bottom: 1.25rem; }
.nq-single-title  { font-size: 1.85rem; font-weight: 900; line-height: 1.2; margin: .5rem 0 .75rem; overflow-wrap: break-word; word-break: break-word; }
@media(max-width:768px){ .nq-single-title { font-size: 1.35rem; } }
.nq-single-meta   { font-size: .8rem; color: var(--nq-muted); display: flex; gap: .85rem; flex-wrap: wrap; align-items: center; margin-bottom: .85rem; }
.nq-single-figure { margin: 1.25rem 0; }
.nq-single-hero   {
  width: 100% !important;
  height: 480px !important;
  max-height: 480px !important;
  object-fit: cover !important;
  border-radius: var(--nq-radius);
  display: block !important;
}
@media(max-width:768px){ .nq-single-hero { height: 260px !important; max-height: 260px !important; } }
.nq-img-caption   { font-size: .75rem; color: var(--nq-muted); text-align: center; margin-top: .35rem; }

/* Article Actions Bar */
.nq-article-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .85rem 0; }
.nq-action-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 4px; font-size: .78rem; font-weight: 700; cursor: pointer; border: 1px solid var(--nq-border); background: var(--nq-card-bg); color: var(--nq-text); transition: all .15s; }
.nq-action-btn:hover { background: var(--nq-dark); color: #fff; border-color: var(--nq-dark); }
.nq-action-btn.active { background: var(--nq-primary); color: #fff; border-color: var(--nq-primary); }

/* Tags Row */
.nq-tags-row { margin: 1.5rem 0 1rem; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; padding-top: 1rem; border-top: 1px solid var(--nq-border); }
.nq-tags-row a { display: inline-block; background: var(--nq-bg); border: 1px solid var(--nq-border); color: var(--nq-muted); font-size: .75rem; padding: .2rem .55rem; border-radius: 4px; transition: all .15s; }
.nq-tags-row a:hover { background: var(--nq-primary); color: #fff; border-color: var(--nq-primary); }

/* Share Bar */
.nq-share-bar  { margin: 1.25rem 0; padding: 1rem 1.15rem; background: var(--nq-card-bg); border: 1px solid var(--nq-border); border-radius: 8px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.nq-share-label { font-size: .88rem; font-weight: 700; }
.nq-share-btns  { display: flex; gap: .4rem; flex-wrap: wrap; }
.nq-share-btn   { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 4px; font-size: .75rem; font-weight: 700; text-decoration: none; color: #fff; transition: opacity .15s; }
.nq-share-btn:hover { opacity: .88; }
.nq-share-copy  { border: none; cursor: pointer; font-family: inherit; }
.nq-share-bar.nq-share-style-compact { padding: 0; background: none; border: none; justify-content: flex-start; }
.nq-share-wa { background: #25d366; }
.nq-share-tg { background: #229ed9; }
.nq-share-tw { background: #000; }
.nq-share-fb { background: #1877f2; }
.nq-share-li { background: #0a66c2; }

/* Author Card */
.nq-author-card { margin: 1.75rem 0; background: var(--nq-card-bg); border: 1px solid var(--nq-border); border-radius: 8px; padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.nq-author-avatar { border-radius: 50%; flex-shrink: 0; }
.nq-author-info { flex: 1; min-width: 0; }
.nq-author-name { margin: 0 0 .3rem; font-size: 1rem; font-weight: 800; }
.nq-author-bio  { margin: 0 0 .5rem; font-size: .82rem; color: var(--nq-muted); line-height: 1.5; }
.nq-author-link { font-size: .78rem; font-weight: 700; color: var(--nq-primary); }

/* Related section */
.nq-related-section { margin-top: 2.5rem; }

/* Page links */
.nq-page-links { margin: 1rem 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.nq-page-links a, .nq-page-links span { padding: .25rem .6rem; border-radius: 4px; border: 1px solid var(--nq-border); font-size: .8rem; }
.nq-page-links a { color: var(--nq-primary); }
.nq-page-links a:hover { background: var(--nq-primary); color: #fff; }

/* Ad slot in article */
.nq-ad-in-article { margin: 1.25rem 0; text-align: center; }

/* Defense-in-depth: cap ANY image that ends up inside the article body
   (e.g. one inserted directly into post_content by the AI content
   pipeline rather than set as the featured image), so a native
   full-resolution image can never dominate the viewport the way the
   unconstrained hero did. */
.entry-content img { max-height: 640px; object-fit: cover; }
