/*
Theme Name:  News Portal Pro
Theme URI:   https://example.com/news-portal-pro
Author:      Your Name
Author URI:  https://example.com
Description: قالب ووردبريس إخباري احترافي مع دعم كامل للغة العربية (RTL)، الوضع الليلي، ومؤشر تقدم القراءة.
Version:     2.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: news-portal-pro
Tags:        news, rtl-language, dark-mode, responsive, custom-logo, custom-menu, featured-images, widgets
*/

/* ══════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
══════════════════════════════════════════════════════════════ */
:root {
  /* Brand */
  --clr-primary:        #C0392B;
  --clr-primary-dark:   #9B2B1E;
  --clr-primary-light:  #E74C3C;
  --clr-accent:         #E67E22;
  --clr-accent-light:   #F39C12;
  --clr-gold:           #D4AC0D;

  /* Neutrals – Light Mode */
  --clr-bg:             #F7F8FC;
  --clr-bg-alt:         #ECEEF4;
  --clr-card:           #FFFFFF;
  --clr-surface:        #E2E5EE;
  --clr-border:         #D5D8E2;
  --clr-border-light:   #EAECF3;

  /* Text – Light Mode */
  --clr-text:           #111827;
  --clr-text-muted:     #6B7280;
  --clr-text-light:     #9CA3AF;
  --clr-link:           #C0392B;

  /* Header */
  --hdr-bg:             #13171F;
  --hdr-text:           #FFFFFF;
  --topbar-bg:          #C0392B;
  --topbar-text:        #FFFFFF;

  /* Typography */
  --ff-arabic:          'Tajawal', 'Cairo', system-ui, sans-serif;
  --fs-base:            16px;
  --lh-base:            1.85;
  --fw-normal:          400;
  --fw-medium:          500;
  --fw-bold:            700;
  --fw-black:           900;

  /* Spacing Scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Border Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs:  0 1px 2px rgba(0,0,0,0.06);
  --sh-sm:  0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --sh-md:  0 6px 20px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --sh-lg:  0 14px 40px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.08);
  --sh-xl:  0 24px 60px rgba(0,0,0,0.18);

  /* Motion */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   150ms;
  --dur-normal: 250ms;
  --dur-slow:   400ms;

  /* Layout */
  --container:    1260px;
  --sidebar-w:    300px;
  --z-topbar:     900;
  --z-header:     1000;
  --z-dropdown:   1100;
  --z-overlay:    1200;
  --z-progress:   9999;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --clr-bg:          #0C0F18;
  --clr-bg-alt:      #161925;
  --clr-card:        #1A1E2E;
  --clr-surface:     #232738;
  --clr-border:      #2C3148;
  --clr-border-light:#222640;
  --clr-text:        #E8EAEF;
  --clr-text-muted:  #9BA3B4;
  --clr-text-light:  #6B7280;
  --clr-link:        #E74C3C;
  --hdr-bg:          #090C14;
  --sh-sm: 0 2px 8px rgba(0,0,0,0.25), 0 1px 3px rgba(0,0,0,0.2);
  --sh-md: 0 6px 20px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.25);
  --sh-lg: 0 14px 40px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.3);
}

/* ══════════════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--fs-base);
  scroll-behavior: smooth;
  direction: rtl;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-arabic);
  font-size: 1rem;
  line-height: var(--lh-base);
  color: var(--clr-text);
  background: var(--clr-bg);
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-normal) var(--ease-in-out),
              color var(--dur-normal) var(--ease-in-out);
  overflow-x: hidden;
}

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

a {
  color: var(--clr-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-in-out);
}

a:hover { color: var(--clr-primary-dark); }

ul, ol { list-style: none; }

h1,h2,h3,h4,h5,h6 {
  font-weight: var(--fw-bold);
  line-height: 1.35;
  color: var(--clr-text);
}

button { font-family: inherit; }

/* ══════════════════════════════════════════════════════════════
   READING PROGRESS BAR
══════════════════════════════════════════════════════════════ */
#reading-progress-bar {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  width: 0%;
  z-index: var(--z-progress);
  transition: width 80ms linear;
  box-shadow: 0 0 10px rgba(192,57,43,0.5);
}

/* ══════════════════════════════════════════════════════════════
   SKIP LINK
══════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -60px; right: 0;
  background: var(--clr-primary);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  z-index: 9999;
  border-radius: 0 0 var(--r-sm) 0;
  transition: top var(--dur-fast);
  font-weight: var(--fw-bold);
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════════════════════════════
   CONTAINER & LAYOUT
══════════════════════════════════════════════════════════════ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.site-main {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  align-items: start;
}

/* ══════════════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════════════ */
.site-topbar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
  font-size: 0.8rem;
  font-weight: var(--fw-medium);
  padding: 7px 0;
  position: relative;
  z-index: var(--z-topbar);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0.88;
  white-space: nowrap;
}

.topbar-date i { font-size: 0.75rem; }

.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  border-radius: var(--r-full);
  padding: 4px 14px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: var(--ff-arabic);
  font-weight: var(--fw-medium);
  transition: background var(--dur-fast);
  white-space: nowrap;
}
.dark-mode-toggle:hover { background: rgba(0,0,0,0.32); }
.dark-mode-toggle .mode-icon { font-size: 0.9rem; }

/* ══════════════════════════════════════════════════════════════
   SITE HEADER
══════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--hdr-bg);
  color: var(--hdr-text);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
  transition: background var(--dur-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: var(--sp-6);
  min-height: 70px;
}

/* Branding */
.site-branding { flex-shrink: 0; }

.site-branding .site-logo img {
  height: 46px;
  width: auto;
}

.site-branding .site-title-link:hover { color: inherit; }

.site-branding .site-title {
  font-size: 1.55rem;
  font-weight: var(--fw-black);
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Main Nav */
.main-navigation { flex: 1; }

.main-navigation > ul {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
}

.main-navigation > ul > li { position: relative; }

.main-navigation > ul > li > a {
  display: block;
  color: rgba(255,255,255,0.82);
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  border-radius: var(--r-xs);
  transition: color var(--dur-fast), background var(--dur-fast);
}

.main-navigation > ul > li > a:hover,
.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current-menu-ancestor > a {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Dropdown */
.main-navigation ul ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--clr-card);
  border-top: 3px solid var(--clr-primary);
  box-shadow: var(--sh-lg);
  min-width: 210px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur-normal) var(--ease-out),
              transform var(--dur-normal) var(--ease-out),
              visibility var(--dur-normal);
  flex-direction: column;
  z-index: var(--z-dropdown);
}

.main-navigation ul li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-navigation ul ul li a {
  color: var(--clr-text);
  padding: 10px var(--sp-5);
  font-size: 0.87rem;
  border-bottom: 1px solid var(--clr-border-light);
  display: block;
  transition: background var(--dur-fast), color var(--dur-fast), padding-right var(--dur-fast);
}

.main-navigation ul ul li:last-child a { border-bottom: none; }

.main-navigation ul ul li a:hover {
  background: var(--clr-bg-alt);
  color: var(--clr-primary);
  padding-right: var(--sp-6);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.header-search-btn,
.mobile-menu-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--dur-fast);
  flex-shrink: 0;
}

.header-search-btn:hover,
.mobile-menu-toggle:hover {
  background: rgba(255,255,255,0.18);
}

.mobile-menu-toggle { display: none; }

/* Header Ad */
.header-ad {
  flex-shrink: 0;
  max-width: 300px;
}

/* Search Panel */
.header-search-panel {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--sp-5) 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.header-search-panel .search-form {
  display: flex;
  gap: var(--sp-3);
}

.header-search-panel .search-field {
  flex: 1;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--ff-arabic);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.header-search-panel .search-field::placeholder { color: rgba(255,255,255,0.5); }
.header-search-panel .search-field:focus {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
}

.header-search-panel .search-submit {
  background: var(--clr-primary);
  border: none;
  color: #fff;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-full);
  cursor: pointer;
  font-family: var(--ff-arabic);
  font-weight: var(--fw-bold);
  font-size: 0.9rem;
  transition: background var(--dur-fast);
}

.header-search-panel .search-submit:hover { background: var(--clr-primary-dark); }

/* ══════════════════════════════════════════════════════════════
   BREAKING NEWS BAR
══════════════════════════════════════════════════════════════ */
.breaking-news-bar {
  background: var(--clr-primary);
  color: #fff;
  padding: 9px 0;
  font-size: 0.87rem;
  overflow: hidden;
}

.breaking-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  overflow: hidden;
}

.breaking-label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.22);
  padding: 4px 14px;
  border-radius: var(--r-full);
  font-weight: var(--fw-black);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  animation: breakingPulse 2s ease-in-out infinite;
}

@keyframes breakingPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.75; }
}

.breaking-scroll {
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

.breaking-scroll ul {
  display: flex;
  gap: var(--sp-12);
  animation: scrollRTL 35s linear infinite;
  white-space: nowrap;
}

.breaking-scroll li a {
  color: #fff;
  font-weight: var(--fw-medium);
  opacity: 0.92;
}
.breaking-scroll li a:hover { opacity: 1; color: #fff; }
.breaking-scroll li::before {
  content: '•';
  margin-left: var(--sp-3);
  opacity: 0.5;
}
.breaking-scroll li:first-child::before { display: none; }

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

/* ══════════════════════════════════════════════════════════════
   BREADCRUMBS
══════════════════════════════════════════════════════════════ */
.breadcrumbs {
  background: var(--clr-bg-alt);
  border-bottom: 1px solid var(--clr-border);
  padding: 10px 0;
  font-size: 0.82rem;
  color: var(--clr-text-muted);
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  opacity: 0.4;
}

.breadcrumbs li a {
  color: var(--clr-primary);
}

.breadcrumbs li:last-child {
  color: var(--clr-text);
  font-weight: var(--fw-medium);
}

/* ══════════════════════════════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--clr-border);
  gap: var(--sp-4);
}

.section-title {
  font-size: 1.15rem;
  font-weight: var(--fw-black);
  color: var(--clr-text);
  position: relative;
  padding-right: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 4px;
  background: linear-gradient(180deg, var(--clr-primary), var(--clr-accent));
  border-radius: var(--r-full);
}

.section-link {
  font-size: 0.82rem;
  color: var(--clr-primary);
  font-weight: var(--fw-medium);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--clr-primary);
  border-radius: var(--r-full);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.section-link:hover {
  background: var(--clr-primary);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   NEWS CARDS
══════════════════════════════════════════════════════════════ */
.news-card {
  background: var(--clr-card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--clr-border);
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: transparent;
}

/* Thumbnail */
.news-card .card-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--clr-surface);
}

.news-card .card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.news-card:hover .card-thumbnail img {
  transform: scale(1.06);
}

/* Category Badge */
.card-category {
  position: absolute;
  bottom: var(--sp-3);
  right: var(--sp-3);
  background: var(--clr-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  padding: 3px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}

/* Card Body */
.news-card .card-body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.news-card .card-title {
  font-size: 0.97rem;
  font-weight: var(--fw-bold);
  line-height: 1.5;
  color: var(--clr-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card .card-title a { color: inherit; }
.news-card .card-title a:hover { color: var(--clr-primary); }

.news-card .card-excerpt {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Meta */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: 0.77rem;
  color: var(--clr-text-light);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--clr-border-light);
  flex-wrap: wrap;
}

.card-meta i { font-size: 0.7rem; margin-left: 3px; }

.card-meta .meta-author a {
  color: var(--clr-text-muted);
  font-weight: var(--fw-medium);
}
.card-meta .meta-author a:hover { color: var(--clr-primary); }

/* ══════════════════════════════════════════════════════════════
   GRID LAYOUTS
══════════════════════════════════════════════════════════════ */
.news-grid { display: grid; gap: var(--sp-5); }
.news-grid-2 { grid-template-columns: repeat(2, 1fr); }
.news-grid-3 { grid-template-columns: repeat(3, 1fr); }
.news-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Hero Grid: 1 large + 2 stacked */
.hero-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--sp-5);
}

.hero-grid .news-card:first-child {
  grid-row: 1 / 3;
}

.hero-grid .news-card:first-child .card-thumbnail {
  aspect-ratio: 16 / 11;
}

.hero-grid .news-card:first-child .card-title {
  font-size: 1.25rem;
  -webkit-line-clamp: 4;
}

/* Horizontal card */
.news-card.horizontal {
  flex-direction: row;
  align-items: stretch;
}

.news-card.horizontal .card-thumbnail {
  width: 110px;
  min-width: 110px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.news-card.horizontal .card-title {
  font-size: 0.88rem;
  -webkit-line-clamp: 2;
}

.news-card.horizontal .card-excerpt { display: none; }

.news-card.horizontal .card-body {
  padding: var(--sp-4);
  gap: var(--sp-2);
}

/* ══════════════════════════════════════════════════════════════
   AD ZONES
══════════════════════════════════════════════════════════════ */
.ad-zone {
  text-align: center;
  margin: var(--sp-6) 0;
  background: var(--clr-bg-alt);
  border: 1.5px dashed var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-size: 0.75rem;
  color: var(--clr-text-light);
}

.ad-zone-top  { min-height: 90px; }
.ad-zone-mid  { min-height: 250px; }
.ad-zone-side { min-height: 250px; margin: 0 0 var(--sp-5); }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: sticky;
  top: calc(70px + var(--sp-4));
}

.sidebar-widget {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.widget-title {
  font-size: 0.97rem;
  font-weight: var(--fw-black);
  color: var(--clr-text);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--clr-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Most Read */
.most-read-list { display: flex; flex-direction: column; gap: 0; }

.most-read-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

.most-read-item:last-child { border-bottom: none; padding-bottom: 0; }
.most-read-item:first-child { padding-top: 0; }

.most-read-number {
  font-size: 1.5rem;
  font-weight: var(--fw-black);
  color: var(--clr-surface);
  line-height: 1;
  min-width: 30px;
  flex-shrink: 0;
}

.most-read-item:nth-child(1) .most-read-number { color: var(--clr-primary); }
.most-read-item:nth-child(2) .most-read-number { color: var(--clr-accent); }
.most-read-item:nth-child(3) .most-read-number { color: var(--clr-gold); }

.most-read-title {
  font-size: 0.86rem;
  font-weight: var(--fw-medium);
  line-height: 1.55;
}

.most-read-title a { color: var(--clr-text); }
.most-read-title a:hover { color: var(--clr-primary); }

/* Weather Widget */
.weather-widget {
  text-align: center;
  padding: var(--sp-2) 0;
}
.weather-icon img { margin: 0 auto; }
.weather-temp {
  font-size: 2.8rem;
  font-weight: var(--fw-black);
  color: var(--clr-primary);
  line-height: 1;
  margin: var(--sp-2) 0 var(--sp-1);
}
.weather-city {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-1);
}
.weather-desc { font-size: 0.84rem; color: var(--clr-text-light); }

/* Currency Widget */
.currency-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: 0.88rem;
  gap: var(--sp-2);
}
.currency-item:last-child { border-bottom: none; }
.currency-name { font-weight: var(--fw-medium); }
.currency-rate { font-weight: var(--fw-bold); }
.currency-change { font-size: 0.78rem; font-weight: var(--fw-medium); }
.currency-change.up   { color: #16A34A; }
.currency-change.down { color: var(--clr-primary); }

/* ══════════════════════════════════════════════════════════════
   SINGLE POST
══════════════════════════════════════════════════════════════ */
.single-post-header { margin-bottom: var(--sp-8); }

.post-category-badge {
  display: inline-block;
  background: var(--clr-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: var(--fw-bold);
  padding: 4px 14px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-4);
  letter-spacing: 0.04em;
}

.post-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: var(--fw-black);
  line-height: 1.35;
  margin-bottom: var(--sp-4);
  color: var(--clr-text);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  font-size: 0.83rem;
  color: var(--clr-text-muted);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}

.post-meta i { font-size: 0.78rem; margin-left: 4px; }
.post-meta a { color: var(--clr-text-muted); }
.post-meta a:hover { color: var(--clr-primary); }

.post-featured-image {
  margin-bottom: var(--sp-8);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}

.post-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Article Typography */
.entry-content {
  font-size: 1.025rem;
  line-height: 1.95;
  color: var(--clr-text);
}

.entry-content > * + * { margin-top: var(--sp-5); }

.entry-content h2 {
  font-size: 1.4rem;
  margin-top: var(--sp-8);
  color: var(--clr-text);
  padding-right: var(--sp-4);
  border-right: 4px solid var(--clr-primary);
}

.entry-content h3 {
  font-size: 1.15rem;
  margin-top: var(--sp-6);
}

.entry-content a {
  color: var(--clr-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content blockquote {
  border-right: 4px solid var(--clr-primary);
  background: var(--clr-bg-alt);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-8) 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 1.08rem;
  color: var(--clr-text-muted);
  font-style: italic;
}

.entry-content ul,
.entry-content ol {
  padding-right: var(--sp-6);
  margin: var(--sp-5) 0;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li { margin-bottom: var(--sp-2); }

.entry-content img {
  border-radius: var(--r-md);
  margin: var(--sp-5) auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--clr-border);
  text-align: right;
}

.entry-content th {
  background: var(--clr-primary);
  color: #fff;
  font-weight: var(--fw-bold);
}

/* Post Tags */
.post-tag {
  display: inline-flex;
  align-items: center;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: 4px 14px;
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  transition: all var(--dur-fast);
}
.post-tag:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   SHORTCODES
══════════════════════════════════════════════════════════════ */
/* Alert */
.np-alert {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  margin: var(--sp-6) 0;
  border-right: 4px solid;
  font-size: 0.95rem;
  line-height: 1.75;
}
.np-alert .alert-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: 1rem;
}
.np-alert.info    { background: #EBF5FB; border-color: #3498DB; color: #1A5276; }
.np-alert.success { background: #EAFAF1; border-color: #27AE60; color: #1D6A39; }
.np-alert.warning { background: #FEF9E7; border-color: #F39C12; color: #7D6608; }
.np-alert.danger  { background: #FDEDEC; border-color: #E74C3C; color: #922B21; }
[data-theme="dark"] .np-alert.info    { background: #152030; color: #85C1E9; }
[data-theme="dark"] .np-alert.success { background: #152820; color: #82E0AA; }
[data-theme="dark"] .np-alert.warning { background: #251D08; color: #F9E79F; }
[data-theme="dark"] .np-alert.danger  { background: #250E0E; color: #F1948A; }

/* Quote */
.np-quote {
  position: relative;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-6) var(--sp-5) 60px;
  margin: var(--sp-6) 0;
}
.np-quote::before {
  content: '"';
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-4);
  font-size: 4.5rem;
  color: var(--clr-primary);
  opacity: 0.35;
  line-height: 1;
  font-family: Georgia, serif;
  user-select: none;
}
.np-quote p { font-size: 1.08rem; font-style: italic; color: var(--clr-text); margin: 0; }
.np-quote .quote-author {
  margin-top: var(--sp-3);
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-style: normal;
  font-weight: var(--fw-medium);
}

/* Comparison Table */
.np-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-6) 0;
  font-size: 0.9rem;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.np-compare-table th {
  background: var(--clr-primary);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  text-align: right;
  font-weight: var(--fw-bold);
}
.np-compare-table td {
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-card);
  text-align: right;
}
.np-compare-table tr:last-child td { border-bottom: none; }
.np-compare-table tr:nth-child(even) td { background: var(--clr-bg-alt); }

/* Download Button */
.np-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--clr-primary);
  color: #fff;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  font-weight: var(--fw-bold);
  font-size: 0.95rem;
  transition: background var(--dur-fast), transform var(--dur-fast);
  margin: var(--sp-4) 0;
}
.np-download-btn:hover {
  background: var(--clr-primary-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* Highlight */
.np-highlight {
  background: rgba(243,156,18,0.22);
  border-radius: 3px;
  padding: 1px 4px;
  color: inherit;
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin: var(--sp-10) 0 var(--sp-6);
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  border: 1.5px solid var(--clr-border);
  background: var(--clr-card);
  color: var(--clr-text);
  transition: all var(--dur-fast);
}

.pagination a:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(192,57,43,0.06);
}

.pagination .current,
.pagination span.current {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0E1119;
  color: #9CA3AF;
  margin-top: var(--sp-16);
}

.footer-top {
  padding: var(--sp-12) 0 var(--sp-8);
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer-brand .site-title {
  font-size: 1.35rem;
  font-weight: var(--fw-black);
  color: #fff;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.02em;
}

.footer-widget-title {
  font-size: 0.9rem;
  font-weight: var(--fw-bold);
  color: #fff;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  letter-spacing: 0.02em;
}

.footer-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-links li a {
  color: #9CA3AF;
  font-size: 0.87rem;
  transition: color var(--dur-fast), padding-right var(--dur-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer-links li a::before {
  content: '›';
  opacity: 0;
  font-size: 1.1rem;
  transition: opacity var(--dur-fast);
}
.footer-links li a:hover {
  color: var(--clr-primary-light);
  padding-right: 4px;
}
.footer-links li a:hover::before { opacity: 1; }

.social-links {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.social-links a:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  transform: translateY(-3px);
  color: #fff;
}

.footer-bottom {
  padding: var(--sp-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════
   LAZY LOAD
══════════════════════════════════════════════════════════════ */
img[data-src] {
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-out);
}
img.loaded { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   NO POSTS
══════════════════════════════════════════════════════════════ */
.no-posts-found {
  text-align: center;
  padding: var(--sp-16) 0;
  color: var(--clr-text-muted);
}

.no-posts-found i {
  font-size: 3.5rem;
  color: var(--clr-border);
  display: block;
  margin-bottom: var(--sp-4);
}

/* ══════════════════════════════════════════════════════════════
   PAGE LINKS (multi-page post)
══════════════════════════════════════════════════════════════ */
.page-links {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-6) 0;
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  flex-wrap: wrap;
}
.page-links a,
.page-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--clr-border);
  border-radius: var(--r-sm);
  background: var(--clr-card);
  color: var(--clr-text);
  transition: all var(--dur-fast);
}
.page-links a:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

/* ══════════════════════════════════════════════════════════════
   TABLET — ≤ 1024px
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 260px; }

  .site-main {
    grid-template-columns: 1fr var(--sidebar-w);
    gap: var(--sp-6);
  }

  .news-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .news-grid-3 { grid-template-columns: repeat(2, 1fr); }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .news-card:first-child { grid-row: auto; }

  .main-navigation > ul > li > a { padding: var(--sp-3) var(--sp-3); }
}

/* ══════════════════════════════════════════════════════════════
   SMALL TABLET — ≤ 860px
══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .site-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
  }

  .sidebar .ad-zone-side {
    grid-column: 1 / -1;
  }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE — ≤ 640px
══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --fs-base: 15px; }

  .container { padding: 0 var(--sp-4); }

  /* Topbar */
  .site-topbar { padding: 6px 0; }
  .topbar-inner {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: var(--sp-2);
  }
  .topbar-date.topbar-date--calendar { display: none; } /* hide date, keep clock + dark btn */

  /* Header */
  .mobile-menu-toggle { display: flex; }
  .main-navigation { display: none; }
  .header-ad { display: none; }

  .header-inner {
    padding: 10px 0;
    min-height: 58px;
  }

  .site-branding .site-title { font-size: 1.25rem; }

  /* Mobile Nav Open State */
  .main-navigation.open {
    display: block;
    position: absolute;
    top: 100%;
    right: 0; left: 0;
    background: var(--hdr-bg);
    z-index: var(--z-dropdown);
    box-shadow: var(--sh-lg);
    border-top: 1px solid rgba(255,255,255,0.08);
    animation: slideDown var(--dur-normal) var(--ease-out);
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .main-navigation.open > ul {
    flex-direction: column;
    padding: var(--sp-3) 0;
  }

  .main-navigation.open > ul > li > a {
    padding: var(--sp-3) var(--sp-5);
    border-radius: 0;
    font-size: 0.95rem;
    opacity: 1;
    color: rgba(255,255,255,0.88);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .main-navigation.open > ul > li:last-child > a { border-bottom: none; }
  .main-navigation.open > ul > li > a:hover { background: rgba(255,255,255,0.08); color: #fff; }

  .main-navigation.open ul ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0,0,0,0.25);
    border-top: none;
    border-radius: 0;
    min-width: 0;
  }

  .main-navigation.open ul ul li a {
    padding-right: var(--sp-8);
    font-size: 0.87rem;
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .hero-grid .news-card:first-child .card-title { font-size: 1.05rem; }

  /* Grids */
  .news-grid-3,
  .news-grid-4,
  .news-grid-2 { grid-template-columns: 1fr; }

  /* Let 2-col grids stay 2-col on mobile for compact news lists */
  .breaking-section .news-grid-2,
  .news-grid-2.keep-2 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }

  /* Sidebar back to single column */
  .sidebar {
    grid-template-columns: 1fr;
  }

  /* Post */
  .post-title { font-size: 1.4rem; }
  .post-meta {
    gap: var(--sp-3);
    font-size: 0.8rem;
  }
  .post-featured-image { border-radius: var(--r-sm); }

  /* Cards */
  .news-card .card-body { padding: var(--sp-4); }
  .news-card.horizontal .card-thumbnail { width: 90px; min-width: 90px; }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding: var(--sp-8) 0 var(--sp-6);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-3);
  }

  /* Breaking news */
  .breaking-label { font-size: 0.75rem; padding: 3px 10px; }
  .breaking-scroll ul { gap: var(--sp-8); }

  /* Pagination */
  .pagination a,
  .pagination span { min-width: 36px; height: 36px; font-size: 0.83rem; }

  /* Section */
  .section-header { gap: var(--sp-3); }
  .section-link { font-size: 0.76rem; }

  /* Post meta — hide less important items on small screens */
  .post-meta span:nth-child(n+4) { display: none; }

  /* Post navigation */
  nav.post-navigation { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   EXTRA SMALL — ≤ 380px
══════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  :root { --fs-base: 14px; }

  .site-main { padding: var(--sp-4) 0; }

  .hero-section,
  .breaking-section,
  .latest-section { margin-bottom: var(--sp-6); }

  .section-title { font-size: 1rem; }

  .breaking-section .news-grid-2 { grid-template-columns: 1fr; }

  .card-meta { gap: var(--sp-3); }
}

/* ══════════════════════════════════════════════════════════════
   PRINT
══════════════════════════════════════════════════════════════ */
@media print {
  .site-topbar,
  .site-header,
  .breaking-news-bar,
  .sidebar,
  .post-share,
  .related-posts,
  #comments,
  .site-footer,
  .ad-zone,
  #reading-progress-bar { display: none !important; }

  .site-main { grid-template-columns: 1fr; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
