﻿/*
 * Newsroom Glass — Editorial Magazine
 * Purple V2 Theme | RTL / Persian | Dark Purple + Gold
 */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --nr-purple-900: var(--theme-color-bg-deep);
  --nr-purple-800: var(--theme-color-bg-alt);
  --nr-purple-700: var(--theme-color-surface);
  --nr-purple-600: var(--theme-color-surface-2);
  --nr-gold:       var(--theme-color-accent);
  --nr-gold-soft:  rgba(var(--theme-color-accent-rgb), 0.15);

  /* Internal helpers */
  --nr-gold-bright:    var(--theme-color-gold-light);
  --nr-gold-border:    rgba(var(--theme-color-accent-rgb), 0.38);
  --nr-purple-accent:  var(--theme-color-accent-2);
  --nr-purple-glow:    rgba(var(--theme-color-accent-2-rgb), 0.22);
  --nr-text:           var(--theme-color-text);
  --nr-text-muted:     var(--theme-color-muted);
  --nr-text-faint:     rgba(var(--theme-color-muted-rgb, 200, 186, 215), 0.62);
  --nr-border:         rgba(var(--theme-color-border-rgb), 0.13);
  --nr-border-strong:  rgba(var(--theme-color-border-rgb), 0.28);
  --nr-glass-bg:       rgba(var(--theme-color-surface-rgb), 0.68);
  --nr-glass-blur:     18px;
  --nr-radius:         16px;
  --nr-radius-lg:      22px;
  --nr-ease:           0.25s ease;
  --nr-shadow:         0 8px 32px rgba(0, 0, 0, 0.34);
  --nr-shadow-hover:   0 22px 58px rgba(0, 0, 0, 0.55);

  /* Category color palette (5 variants) */
  --nr-cat-1: rgba(var(--theme-color-accent-rgb), 0.18);   /* gold   */
  --nr-cat-2: rgba(var(--theme-color-accent-2-rgb), 0.18);   /* purple */
  --nr-cat-3: rgba(var(--theme-color-cat-blue-rgb), 0.18);   /* blue   */
  --nr-cat-4: rgba(var(--theme-color-cat-coral-rgb), 0.18);   /* coral  */
  --nr-cat-5: rgba(var(--theme-color-cat-teal-rgb), 0.18);   /* teal   */

  /* Typography scale (minor third 1.2) */
  --nr-fs-xs: 0.694rem;
  --nr-fs-sm: 0.833rem;
  --nr-fs-base: 1rem;
  --nr-fs-md: 1.2rem;
  --nr-fs-lg: 1.44rem;
  --nr-fs-xl: 1.728rem;
  --nr-fs-2xl: 2.074rem;
  --nr-fs-3xl: 2.488rem;
  --nr-lh-tight: 1.3;
  --nr-lh-normal: 1.55;
  --nr-lh-relaxed: 1.75;
  --nr-card-lift: -3px;
  --nr-bg-scale: 1.03;
  --nr-thumb-ratio: 16 / 9;
}

/* ============================================================
   Section wrapper
   ============================================================ */
.nr-section {
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
}

/* ============================================================
   Section header bar
   ============================================================ */
.nr-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--nr-border);
}

.nr-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--nr-fs-md);
  font-weight: 700;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
  margin: 0;
}

.nr-section-title::before {
  content: "";
  display: block;
  width: 3px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--nr-gold) 0%, var(--nr-purple-accent) 100%);
  flex-shrink: 0;
}

.nr-section-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nr-gold);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--nr-ease), gap var(--nr-ease);
}

.nr-section-more:hover { color: var(--nr-gold-bright); gap: 9px; }

/* ============================================================
   Category badges
   ============================================================ */
.nr-card__cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 50px;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  color: var(--nr-gold-bright);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  transition: transform var(--nr-ease), box-shadow var(--nr-ease), background var(--nr-ease);
  cursor: default;
}

/* 5 auto-assigned color variants via JS (data-cat-color="1..5") */
.nr-card__cat[data-cat-color="1"] { background: var(--nr-cat-1); border-color: rgba(var(--theme-color-accent-rgb),.45); color: #f0d090; }
.nr-card__cat[data-cat-color="2"] { background: var(--nr-cat-2); border-color: rgba(var(--theme-color-accent-2-rgb), .45);  color: var(--theme-color-purple-pale); }
.nr-card__cat[data-cat-color="3"] { background: var(--nr-cat-3); border-color: rgba(var(--theme-color-cat-blue-rgb), .45); color: var(--theme-color-cat-blue-text); }
.nr-card__cat[data-cat-color="4"] { background: var(--nr-cat-4); border-color: rgba(var(--theme-color-cat-coral-rgb), .45); color: var(--theme-color-cat-coral-text); }
.nr-card__cat[data-cat-color="5"] { background: var(--nr-cat-5); border-color: rgba(var(--theme-color-cat-teal-rgb), .45); color: var(--theme-color-cat-teal-text); }

/* category badge hover scale removed for cleaner interaction */

/* ============================================================
   Base card
   ============================================================ */
.nr-card {
  position: relative;
  border-radius: var(--nr-radius);
  overflow: hidden;
  background: var(--nr-glass-bg);
  backdrop-filter: blur(var(--nr-glass-blur));
  -webkit-backdrop-filter: blur(var(--nr-glass-blur));
  border: 1px solid var(--nr-border);
  box-shadow: var(--nr-shadow);
  transition: transform var(--nr-ease), box-shadow var(--nr-ease), border-color var(--nr-ease);
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.nr-card:hover {
  transform: translateY(var(--nr-card-lift));
  box-shadow: var(--nr-shadow-hover);
  border-color: var(--nr-gold-border);
}

.nr-card:focus-visible {
  outline: 2px solid var(--nr-gold);
  outline-offset: 3px;
}

/* ============================================================
   Card background image
   ============================================================ */
.nr-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--nr-purple-700);
  filter: brightness(0.75);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), filter 0.35s ease;
  z-index: 1;
}

.nr-card:hover .nr-card__bg { transform: scale(var(--nr-bg-scale)); filter: brightness(0.72); }

/* ============================================================
   Gradient overlay
   ============================================================ */
.nr-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(var(--theme-color-bg-rgb), 0.95) 0%,
    rgba(var(--theme-color-bg-rgb), 0.45) 35%,
    rgba(var(--theme-color-bg-rgb), 0.05) 100%
  );
}

/* ============================================================
   Card content block
   ============================================================ */
.nr-card__content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 22px;
  z-index: 5;
  direction: rtl;
}

/* ============================================================
   Card title
   ============================================================ */
.nr-card__title {
  margin: 0 0 8px;
  font-weight: 700;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
  line-height: var(--nr-lh-normal);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  transition: color var(--nr-ease);
}

.nr-card__title a { color: inherit; text-decoration: none; }
.nr-card:hover .nr-card__title { color: var(--theme-color-gold-pale); }

/* Stretched link — makes entire card clickable */
.nr-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* Ensure inner interactive elements sit above stretched link */
.nr-card__cat,
.nr-card__admin,
.nr-card__meta a {
  position: relative;
  z-index: 5;
}

/* ============================================================
   Card summary
   ============================================================ */
.nr-card__summary {
  margin: 0 0 10px;
  color: rgba(var(--theme-color-text-rgb, 244, 238, 251), 0.82);
  font-size: 0.9rem;
  line-height: var(--nr-lh-relaxed);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Meta row — with SVG icon pseudo-elements
   ============================================================ */
.nr-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  direction: rtl;
  margin-top: 2px;
  font-size: var(--nr-fs-xs);
}

.nr-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nr-text-faint);
  font-size: 0.78rem;
}

.nr-meta-item::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.6;
  flex-shrink: 0;
}

.nr-meta-item--author::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c8bad7'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E");
}

.nr-meta-item--date::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c8bad7'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5C3.9 4 3 4.9 3 6v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zm0-13H5V6h14v1z'/%3E%3C/svg%3E");
}

.nr-meta-item--views::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c8bad7'%3E%3Cpath d='M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5C21.3 7.6 17 4.5 12 4.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z'/%3E%3C/svg%3E");
}

.nr-meta-item--comments::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c8bad7'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
}

/* ============================================================
   Read-more button
   ============================================================ */
.nr-card__more {
  display: none;
  /* display: inline-flex; */
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  color: var(--nr-gold-bright);
  font-size: 0.87rem;
  text-decoration: none;
  backdrop-filter: blur(var(--glass-blur-xs));
  -webkit-backdrop-filter: blur(var(--glass-blur-xs));
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease);
}

.nr-card__more:hover {
  background: rgba(var(--theme-color-accent-rgb), 0.3);
  border-color: rgba(var(--theme-color-accent-rgb), 0.68);
  color: var(--theme-color-gold-pale);
}

/* ============================================================
   Admin controls (top-left, visible on hover)
   ============================================================ */
.nr-card__admin {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity var(--nr-ease);
}

.nr-card:hover .nr-card__admin { opacity: 1; }

.nr-card__admin a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(var(--glass-blur-xs));
  -webkit-backdrop-filter: blur(var(--glass-blur-xs));
  color: var(--nr-text);
  font-size: 0.78rem;
  text-decoration: none;
  transition: background var(--nr-ease), transform var(--nr-ease);
}

.nr-card__admin a:hover {
  background: rgba(var(--theme-color-accent-rgb), 0.42);
  color: var(--nr-gold-bright);
  transform: scale(1.1);
}

/* ============================================================
   HERO card — full-width top story
   ============================================================ */
.nr-card--hero {
  min-height: 480px;
  border-radius: var(--nr-radius-lg);
  border-color: rgba(var(--theme-color-accent-rgb), 0.22);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.45);
}

.nr-card--hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.62);
  border-color: rgba(var(--theme-color-accent-rgb), 0.5);
}

.nr-card--hero .nr-card__overlay {
  background:
    radial-gradient(ellipse at bottom right, rgba(var(--theme-color-accent-rgb),0.08) 0%, transparent 70%),
    linear-gradient(
      to top,
      rgba(var(--theme-color-bg-rgb), 0.95) 0%,
      rgba(var(--theme-color-bg-rgb), 0.5) 30%,
      rgba(var(--theme-color-bg-rgb), 0.05) 65%,
      transparent 100%
    );
}

.nr-card--hero .nr-card__content { padding: 36px 42px; }

.nr-card--hero .nr-card__title {
  font-size: clamp(var(--nr-fs-xl), 3vw, var(--nr-fs-2xl));
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  line-height: 1.4;
  margin-bottom: 12px;
}

.nr-card--hero .nr-card__summary { -webkit-line-clamp: 3; font-size: 0.98rem; }

/* Gold accent line bottom on hover */
.nr-card--hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nr-gold) 0%, var(--nr-purple-accent) 55%, transparent 100%);
  z-index: 6;
  opacity: 0.4;
  transition: opacity var(--nr-ease);
}

.nr-card--hero:hover::after { opacity: 1; }

/* ============================================================
   LEAD TILE — 2nd card, overlay style (wide)
   ============================================================ */
.nr-card--tile-lead {
  min-height: 380px;
  border-radius: var(--nr-radius-lg);
  border-right: 2px solid rgba(var(--theme-color-accent-rgb),0.25);
  /* override tile defaults */
  display: block;
  flex-direction: unset;
}

.nr-card--tile-lead .nr-card__bg,
.nr-card--tile-lead .nr-card__overlay {
  display: block;
}

.nr-card--tile-lead .nr-card__thumb-wrap { display: none; }

.nr-card--tile-lead .nr-card__content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 28px 30px;
  flex-direction: unset;
  gap: unset;
}

.nr-card--tile-lead .nr-card__title {
  font-size: 1.45rem;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  color: var(--nr-text);
  margin-bottom: 10px;
}

.nr-card--tile-lead .nr-card__summary { -webkit-line-clamp: 2; }

/* ============================================================
   TILE card — thumbnail + content below
   ============================================================ */
.nr-card--tile {
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.nr-card--tile .nr-card__bg,
.nr-card--tile .nr-card__overlay { display: none; }

.nr-card--tile .nr-card__thumb-wrap {
  position: relative;
  height: auto;
  min-height: 110px;
  max-height: 300px;
  aspect-ratio: var(--nr-thumb-ratio);
  overflow: hidden;
  flex-shrink: 0;
  border-radius: var(--nr-radius) var(--nr-radius) 0 0;
  background: var(--nr-purple-800);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nr-card--tile .nr-card__thumb {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.nr-card--tile:hover .nr-card__thumb { transform: scale(1.04); }

/* Broken image fallback */
.nr-card--tile .nr-card__thumb-wrap.nr-img-broken {
  min-height: 140px;
  background: linear-gradient(135deg, var(--nr-purple-700) 0%, rgba(var(--theme-color-accent-2-rgb), .2) 100%);
}

.nr-card--tile .nr-card__thumb-wrap.nr-img-broken::after {
  content: '';
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  opacity: 0.45;
  position: absolute;
}

.nr-card--tile .nr-card__thumb-noimage {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--nr-purple-700) 0%, rgba(var(--theme-color-accent-2-rgb), 0.28) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nr-card--tile .nr-card__thumb-noimage::after {
  content: '';
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  opacity: 0.5;
}

.nr-card--tile .nr-card__content {
  position: static;
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nr-card--tile .nr-card__title {
  font-size: 1rem;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  text-shadow: none;
  margin: 0;
  color: var(--nr-text);
  line-height: 1.55;
}

.nr-card--tile .nr-card__summary {
  font-size: 0.875rem;
  line-height: 1.68;
  -webkit-line-clamp: 3;
  color: var(--nr-text-muted);
  margin: 0;
  flex: 1;
  text-shadow: none;
}

.nr-card--tile .nr-card__meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--nr-border);
}

/* ============================================================
   Magazine listing grid
   ============================================================ */
.nr-listing-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  row-gap: 24px;
  direction: rtl;
}

/* Row 1: hero full-width */
.nr-listing-grid > .nr-card--hero { grid-column: 1 / -1; }

/* Row 2: lead (8) + sidebar (4) */
.nr-listing-grid > .nr-card--tile-lead { grid-column: span 8; }
.nr-listing-grid > :nth-child(3):not(.nr-card--hero) { grid-column: span 4; }

/* Row 3: 3-column */
.nr-listing-grid > :nth-child(4),
.nr-listing-grid > :nth-child(5),
.nr-listing-grid > :nth-child(6) { grid-column: span 4; }

/* Row 4: 2-wide */
.nr-listing-grid > :nth-child(7),
.nr-listing-grid > :nth-child(8) { grid-column: span 6; }

/* Row 5+: 3-column */
.nr-listing-grid > :nth-child(n+9) { grid-column: span 4; }

/* ============================================================
   Category page header
   ============================================================ */
.nr-cat-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nr-border);
  direction: rtl;
}

.nr-cat-header__name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nr-text);
  margin: 0 0 8px;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

.nr-cat-header__name::before {
  content: "";
  display: block;
  width: 4px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--nr-gold) 0%, var(--nr-purple-accent) 100%);
  flex-shrink: 0;
}

.nr-cat-header__desc {
  color: var(--nr-text-muted);
  font-size: 0.9rem;
  margin: 0;
  padding-right: 16px;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.nr-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  direction: rtl;
  margin-bottom: 14px;
  padding: 10px 16px;
  background: rgba(var(--theme-color-accent-2-rgb), 0.12);
  border: 1px solid rgba(var(--theme-color-accent-2-rgb), 0.22);
  border-radius: 10px;
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
  font-size: 0.83rem;
}

.nr-breadcrumb a {
  color: var(--nr-text-muted);
  text-decoration: none;
  transition: color var(--nr-ease);
}

.nr-breadcrumb a:hover { color: var(--nr-gold); }

.nr-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nr-breadcrumb li::after {
  content: "›";
  opacity: 0.35;
  font-size: 0.8rem;
}

.nr-breadcrumb li:last-child::after { display: none; }

/* .nr-article prefix raises specificity above module newsroom.css
   (ul.newsroom_breadcrumb …) which loads after this file. */
.nr-article ul.newsroom_breadcrumb {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  direction: rtl;
  margin: 0 0 16px;
  padding: 9px 16px 9px 14px;
  background: linear-gradient(90deg,
    rgba(var(--theme-color-accent-rgb), 0.10) 0%,
    rgba(var(--theme-color-accent-2-rgb), 0.10) 100%);
  border: 1px solid rgba(var(--theme-color-accent-2-rgb), 0.20);
  border-radius: 12px;
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
  font-size: 0.82rem;
  line-height: 1.4;
  list-style: none;
  color: var(--nr-text-muted);
  overflow: hidden;
}

/* leading gold accent rail (RTL → right edge) */
.nr-article ul.newsroom_breadcrumb::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--nr-gold) 0%, var(--nr-purple-accent) 100%);
  opacity: 0.85;
}

.nr-article ul.newsroom_breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: inherit;
  list-style: none;
}

.nr-article ul.newsroom_breadcrumb li + li::before {
  content: "‹";
  margin: 0 1px;
  padding: 0;
  color: var(--nr-gold);
  opacity: 0.5;
  font-size: 0.85rem;
}

.nr-article ul.newsroom_breadcrumb li a {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  color: var(--nr-text-muted);
  text-decoration: none;
  transition: color var(--nr-ease), background var(--nr-ease);
}

.nr-article ul.newsroom_breadcrumb li a:hover {
  color: var(--nr-gold-bright);
  background: var(--nr-gold-soft);
}

/* current page (last crumb = article title) — not a link */
.nr-article ul.newsroom_breadcrumb li:last-child {
  color: var(--nr-text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nr-intro {
  color: var(--nr-text-muted);
  font-size: 0.95rem;
  direction: rtl;
  margin-bottom: 18px;
  line-height: 1.75;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

/* ============================================================
   Pagination
   ============================================================ */
.nr-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  direction: rtl;
  padding: 6px 0;
}

.nr-nav a,
.nr-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--nr-glass-bg);
  border: 1px solid var(--nr-border);
  color: var(--nr-text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease);
}

.nr-nav a:hover {
  background: var(--nr-gold-soft);
  border-color: var(--nr-gold-border);
  color: var(--nr-gold-bright);
}

/* ============================================================
   Empty state
   ============================================================ */
.nr-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--nr-glass-bg);
  backdrop-filter: blur(var(--nr-glass-blur));
  -webkit-backdrop-filter: blur(var(--nr-glass-blur));
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-lg);
  direction: rtl;
}

.nr-empty__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
}

.nr-empty__icon svg {
  width: 34px;
  height: 34px;
  fill: var(--nr-gold);
  opacity: 0.75;
}

.nr-empty__title {
  color: var(--nr-text);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

.nr-empty__desc {
  color: var(--nr-text-muted);
  font-size: 0.9rem;
  margin: 0;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

/* ============================================================
   Section footer (view-more row)
   ============================================================ */
.nr-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--nr-border);
  direction: rtl;
  font-size: 0.87rem;
}

.nr-footer a {
  color: var(--nr-gold);
  text-decoration: none;
  transition: color var(--nr-ease);
}

.nr-footer a:hover { color: var(--nr-gold-bright); }

/* ============================================================
   MODULE FOOTER (newsroom_footer.tpl)
   ============================================================ */
.newsroom-index-footer {
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--nr-text-muted);
  padding: 12px 0;
}

.newsroom-admin-links {
  direction: rtl;
  font-size: 0.85rem;
  padding: 10px 0;
}

.newsroom-admin-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin: 4px;
  border-radius: 8px;
  background: rgba(var(--theme-color-accent-2-rgb), 0.12);
  border: 1px solid rgba(var(--theme-color-accent-2-rgb), 0.3);
  color: var(--theme-color-purple-pale);
  font-size: 0.83rem;
  text-decoration: none;
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease);
}

.newsroom-admin-links a:hover {
  background: rgba(var(--theme-color-accent-2-rgb), 0.24);
  border-color: rgba(var(--theme-color-accent-2-rgb), 0.52);
  color: var(--theme-color-purple-faint);
}

.newsroom-comments-section {
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  margin-top: 28px;
  padding: 20px 24px;
    background: rgba(var(--theme-color-accent-2-rgb), 0.12);
  border: 1px solid rgba(var(--theme-color-accent-2-rgb), 0.22);
  border-radius: 10px;
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));

}

#newsroom_rnewsroom_feed {
  direction: rtl;
  font-size: 0.85rem;
  color: var(--nr-text-muted);
  padding: 10px 0;
}

/* ============================================================
   BLOCK: singleitem_block — sidebar / homepage
   ============================================================ */
.nr-grid {
  display: grid;
  grid-template-columns: 4fr 3fr;
  gap: 14px;
  align-items: start;
}

.nr-grid > .nr-card--featured { grid-column: 1; grid-row: 1 / 4; }
.nr-grid > .nr-card--secondary { grid-column: 2; }

.nr-card--featured {
  border-radius: 20px;
  border-color: rgba(var(--theme-color-accent-rgb), 0.24);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.38);
  min-height: 460px;
}

.nr-card--featured:hover {
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.56);
  border-color: rgba(var(--theme-color-accent-rgb), 0.52);
}

.nr-card--featured .nr-card__overlay {
  background: linear-gradient(
    to top,
    rgba(var(--theme-color-bg-rgb), 0.97) 0%,
    rgba(var(--theme-color-bg-rgb), 0.64) 42%,
    rgba(var(--theme-color-bg-rgb), 0.1) 100%
  );
}

.nr-card--featured .nr-card__content { padding: 26px; }
.nr-card--featured .nr-card__title { font-size: 1.35rem; margin-bottom: 10px; }
.nr-card--featured .nr-card__summary { -webkit-line-clamp: 3; }

.nr-card--secondary { min-height: 144px; }
.nr-card--secondary .nr-card__title { font-size: 0.95rem; }
.nr-card--secondary .nr-card__content { padding: 16px 18px; }

/* ============================================================
   BLOCK: recent news grid (newsroom_items_recent.tpl)
   ============================================================ */
.hp-news-grid {
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

.news-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.news-grid-item {
  position: relative;
  border-radius: var(--nr-radius);
  overflow: hidden;
  background: var(--nr-glass-bg);
  border: 1px solid var(--nr-border);
  backdrop-filter: blur(var(--nr-glass-blur));
  -webkit-backdrop-filter: blur(var(--nr-glass-blur));
  min-height: 220px;
  transition: transform var(--nr-ease), box-shadow var(--nr-ease), border-color var(--nr-ease);
}

.news-grid-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--nr-shadow-hover);
  border-color: var(--nr-gold-border);
}

.news-grid-item:first-child {
  grid-column: 1 / -1;
  min-height: 280px;
}

.news-card-link {
  display: block;
  position: absolute;
  inset: 0;
  text-decoration: none;
  color: inherit;
}

.news-card-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.6);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), filter 0.35s ease;
}

.news-grid-item:hover .news-card-image img { transform: scale(1.07); filter: brightness(0.72); }

.news-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--theme-color-bg-rgb), 0.95) 0%,
    rgba(var(--theme-color-bg-rgb), 0.5) 42%,
    transparent 100%
  );
}

.news-card-content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 16px;
  z-index: 3;
  direction: rtl;
}

.news-card-title {
  margin: 0 0 8px;
  font-family: 'Lalezar', var(--nr2-title-font, 'Vazir'), Tahoma, Arial, sans-serif;
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: .2px;
  color: var(--nr-text);
  line-height: 1.55;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-grid-item:first-child .news-card-title {
  font-size: 1.22rem;
  -webkit-line-clamp: 3;
}

.news-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.news-card-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nr-text-faint);
  font-size: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.news-card-meta .meta-item i { flex: 0 0 auto; }
.news-card-meta .meta-item--poster { min-width: 0; max-width: 100%; overflow: hidden; }
.news-card-meta .meta-item--poster .meta-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.svg-icon svg { width: 13px; height: 13px; fill: var(--nr-text-muted); }

.news-grid-footer {
  margin-top: 14px;
  direction: rtl;
  display: flex;
  justify-content: flex-start;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 50px;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  color: var(--nr-gold-bright);
  font-size: 0.875rem;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  text-decoration: none;
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease);
}

.view-all-btn:hover {
  background: rgba(var(--theme-color-accent-rgb), 0.3);
  border-color: rgba(var(--theme-color-accent-rgb), 0.65);
  color: var(--theme-color-gold-pale);
}

/* ============================================================
   Shimmer loading state
   ============================================================ */
@keyframes nr-shimmer {
  0%   { transform: translateX(120%) rotate(25deg); }
  100% { transform: translateX(-120%) rotate(25deg); }
}

.nr-card.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 62%
  );
  animation: nr-shimmer 1.8s ease-in-out infinite;
  z-index: 20;
  pointer-events: none;
}

/* ============================================================
   Light theme overrides
   ============================================================ */
[data-theme="light"] .nr-card {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(var(--theme-color-border-rgb), 0.14);
}

[data-theme="light"] .nr-card:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(var(--theme-color-accent-rgb), 0.42);
}

[data-theme="light"] .nr-card__overlay {
  background: linear-gradient(
    to top,
    rgba(var(--theme-color-surface-rgb), 0.92) 0%,
    rgba(var(--theme-color-surface-rgb), 0.5) 40%,
    rgba(var(--theme-color-surface-rgb), 0.06) 100%
  );
}

[data-theme="light"] .nr-card--tile {
  background: rgba(255, 255, 255, 0.58);
}

[data-theme="light"] .nr-card--tile .nr-card__title { color: var(--theme-color-text); }

[data-theme="light"] .nr-card--tile .nr-card__meta {
  border-top-color: rgba(var(--theme-color-border-rgb), 0.12);
}

[data-theme="light"] .nr-article ul.newsroom_breadcrumb {
  background: linear-gradient(90deg,
    rgba(var(--theme-color-accent-rgb), 0.08) 0%,
    rgba(var(--theme-color-accent-2-rgb), 0.08) 100%);
  border-color: rgba(var(--theme-color-accent-2-rgb), 0.22);
}
[data-theme="light"] .nr-article ul.newsroom_breadcrumb li a { color: var(--nr-text-muted); }
[data-theme="light"] .nr-article ul.newsroom_breadcrumb li:last-child { color: var(--nr-text); }
[data-theme="light"] .nr-breadcrumb {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(var(--theme-color-border-rgb), 0.12);
}

[data-theme="light"] .nr-article {
  --nr-glass-bg: rgba(255, 255, 255, 0.85);
  --nr-border: rgba(var(--theme-color-accent-2-rgb), 0.15);
}

[data-theme="light"] .nr-article__hero .nr-article__overlay {
  background: linear-gradient(180deg, transparent 30%, rgba(255,255,255,0.95) 100%);
}

[data-theme="light"] .nr-article__title,
[data-theme="light"] .nr-article__body h2,
[data-theme="light"] .nr-article__body h3 {
  color: var(--nr-purple-900);
}

[data-theme="light"] .nr-article__body {
  color: var(--theme-color-purple-deep);
}

[data-theme="light"] .nr-article__body blockquote {
  background: rgba(var(--theme-color-accent-2-rgb), 0.06);
  color: var(--theme-color-purple-dark);
}

[data-theme="light"] .nr-article__prevnext a {
  background: rgba(255, 255, 255, 0.7);
  color: var(--nr-purple-900);
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .nr-card--hero .nr-card__title { font-size: 1.72rem; }
  .nr-card--hero .nr-card__content { padding: 28px 32px; }
}

@media (max-width: 991px) {
  .nr-listing-grid { grid-template-columns: repeat(2, 1fr); }
  .nr-listing-grid > .nr-card--hero  { grid-column: 1 / -1; }
  .nr-listing-grid > .nr-card--tile-lead { grid-column: 1 / -1; min-height: 300px; }
  .nr-listing-grid > :nth-child(3),
  .nr-listing-grid > :nth-child(4),
  .nr-listing-grid > :nth-child(5),
  .nr-listing-grid > :nth-child(6),
  .nr-listing-grid > :nth-child(7),
  .nr-listing-grid > :nth-child(8),
  .nr-listing-grid > :nth-child(n+9) { grid-column: span 1; }

  .nr-card--hero { min-height: 360px; }
  .nr-card--hero .nr-card__title { font-size: 1.5rem; }
  .nr-card--tile-lead { min-height: 280px; }
  .nr-card--tile-lead .nr-card__title { font-size: 1.2rem; }

  .nr-grid { grid-template-columns: 1fr 1fr; }
  .nr-grid > .nr-card--featured { grid-column: 1 / 3; grid-row: 1; min-height: 320px; }
  .nr-grid > .nr-card--secondary { grid-column: auto; }

  .news-grid-container { grid-template-columns: repeat(2, 1fr); }
  .news-grid-item:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nr-listing-grid { grid-template-columns: 1fr; }
  .nr-listing-grid > * { grid-column: 1; }

  .nr-card--hero { min-height: 260px; }
  .nr-card--hero .nr-card__title { font-size: 1.22rem; }
  .nr-card--hero .nr-card__content { padding: 18px 20px; }
  .nr-card--hero .nr-card__summary { -webkit-line-clamp: 2; }

  .nr-card--tile-lead { min-height: 220px; }
  .nr-card--tile-lead .nr-card__title { font-size: 1.05rem; }
  .nr-card--tile-lead .nr-card__content { padding: 18px 18px; }

  .nr-card__more { padding: 7px 16px; font-size: 0.83rem; }

  .nr-grid { grid-template-columns: 1fr; }
  .nr-grid > .nr-card--featured { grid-column: 1; grid-row: 1; min-height: 260px; }
  .nr-card--featured { min-height: 260px; }

  .news-grid-container { grid-template-columns: 1fr; }
  .news-grid-item:first-child { grid-column: 1; }
}

/* ============================================================
   ARTICLE VIEW
   ============================================================ */

/* ── Reading progress bar ── */
.nr-article__progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--nr-gold);
  transform-origin: right;
  transform: scaleX(0);
  z-index: 9999;
  animation: nr-progress linear;
  animation-timeline: scroll();
}

@keyframes nr-progress { to { transform: scaleX(1); } }

/* ── Outer wrapper ── */
.nr-article {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
}

.nr-article a { color: var(--nr-gold); }
.nr-article a:hover { color: var(--nr-gold-bright); }

/* ── Breadcrumb header ── */
.nr-article .newsroom_header { padding: 20px 0 0; }

/* ── Hero ── */
.nr-article__hero {
  position: relative;
  min-height: 520px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin: 24px 0 0;
  border-radius: var(--nr-radius-lg) var(--nr-radius-lg) 0 0;
}

.nr-article__hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.78);
  z-index: 1;
  transition: filter 0.4s ease;
}

.nr-article__hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(var(--theme-color-bg-rgb), 1)    0%,
    rgba(var(--theme-color-bg-rgb), 0.55) 30%,
    rgba(var(--theme-color-bg-rgb), 0.08) 60%,
    transparent 100%
  );
}

/* Gold accent line bottom */
.nr-article__hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nr-gold) 0%, var(--nr-purple-accent) 55%, transparent 100%);
  z-index: 6;
}

.nr-article__hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 40px 48px;
  direction: rtl;
}

.nr-article__hero .newsroom-hero-category {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 50px;
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  color: var(--nr-gold-bright);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

.nr-article__title {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 3.5vw, 2.55rem);
  font-weight: 800;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
  line-height: 1.35;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7);
}

.nr-article__subtitle {
  font-size: 1.05rem;
  color: rgba(var(--theme-color-text-rgb, 244, 238, 251), 0.8);
  line-height: 1.68;
  margin-bottom: 20px;
}

.nr-article__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  direction: rtl;
}

.nr-article__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--nr-gold-border);
  object-fit: cover;
  flex-shrink: 0;
}

.nr-article__meta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nr-article__author {
  color: var(--nr-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.nr-article__date {
  color: var(--nr-text-muted);
  font-size: 0.82rem;
}

/* ── Article body wrapper ── */
.nr-article__body-wrap {
  margin: 0 auto;
  padding: 44px 30px 30px;
  background: rgba(var(--theme-color-surface-rgb), 0.55);
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
  border: 1px solid var(--nr-border);
  border-radius: 0 0 var(--nr-radius-lg) var(--nr-radius-lg);
}

/* ── Article body — typography ── */
.nr-article__body {
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.9;
  color: var(--nr-text);
}


.nr-article__body p {
  margin: 0 0 1.2em;
  line-height: 1.85;
}

.nr-article__body h2 {
  font-size: var(--nr-fs-lg);
  font-weight: 700;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
  margin: 2em 0 0.8em;
  line-height: 1.4;
}

.nr-article__body h3 {
  font-size: var(--nr-fs-md);
  font-weight: 700;
  font-family: "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  margin: 1.8em 0 0.7em;
}

.nr-article__body a {
  color: var(--nr-gold);
  text-underline-offset: 3px;
  transition: color var(--nr-ease);
}

.nr-article__body a:hover { color: var(--nr-gold-bright); }

/* Blockquote / pull-quote — RTL border-right */
.nr-article__body blockquote {
  position: relative;
  border-right: 3px solid var(--nr-gold);
  border-left: none;
  padding: 18px 24px 18px 16px;
  margin: 1.6em 0;
  background: var(--nr-gold-soft);
  border-radius: 0 10px 10px 0;
  color: rgba(var(--theme-color-text-rgb, 244, 238, 251), 0.88);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.8;
}

.nr-article__body blockquote::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 3rem;
  font-family: "Lalezar", "Vazir", sans-serif;
  color: var(--nr-gold);
  opacity: 0.35;
  line-height: 1;
}

/* Images */
.nr-article__body img {
  max-width: 100%;
  border-radius: var(--nr-radius);
  margin: 1em 0;
  box-shadow: var(--nr-shadow);
}

/* figure + figcaption */
.nr-article__body figure {
  margin: 1.5em 0;
  text-align: center;
}

.nr-article__body figure img {
  margin: 0 auto 0.5em;
  display: block;
}

.nr-article__body figcaption {
  color: var(--nr-text-muted);
  font-size: var(--nr-fs-sm);
  margin-top: 6px;
}

/* Lists — RTL padding */
.nr-article__body ul,
.nr-article__body ol {
  padding-right: 24px;
  padding-left: 0;
  margin: 0 0 1.5em;
}

.nr-article__body li {
  margin-bottom: 0.5em;
}

.nr-article__body ul li::marker {
  color: var(--nr-gold);
}

.nr-article__body ol li::marker {
  color: var(--nr-gold);
  font-weight: 600;
}

/* Links inside body */
.nr-article__body .nr-intro {
  color: var(--nr-text-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
  line-height: 1.75;
}

/* ── Page nav ── */
.nr-article .newsroom_pagenav_top,
.nr-article .newsroom_pagenav_bottom {
  padding: 12px 0;
  color: var(--nr-text-muted);
  font-size: 0.9rem;
}

/* ── Admin action bar ── */
.nr-article__admin {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--nr-border);
}

.nr-article__admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.nr-article__admin-left,
.nr-article__admin-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nr-article__admin-left a,
.nr-article__admin-right a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--nr-glass-bg);
  border: 1px solid var(--nr-border);
  color: var(--nr-text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease);
  backdrop-filter: blur(var(--glass-blur-sm));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
}

.nr-article__admin-left a:hover,
.nr-article__admin-right a:hover {
  background: var(--nr-gold-soft);
  border-color: var(--nr-gold-border);
  color: var(--nr-gold-bright);
}

/* ── Attached files ── */
.nr-article__files {
  margin: 24px 0;
}

.nr-article__files .outer,
.nr-article__files table.outer {
  width: 100%;
  border-collapse: collapse;
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 0.9rem;
  background: var(--nr-glass-bg);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
}

.nr-article__files .itemHead {
  background: rgba(var(--theme-color-accent-rgb), 0.1);
  color: var(--nr-gold-bright);
  font-weight: 700;
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--nr-border);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.nr-article__files td {
  padding: 10px 16px;
  color: var(--nr-text-muted);
  border-bottom: 1px solid rgba(var(--theme-color-border-rgb), 0.07);
  vertical-align: middle;
  text-align: right;
}

.nr-article__files tr:last-child td { border-bottom: none; }

.nr-article__files tr:hover td {
  background: rgba(var(--theme-color-accent-rgb), 0.06);
  transition: background var(--nr-ease);
}

.nr-article__files td a { color: var(--nr-gold); text-decoration: none; }
.nr-article__files td a:hover { color: var(--nr-gold-bright); }

.nr-article__files .files-section {
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

/* ── Prev / Next navigation ── */
.nr-article__prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
  direction: rtl;
}

.nr-article__prevnext a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: var(--nr-glass-bg);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  color: var(--nr-text-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease), transform var(--nr-ease), box-shadow var(--nr-ease);
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
  min-height: 64px;
}

.nr-article__prevnext a:hover {
  background: var(--nr-gold-soft);
  border-color: var(--nr-gold-border);
  color: var(--nr-text);
  transform: translateY(-2px);
  box-shadow: var(--nr-shadow);
}

.nr-article__prevnext-label {
  font-size: 0.72rem;
  color: var(--nr-text-faint);
  display: block;
  margin-bottom: 4px;
}

.nr-article__prevnext-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.45;
}

/* ── Module footer ── */
.nr-article .newsroom_footer { padding: 24px 0; }

/* ── Comments ── */
.nr-comments {
  direction: rtl;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  color: var(--nr-text);
}

.nr-comments__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Comment card ── */
.cmt-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 16px;
  border: 1px solid rgba(var(--theme-color-border-rgb), 0.12);
  background: rgba(var(--theme-color-bg-rgb), 0.65);
  backdrop-filter: blur(var(--glass-blur-lg));
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.cmt-card:hover {
  border-color: rgba(var(--theme-color-accent-rgb), 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Sidebar ── */
.cmt-sidebar {
  flex-shrink: 0;
  width: 160px;
  position: relative;
  overflow: hidden;
}

/* Blurred house background */
.cmt-bg-shell {
  --cmt-house-bg: linear-gradient(160deg, var(--theme-color-surface) 0%, #0e0818 100%);
  position: absolute;
  inset: 0;
  background: var(--cmt-house-bg) center / cover no-repeat;
  filter: none;
  z-index: 0;
}

/* Keep poster background natural, without dark filter/overlay */
.cmt-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

/* Poster content sits above bg layers */
.cmt-poster {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 10px 14px;
  height: 100%;
}

/* Avatar + online dot container */
.cmt-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 120px;
  max-height: 120px;
}

.cmt-avatar {
  width: auto;
  height: auto;
  max-width: 120px;
  max-height: 120px;
  border-radius: 0;
  object-fit: contain;
  display: block;
  border: 2.5px solid rgba(var(--theme-color-accent-2-rgb), 0.78);
  box-shadow: 0 0 0 4px rgba(var(--theme-color-accent-2-rgb), 0.18), 0 6px 18px rgba(0, 0, 0, 0.65);
  transition: border-color 0.2s ease;
}

.cmt-card:hover .cmt-avatar {
  border-color: rgba(var(--theme-color-accent-2-rgb), 0.98);
}

.cmt-online-dot {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--theme-color-success);
  border: 2px solid var(--theme-color-bg-deep);
  box-shadow: 0 0 6px rgba(var(--theme-color-success-rgb, 74, 222, 128), 0.7);
}

/* Name — PHP already wraps in <a> */
.cmt-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--theme-color-white);
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}

.cmt-name a {
  color: var(--theme-color-white);
  text-decoration: none;
}

.cmt-name a:hover {
  color: var(--nr-gold);
}

/* Rank */
.cmt-rank-title {
  font-size: 0.68rem;
  color: var(--nr-gold);
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.02em;
}

.cmt-rank-img {
  max-width: 80%;
  max-height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}

/* Loyalty badges */
.cmt-loyalty {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  justify-content: center;
  margin-inline: auto;
  text-align: center;
}

.cmt-loyalty-img {
  flex: 0 0 calc(50% - 2px);
  max-width: calc(50% - 2px);
  max-height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
}

/* ── Body ── */
.cmt-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  gap: 10px;
}

.cmt-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nr-gold);
  line-height: 1.4;
}

.cmt-text {
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(var(--theme-color-text-rgb, 244, 238, 251), 0.85);
  flex: 1;
}

.cmt-text p { margin: 0 0 0.5em; }
.cmt-text p:last-child { margin-bottom: 0; }

/* ── Footer: date + actions ── */
.cmt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(var(--theme-color-border-rgb), 0.08);
}

.cmt-date {
  font-size: 0.72rem;
  color: rgba(var(--theme-color-muted-rgb, 200, 186, 215), 0.6);
  letter-spacing: 0.01em;
}

.cmt-actions {
  display: flex;
  gap: 4px;
}

.cmt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(var(--theme-color-accent-2-rgb), 0.1);
  color: rgba(var(--theme-color-muted-rgb, 200, 186, 215), 0.6);
  font-size: 0.75rem;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.cmt-btn:hover {
  background: rgba(var(--theme-color-accent-rgb), 0.15);
  color: var(--nr-gold);
  border-color: rgba(var(--theme-color-accent-rgb), 0.25);
}

.cmt-btn--danger:hover {
  background: rgba(var(--theme-color-danger-rgb, 227, 93, 106), 0.15);
  color: var(--theme-color-danger);
  border-color: rgba(var(--theme-color-danger-rgb, 227, 93, 106), 0.25);
}

/* ── Mobile: sidebar → horizontal strip ── */
@media (max-width: 600px) {
  .cmt-card {
    flex-direction: column;
  }

  .cmt-sidebar {
    width: 100%;
    height: auto;
  }

  .cmt-poster {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    padding: 16px 16px 14px;
    gap: 10px;
  }

  .cmt-avatar {
    max-width: 72px;
    max-height: 72px;
  }

  .cmt-name {
    font-size: 0.9rem;
    text-align: center;
  }

  .cmt-rank-title {
    text-align: center;
  }

  .cmt-loyalty {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .cmt-body {
    border-inline-start: none;
    border-top: 1px solid rgba(var(--theme-color-accent-rgb), 0.12);
  }
}

/* ── Tablet: tighter sidebar ── */
@media (min-width: 601px) and (max-width: 900px) {
  .cmt-sidebar {
    width: 130px;
  }

  .cmt-avatar {
    max-width: 68px;
    max-height: 68px;
  }
}

/* ── Nested replies: indented thread with a single rail per reply ── */
.cmt-replies {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.cmt-reply {
  position: relative;
  margin-inline-start: calc(var(--cmt-depth, 1) * 22px);
  padding-inline-start: 16px;
}

/* One thin gold rail marks the reply — replaces stacked card borders/offsets */
.cmt-reply::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(var(--theme-color-accent-rgb), 0.35),
    rgba(var(--theme-color-accent-rgb), 0.06)
  );
}

/* Replies read as subordinate: lighter surface, softer shadow, calmer border */
.cmt-reply .cmt-card {
  background: rgba(var(--theme-color-bg-rgb), 0.45);
  border-color: rgba(var(--theme-color-border-rgb), 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.cmt-reply .cmt-sidebar {
  width: 128px;
}

@media (min-width: 601px) and (max-width: 900px) {
  .cmt-reply .cmt-sidebar {
    width: 112px;
  }
}

@media (max-width: 600px) {
  .cmt-reply {
    margin-inline-start: calc(var(--cmt-depth, 1) * 10px);
    padding-inline-start: 10px;
  }

  .cmt-reply .cmt-sidebar {
    width: 100%;
  }
}

/* Comment form — inline, no modal */
.nr-comments__form-wrap {
  margin-top: 24px;
  padding: 24px;
  background: rgba(var(--theme-color-surface-rgb), 0.4);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  backdrop-filter: blur(var(--glass-blur-sm));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
}

.nr-comments__form input[type="text"],
.nr-comments__form textarea,
.nr-comments__form select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--nr-border);
  border-radius: 8px;
  color: var(--nr-text);
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 0.9rem;
  transition: border-color var(--nr-ease);
  margin: 8px 0;
}

.nr-comments__form input[type="text"]:focus,
.nr-comments__form textarea:focus,
.nr-comments__form select:focus {
  border-color: var(--nr-gold-border);
  outline: none;
}

.nr-comments__form label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.83rem;
  color: var(--nr-text-muted);
}

.nr-comments__form .xoops-form-element-caption {
  font-size: 0.85rem;
  color: var(--nr-text-muted);
  margin-bottom: 4px;
}

.nr-comments__form input[type="submit"],
.nr-comments__form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 10px 22px;
  border: 1px solid var(--nr-gold-border);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--theme-color-accent-rgb), 0.92), rgba(var(--theme-color-accent-2-rgb), 0.82));
  color: var(--theme-color-gold-pale);
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(var(--theme-color-accent-rgb), 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
  cursor: pointer;
}

.nr-comments__form input[type="submit"]:hover,
.nr-comments__form button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  border-color: rgba(var(--theme-color-gold-dark-rgb), 0.65);
  box-shadow: 0 14px 28px rgba(var(--theme-color-accent-rgb), 0.28);
}

.nr-comments__form input[type="submit"]:focus-visible,
.nr-comments__form button[type="submit"]:focus-visible {
  outline: 2px solid rgba(var(--theme-color-gold-dark-rgb), 0.5);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .nr-comment {
    flex-direction: column;
    gap: 10px;
  }
  .nr-comment__aside {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nr-comment__avatar {
    width: 36px;
    height: 36px;
  }
}

/* ── Newsroom button overrides ── */
.nr-article .btn-primary,
.nr-article .btn-comment,
.nr-article .btn-md,
.newsroom-comments-section .btn-primary,
.newsroom-comments-section .btn-comment,
.newsroom-comments-section .btn-md {
  background: var(--nr-gold-soft);
  border: 1px solid var(--nr-gold-border);
  color: var(--nr-gold-bright);
  border-radius: 10px;
  padding: 8px 20px;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  backdrop-filter: blur(var(--glass-blur-xs));
  -webkit-backdrop-filter: blur(var(--glass-blur-xs));
  transition: background var(--nr-ease), border-color var(--nr-ease), color var(--nr-ease);
}

.nr-article .btn-primary:hover,
.nr-article .btn-comment:hover,
.nr-article .btn-md:hover,
.newsroom-comments-section .btn-primary:hover,
.newsroom-comments-section .btn-comment:hover,
.newsroom-comments-section .btn-md:hover {
  background: rgba(var(--theme-color-accent-rgb), 0.3);
  border-color: rgba(var(--theme-color-accent-rgb), 0.68);
  color: var(--theme-color-gold-pale);
}

/* ── Article responsive ── */
@media (max-width: 768px) {
  .nr-article { padding: 0 12px; }
  .nr-article__hero {
    min-height: 380px;
    margin: 16px 0 0;
  }

  .nr-article__hero-content { padding: 0 16px 28px; }
  .nr-article__title { font-size: 1.5rem; }
  .nr-article__body-wrap { padding: 26px 14px 16px; }
  .nr-article__prevnext { grid-template-columns: 1fr; }

  .nr-article ul.newsroom_breadcrumb {
    padding: 8px 12px 8px 10px;
    font-size: 0.78rem;
  }
  .nr-article ul.newsroom_breadcrumb li a { padding: 2px 6px; }

  .nr-article__body blockquote {
    padding: 14px 18px 14px 12px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .nr-article { padding: 0 2px; }
  .nr-article__hero { min-height: 280px; }
  .nr-article__title { font-size: 1.25rem; }
  .nr-article__hero-content { padding: 0 12px 20px; }
  .nr-article__body-wrap { padding: 22px 12px 14px; }
  .nr-article__body { font-size: 1rem; }

  .nr-article ul.newsroom_breadcrumb {
    padding: 7px 10px 7px 9px;
    border-radius: 10px;
  }


  .nr-article__meta { gap: 10px; }

  .nr-article__avatar {
    width: 36px;
    height: 36px;
  }

  .nr-article__admin-left a,
  .nr-article__admin-right a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* ============================================================
   Accessibility / reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .nr-card,
  .nr-card__bg,
  .nr-card__cat,
  .nr-card__more,
  .nr-card__admin a,
  .nr-card--tile .nr-card__thumb,
  .news-card-image img,
  .nr-article__hero-image,
  .nr-article__prevnext a,
  .nr-article__admin-left a,
  .nr-article__admin-right a,
  .nr-article__progress {
    transition: none;
    animation: none;
  }

  .nr-card:hover,
  .nr-card:hover .nr-card__bg,
  .nr-article__prevnext a:hover {
    transform: none; /* @keep — accessibility */
  }
  .nr-article__progress {
    animation: none; /* @keep — accessibility */
    display: none;
  }

  .nr-card.loading::after { animation: none; }
}

/* ============================================================
   High contrast mode
   ============================================================ */
@media (prefers-contrast: more) {
  .nr-section,
  .nr-article {
    --nr-glass-bg: rgba(var(--theme-color-bg-rgb), 0.95);
    --nr-border: rgba(var(--theme-color-border-rgb), 0.45);
    --nr-border-strong: rgba(var(--theme-color-border-rgb), 0.6);
    --nr-text-muted: var(--theme-color-muted);
    --nr-text-faint: rgba(var(--theme-color-muted-rgb, 200, 186, 215), 0.85);
  }
  .nr-card,
  .nr-article__hero,
  .nr-article__prevnext a,
  .nr-article__files {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-width: 2px;
  }
  .nr-card__cat {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid currentColor;
  }
  .nr-card__title a,
  .nr-article__title {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* ============================================================
   Focus-visible — article elements
   ============================================================ */
.nr-article__prevnext a:focus-visible,
.nr-article__admin a:focus-visible,
.nr-article__files a:focus-visible {
  outline: 2px solid var(--nr-gold);
  outline-offset: 2px;
}

/* ============================================================
   NEWSROOM INDEX / CATEGORY LISTING  (nr2-*)
   Moved out of newsroom_display_full.tpl inline <style>.
   Fully tokenised → adapts to light + dark automatically.
   Slider + 2-column grid, RTL Persian, Lalezar titles.
   ============================================================ */
.nr2-section {
  /* token map — scoped so it never pollutes :root */
  --nr2-surface:     rgba(var(--theme-color-surface-rgb), 0.92);
  --nr2-border:      rgba(var(--theme-color-accent-2-rgb), 0.22);
  --nr2-border-glow: rgba(var(--theme-color-accent-2-rgb), 0.60);
  --nr2-accent:      var(--theme-color-accent-2);
  --nr2-accent-dim:  rgba(var(--theme-color-accent-2-rgb), 0.55);
  --nr2-gold:        var(--theme-color-accent);
  --nr2-gold-dim:    rgba(var(--theme-color-accent-rgb), 0.18);
  --nr2-text:        var(--theme-color-text);
  --nr2-text-muted:  var(--theme-color-muted);
  /* scrim confined to bottom only — image stays clear above the text */
  --nr2-overlay:     linear-gradient(to top,
                       rgba(var(--theme-color-bg-rgb), 0.95) 0%,
                       rgba(var(--theme-color-bg-rgb), 0.78) 16%,
                       rgba(var(--theme-color-bg-rgb), 0.32) 38%,
                       transparent 58%);
  --nr2-radius:      14px;
  --nr2-radius-lg:   20px;
  --nr2-title-font:  "Lalezar", "Vazir", Tahoma, Arial, sans-serif;
  --nr2-body-font:   "Vazir", "Vazirmatn", Tahoma, Arial, sans-serif;

  direction: rtl;
  font-family: var(--nr2-body-font);
  color: var(--nr2-text);
  padding: 0 0 40px;
}

/* ── category header ── */
.nr2-cat-header {
  border-right: 3px solid var(--nr2-gold);
  padding: 6px 16px 6px 0;
  margin-bottom: 28px;
}
.nr2-cat-header__name {
  font-family: var(--nr2-title-font);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--nr2-text);
  margin: 0 0 4px;
}
.nr2-cat-header__desc { font-size: .875rem; color: var(--nr2-text-muted); margin: 0; }

/* ── badge ── */
.nr2-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--nr2-gold-dim);
  color: var(--nr2-gold);
  border: 1px solid rgba(var(--theme-color-accent-rgb), .35);
  width: fit-content;
  pointer-events: none;
}
.nr2-badge[data-cat-color="1"] { background: rgba(var(--theme-color-accent-2-rgb), .18); color: var(--theme-color-purple-pale); border-color: rgba(var(--theme-color-accent-2-rgb), .4); }
.nr2-badge[data-cat-color="2"] { background: rgba(var(--theme-color-accent-rgb), .18);   color: var(--nr2-gold);                 border-color: rgba(var(--theme-color-accent-rgb), .4); }
.nr2-badge[data-cat-color="3"] { background: rgba(var(--theme-color-cat-blue-rgb), .14);  color: var(--theme-color-cat-blue-text);  border-color: rgba(var(--theme-color-cat-blue-rgb), .35); }
.nr2-badge[data-cat-color="4"] { background: rgba(var(--theme-color-cat-coral-rgb), .13); color: var(--theme-color-cat-coral-text); border-color: rgba(var(--theme-color-cat-coral-rgb), .35); }
.nr2-badge[data-cat-color="5"] { background: rgba(var(--theme-color-cat-teal-rgb), .13);  color: var(--theme-color-cat-teal-text);  border-color: rgba(var(--theme-color-cat-teal-rgb), .35); }

/* ── stats bar ── */
.nr2-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.nr2-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--nr2-text-muted);
  white-space: nowrap;
}
.nr2-stat svg { width: 13px; height: 13px; flex-shrink: 0; }
.nr2-stat--views    { color: var(--theme-color-cat-blue-text); }
.nr2-stat--comments { color: var(--theme-color-cat-teal-text); }
.nr2-stat--date     { color: rgba(var(--theme-color-accent-rgb), .9); }
.nr2-stat--author   { color: var(--nr2-text-muted); }

/* Light mode: pale blue/green stat + badge text is unreadable on the
   lavender surface — darken each hue toward the dark text token so it
   keeps its meaning-color but passes contrast. */
[data-theme="light"] .nr2-stat--views {
  color: color-mix(in srgb, rgb(var(--theme-color-cat-blue-rgb)) 60%, var(--theme-color-text));
}
[data-theme="light"] .nr2-stat--comments {
  color: color-mix(in srgb, rgb(var(--theme-color-cat-teal-rgb)) 56%, var(--theme-color-text));
}
[data-theme="light"] .nr2-badge[data-cat-color="1"] { color: color-mix(in srgb, var(--theme-color-accent-2) 78%, var(--theme-color-text)); }
[data-theme="light"] .nr2-badge[data-cat-color="3"] { color: color-mix(in srgb, rgb(var(--theme-color-cat-blue-rgb)) 60%, var(--theme-color-text)); }
[data-theme="light"] .nr2-badge[data-cat-color="4"] { color: color-mix(in srgb, rgb(var(--theme-color-cat-coral-rgb)) 62%, var(--theme-color-text)); }
[data-theme="light"] .nr2-badge[data-cat-color="5"] { color: color-mix(in srgb, rgb(var(--theme-color-cat-teal-rgb)) 56%, var(--theme-color-text)); }

/* ============================================================
   SLIDER — top 5 items
   ============================================================ */
.nr2-slider-wrap { margin-bottom: 28px; }
.nr2-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--nr2-radius-lg);
  border: 1px solid var(--nr2-border);
  background: var(--theme-color-bg-deep);
  height: 460px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, .45), 0 0 0 1px rgba(var(--theme-color-accent-2-rgb), .12);
}
.nr2-slides { display: flex; height: 100%; transition: transform 600ms cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.nr2-slide { flex: 0 0 100%; position: relative; overflow: hidden; cursor: pointer; }
.nr2-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--theme-color-bg-deep);
  transition: transform 6s ease;
}
/* fallback when an item has no image — replaces inline gradient */
.nr2-slide__bg--empty {
  background-image: linear-gradient(135deg, var(--theme-color-bg-deep) 0%, rgba(var(--theme-color-accent-2-rgb), .38) 100%);
}
.nr2-slider:not(.is-paused) .nr2-slide.is-active .nr2-slide__bg { transform: scale(1.06); }
.nr2-slide__overlay { position: absolute; inset: 0; background: var(--nr2-overlay); z-index: 1; }
.nr2-slide__body {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  z-index: 2;
  padding: 0 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nr2-slide__title {
  font-family: var(--nr2-title-font);
  font-weight: 900;
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  line-height: 1.38;
  margin: 0;
}
.nr2-slide__title a { color: var(--nr2-text); text-decoration: none; }
.nr2-slide__title a:hover { color: color-mix(in srgb, var(--theme-color-accent-2) 65%, var(--theme-color-text)); }
.nr2-slide__summary {
  margin: 0;
  font-size: .92rem;
  color: rgba(var(--theme-color-text-rgb, 244, 238, 251), .82);
  line-height: 1.65;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 700px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}

/* progress bar */
.nr2-slide__progress {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 3px;
  background: rgba(var(--theme-color-text-rgb, 244, 238, 251), .14);
  z-index: 3;
}
.nr2-slide__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--nr2-accent), var(--nr2-gold));
  width: 0;
  transition: none;
}
.nr2-slide.is-active .nr2-slide__progress-bar { width: 100%; transition: width 5s linear; }

/* arrows */
.nr2-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(var(--theme-color-text-rgb, 244, 238, 251), .2);
  background: rgba(var(--theme-color-bg-deep-rgb, 14, 7, 32), .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--theme-color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms, border-color 180ms;
}
.nr2-slider-btn:hover { background: var(--nr2-accent-dim); border-color: var(--nr2-accent); }
.nr2-slider-btn svg { width: 20px; height: 20px; pointer-events: none; }
.nr2-slider-btn--prev { right: 16px; }
.nr2-slider-btn--next { left: 16px; }

/* dots */
.nr2-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 7px;
  align-items: center;
}
.nr2-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(var(--theme-color-text-rgb, 244, 238, 251), .4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 220ms, transform 220ms, width 220ms;
}
.nr2-dot.is-active { background: var(--nr2-gold); width: 22px; border-radius: 4px; }

/* counter */
.nr2-slide-counter {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 10;
  font-size: .75rem;
  background: rgba(var(--theme-color-bg-deep-rgb, 14, 7, 32), .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(var(--theme-color-text-rgb, 244, 238, 251), .15);
  border-radius: 20px;
  padding: 3px 12px;
  color: rgba(var(--theme-color-text-rgb, 244, 238, 251), .8);
  font-family: var(--nr2-body-font);
}

/* ============================================================
   2-COLUMN GRID — remaining items
   ============================================================ */
.nr2-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.nr2-card {
  position: relative;
  border-radius: var(--nr2-radius);
  overflow: hidden;
  background: var(--nr2-surface);
  border: 1px solid var(--nr2-border);
  display: flex;
  flex-direction: row;
  min-height: 148px;
  backdrop-filter: blur(var(--glass-blur-sm));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.nr2-card:hover {
  border-color: var(--nr2-border-glow);
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .28), 0 0 0 1px var(--nr2-accent-dim);
}
.nr2-card__thumb-wrap { flex-shrink: 0; width: 150px; position: relative; overflow: hidden; }
.nr2-card__thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 380ms ease; }
.nr2-card:hover .nr2-card__thumb { transform: scale(1.07); }
.nr2-card__thumb-wrap.nr2-img-broken,
.nr2-card__thumb-noimage {
  width: 100%; height: 100%;
  display: block;
  background: linear-gradient(135deg, var(--theme-color-surface) 0%, rgba(var(--theme-color-accent-2-rgb), .22) 100%);
}
.nr2-card__body { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nr2-card__title { font-family: var(--nr2-title-font); font-weight: 900; font-size: 1.2rem; line-height: 1.5; margin: 0; }
.nr2-card__title a { color: var(--nr2-text); text-decoration: none; transition: color 180ms; }
.nr2-card__title a:hover { color: color-mix(in srgb, var(--theme-color-accent-2) 65%, var(--theme-color-text)); }
.nr2-card__summary {
  margin: 0;
  font-size: .82rem;
  color: var(--nr2-text-muted);
  line-height: 1.65;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  flex-grow: 1;
}
.nr2-card .nr2-stats { gap: 10px; margin-top: auto; }
.nr2-card .nr2-stat  { font-size: .75rem; }

/* stretched link */
.nr2-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.nr2-card .nr2-badge,
.nr2-card .nr2-stats,
.nr2-card__thumb-wrap a { position: relative; z-index: 2; }

/* pagination + empty */
.nr2-nav { margin-top: 28px; text-align: center; }
.nr2-empty { text-align: center; padding: 64px 24px; color: var(--nr2-text-muted); }
.nr2-empty__icon { width: 52px; height: 52px; margin: 0 auto 16px; opacity: .3; }
.nr2-empty__icon svg { width: 100%; height: 100%; fill: var(--nr2-text); }
.nr2-empty__title { font-family: var(--nr2-title-font); font-size: 1.1rem; font-weight: 900; margin: 0 0 6px; color: var(--nr2-text); }
.nr2-empty__desc  { font-size: .875rem; margin: 0; }

/* ============================================================
   nr2 — Responsive
   ============================================================ */
@media (min-width: 1200px) { .nr2-slider { height: 520px; } }

@media (max-width: 1024px) {
  .nr2-slide__body { padding: 0 26px 26px; }
}

/* Tablet 641–1024: 2-column row cards read cramped → go single column
   with a wider thumb so each card breathes. */
@media (min-width: 641px) and (max-width: 1024px) {
  .nr2-grid { grid-template-columns: 1fr; gap: 14px; }
  .nr2-card { min-height: 160px; }
  .nr2-card__thumb-wrap { width: 210px; }
  .nr2-card__title { font-size: 1.15rem; }
  .nr2-card__summary { -webkit-line-clamp: 3; }
}

@media (max-width: 768px) {
  .nr2-slider { height: 360px; }
}

/* Mobile: keep 2 cards per row → stack thumb on top so they fit */
@media (max-width: 640px) {
  .nr2-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nr2-card { flex-direction: column; min-height: unset; }
  .nr2-card__thumb-wrap { width: 100%; height: 118px; }
  .nr2-card__body { padding: 10px 11px; gap: 6px; }
  .nr2-card__title { font-size: .9rem; line-height: 1.45; }
  .nr2-card__summary { font-size: .76rem; -webkit-line-clamp: 2; }
  .nr2-card .nr2-stats { gap: 8px; }
  .nr2-card .nr2-stat { font-size: .68rem; }

  .nr2-slider { height: 300px; }
  .nr2-slide__body { padding: 0 18px 20px; }
  .nr2-slide__summary { display: none; }
}

@media (max-width: 480px) {
  .nr2-slider-btn { width: 36px; height: 36px; }
  .nr2-slider-btn--prev { right: 8px; }
  .nr2-slider-btn--next { left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .nr2-slides,
  .nr2-slide__bg,
  .nr2-card,
  .nr2-card__thumb { transition: none; }
  .nr2-card:hover { transform: none; }
}
