/* =========================================================
   NewsWave — Main CSS
   Bootstrap 5 + Custom Editorial Design
   RTL-ready | Mobile-first | Dark/Light mode
   ========================================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* =========================================================
   CSS Variables
   ========================================================= */
:root {
  --nw-primary:       #C8102E;
  --nw-primary-dark:  #a00d24;
  --nw-secondary:     #1a1a2e;
  --nw-accent:        #f0a500;
  --nw-bg:            #f4f5f7;
  --nw-surface:       #ffffff;
  --nw-surface-2:     #f9f9f9;
  --nw-text:          #1a1a2e;
  --nw-text-muted:    #6b7280;
  --nw-border:        #e5e7eb;
  --nw-shadow:        0 2px 16px rgba(0,0,0,.08);
  --nw-shadow-hover:  0 8px 32px rgba(0,0,0,.14);
  --nw-radius:        8px;
  --nw-radius-sm:     4px;
  --nw-font-heading:  'Playfair Display', Georgia, serif;
  --nw-font-body:     'IBM Plex Sans', 'Segoe UI', sans-serif;
  --nw-font-arabic:   'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
  --nw-topbar-h:      40px;
  --nw-header-h:      72px;
  --nw-transition:    .25s ease;
}

/* Dark mode */
[data-theme="dark"] {
  --nw-bg:         #0d0d1a;
  --nw-surface:    #1a1a2e;
  --nw-surface-2:  #16213e;
  --nw-text:       #e8e8f0;
  --nw-text-muted: #9ca3af;
  --nw-border:     #2d2d4a;
  --nw-shadow:     0 2px 16px rgba(0,0,0,.4);
}

/* =========================================================
   Base Reset & Typography
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

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

/* RTL body */
body.rtl,
[dir="rtl"] {
  font-family: var(--nw-font-arabic);
  direction: rtl;
  text-align: right;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--nw-font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--nw-text);
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  font-family: var(--nw-font-arabic);
}

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

/* =========================================================
   Utility Classes
   ========================================================= */
.text-primary   { color: var(--nw-primary) !important; }
.bg-primary     { background: var(--nw-primary) !important; }
.bg-surface     { background: var(--nw-surface) !important; }
.nw-border      { border: 1px solid var(--nw-border); }
.nw-radius      { border-radius: var(--nw-radius); }
.nw-shadow      { box-shadow: var(--nw-shadow); }
.nw-transition  { transition: all var(--nw-transition); }
.line-clamp-2   { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3   { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* Category badge */
.nw-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--nw-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--nw-radius-sm);
  line-height: 1.6;
}
.nw-cat-badge:hover { background: var(--nw-primary-dark); color:#fff; }

/* =========================================================
   Top Bar
   ========================================================= */
#nw-topbar {
  height: var(--nw-topbar-h);
  background: var(--nw-secondary);
  color: #aab2c0;
  font-size: .78rem;
  overflow: hidden;
}
#nw-topbar a { color: #aab2c0; }
#nw-topbar a:hover { color: #fff; }

.nw-ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
}
.nw-ticker-label {
  display: inline-block;
  background: var(--nw-primary);
  color: #fff;
  padding: 4px 12px;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.nw-ticker-items {
  display: inline-block;
  white-space: nowrap;
  animation: nwTicker 30s linear infinite;
  padding-left: 40px;
}
@keyframes nwTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
[dir="rtl"] .nw-ticker-items { animation: nwTickerRTL 30s linear infinite; padding-left: 0; padding-right: 40px; }
@keyframes nwTickerRTL {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
.nw-ticker-items span { margin: 0 24px; }
.nw-ticker-items span::before { content: '•'; margin-right: 8px; color: var(--nw-primary); }
[dir="rtl"] .nw-ticker-items span::before { margin-right: 0; margin-left: 8px; }

/* Social icons topbar */
.nw-social-top a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: .8rem;
  transition: all var(--nw-transition);
}
.nw-social-top a:hover { background: var(--nw-primary); color:#fff !important; }

/* =========================================================
   Header / Navbar
   ========================================================= */
#nw-header {
  background: var(--nw-surface);
  border-bottom: 1px solid var(--nw-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--nw-shadow);
  transition: background var(--nw-transition);
}

.nw-logo-text {
  font-family: var(--nw-font-heading);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--nw-secondary);
  letter-spacing: -.02em;
  line-height: 1;
}
.nw-logo-text span { color: var(--nw-primary); }

[data-theme="dark"] .nw-logo-text { color: #fff; }

.navbar { padding: .6rem 0; }

/* Nav links */
.navbar-nav .nav-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--nw-text) !important;
  padding: .5rem .85rem !important;
  letter-spacing: .02em;
  border-radius: var(--nw-radius-sm);
  transition: all var(--nw-transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--nw-primary) !important;
  background: rgba(200,16,46,.07);
}

/* Dropdown */
.navbar-nav .dropdown-menu {
  border: 1px solid var(--nw-border);
  box-shadow: var(--nw-shadow-hover);
  border-radius: var(--nw-radius);
  background: var(--nw-surface);
  padding: .5rem;
  min-width: 200px;
}
.navbar-nav .dropdown-item {
  font-size: .85rem;
  font-weight: 500;
  color: var(--nw-text);
  border-radius: var(--nw-radius-sm);
  padding: .45rem .85rem;
  transition: all var(--nw-transition);
}
.navbar-nav .dropdown-item:hover { background: rgba(200,16,46,.08); color: var(--nw-primary); }

/* RTL dropdown */
[dir="rtl"] .dropdown-menu { text-align: right; }
[dir="rtl"] .dropdown-menu-end { left: 0 !important; right: auto !important; }

/* Search in navbar */
.nw-nav-search { position: relative; }
.nw-nav-search input {
  background: var(--nw-bg);
  border: 1px solid var(--nw-border);
  border-radius: 20px;
  padding: .38rem 1rem .38rem 2.4rem;
  font-size: .82rem;
  color: var(--nw-text);
  width: 200px;
  transition: all var(--nw-transition);
}
[dir="rtl"] .nw-nav-search input { padding: .38rem 2.4rem .38rem 1rem; }
.nw-nav-search input:focus { outline:none; border-color: var(--nw-primary); width: 240px; background: var(--nw-surface); }
.nw-nav-search .nw-search-icon {
  position: absolute;
  left: .8rem; top: 50%;
  transform: translateY(-50%);
  color: var(--nw-text-muted);
  font-size: .8rem;
  pointer-events: none;
}
[dir="rtl"] .nw-nav-search .nw-search-icon { left: auto; right: .8rem; }

/* Dark mode toggle */
#nw-theme-toggle {
  background: none;
  border: 1px solid var(--nw-border);
  border-radius: 20px;
  padding: .3rem .7rem;
  color: var(--nw-text);
  font-size: .8rem;
  cursor: pointer;
  transition: all var(--nw-transition);
}
#nw-theme-toggle:hover { border-color: var(--nw-primary); color: var(--nw-primary); }

/* Hamburger */
.navbar-toggler {
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-sm);
  padding: .3rem .55rem;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231a1a2e' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e8e8f0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================================================
   Hero / Featured Post
   ========================================================= */
.nw-hero {
  position: relative;
  background: var(--nw-secondary);
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
}
.nw-hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
  transition: opacity .6s;
}
.nw-hero:hover .nw-hero-img { opacity: .65; }
.nw-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,20,.95) 0%, rgba(10,10,20,.3) 60%, transparent 100%);
}
.nw-hero-body {
  position: relative;
  z-index: 2;
  padding: 2.5rem 0;
  width: 100%;
}
.nw-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.nw-hero-meta { font-size: .82rem; color: rgba(255,255,255,.7); }
.nw-hero-meta a { color: rgba(255,255,255,.85); }
.nw-hero-meta a:hover { color: #fff; }

/* Mini carousel dots */
.nw-hero-dots {
  display: flex;
  gap: 6px;
  margin-top: 1.25rem;
}
[dir="rtl"] .nw-hero-dots { flex-direction: row-reverse; }
.nw-hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  border: none;
  transition: all var(--nw-transition);
}
.nw-hero-dot.active { background: var(--nw-primary); width: 24px; border-radius: 4px; }

/* =========================================================
   Section Heading
   ========================================================= */
.nw-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--nw-border);
}
.nw-section-head::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--nw-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.nw-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--nw-text);
  margin: 0;
}
.nw-section-more {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 600;
  color: var(--nw-primary);
}
[dir="rtl"] .nw-section-more { margin-left: 0; margin-right: auto; }

/* =========================================================
   Article Cards
   ========================================================= */

/* Standard card */
.nw-card {
  background: var(--nw-surface);
  border-radius: var(--nw-radius);
  overflow: hidden;
  box-shadow: var(--nw-shadow);
  transition: all var(--nw-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.nw-card:hover {
  box-shadow: var(--nw-shadow-hover);
  transform: translateY(-3px);
}

.nw-card-img-wrap {
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
}
.nw-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.nw-card:hover .nw-card-img-wrap img { transform: scale(1.05); }

.nw-card-img-wrap .nw-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}
[dir="rtl"] .nw-card-img-wrap .nw-cat-badge { left: auto; right: 10px; }

.nw-card-body {
  padding: 1.1rem 1.1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nw-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.35;
}
.nw-card-title a { color: var(--nw-text); }
.nw-card-title a:hover { color: var(--nw-primary); }
.nw-card-excerpt {
  font-size: .86rem;
  color: var(--nw-text-muted);
  line-height: 1.6;
  flex: 1;
}
.nw-card-meta {
  margin-top: .9rem;
  font-size: .78rem;
  color: var(--nw-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
[dir="rtl"] .nw-card-meta { flex-direction: row-reverse; }
.nw-card-meta .nw-dot { font-size: .5rem; opacity: .5; }

/* Horizontal list card */
.nw-card-h {
  display: flex;
  gap: 1rem;
  background: var(--nw-surface);
  border-radius: var(--nw-radius);
  overflow: hidden;
  box-shadow: var(--nw-shadow);
  padding: .75rem;
  transition: all var(--nw-transition);
}
.nw-card-h:hover { box-shadow: var(--nw-shadow-hover); }
[dir="rtl"] .nw-card-h { flex-direction: row-reverse; }

.nw-card-h-img {
  width: 100px;
  min-width: 100px;
  border-radius: var(--nw-radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.nw-card-h-img img { width:100%; height:100%; object-fit:cover; }

.nw-card-h-body { flex: 1; }
.nw-card-h-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .35rem;
  line-height: 1.35;
}
.nw-card-h-title a { color: var(--nw-text); }
.nw-card-h-title a:hover { color: var(--nw-primary); }
.nw-card-h-meta { font-size: .74rem; color: var(--nw-text-muted); }

/* Numbered/ranked card */
.nw-card-rank {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: .85rem 0;
  border-bottom: 1px solid var(--nw-border);
}
[dir="rtl"] .nw-card-rank { flex-direction: row-reverse; }
.nw-card-rank:last-child { border-bottom: none; }
.nw-rank-num {
  font-family: var(--nw-font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--nw-border);
  line-height: 1;
  min-width: 2rem;
  text-align: center;
}
.nw-card-rank:hover .nw-rank-num { color: var(--nw-primary); }
.nw-rank-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--nw-text);
  line-height: 1.35;
}
.nw-rank-title a { color: var(--nw-text); }
.nw-rank-title a:hover { color: var(--nw-primary); }
.nw-rank-meta { font-size: .74rem; color: var(--nw-text-muted); margin-top: 4px; }

/* Video card overlay */
.nw-card-video .nw-card-img-wrap::after {
  content: '\f144';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
  background: rgba(0,0,0,.3);
  transition: background var(--nw-transition);
}
.nw-card-video:hover .nw-card-img-wrap::after { background: rgba(200,16,46,.5); }

/* =========================================================
   Ad / Banner slot
   ========================================================= */
.nw-ad-slot {
  background: var(--nw-surface-2);
  border: 1px dashed var(--nw-border);
  border-radius: var(--nw-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nw-text-muted);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nw-ad-slot-728 { min-height: 90px; }
.nw-ad-slot-300 { min-height: 250px; }

/* =========================================================
   Sidebar
   ========================================================= */
.nw-sidebar {}
.nw-sidebar .nw-widget {
  background: var(--nw-surface);
  border-radius: var(--nw-radius);
  box-shadow: var(--nw-shadow);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.nw-sidebar .nw-widget:last-child { margin-bottom: 0; }

/* Tags cloud widget */
.nw-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.nw-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--nw-bg);
  border: 1px solid var(--nw-border);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--nw-text-muted);
  transition: all var(--nw-transition);
}
.nw-tag:hover { background: var(--nw-primary); border-color: var(--nw-primary); color: #fff; }

/* Weather widget */
.nw-weather {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5c 100%);
  color: #fff;
  border-radius: var(--nw-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.nw-weather-temp { font-size: 3rem; font-weight: 300; line-height: 1; }
.nw-weather-city { font-size: .85rem; opacity: .8; margin-top: 4px; }

/* Newsletter widget */
.nw-newsletter { background: var(--nw-primary); color:#fff; border-radius: var(--nw-radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.nw-newsletter h5 { font-family: var(--nw-font-heading); color: #fff; }
.nw-newsletter p { font-size: .85rem; opacity: .9; }
.nw-newsletter input {
  width: 100%; padding: .5rem .85rem; border: none; border-radius: var(--nw-radius-sm);
  margin-bottom: .6rem; font-size: .85rem;
  background: rgba(255,255,255,.2); color:#fff;
}
.nw-newsletter input::placeholder { color: rgba(255,255,255,.65); }
.nw-newsletter input:focus { outline: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.25); }
.nw-newsletter .btn {
  width: 100%; background: #fff; color: var(--nw-primary); font-weight: 700; font-size: .85rem;
  border: none; padding: .5rem; border-radius: var(--nw-radius-sm);
}
.nw-newsletter .btn:hover { background: var(--nw-secondary); color:#fff; }

/* =========================================================
   Single Post / Article page
   ========================================================= */
.nw-single-hero {
  background: var(--nw-secondary);
  color: #fff;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
}
.nw-single-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: .75rem;
}
.nw-single-meta { font-size: .82rem; color: rgba(255,255,255,.7); gap: 12px; flex-wrap: wrap; }
.nw-single-meta a { color: rgba(255,255,255,.85); }

.nw-post-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--nw-text);
}
.nw-post-content p { margin-bottom: 1.35rem; }
.nw-post-content h2,
.nw-post-content h3 { margin: 2rem 0 1rem; }
.nw-post-content img { border-radius: var(--nw-radius); margin: 1.5rem 0; }
.nw-post-content blockquote {
  border-left: 4px solid var(--nw-primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--nw-surface-2);
  border-radius: 0 var(--nw-radius) var(--nw-radius) 0;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--nw-text-muted);
}
[dir="rtl"] .nw-post-content blockquote {
  border-left: none;
  border-right: 4px solid var(--nw-primary);
  border-radius: var(--nw-radius) 0 0 var(--nw-radius);
}

/* Share buttons */
.nw-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
[dir="rtl"] .nw-share-btns { flex-direction: row-reverse; }
.nw-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .4rem .85rem; border-radius: 20px;
  font-size: .8rem; font-weight: 600; border: none; cursor: pointer;
  transition: all var(--nw-transition);
}
.nw-share-fb   { background:#1877F2; color:#fff; }
.nw-share-tw   { background:#1DA1F2; color:#fff; }
.nw-share-wa   { background:#25D366; color:#fff; }
.nw-share-cp   { background: var(--nw-bg); color: var(--nw-text); border: 1px solid var(--nw-border); }
.nw-share-btn:hover { opacity:.85; transform: translateY(-1px); }

/* Author box */
.nw-author-box {
  background: var(--nw-surface);
  border-radius: var(--nw-radius);
  padding: 1.5rem;
  box-shadow: var(--nw-shadow);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
[dir="rtl"] .nw-author-box { flex-direction: row-reverse; }
.nw-author-avatar { width: 72px; min-width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.nw-author-name { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.nw-author-bio { font-size: .85rem; color: var(--nw-text-muted); line-height: 1.6; }

/* Comments */
.nw-comment {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--nw-border);
}
[dir="rtl"] .nw-comment { flex-direction: row-reverse; }
.nw-comment-avatar { width: 44px; min-width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.nw-comment-author { font-weight: 700; font-size: .88rem; }
.nw-comment-date { font-size: .75rem; color: var(--nw-text-muted); }
.nw-comment-text { font-size: .88rem; line-height: 1.7; margin-top: .4rem; }
.nw-comment-reply { font-size: .78rem; font-weight: 700; color: var(--nw-primary); background: none; border: none; cursor: pointer; padding: 0; }

/* Comment form */
.nw-comment-form input,
.nw-comment-form textarea {
  background: var(--nw-bg);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-sm);
  color: var(--nw-text);
  width: 100%; padding: .55rem .85rem; font-size: .9rem;
  transition: border-color var(--nw-transition);
}
.nw-comment-form input:focus,
.nw-comment-form textarea:focus { outline: none; border-color: var(--nw-primary); background: var(--nw-surface); }
.nw-comment-form textarea { resize: vertical; min-height: 120px; }
.nw-comment-form label { font-size: .82rem; font-weight: 600; color: var(--nw-text-muted); margin-bottom: 4px; }
.nw-submit-btn {
  background: var(--nw-primary); color: #fff;
  border: none; padding: .55rem 1.75rem;
  border-radius: var(--nw-radius-sm); font-weight: 700; font-size: .9rem;
  cursor: pointer; transition: all var(--nw-transition);
}
.nw-submit-btn:hover { background: var(--nw-primary-dark); }

/* =========================================================
   Category / Archive page
   ========================================================= */
.nw-archive-header {
  background: var(--nw-surface);
  border-bottom: 1px solid var(--nw-border);
  padding: 1.75rem 0;
  margin-bottom: 2rem;
}
.nw-archive-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 0;
}
.nw-archive-count { font-size: .85rem; color: var(--nw-text-muted); margin-top: .35rem; }

/* Filter tabs */
.nw-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.5rem; }
[dir="rtl"] .nw-filter-tabs { flex-direction: row-reverse; }
.nw-filter-tab {
  padding: .38rem .9rem;
  border-radius: 20px;
  font-size: .8rem; font-weight: 600;
  border: 1px solid var(--nw-border);
  background: none; color: var(--nw-text-muted);
  cursor: pointer; transition: all var(--nw-transition);
}
.nw-filter-tab.active,
.nw-filter-tab:hover { background: var(--nw-primary); border-color: var(--nw-primary); color:#fff; }

/* =========================================================
   Pagination
   ========================================================= */
.nw-pagination { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 2rem 0; }
[dir="rtl"] .nw-pagination { flex-direction: row-reverse; }
.nw-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--nw-radius-sm);
  border: 1px solid var(--nw-border);
  background: var(--nw-surface);
  color: var(--nw-text);
  font-size: .85rem; font-weight: 600;
  text-decoration: none; transition: all var(--nw-transition);
}
.nw-page-btn:hover,
.nw-page-btn.active { background: var(--nw-primary); border-color: var(--nw-primary); color:#fff; }
.nw-page-btn.disabled { opacity: .4; pointer-events: none; }

/* =========================================================
   Footer
   ========================================================= */
#nw-footer {
  background: var(--nw-secondary);
  color: #aab2c0;
  padding: 3rem 0 0;
  margin-top: 3rem;
}
#nw-footer h5 {
  font-size: .9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
#nw-footer a { color: #8896a6; font-size: .85rem; line-height: 2; }
#nw-footer a:hover { color: var(--nw-primary); }
#nw-footer ul { list-style: none; padding: 0; margin: 0; }
#nw-footer ul li::before { content: '›'; margin-right: 6px; color: var(--nw-primary); }
[dir="rtl"] #nw-footer ul li::before { margin-right: 0; margin-left: 6px; content: '‹'; }

.nw-footer-logo { font-family: var(--nw-font-heading); font-size: 1.5rem; font-weight: 900; color: #fff; }
.nw-footer-logo span { color: var(--nw-primary); }
.nw-footer-desc { font-size: .85rem; line-height: 1.7; margin-top: .75rem; }

.nw-footer-social { display: flex; gap: 10px; margin-top: 1rem; }
[dir="rtl"] .nw-footer-social { flex-direction: row-reverse; }
.nw-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #aab2c0; font-size: .85rem;
  transition: all var(--nw-transition);
}
.nw-footer-social a:hover { background: var(--nw-primary); color:#fff !important; }

.nw-footer-bottom {
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: .8rem;
  color: #5a6472;
}

/* =========================================================
   Reading Progress Bar
   ========================================================= */
#nw-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--nw-primary);
  z-index: 9999;
  width: 0;
  transition: width .1s linear;
}

/* =========================================================
   Back to Top
   ========================================================= */
#nw-back-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px; height: 42px;
  background: var(--nw-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(200,16,46,.35);
  transition: all var(--nw-transition);
  z-index: 990;
}
[dir="rtl"] #nw-back-top { right: auto; left: 1.5rem; }
#nw-back-top:hover { background: var(--nw-primary-dark); transform: translateY(-3px); }
#nw-back-top.visible { display: flex; }

/* =========================================================
   Breaking News Bar
   ========================================================= */
.nw-breaking {
  background: var(--nw-primary);
  color: #fff;
  padding: .55rem 0;
  overflow: hidden;
  font-size: .82rem;
  font-weight: 500;
}
.nw-breaking-label {
  background: rgba(0,0,0,.25);
  padding: 2px 12px;
  border-radius: var(--nw-radius-sm);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-right: 1rem;
}
[dir="rtl"] .nw-breaking-label { margin-right: 0; margin-left: 1rem; }

/* =========================================================
   Responsive adjustments
   ========================================================= */
@media (max-width: 991.98px) {
  .nw-hero { min-height: 380px; }
  .navbar-collapse { background: var(--nw-surface); padding: 1rem; border-radius: 0 0 var(--nw-radius) var(--nw-radius); box-shadow: var(--nw-shadow-hover); margin-top: .5rem; }
  .nw-nav-search input { width: 100%; margin-top: .5rem; border-radius: var(--nw-radius-sm); }
  .nw-nav-search input:focus { width: 100%; }
}

@media (max-width: 767.98px) {
  .nw-hero { min-height: 300px; }
  .nw-hero-title { font-size: 1.4rem; }
  .nw-card-h-img { width: 80px; min-width: 80px; }
  #nw-footer .row > div { margin-bottom: 1.5rem; }
  .nw-single-title { font-size: 1.5rem; }
  .nw-author-box { flex-direction: column; }
  [dir="rtl"] .nw-author-box { flex-direction: column; }
}

@media (max-width: 575.98px) {
  :root { --nw-topbar-h: 0px; }
  #nw-topbar { display: none; }
  .nw-share-btns { gap: 6px; }
  .nw-share-btn { padding: .38rem .65rem; font-size: .75rem; }
}

/* =========================================================
   RTL Utility overrides
   ========================================================= */
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .ms-2   { margin-left: 0 !important; margin-right: .5rem !important; }
[dir="rtl"] .me-2   { margin-right: 0 !important; margin-left: .5rem !important; }
[dir="rtl"] .text-end { text-align: left !important; }
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .float-end { float: left !important; }
[dir="rtl"] .float-start { float: right !important; }
[dir="rtl"] .border-start { border-start: none !important; border-end: inherit; }
[dir="rtl"] .ps-0 { padding-left: 0 !important; }
[dir="rtl"] .pe-0 { padding-right: 0 !important; }

/* =========================================================
   WordPress Core Classes
   ========================================================= */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--nw-text-muted); text-align: center; margin-top: .35rem; }
.sticky { border-left: 3px solid var(--nw-primary); padding-left: 1rem; }
[dir="rtl"] .sticky { border-left: none; border-right: 3px solid var(--nw-primary); padding-left: 0; padding-right: 1rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: .75rem; }
.gallery img { border-radius: var(--nw-radius-sm); width:100%; height:120px; object-fit:cover; }
.screen-reader-text { position:absolute; width:1px; height:1px; clip:rect(0,0,0,0); overflow:hidden; }
