/*
Theme Name: The Hans India Clone
Theme URI: https://example.com
Author: Your Name
Description: A modern news portal theme inspired by The Hans India, with AMP support, app download banner, and visitor counter.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: hans-theme
Tags: news, magazine, amp, responsive, visitor-counter, app-banner
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --primary:    #1a3c6e;
  --primary-dk: #112a50;
  --accent:     #e8202a;
  --accent-dk:  #b5161f;
  --gold:       #f5a623;
  --white:      #ffffff;
  --off-white:  #f6f8fa;
  --light:      #eef1f5;
  --border:     #dde3ea;
  --text:       #1a1a2e;
  --muted:      #6b7280;
  --font-head:  'Georgia', 'Times New Roman', serif;
  --font-body:  'Arial', 'Helvetica Neue', sans-serif;
  --radius:     4px;
  --shadow:     0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:  0 6px 24px rgba(0,0,0,.15);
  --max-w:      1200px;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--off-white); line-height: 1.55; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* =============================================
   APP DOWNLOAD BANNER
   ============================================= */
#app-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: white;
  z-index: 9999;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
#app-banner.visible { transform: translateY(0); }
#app-banner.hidden { display: none; }
.app-banner-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.app-banner-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
}
.app-banner-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.app-banner-text .app-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.app-banner-text .app-desc { font-size: 11px; opacity: .8; }
.app-banner-text .app-stars { color: var(--gold); font-size: 11px; margin-top: 2px; }
.app-banner-btn {
  background: var(--gold);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  border: none;
  border-radius: 20px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
}
.app-banner-btn:hover { background: #e09000; color: #111; }
.app-banner-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.app-banner-close:hover { background: rgba(255,255,255,.3); }

/* =============================================
   VISITOR COUNTER WIDGET (sidebar + footer)
   ============================================= */
.visitor-counter {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 20px;
}
.visitor-counter .vc-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: .75;
  margin-bottom: 10px;
}
.visitor-counter .vc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.visitor-counter .vc-item {
  background: rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 10px 8px;
}
.visitor-counter .vc-num {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.visitor-counter .vc-label { font-size: 10px; opacity: .7; margin-top: 3px; }
.visitor-counter .vc-online {
  margin-top: 10px;
  font-size: 11px;
  opacity: .8;
}
.visitor-counter .vc-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 4px;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* =============================================
   TOP UTILITY BAR
   ============================================= */
.top-bar {
  background: var(--primary-dk);
  color: rgba(255,255,255,.75);
  font-size: 11px;
  padding: 5px 0;
}
.top-bar .tb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.top-bar .tb-date { font-style: italic; white-space: nowrap; }
.top-bar .tb-links { display: flex; gap: 12px; align-items: center; }
.top-bar .tb-links a { color: rgba(255,255,255,.75); }
.top-bar .tb-links a:hover { color: white; }
.top-bar .tb-social { display: flex; gap: 6px; }
.top-bar .tb-social a {
  width: 22px; height: 22px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white;
}
.top-bar .tb-social a:hover { background: var(--accent); }

/* =============================================
   SITE HEADER
   ============================================= */
.site-header {
  background: white;
  border-bottom: 3px solid var(--primary);
  padding: 12px 0 0;
  box-shadow: var(--shadow);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding-bottom: 12px;
}
.site-logo a { display: block; }
.logo-text {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.logo-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
}
.header-ad-slot {
  text-align: center;
}
.header-ad-slot .ad-placeholder {
  min-height: 80px;
  max-width: 728px;
  margin: 0 auto;
}
.header-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.search-form {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.search-form input {
  border: none;
  padding: 7px 14px;
  font-size: 13px;
  width: 180px;
  outline: none;
  background: var(--off-white);
}
.search-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 7px 14px;
  font-size: 12px;
}
.header-app-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: #111;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.header-app-link:hover { background: #e09000; color: #111; }

/* =============================================
   PRIMARY NAVIGATION
   ============================================= */
.primary-nav {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 200;
  /* prevent overflow causing scroll issues */
  overflow: visible;
}
.primary-nav .nav-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.primary-nav > .nav-inner > ul {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  overflow: visible;
}
.primary-nav ul li { position: relative; }
.primary-nav > .nav-inner > ul > li { display: flex; align-items: stretch; }
.primary-nav ul li a {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.9);
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item > a { background: var(--accent); color: white; }
/* Sub-menu toggle button - replaces CSS :hover, works on touch */
.sub-toggle {
  background: rgba(255,255,255,.15);
  border: none;
  color: white;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
  border-left: 1px solid rgba(255,255,255,.15);
  transition: background .2s, transform .2s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sub-toggle:hover { background: var(--accent); }
.sub-toggle[aria-expanded="true"] {
  background: var(--accent);
  transform: rotate(180deg);
}
/* Dropdown - ONLY JS-controlled (.sub-open), NO CSS :hover trigger */
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: white;
  min-width: 210px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  border-top: 3px solid var(--accent);
}
.primary-nav li.sub-open > .sub-menu { display: block; }
.primary-nav .sub-menu a {
  color: var(--text);
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  border-bottom: 1px solid var(--light);
  white-space: normal;
}
.primary-nav .sub-menu a:hover { background: var(--light); color: var(--accent); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  line-height: 1;
  padding: 10px 14px;
  margin-left: auto;
  flex-shrink: 0;
}

/* =============================================
   BREAKING NEWS TICKER
   ============================================= */
.breaking-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  font-size: 12.5px;
}
.breaking-tag {
  background: var(--accent);
  color: white;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.breaking-tag .blink {
  width: 7px; height: 7px;
  background: white;
  border-radius: 50%;
  animation: blink-anim .8s step-end infinite;
}
@keyframes blink-anim { 0%,100% { opacity:1; } 50% { opacity:0; } }
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-inner {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-move 35s linear infinite;
  padding-left: 100%;
}
.ticker-inner a { color: var(--text); margin-right: 45px; }
.ticker-inner a:hover { color: var(--accent); }
@keyframes ticker-move { to { transform: translateX(-100%); } }

/* =============================================
   LAYOUT CONTAINER
   ============================================= */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 14px; }
.page-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 22px; padding: 22px 0; }
.main-col { min-width: 0; }
.side-col { min-width: 0; }

/* =============================================
   SECTION HEADINGS
   ============================================= */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 16px;
}
.sec-head h2 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sec-head a.more-link {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: 1px solid var(--accent);
  padding: 3px 10px;
  border-radius: 12px;
}
.sec-head a.more-link:hover { background: var(--accent); color: white; }

/* =============================================
   HERO / TOP STORY BLOCK
   ============================================= */
.hero-block {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  margin-bottom: 22px;
  background: var(--border);
}
.hero-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
}
.hero-main img, .hero-main amp-img { width: 100%; height: 340px; object-fit: cover; }
.hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.78) 100%);
  padding: 30px 14px 14px;
}
.hero-cat {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  text-transform: uppercase;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 6px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}
.hero-title a:hover { color: #ffdddd; }
.hero-time { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 5px; }

.hero-side { position: relative; overflow: hidden; background: #111; }
.hero-side img, .hero-side amp-img { width: 100%; height: 168px; object-fit: cover; opacity: .85; }
.hero-side-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: 18px 10px 10px;
}
.hero-side-info .hero-cat { font-size: 9px; padding: 1px 6px; }
.hero-side-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}
.hero-side-title a:hover { color: #ffcccc; }

/* =============================================
   NEWS CARDS
   ============================================= */

/* Horizontal list card */
.card-h {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.card-h:last-child { border-bottom: none; }
.card-h .ch-img { width: 110px; height: 75px; object-fit: cover; flex-shrink: 0; border-radius: var(--radius); }
.card-h amp-img { border-radius: var(--radius); }
.card-h .ch-body { flex: 1; }
.card-h .ch-cat { font-size: 10px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 3px; }
.card-h .ch-title { font-family: var(--font-head); font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--text); margin-bottom: 4px; }
.card-h .ch-title:hover { color: var(--accent); }
.card-h .ch-meta { font-size: 10.5px; color: var(--muted); }

/* Vertical grid card */
.card-v { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-v .cv-img { width: 100%; height: 145px; object-fit: cover; }
.card-v amp-img { display: block; }
.card-v .cv-body { padding: 10px 11px 12px; }
.card-v .cv-cat { font-size: 10px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.card-v .cv-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--text); margin-bottom: 5px; }
.card-v .cv-title:hover { color: var(--accent); }
.card-v .cv-excerpt { font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 6px; }
.card-v .cv-meta { font-size: 10.5px; color: #aaa; }

/* Grid wrappers */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }

/* News section block */
.news-section { background: white; border-radius: var(--radius); padding: 16px; margin-bottom: 22px; box-shadow: var(--shadow); }

/* =============================================
   LATEST NEWS TICKER/LIST
   ============================================= */
.latest-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 22px; }
.latest-box .sec-head { margin: 0; padding: 12px 16px 12px 16px; background: var(--primary); border-left: none; }
.latest-box .sec-head h2 { color: white; font-size: 14px; }
.latest-box .sec-head a.more-link { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.4); }
.latest-list { padding: 4px 14px 6px; }
.latest-item {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  align-items: flex-start;
}
.latest-item:last-child { border-bottom: none; }
.latest-item .li-bullet {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.latest-item a { font-size: 12.5px; line-height: 1.4; color: var(--text); }
.latest-item a:hover { color: var(--accent); }
.latest-item .li-time { font-size: 10px; color: var(--muted); white-space: nowrap; margin-left: auto; padding-left: 8px; flex-shrink: 0; }

/* =============================================
   AD BLOCKS
   ============================================= */
.ad-placeholder {
  background: var(--light);
  border: 1px dashed #c8d0da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: var(--radius);
}
.ad-leaderboard { min-height: 90px; margin: 14px 0; }
.ad-rectangle { min-height: 250px; margin: 14px 0; }
.ad-skyscraper { min-height: 600px; margin: 14px 0; }

/* =============================================
   SIDEBAR WIDGETS
   ============================================= */
.widget { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.widget-head {
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 9px 14px;
}
.widget-body { padding: 10px 13px 12px; }

/* Popular posts */
.pop-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--light); align-items: flex-start; }
.pop-item:last-child { border-bottom: none; }
.pop-num { width: 22px; height: 22px; background: var(--primary); color: white; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 3px; }
.pop-title { font-size: 12px; line-height: 1.35; color: var(--text); }
.pop-title:hover { color: var(--accent); }

/* Tags */
.tags-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.tags-wrap a { background: var(--light); border: 1px solid var(--border); color: var(--text); padding: 3px 9px; font-size: 11px; border-radius: 12px; }
.tags-wrap a:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* App download sidebar card */
.app-widget-card {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: white;
  padding: 18px 14px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 18px;
}
.app-widget-card .aw-icon { font-size: 40px; margin-bottom: 8px; }
.app-widget-card .aw-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.app-widget-card .aw-desc { font-size: 11px; opacity: .8; margin-bottom: 14px; line-height: 1.4; }
.app-widget-card .aw-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold);
  color: #111;
  font-weight: 700;
  font-size: 12px;
  padding: 9px 18px;
  border-radius: 22px;
  text-decoration: none;
}
.app-widget-card .aw-btn:hover { background: #e09000; color: #111; }
.app-widget-card .aw-rating { font-size: 11px; opacity: .7; margin-top: 10px; }
.app-widget-card .aw-rating span { color: var(--gold); }

/* =============================================
   SINGLE POST
   ============================================= */
.post-breadcrumb { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.post-breadcrumb a { color: var(--primary); }
.cat-pill {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.entry-title {
  font-family: var(--font-head);
  font-size: 27px;
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 12px;
}
.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
  margin-bottom: 16px;
}
.post-meta-bar .author { color: var(--primary); font-weight: 600; }
.post-meta-bar .share-row { margin-left: auto; display: flex; gap: 5px; }
.s-btn {
  padding: 4px 11px;
  border: none;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}
.s-btn.fb { background: #1877f2; }
.s-btn.tw { background: #1da1f2; }
.s-btn.wa { background: #25d366; }
.s-btn.tg { background: #2ca5e0; }

.featured-image { margin-bottom: 16px; }
.featured-image img, .featured-image amp-img { width: 100%; border-radius: var(--radius); }
.featured-image figcaption { font-size: 11px; color: var(--muted); padding: 5px 0; font-style: italic; }

.entry-content { font-size: 15px; line-height: 1.75; color: #222; }
.entry-content p { margin-bottom: 16px; }
.entry-content h2, .entry-content h3 { font-family: var(--font-head); margin: 22px 0 10px; color: var(--primary); }
.entry-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--light);
  padding: 12px 20px;
  margin: 20px 0;
  font-style: italic;
  font-size: 15.5px;
  color: #333;
}
.entry-content a { color: var(--primary); text-decoration: underline; }
.post-tags-row { margin-top: 18px; }
.post-tags-row strong { font-size: 12px; margin-right: 5px; }

.related-section { margin-top: 28px; }

/* =============================================
   COMMENTS
   ============================================= */
.comment-section { margin-top: 28px; background: white; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.comment-section h3 { font-size: 16px; margin-bottom: 16px; color: var(--primary); font-family: var(--font-head); }

/* =============================================
   ARCHIVE / CATEGORY
   ============================================= */
.archive-head {
  border-left: 5px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 20px;
}
.archive-head h1 { font-family: var(--font-head); font-size: 24px; color: var(--primary); font-weight: 700; }
.archive-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pagination .page-numbers { padding: 7px 14px; border: 1px solid var(--border); background: white; font-size: 13px; border-radius: var(--radius); color: var(--text); }
.pagination .page-numbers:hover, .pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: #0e2340; color: rgba(255,255,255,.75); margin-top: 30px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 36px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.fw-title {
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.fw-links li { margin-bottom: 7px; }
.fw-links a { color: rgba(255,255,255,.65); font-size: 12.5px; }
.fw-links a:hover { color: white; }
.fw-about { font-size: 12.5px; line-height: 1.65; margin-bottom: 12px; }
.fw-social { display: flex; gap: 8px; flex-wrap: wrap; }
.fw-social a {
  width: 33px; height: 33px;
  background: rgba(255,255,255,.1);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
}
.fw-social a:hover { background: var(--accent); }
.footer-app-row {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.1);
  gap: 14px;
  flex-wrap: wrap;
}
.footer-app-text { font-size: 13px; }
.footer-app-text strong { color: white; }
.footer-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #111;
  padding: 8px 18px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 700;
}
.footer-app-btn:hover { background: #e09000; color: #111; }
.footer-bottom {
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: white; }
.footer-bottom-links { display: flex; gap: 14px; }

/* =============================================
   404
   ============================================= */
.not-found-wrap { text-align: center; padding: 70px 20px; }
.not-found-wrap h1 { font-size: 90px; color: var(--accent); font-family: var(--font-head); line-height: 1; }
.not-found-wrap h2 { font-size: 24px; color: var(--primary); margin: 12px 0 10px; }
.not-found-wrap p { color: var(--muted); margin-bottom: 22px; }
.btn-primary { background: var(--primary); color: white; padding: 11px 26px; border-radius: 4px; font-weight: 700; font-size: 13px; display: inline-block; }
.btn-primary:hover { background: var(--primary-dk); color: white; }

/* =============================================
   GLOBAL OVERFLOW / SCROLL FIX
   ============================================= */
html {
  overflow-x: hidden;
  /* Allow vertical scrolling always */
  overflow-y: auto;
}
body {
  overflow-x: hidden;
  /* Never block vertical scroll */
  overflow-y: auto;
  /* Prevent fixed app-banner from blocking scroll area */
  position: relative;
}
/* Prevent any fixed/sticky element from creating new stacking context that hides scroll */
.site-header, .primary-nav { overflow: visible; }

/* =============================================
   RESPONSIVE
   ============================================= */

/* --- Tablet --- */
@media (max-width: 1024px) {
  .page-wrap { grid-template-columns: 1fr 270px; }
  .footer-inner { grid-template-columns: repeat(2,1fr); }
}

/* --- Mobile (768px and below) --- */
@media (max-width: 768px) {

  /* Layout */
  .page-wrap { grid-template-columns: 1fr; }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-ad-slot { display: none; }
  .entry-title { font-size: 20px; }

  /* Hero block stacks vertically */
  .hero-block { grid-template-columns: 1fr; grid-template-rows: none; }
  .hero-main { grid-row: auto; grid-column: auto; }
  .hero-main img, .hero-main amp-img { height: 220px; width: 100%; }
  .hero-side img, .hero-side amp-img { height: 150px; width: 100%; }

  /* News grids */
  .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr 1fr; }

  /* ---- MOBILE NAV ---- */
  /* Hide full nav list by default on mobile */
  .primary-nav > .nav-inner > ul {
    display: none;
    flex-direction: column;
    width: 100%;
    /* Scrollable nav drawer */
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--primary-dk);
  }
  /* Show when JS adds .open */
  .primary-nav > .nav-inner > ul.open { display: flex; }

  /* Show hamburger on mobile */
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }

  /* Mobile nav items full width */
  .primary-nav > .nav-inner > ul > li {
    flex-direction: row;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .primary-nav > .nav-inner > ul > li > a {
    flex: 1;
    padding: 13px 16px;
    font-size: 13px;
  }
  /* Sub-toggle visible on mobile */
  .sub-toggle {
    padding: 0 16px;
    border-left: 1px solid rgba(255,255,255,.15);
    min-width: 44px; min-height: 44px;
    justify-content: center;
  }

  /* Sub-menus on mobile: relative position, full width, slide under parent */
  .primary-nav .sub-menu {
    position: static;  /* NOT absolute — sits in document flow on mobile */
    box-shadow: none;
    border-top: none;
    background: rgba(0,0,0,.25);
    border-left: 4px solid var(--accent);
    width: 100%;
    display: none; /* still controlled by .sub-open */
  }
  .primary-nav li.sub-open > .sub-menu { display: block; }
  .primary-nav .sub-menu a {
    color: rgba(255,255,255,.85);
    padding: 10px 20px 10px 24px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  .primary-nav .sub-menu a:hover { background: rgba(255,255,255,.1); color: white; }
}

/* --- Small phones --- */
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-main img { height: 190px; }
  .app-banner-left .app-banner-text .app-desc { display: none; }
  /* Ticker wraps on very small screens */
  .ticker-inner { animation-duration: 20s; }
}
