/* =============================================
   NAYNAWA ALGHAD — DESIGN SYSTEM (PART 1)
   Base, Layout, Header, Breaking Bar, Cards
   ============================================= */

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

/* ─────────────────────────────────────────────
   COLOR SYSTEM — Derived from Naynawa Alghad logo
   • Crimson Red  : logo Arabic text + diamond dots
   • Metallic Silver: logo flame/calligraphy symbol
   • Deep Charcoal : header, footer, dark surfaces
   ───────────────────────────────────────────── */
:root {
  /* Primary — Crimson Red (from logo text & dots) */
  --ag-primary:      #cc1f1f;
  --ag-primary-dk:   #a81818;
  --ag-primary-lt:   #faeaea;
  --ag-primary-mid:  #e52222;

  /* Silver — Metallic (from logo flame symbol) */
  --ag-silver:       #b8babb;
  --ag-silver-dk:    #858585;
  --ag-silver-lt:    #e8e8e8;
  --ag-silver-mid:   #d0d0d0;

  /* Dark surfaces — Deep charcoal (complements silver logo) */
  --ag-dark:         #111111;
  --ag-dark-2:       #1c1c1c;
  --ag-dark-3:       #2a2a2a;
  --ag-nav-bg:       #1c1c1c;

  /* Text */
  --ag-text:         #181818;
  --ag-text-2:       #4a4a4a;
  --ag-text-3:       #7a7a7a;

  /* Surfaces */
  --ag-bg:           #f4f4f4;
  --ag-card-bg:      #ffffff;
  --ag-border:       #e0e0e0;
  --ag-breaking:     #cc1f1f;

  /* Typography */
  --ag-font:         'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;

  /* Geometry */
  --ag-radius:       8px;
  --ag-radius-lg:    14px;

  /* Shadows */
  --ag-shadow:       0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --ag-shadow-md:    0 4px 20px rgba(0,0,0,.10);
  --ag-shadow-lg:    0 10px 40px rgba(0,0,0,.14);

  /* Motion */
  --ag-transition:   all .22s ease;

  /* Layout */
  --ag-container:    1240px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ag-font);
  background: var(--ag-bg);
  color: var(--ag-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: var(--ag-transition); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--ag-font); }

/* --- Container --- */
.ag-container {
  max-width: var(--ag-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   TOP BAR
   ============================================= */
.ag-topbar {
  background: var(--ag-dark);
  color: var(--ag-silver);
  font-size: .78rem;
  border-bottom: 1px solid var(--ag-dark-3);
}
.ag-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}
.ag-topbar__date { letter-spacing: .02em; }
.ag-topbar__social { display: flex; align-items: center; gap: 14px; }
.ag-topbar__social a {
  color: var(--ag-silver-dk);
  display: flex;
  align-items: center;
  transition: var(--ag-transition);
}
.ag-topbar__social a:hover { color: var(--ag-silver-lt); }

/* =============================================
   HEADER
   ============================================= */
.ag-header {
  background: var(--ag-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.ag-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  gap: 24px;
}

/* Logo */
.ag-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 0;
}
/* custom-logo-link outputs its own <a> — make it behave inline */
.ag-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
/* Constrain the logo image — no matter what WP outputs */
.ag-logo img,
.ag-logo .custom-logo,
.ag-logo .site-logo {
  height: 64px !important;
  width: auto !important;
  max-width: 200px !important;
  max-height: 64px !important;
  object-fit: contain !important;
  display: block !important;
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transition: box-shadow .2s ease, transform .2s ease;
}
.ag-logo .custom-logo-link:hover img,
.ag-logo a:hover .site-logo {
  box-shadow: 0 6px 20px rgba(204,31,31,.35), 0 0 0 2px var(--ag-primary);
  transform: translateY(-1px);
}
.ag-logo__text {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.02em;
}
.ag-logo__text span { color: var(--ag-primary); }

/* Search */
.ag-header__right { display: flex; align-items: center; gap: 16px; }
.ag-search-form {
  display: flex;
  align-items: center;
  background: var(--ag-dark-3);
  border: 1px solid #30363d;
  border-radius: 6px;
  overflow: hidden;
  transition: var(--ag-transition);
}
.ag-search-form:focus-within {
  border-color: var(--ag-primary);
  background: var(--ag-dark-2);
}
.ag-search-form input {
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 14px;
  color: #e6edf3;
  font-family: var(--ag-font);
  font-size: .88rem;
  width: 220px;
  direction: rtl;
}
.ag-search-form input::placeholder { color: #6b7280; }
.ag-search-form button {
  background: var(--ag-primary);
  border: none;
  padding: 0 14px;
  height: 38px;
  color: #fff;
  display: flex;
  align-items: center;
  transition: var(--ag-transition);
}
.ag-search-form button:hover { background: var(--ag-primary-dk); }

/* Live search dropdown */
.ag-search-wrap { position: relative; }
.ag-live-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  min-width: 340px;
  background: var(--ag-dark-2);
  border: 1px solid #30363d;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  overflow: hidden;
  display: none;
  z-index: 9999;
  direction: rtl;
}
.ag-live-results.is-open { display: block; animation: ag-fadedown .15s ease; }
@keyframes ag-fadedown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ag-live-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #30363d;
  text-decoration: none;
  transition: background .15s;
}
.ag-live-result:last-child { border-bottom: none; }
.ag-live-result:hover { background: var(--ag-dark-3); }
.ag-live-result__img {
  width: 56px; height: 42px;
  border-radius: 5px; overflow: hidden; flex-shrink: 0;
}
.ag-live-result__img img { width: 100%; height: 100%; object-fit: cover; }
.ag-live-result__text { flex: 1; min-width: 0; }
.ag-live-result__title {
  font-size: .85rem; font-weight: 700;
  color: #e6edf3; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ag-live-result__cat {
  font-size: .72rem; color: var(--ag-primary);
  margin-top: 3px; font-weight: 600;
}
.ag-live-results__footer {
  display: block; text-align: center;
  padding: 10px; font-size: .82rem;
  color: var(--ag-primary); font-weight: 700;
  background: var(--ag-dark-3);
  transition: background .15s;
}
.ag-live-results__footer:hover { background: var(--ag-primary); color: #fff; }
.ag-live-results__loading,
.ag-live-results__empty {
  padding: 16px; text-align: center;
  color: #6b7280; font-size: .85rem;
}


/* Hamburger */
.ag-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.ag-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--ag-transition);
}
.ag-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ag-menu-toggle.active span:nth-child(2) { opacity: 0; }
.ag-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   NAVIGATION
   ============================================= */
.ag-nav {
  background: var(--ag-nav-bg);
  border-top: 1px solid #30363d;
}
.ag-nav .ag-container { display: flex; }
.ag-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.ag-nav__list li a {
  display: block;
  padding: 11px 18px;
  color: var(--ag-silver);
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  transition: var(--ag-transition);
}
.ag-nav__list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--ag-primary);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.ag-nav__list li a:hover,
.ag-nav__list li.current-menu-item a,
.ag-nav__list li.current-cat a {
  color: #ffffff;
}
.ag-nav__list li a:hover::after,
.ag-nav__list li.current-menu-item a::after { transform: scaleX(1); }

/* =============================================
   BREAKING NEWS TICKER
   ============================================= */
.ag-breaking {
  background: var(--ag-breaking);
  display: flex;
  align-items: center;
  height: 40px;
  overflow: hidden;
}
.ag-breaking__label {
  background: #991b1b;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  font-weight: 800;
  font-size: .82rem;
  color: #fff;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ag-breaking__track { flex: 1; overflow: hidden; position: relative; }
.ag-breaking__ticker {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  animation: ag-ticker 40s linear infinite;
  will-change: transform;
}
.ag-breaking__ticker a {
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}
.ag-breaking__ticker a:hover { opacity: .85; text-decoration: underline; }
.ag-breaking__sep { color: rgba(255,255,255,.5); font-size: .7rem; }
.ag-breaking__ticker:hover { animation-play-state: paused; }
@keyframes ag-ticker {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* =============================================
   PAGE LAYOUT
   ============================================= */
.ag-main { padding: 28px 0 48px; }
.ag-main--single { padding: 24px 0 48px; }

/* Single article 2-column layout */
.ag-single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* =============================================
   HERO SECTION
   ============================================= */
.ag-hero { margin-bottom: 48px; }
.ag-hero__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4px;
  border-radius: var(--ag-radius-lg);
  overflow: hidden;
  background: var(--ag-dark);
  min-height: 520px;
  box-shadow: var(--ag-shadow-lg);
}

/* Hero main */
.ag-hero__main { position: relative; overflow: hidden; }
.ag-hero__main-link { display: block; height: 100%; }
.ag-hero__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.ag-hero__main:hover .ag-hero__main-img { transform: scale(1.03); }
.ag-hero__main-body {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  padding: 28px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,.92));
}
.ag-hero__main-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 10px 0 10px;
}
.ag-hero__main-title a { color: #fff; }
.ag-hero__main-title a:hover { color: #fca5a5; }
.ag-hero__main-excerpt {
  color: rgba(255,255,255,.8);
  font-size: .88rem;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-hero__main .ag-meta { gap: 14px; }
.ag-hero__main .ag-meta__time,
.ag-hero__main .ag-meta__author { color: rgba(255,255,255,.78); }

/* Silver metallic accent line on hero cards */
.ag-hero__secondary { border-right: 3px solid var(--ag-silver-dk); }

/* Hero secondary stack */
.ag-hero__secondary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--ag-dark-2);
}
.ag-hero__card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--ag-dark-2);
  transition: var(--ag-transition);
  border-bottom: 1px solid #30363d;
  flex: 1;
}
.ag-hero__card:last-child { border-bottom: none; }
.ag-hero__card:hover { background: var(--ag-dark-3); }
.ag-hero__card-img-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 65px;
  overflow: hidden;
  border-radius: 6px;
}
.ag-hero__card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.ag-hero__card:hover .ag-hero__card-img-wrap img { transform: scale(1.06); }
.ag-hero__card-body { flex: 1; min-width: 0; }
.ag-hero__card-title {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 6px 0 8px;
}
.ag-hero__card-title a { color: #e6edf3; }
.ag-hero__card-title a:hover { color: var(--ag-primary); }

/* =============================================
   SECTION HEADINGS
   ============================================= */
.ag-section { margin-bottom: 48px; }
.ag-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 0;
  border-bottom: none;
  position: relative;
}
.ag-section__head::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--ag-border);
}
.ag-section__title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ag-text);
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ag-section__title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 22px;
  background: linear-gradient(to bottom, var(--ag-primary), var(--ag-primary-dk));
  border-radius: 3px;
  flex-shrink: 0;
}
.ag-section__title--viewed { color: var(--ag-primary); }
.ag-section__more {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ag-primary);
  background: transparent;
  border: 1.5px solid var(--ag-primary);
  padding: 5px 14px;
  border-radius: 20px;
  transition: var(--ag-transition);
  white-space: nowrap;
}
.ag-section__more:hover { background: var(--ag-primary); color: #fff; }

/* =============================================
   NEWS CARDS
   ============================================= */
.ag-card-grid { display: grid; gap: 22px; }
.ag-card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ag-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ag-card-grid--2 { grid-template-columns: repeat(2, 1fr); }

.ag-card {
  background: var(--ag-card-bg);
  border-radius: var(--ag-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ag-border);
}
.ag-card:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  border-color: transparent;
}

.ag-card__img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.ag-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.ag-card:hover .ag-card__img { transform: scale(1.07); }
/* Red overlay tint on image hover */
.ag-card__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(204,31,31,.35), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.ag-card:hover .ag-card__img-wrap::after { opacity: 1; }
.ag-card__cat-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--ag-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: .04em;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.ag-card__body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ag-card__title {
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ag-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-card__title a:hover { color: var(--ag-primary); }
.ag-card__excerpt {
  font-size: .82rem;
  color: var(--ag-text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* =============================================
   META
   ============================================= */
.ag-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--ag-text-3);
}
.ag-meta--sm { font-size: .75rem; }
.ag-meta > span,
.ag-meta > time,
.ag-meta > a { display: flex; align-items: center; gap: 4px; }
.ag-meta__author a:hover { color: var(--ag-primary); }
.ag-meta__views svg { opacity: .7; }

/* =============================================
   LABELS
   ============================================= */
.ag-label {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ag-primary);
  background: var(--ag-primary-lt);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: .03em;
  transition: var(--ag-transition);
}
.ag-label:hover { background: var(--ag-primary); color: #fff; }
.ag-label--sm { font-size: .7rem; padding: 2px 8px; }
.ag-label--lg { font-size: .82rem; padding: 4px 14px; margin-bottom: 12px; }
.ag-label--cat { text-transform: uppercase; }

/* =============================================
   ARTICLE PAGE
   ============================================= */
.ag-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--ag-text-3); margin-bottom: 18px;
}
.ag-breadcrumb a { color: var(--ag-text-3); }
.ag-breadcrumb a:hover { color: var(--ag-primary); }
.bc-sep { color: var(--ag-border); }
.bc-current { color: var(--ag-text-2); font-weight: 500; }

.ag-article__title {
  font-size: 1.9rem; font-weight: 900; line-height: 1.4;
  color: var(--ag-text); margin: 14px 0 18px; letter-spacing: -.02em;
}
.ag-article__meta {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--ag-border);
  border-bottom: 1px solid var(--ag-border); margin-bottom: 24px;
  font-size: .82rem; color: var(--ag-text-3);
}
.ag-article__meta > * { display: flex; align-items: center; gap: 5px; }
.ag-article__featured-img { margin-bottom: 28px; border-radius: var(--ag-radius); overflow: hidden; }
.ag-article__img { width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.ag-article__img-caption {
  background: #f8f9fa; padding: 8px 14px; font-size: .78rem;
  color: var(--ag-text-3); text-align: center;
}
.ag-article__body {
  font-size: 1.06rem; line-height: 1.95; color: var(--ag-text);
}
.ag-article__body p { margin-bottom: 1.5em; }

/* In-article headings */
.ag-article__body h2 {
  font-size: 1.4rem; font-weight: 900; margin: 2.2em 0 .9em;
  color: var(--ag-text); letter-spacing: -.02em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ag-border);
  position: relative;
}
.ag-article__body h2::after {
  content: ''; position: absolute; bottom: -2px; right: 0;
  width: 48px; height: 3px;
  background: var(--ag-primary); border-radius: 2px;
}
.ag-article__body h3 {
  font-size: 1.18rem; font-weight: 800; margin: 1.8em 0 .7em;
  color: var(--ag-text);
}
.ag-article__body h4 {
  font-size: 1rem; font-weight: 700; margin: 1.4em 0 .5em;
  color: var(--ag-text-2);
}

/* ── BLOCKQUOTE (pull quote) ─────────────────────────────── */
.ag-article__body blockquote {
  position: relative;
  border-right: 5px solid var(--ag-primary);
  background: linear-gradient(135deg, #fef2f2 0%, #fff8f8 100%);
  padding: 22px 28px 22px 20px;
  margin: 2em 0;
  border-radius: 0 12px 12px 0;
  font-size: 1.12rem;
  font-style: italic;
  color: #374151;
  box-shadow: 0 2px 12px rgba(204,31,31,.08);
}
.ag-article__body blockquote::before {
  content: '"';
  position: absolute;
  top: -12px; right: 18px;
  font-size: 5rem; font-family: Georgia, serif;
  color: var(--ag-primary); opacity: .25;
  line-height: 1;
}
.ag-article__body blockquote p { margin: 0; }
.ag-article__body blockquote cite {
  display: block; margin-top: 10px;
  font-size: .82rem; font-style: normal;
  font-weight: 700; color: var(--ag-primary);
}

/* ── INFO BOXES ──────────────────────────────────────────── */
/* Publishers type: [info] ... [/info] — handled via shortcode */
.ag-infobox {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-right: 4px solid #3b82f6;
  border-radius: 0 10px 10px 0;
  padding: 18px 22px; margin: 2em 0;
}
.ag-infobox--warning {
  background: #fffbeb; border-color: #fcd34d; border-right-color: #f59e0b;
}
.ag-infobox--danger {
  background: #fef2f2; border-color: #fca5a5; border-right-color: var(--ag-primary);
}
.ag-infobox__title {
  font-weight: 800; font-size: .9rem; margin-bottom: 8px;
  color: #1e40af;
}
.ag-infobox--warning .ag-infobox__title { color: #92400e; }
.ag-infobox--danger  .ag-infobox__title { color: #991b1b; }

/* ── LISTS ───────────────────────────────────────────────── */
.ag-article__body ul {
  padding-right: 0; margin-bottom: 1.4em; list-style: none;
}
.ag-article__body ul li {
  padding: 6px 0 6px 0; margin-bottom: 4px;
  padding-right: 24px; position: relative;
}
.ag-article__body ul li::before {
  content: ''; position: absolute;
  right: 6px; top: 14px;
  width: 7px; height: 7px;
  background: var(--ag-primary); border-radius: 50%;
}
.ag-article__body ol {
  padding-right: 1.8em; margin-bottom: 1.4em;
  counter-reset: ag-counter;
  list-style: none;
}
.ag-article__body ol li {
  counter-increment: ag-counter;
  position: relative; padding-right: 10px; margin-bottom: 6px;
}
.ag-article__body ol li::before {
  content: counter(ag-counter) ".";
  position: absolute; right: -22px;
  font-weight: 800; color: var(--ag-primary); font-size: .9rem;
}

/* ── LINKS ───────────────────────────────────────────────── */
.ag-article__body a {
  color: var(--ag-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .15s;
}
.ag-article__body a:hover { opacity: .8; }

/* ── INLINE IMAGES ───────────────────────────────────────── */
.ag-article__body img {
  border-radius: 10px;
  margin: 1.8em auto;
  display: block;
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.ag-article__body figure {
  margin: 2em 0;
}
.ag-article__body figcaption {
  text-align: center; font-size: .8rem;
  color: var(--ag-text-3); margin-top: 8px;
  font-style: italic;
}
/* Gutenberg image block — full width option */
.ag-article__body .wp-block-image.alignfull img,
.ag-article__body .wp-block-image.alignwide img {
  border-radius: 0; box-shadow: none;
  margin: 2em -24px; max-width: calc(100% + 48px); width: calc(100% + 48px);
}

/* ── VIDEO EMBEDS (YouTube, Facebook, Twitter) ───────────── */
/* Makes ALL iframes responsive — critical for mobile */
.ag-article__body .wp-block-embed,
.ag-article__body .wp-block-embed__wrapper,
.ag-video-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 2em 0;
  background: #000;
}
.ag-article__body .wp-block-embed iframe,
.ag-article__body .wp-block-embed__wrapper iframe,
.ag-video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
/* WordPress auto-embeds (paste YouTube URL) */
.ag-article__body .wp-block-embed-youtube .wp-block-embed__wrapper,
.ag-article__body .wp-block-embed-vimeo .wp-block-embed__wrapper {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
}
.ag-article__body .wp-block-embed-youtube iframe,
.ag-article__body .wp-block-embed-vimeo iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
/* Facebook video/post embed */
.ag-article__body .wp-block-embed-facebook .wp-block-embed__wrapper {
  display: flex; justify-content: center;
}

/* Twitter/X embed */
.ag-article__body .wp-block-embed-twitter { text-align: center; }

/* ── TABLES ──────────────────────────────────────────────── */
.ag-article__body table {
  width: 100%; border-collapse: collapse;
  margin: 2em 0; font-size: .9rem;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.ag-article__body th {
  background: var(--ag-primary); color: #fff;
  padding: 12px 16px; font-weight: 700;
  text-align: right;
}
.ag-article__body td {
  padding: 10px 16px; border-bottom: 1px solid var(--ag-border);
}
.ag-article__body tr:nth-child(even) td { background: rgba(0,0,0,.02); }
.ag-article__body tr:last-child td { border-bottom: none; }

/* ── HORIZONTAL RULE ─────────────────────────────────────── */
.ag-article__body hr {
  border: none; height: 1px;
  background: linear-gradient(to left, transparent, var(--ag-border), transparent);
  margin: 2.5em 0;
}

/* ── STRONG / MARK ───────────────────────────────────────── */
.ag-article__body strong { color: var(--ag-text); font-weight: 800; }
.ag-article__body mark {
  background: #fef08a; color: #78350f;
  padding: 1px 4px; border-radius: 3px;
}

/* ── GUTENBERG GALLERY BLOCK ─────────────────────────────── */
.ag-article__body .wp-block-gallery {
  display: grid; gap: 8px; margin: 2em 0;
}
.ag-article__body .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.ag-article__body .wp-block-gallery.columns-3 { grid-template-columns: repeat(3, 1fr); }
.ag-article__body .wp-block-gallery img {
  margin: 0; border-radius: 8px; width: 100%; height: 200px; object-fit: cover;
}


.ag-article__tags {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--ag-border);
}
.ag-tag {
  background: #f1f5f9; color: var(--ag-text-2); padding: 5px 14px;
  border-radius: 20px; font-size: .78rem; font-weight: 500;
  transition: var(--ag-transition);
}
.ag-tag:hover { background: var(--ag-primary); color: #fff; }

/* Share Buttons */
.alghad-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 18px 0; border-top: 1px solid var(--ag-border);
  border-bottom: 1px solid var(--ag-border); margin: 24px 0;
}
.alghad-share span { font-weight: 700; font-size: .88rem; color: var(--ag-text-2); }
.alghad-share a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: #fff; transition: var(--ag-transition);
}
.alghad-share a:hover { transform: scale(1.1); opacity: .9; }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-tg { background: #0088cc; }
.share-wa { background: #25d366; }

/* Ad Slots (anti-CLS) */
.ag-ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: #f8f9fa; border: 1px dashed #dee2e6;
  border-radius: var(--ag-radius); color: #adb5bd; font-size: .75rem;
  text-align: center; overflow: hidden;
}
.ag-ad-slot--leaderboard { min-height: 90px; width: 100%; margin: 24px 0; }
.ag-ad-slot--article-top  { min-height: 90px; width: 100%; margin: 0 0 24px; }
.ag-ad-slot--article-bottom { min-height: 280px; width: 100%; margin: 24px 0; }
.ag-ad-slot--sidebar { min-height: 250px; width: 100%; margin: 20px 0; }
.ag-ad-slot--rectangle { min-height: 280px; max-width: 336px; margin: 24px auto; }

/* Related Articles */
.ag-related { margin-top: 40px; }

/* Sidebar */
.ag-sidebar { position: sticky; top: 108px; }
.ag-sidebar__widget {
  background: var(--ag-card-bg); border-radius: var(--ag-radius);
  padding: 20px; box-shadow: var(--ag-shadow); margin-bottom: 24px;
}

/* =============================================
   RANKED / MOST VIEWED LIST
   ============================================= */
.ag-ranked-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--ag-border);
}
.ag-ranked-item:last-child { border-bottom: none; padding-bottom: 0; }
.ag-ranked-item--sm { padding: 12px 0; }
/* Ranked items — silver numbers except #1 which is crimson */
.ag-ranked-item__num {
  font-size: 1.6rem; font-weight: 900; color: var(--ag-silver-mid);
  line-height: 1; flex-shrink: 0; min-width: 28px;
  font-family: 'Georgia', serif;
}
.ag-ranked-item:first-child .ag-ranked-item__num { color: var(--ag-primary); }
.ag-ranked-item:nth-child(2) .ag-ranked-item__num { color: var(--ag-silver); }
.ag-ranked-item:nth-child(3) .ag-ranked-item__num { color: var(--ag-silver-dk); }
.ag-ranked-item__body { flex: 1; min-width: 0; }
.ag-ranked-item__body h3 {
  font-size: .92rem; font-weight: 700; line-height: 1.5; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ag-ranked-item__body h3 a:hover { color: var(--ag-primary); }
.ag-ranked-item__img { flex-shrink: 0; width: 72px; height: 52px; overflow: hidden; border-radius: 6px; }
.ag-ranked-item__img img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================
   SPLIT ROW (Most Viewed + Latest)
   ============================================= */
.ag-split-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px;
}
.ag-split-row__panel {
  background: var(--ag-card-bg); border-radius: var(--ag-radius-lg);
  padding: 24px; box-shadow: var(--ag-shadow);
}

/* =============================================
   LATEST LIST ITEMS
   ============================================= */
.ag-list-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--ag-border);
}
.ag-list-item:last-child { border-bottom: none; }
.ag-list-item__img { flex-shrink: 0; width: 88px; height: 62px; overflow: hidden; border-radius: 6px; }
.ag-list-item__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ag-list-item:hover .ag-list-item__img img { transform: scale(1.06); }
.ag-list-item__body { flex: 1; min-width: 0; }
.ag-list-item__body h3 {
  font-size: .9rem; font-weight: 700; line-height: 1.5; margin: 5px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ag-list-item__body h3 a:hover { color: var(--ag-primary); }

/* =============================================
   SOCIAL SECTION
   ============================================= */
.ag-social-section { margin-bottom: 40px; }
.ag-social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ag-social-panel {
  background: var(--ag-card-bg); border-radius: var(--ag-radius-lg);
  box-shadow: var(--ag-shadow); overflow: hidden;
}
.ag-social-panel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; font-weight: 700; font-size: .95rem; color: #fff;
}
.ag-social-panel__head--fb { background: #1877f2; }
.ag-social-panel__head--tg { background: #0088cc; }
.ag-tg-join-btn {
  display: block; text-align: center; background: #0088cc; color: #fff;
  padding: 10px; font-weight: 700; font-size: .88rem;
  transition: var(--ag-transition);
}
.ag-tg-join-btn:hover { background: #0077b5; }

/* =============================================
   FOOTER
   ============================================= */
.ag-footer { background: var(--ag-dark); color: #9ca3af; margin-top: 60px; }
.ag-footer__top { padding: 52px 0 40px; border-bottom: 1px solid #30363d; }
.ag-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
}
.ag-footer__brand { }
.ag-footer__logo {
  display: inline-block; font-size: 1.4rem; font-weight: 900;
  color: #fff; margin-bottom: 12px; letter-spacing: -.02em;
}
.ag-footer__brand p { font-size: .85rem; line-height: 1.7; margin-bottom: 18px; }
.ag-footer__social { display: flex; gap: 12px; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #30363d;
  color: #9ca3af; transition: var(--ag-transition);
}
.social-link:hover { border-color: transparent; color: #fff; }
.social-link.social-fb:hover  { background: #1877f2; }
.social-link.social-tg:hover  { background: #0088cc; }
.social-link.social-yt:hover  { background: #cc1f1f; }

/* Silver accent on footer widget titles */
.ag-footer__widgets .widget-title {
  font-size: .9rem; font-weight: 700; color: var(--ag-silver-lt);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--ag-dark-3);
  position: relative;
}
.ag-footer__widgets .widget-title::after {
  content: ''; position: absolute; bottom: -1px; right: 0;
  width: 30px; height: 2px;
  background: linear-gradient(to left, var(--ag-primary), var(--ag-silver-dk));
}
.ag-footer__widgets ul { list-style: none; }
.ag-footer__widgets ul li { margin-bottom: 9px; }
.ag-footer__widgets ul li a {
  font-size: .83rem; color: #9ca3af; transition: var(--ag-transition);
}
.ag-footer__widgets ul li a:hover { color: #fff; padding-right: 4px; }

.ag-footer__bottom {
  padding: 18px 0; background: var(--ag-dark-2);
}
.ag-footer__bottom-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.ag-footer__copy { font-size: .8rem; }
.ag-footer__links { list-style: none; display: flex; gap: 0; flex-wrap: wrap; }
.ag-footer__links li a { font-size: .78rem; color: #6b7280; padding: 4px 12px; transition: var(--ag-transition); }
.ag-footer__links li a:hover { color: #fff; }

/* =============================================
   ARCHIVE / CATEGORY PAGE
   ============================================= */
.ag-archive-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
/* Archive page dark header uses charcoal + silver accent */
.ag-archive-header {
  background: linear-gradient(135deg, var(--ag-dark) 0%, var(--ag-dark-2) 100%);
  color: #fff; padding: 28px 0; margin-bottom: 28px;
  border-bottom: 3px solid var(--ag-primary);
}
.ag-archive-header h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.ag-archive-header h1::after {
  content: ''; display: block; width: 40px; height: 3px; margin-top: 8px;
  background: linear-gradient(to left, var(--ag-primary), var(--ag-silver-dk));
  border-radius: 2px;
}
.ag-archive-header p { color: var(--ag-silver); font-size: .88rem; }
.ag-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.ag-pagination a, .ag-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 6px; font-size: .88rem; font-weight: 600;
  background: var(--ag-card-bg); border: 1px solid var(--ag-border); transition: var(--ag-transition);
}
.ag-pagination a:hover { background: var(--ag-primary); color: #fff; border-color: var(--ag-primary); }
.ag-pagination .current { background: var(--ag-primary); color: #fff; border-color: var(--ag-primary); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .ag-hero__grid { grid-template-columns: 1fr 320px; }
  .ag-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .ag-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 900px) {
  .ag-single-layout { grid-template-columns: 1fr; }
  .ag-archive-layout { grid-template-columns: 1fr; }
  .ag-split-row { grid-template-columns: 1fr; }
  .ag-social-grid { grid-template-columns: 1fr; }
  .ag-sidebar { position: static; }
}
@media (max-width: 768px) {
  :root { --ag-container: 100%; }
  .ag-hero__grid { grid-template-columns: 1fr; }
  .ag-hero__secondary { display: none; }
  .ag-hero__main-title { font-size: 1.2rem; }
  .ag-article__title { font-size: 1.4rem; }
  .ag-search-form { display: none; }
  .ag-menu-toggle { display: flex; }
  .ag-nav { display: none; }
  .ag-nav.open { display: block; }
  .ag-nav .ag-container { flex-direction: column; padding: 0; }
  .ag-nav__list { flex-direction: column; }
  .ag-nav__list li a { padding: 13px 20px; border-bottom: 1px solid #30363d; }
  .ag-nav__list li a::after { display: none; }
  .ag-footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .ag-card-grid--4, .ag-card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .ag-footer__bottom-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  html { font-size: 15px; }
  .ag-card-grid--4, .ag-card-grid--3, .ag-card-grid--2 { grid-template-columns: 1fr; }
  .ag-hero__main-body { padding: 16px; }
}
