/**
 * Nomaydan PUBLIC — final authoritative layer
 * Loaded LAST on public pages. Scopes to body.page-shell:not(.admin-shell).
 * Replaces leftover legacy look with full kit surfaces.
 */

/* ========== SCOPE ========== */
body.page-shell:not(.admin-shell) {
  --bg: var(--nm-bg) !important;
  --surface: var(--nm-surface-raised) !important;
  --surface-alt: var(--nm-azure-50) !important;
  --surface-solid: var(--nm-surface-raised) !important;
  --text: var(--nm-text) !important;
  --muted: var(--nm-text-muted) !important;
  --border: var(--nm-border) !important;
  --border-strong: var(--nm-border-strong) !important;
  --primary: var(--nm-azure) !important;
  --primary-dark: var(--nm-azure-600) !important;
  --primary-soft: var(--nm-azure-50) !important;
  --accent: var(--nm-charcoal) !important;
  --azure: var(--nm-azure) !important;
  --on-primary: #fff !important;
  --ring: var(--nm-border-focus) !important;
  --radius-sm: var(--nm-radius-sm) !important;
  --radius-md: var(--nm-radius-md) !important;
  --radius-lg: var(--nm-radius-lg) !important;
  --radius-xl: var(--nm-radius-xl) !important;
  --shadow-sm: var(--nm-shadow-sm) !important;
  --shadow-md: var(--nm-shadow-md) !important;
  --shadow-lg: var(--nm-shadow-md) !important;
  --shadow-glow: none !important;
  --glass: var(--nm-surface-raised) !important;
  --glass-strong: var(--nm-surface-raised) !important;
  --glass-border: var(--nm-border) !important;
  --glass-shine: none !important;
  --blur: 0 !important;
  --bg-glow: transparent !important;
  --bg-glow-2: transparent !important;

  margin: 0;
  min-height: 100vh;
  background: var(--nm-bg) !important;
  color: var(--nm-text) !important;
  font-family: var(--nm-font) !important;
  font-size: var(--nm-fs-base) !important;
  font-weight: var(--nm-fw-regular) !important;
  line-height: var(--nm-lh-relaxed) !important;
  position: relative;
}

/* Body knot pattern — visible on cream */
body.page-shell:not(.admin-shell)::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background-color: transparent !important;
  background-image: var(--nm-pattern) !important;
  background-position: top center !important;
  background-repeat: repeat !important;
  background-size: var(--nm-pattern-size) !important;
  opacity: var(--nm-pattern-body-opacity, 0.22) !important;
}

html[data-theme="dark"] body.page-shell:not(.admin-shell)::before {
  opacity: var(--nm-pattern-body-opacity, 0.28) !important;
}

body.page-shell:not(.admin-shell)::after {
  display: none !important;
  content: none !important;
}

body.page-shell:not(.admin-shell) > *:not(.nav-lang-switcher) {
  position: relative;
  z-index: 1;
}

/* ========== TYPOGRAPHY ========== */
body.page-shell:not(.admin-shell) h1,
body.page-shell:not(.admin-shell) h2,
body.page-shell:not(.admin-shell) h3,
body.page-shell:not(.admin-shell) h4,
body.page-shell:not(.admin-shell) .page-title,
body.page-shell:not(.admin-shell) .section-title {
  font-family: var(--nm-font) !important;
  font-weight: var(--nm-fw-semibold) !important;
  letter-spacing: 0 !important;
}

/* Default title color — NOT inside azure bars / inverse surfaces */
body.page-shell:not(.admin-shell) h1:not(.nm-on-azure),
body.page-shell:not(.admin-shell) h2:not(.nm-on-azure),
body.page-shell:not(.admin-shell) h3:not(.nm-on-azure),
body.page-shell:not(.admin-shell) h4:not(.nm-on-azure),
body.page-shell:not(.admin-shell) .page-title,
body.page-shell:not(.admin-shell) .section-title {
  color: var(--nm-heading, var(--nm-azure)) !important;
}

/* Kit type scale — keep content UI compact (no display 2xl/3xl) */
body.page-shell:not(.admin-shell) h1,
body.page-shell:not(.admin-shell) .page-title,
body.page-shell:not(.admin-shell) .auth-page-title,
body.page-shell:not(.admin-shell) .nm-page-title {
  font-size: var(--nm-fs-xl) !important;
  line-height: var(--nm-lh-tight) !important;
}

body.page-shell:not(.admin-shell) h2,
body.page-shell:not(.admin-shell) .section-title,
body.page-shell:not(.admin-shell) .nm-page-head__title {
  font-size: var(--nm-fs-lg) !important;
  line-height: var(--nm-lh-snug) !important;
}

body.page-shell:not(.admin-shell) h3 {
  font-size: var(--nm-fs-base) !important;
  line-height: var(--nm-lh-snug) !important;
}

body.page-shell:not(.admin-shell) h4 {
  font-size: var(--nm-fs-sm) !important;
  color: var(--nm-text) !important;
  line-height: var(--nm-lh-snug) !important;
}

body.page-shell:not(.admin-shell) p,
body.page-shell:not(.admin-shell) li {
  color: var(--nm-text-secondary);
}

body.page-shell:not(.admin-shell) a:not(.nm-btn):not(.btn):not(.btn-primary):not(.membership-btn):not(.nav-link):not(.search-btn):not(.dashboard-menu-card-admin):not(.profile-quick-link) {
  color: var(--nm-text-link);
}
body.page-shell:not(.admin-shell) a:not(.nm-btn):not(.btn):not(.btn-primary):not(.membership-btn):not(.nav-link):not(.search-btn):not(.dashboard-menu-card-admin):not(.profile-quick-link):hover {
  color: var(--nm-text-link-hover);
}

/* Dark admin dashboard card — light text on charcoal background */
body.page-shell:not(.admin-shell) a.dashboard-menu-card-admin,
body.page-shell:not(.admin-shell) a.dashboard-menu-card-admin:hover,
body.page-shell:not(.admin-shell) a.dashboard-menu-card-admin .dashboard-menu-label,
body.page-shell:not(.admin-shell) a.dashboard-menu-card-admin .dashboard-menu-desc,
body.page-shell:not(.admin-shell) a.dashboard-menu-card-admin .dashboard-menu-icon,
body.page-shell:not(.admin-shell) a.dashboard-menu-card-admin .dashboard-menu-icon i {
  color: var(--nm-cream, #f1e7d0) !important;
}

/* ========== LAYOUT ========== */
body.page-shell:not(.admin-shell) .container {
  width: min(100% - 2rem, 72rem) !important;
  max-width: 72rem !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

body.page-shell:not(.admin-shell) .main-content {
  background: transparent !important;
  padding-block: 0 2rem !important;
}

/* ========== HEADER ========== */
body.page-shell:not(.admin-shell) .header,
body.page-shell:not(.admin-shell) .header.nm-header,
body.page-shell:not(.admin-shell) .site-header {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--nm-surface-raised) !important;
  border-bottom: 1px solid var(--nm-border) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  flex: none !important;
  align-items: initial !important;
  justify-content: initial !important;
  gap: 0 !important;
  min-height: 0 !important;
}

body.page-shell:not(.admin-shell) .top-header {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  background: var(--nm-surface-raised) !important;
  border-bottom: 1px solid var(--nm-border) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding-block: 0.85rem !important;
  overflow: visible !important;
}

body.page-shell:not(.admin-shell) .top-header::before,
body.page-shell:not(.admin-shell) .top-header::after,
body.page-shell:not(.admin-shell) .header::before,
body.page-shell:not(.admin-shell) .header::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

body.page-shell:not(.admin-shell) .top-header > .container,
body.page-shell:not(.admin-shell) .header .container {
  width: min(100% - 2rem, 72rem) !important;
  max-width: 72rem !important;
  margin-inline: auto !important;
}

body.page-shell:not(.admin-shell) .top-header-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  width: 100% !important;
}

body.page-shell:not(.admin-shell) .header-logo {
  flex: 0 0 auto !important;
}

body.page-shell:not(.admin-shell) .logo-img {
  width: 72px !important;
  height: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  filter: none !important;
}

body.page-shell:not(.admin-shell) .header-search {
  flex: 1 1 auto !important;
  max-width: 28rem !important;
  width: auto !important;
  margin: 0 !important;
}

body.page-shell:not(.admin-shell) .search-input-group {
  display: flex !important;
  align-items: stretch !important;
  background: var(--nm-surface-raised) !important;
  border: 1px solid var(--nm-border) !important;
  border-radius: var(--nm-radius-md) !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

body.page-shell:not(.admin-shell) .search-input-group:focus-within {
  border-color: var(--nm-border-focus) !important;
  box-shadow: 0 0 0 3px rgba(23, 59, 94, 0.18) !important;
}

html[data-theme="dark"] body.page-shell:not(.admin-shell) .search-input-group:focus-within {
  box-shadow: 0 0 0 3px rgba(155, 182, 208, 0.22) !important;
}

body.page-shell:not(.admin-shell) .search-input {
  flex: 1 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  padding: 0.5rem 0.85rem !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-regular) !important;
  color: var(--nm-text) !important;
  border-radius: 0 !important;
}

body.page-shell:not(.admin-shell) .search-btn {
  min-width: var(--nm-control-h, 2.5rem) !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--nm-azure) !important;
  color: #fff !important;
}

body.page-shell:not(.admin-shell) .search-btn:hover {
  background: var(--nm-azure-600) !important;
}

/* ========== NAVBAR (لاجوردی + پترن گره‌چینی) ========== */
body.page-shell:not(.admin-shell) .navbar,
body.page-shell:not(.admin-shell) .navbar.nm-pattern-bg,
body.page-shell:not(.admin-shell) .navbar.nm-topbar--azure {
  background: var(--nm-azure) !important;
  background-color: var(--nm-azure) !important;
  border-bottom: 2px solid var(--nm-gold) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  min-height: 3.5rem !important;
  /* visible: overflow:hidden creates a fixed/absolute containing block and
     clips the mobile drawer (.nav-menu) so it appears empty when opened */
  overflow: visible !important;
  --nm-pattern-opacity: 0.28;
}

/* Keep opened drawer + hamburger above page chrome / backdrop */
body.page-shell:not(.admin-shell).nav-open .navbar,
body.page-shell:not(.admin-shell).nav-open .navbar.nm-pattern-bg,
body.page-shell:not(.admin-shell).nav-open .navbar.nm-topbar--azure {
  z-index: 1600 !important;
}

body.page-shell:not(.admin-shell) .navbar.nm-pattern-bg::before,
body.page-shell:not(.admin-shell) .navbar::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  background-image: var(--nm-pattern) !important;
  background-repeat: repeat !important;
  background-size: var(--nm-pattern-size) !important;
  background-position: top center !important;
  opacity: 0.28 !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

body.page-shell:not(.admin-shell) .navbar .container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  min-height: 3.5rem !important;
  position: relative !important;
  z-index: 1 !important;
}

body.page-shell:not(.admin-shell) .nav-menu {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
  position: relative !important;
}

body.page-shell:not(.admin-shell) .nav-list {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.15rem !important;
  list-style: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  width: 100% !important;
  flex: 1 1 auto !important;
}

body.page-shell:not(.admin-shell) .nav-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  position: absolute !important;
  inset-inline-end: 0 !important;
  inset-inline-start: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 2 !important;
}

body.page-shell:not(.admin-shell) .nav-link {
  color: #fff !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: var(--nm-radius-md) !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  min-height: 2.25rem !important;
  align-items: center !important;
  display: inline-flex !important;
}

body.page-shell:not(.admin-shell) .nav-link:hover,
body.page-shell:not(.admin-shell) .nav-link:focus-visible,
body.page-shell:not(.admin-shell) .nav-item.active .nav-link {
  background: rgba(241, 231, 208, 0.12) !important;
  color: #fff !important;
}

body.page-shell:not(.admin-shell) .membership-btn,
body.page-shell:not(.admin-shell) a.membership-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: var(--nm-space-2) !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: var(--nm-radius-md) !important;
  background: var(--nm-charcoal) !important;
  color: #fff !important;
  border: 1px solid var(--nm-charcoal) !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body.page-shell:not(.admin-shell) .membership-btn:hover {
  background: var(--nm-charcoal-600) !important;
  border-color: var(--nm-charcoal-600) !important;
  color: #fff !important;
}

body.page-shell:not(.admin-shell) .membership-btn-logout {
  background: transparent !important;
  border-color: rgba(241, 231, 208, 0.35) !important;
  color: var(--nm-cream) !important;
}

body.page-shell:not(.admin-shell) .membership-btn-logout:hover {
  background: rgba(241, 231, 208, 0.1) !important;
  color: #fff !important;
}

body.page-shell:not(.admin-shell) .nav-toggle {
  background: transparent !important;
  border: 1px solid rgba(241, 231, 208, 0.35) !important;
  border-radius: var(--nm-radius-md) !important;
  width: 2.5rem !important;
  height: 2.5rem !important;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

html[data-theme="dark"] body.page-shell:not(.admin-shell) .nav-toggle {
  border-color: rgba(241, 231, 208, 0.18) !important;
}

body.page-shell:not(.admin-shell) .nav-toggle .bar {
  display: block !important;
  width: 18px !important;
  height: 2px !important;
  background: var(--nm-cream) !important;
  border-radius: 1px !important;
}

@media (max-width: 992px) {
  body.page-shell:not(.admin-shell) .nav-toggle {
    display: inline-flex !important;
  }
  /* RTL: flex-start = راست؛ LTR: چپ — دکمه همبرگر کنار شروع صفحه */
  body.page-shell:not(.admin-shell) .navbar .container {
    justify-content: flex-start !important;
  }
  /* کشو از سمت راست در RTL (inset-inline-start) */
  body.page-shell:not(.admin-shell) .nav-menu {
    position: fixed !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(86vw, 320px) !important;
    max-width: 100% !important;
    height: 100dvh !important;
    background: var(--nm-azure) !important;
    border-inline-start: 1px solid var(--nm-azure-700) !important;
    border-bottom: 0 !important;
    padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    z-index: 1500 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(110%, 0, 0) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.24s ease, visibility 0.24s ease !important;
  }
  [dir="ltr"] body.page-shell:not(.admin-shell) .nav-menu {
    transform: translate3d(-110%, 0, 0) !important;
    border-inline-start: 0 !important;
    border-inline-end: 1px solid var(--nm-azure-700) !important;
  }
  body.page-shell:not(.admin-shell) .nav-menu.active,
  body.page-shell:not(.admin-shell) .nav-menu.open {
    display: flex !important;
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  body.page-shell:not(.admin-shell) .nav-list {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    flex: none !important;
  }
  body.page-shell:not(.admin-shell) .nav-actions {
    position: static !important;
    inset-inline-start: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    justify-content: stretch !important;
    margin-top: auto !important;
    flex-direction: column !important;
  }
  body.page-shell:not(.admin-shell) .nav-link {
    text-align: start !important;
    justify-content: flex-start !important;
    width: 100% !important;
  }
}

/* ========== BUTTONS / FORMS GLOBAL ========== */
body.page-shell:not(.admin-shell) .btn,
body.page-shell:not(.admin-shell) .btn-primary,
body.page-shell:not(.admin-shell) a.btn-primary,
body.page-shell:not(.admin-shell) .form-submit,
body.page-shell:not(.admin-shell) input[type="submit"],
body.page-shell:not(.admin-shell) button[type="submit"]:not(.search-btn):not(.theme-toggle-btn):not(.lang-switcher-btn):not(.scroll-top-btn):not(.nav-toggle) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--nm-space-2) !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  padding: var(--nm-control-py, 0.5rem) var(--nm-control-px, 1rem) !important;
  border-radius: var(--nm-radius-md) !important;
  border: 1px solid var(--nm-azure) !important;
  background: var(--nm-azure) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.page-shell:not(.admin-shell) .btn:hover,
body.page-shell:not(.admin-shell) .btn-primary:hover,
body.page-shell:not(.admin-shell) a.btn-primary:hover,
body.page-shell:not(.admin-shell) .form-submit:hover,
body.page-shell:not(.admin-shell) input[type="submit"]:hover {
  background: var(--nm-azure-600) !important;
  border-color: var(--nm-azure-600) !important;
  color: #fff !important;
}

body.page-shell:not(.admin-shell) .btn-ghost,
body.page-shell:not(.admin-shell) .btn-outline {
  background: transparent !important;
  color: var(--nm-text) !important;
  border-color: var(--nm-border-strong) !important;
}

body.page-shell:not(.admin-shell) .btn-ghost:hover,
body.page-shell:not(.admin-shell) .btn-outline:hover {
  background: var(--nm-azure-50) !important;
  border-color: var(--nm-azure) !important;
  color: var(--nm-heading, var(--nm-azure-700)) !important;
}

body.page-shell:not(.admin-shell) .btn-secondary {
  background: var(--nm-azure) !important;
  border-color: var(--nm-azure) !important;
  color: var(--nm-cream) !important;
}

body.page-shell:not(.admin-shell) .btn-gold,
body.page-shell:not(.admin-shell) .cta-gold {
  background: var(--nm-gold) !important;
  border-color: var(--nm-gold) !important;
  color: var(--nm-azure-900) !important;
}

body.page-shell:not(.admin-shell) input[type="text"],
body.page-shell:not(.admin-shell) input[type="search"],
body.page-shell:not(.admin-shell) input[type="email"],
body.page-shell:not(.admin-shell) input[type="password"],
body.page-shell:not(.admin-shell) input[type="tel"],
body.page-shell:not(.admin-shell) input[type="number"],
body.page-shell:not(.admin-shell) input[type="url"],
body.page-shell:not(.admin-shell) input[type="date"],
body.page-shell:not(.admin-shell) select,
body.page-shell:not(.admin-shell) textarea,
body.page-shell:not(.admin-shell) .form-control {
  width: 100% !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  padding: 0.5rem 0.75rem !important;
  border: 1px solid var(--nm-border) !important;
  border-radius: var(--nm-radius-md) !important;
  background: var(--nm-surface-raised) !important;
  color: var(--nm-text) !important;
  font-family: inherit !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-regular) !important;
  line-height: var(--nm-lh-normal) !important;
  box-shadow: none !important;
}

body.page-shell:not(.admin-shell) textarea {
  min-height: 6rem !important;
}

body.page-shell:not(.admin-shell) input:focus,
body.page-shell:not(.admin-shell) select:focus,
body.page-shell:not(.admin-shell) textarea:focus,
body.page-shell:not(.admin-shell) input:focus-visible,
body.page-shell:not(.admin-shell) select:focus-visible,
body.page-shell:not(.admin-shell) textarea:focus-visible {
  outline: none !important;
  border-color: var(--nm-border-focus) !important;
  box-shadow: var(--nm-focus-ring) !important;
}

/* ========== CARDS / SURFACES ========== */
body.page-shell:not(.admin-shell) .card,
body.page-shell:not(.admin-shell) .widget-container,
body.page-shell:not(.admin-shell) .stat-card,
body.page-shell:not(.admin-shell) .news-card,
body.page-shell:not(.admin-shell) .book-card,
body.page-shell:not(.admin-shell) .thesis-card,
body.page-shell:not(.admin-shell) .congress-card,
body.page-shell:not(.admin-shell) .martyr-card,
body.page-shell:not(.admin-shell) .search-result-card,
body.page-shell:not(.admin-shell) .quick-access-link,
body.page-shell:not(.admin-shell) .profile-card,
body.page-shell:not(.admin-shell) .auth-card,
body.page-shell:not(.admin-shell) .login-card,
body.page-shell:not(.admin-shell) .login-box,
body.page-shell:not(.admin-shell) .form-card,
body.page-shell:not(.admin-shell) .about-section,
body.page-shell:not(.admin-shell) .contact-section,
body.page-shell:not(.admin-shell) .faq-section,
body.page-shell:not(.admin-shell) .page-header,
body.page-shell:not(.admin-shell) .featured-martyr-card,
body.page-shell:not(.admin-shell) .commander-card,
body.page-shell:not(.admin-shell) .news-item,
body.page-shell:not(.admin-shell) .book-item,
body.page-shell:not(.admin-shell) .martyr-card-square,
body.page-shell:not(.admin-shell) .related-martyr-item,
body.page-shell:not(.admin-shell) .book-related-martyr-item,
body.page-shell:not(.admin-shell) .province-content-card,
body.page-shell:not(.admin-shell) .featured-martyr-item,
body.page-shell:not(.admin-shell) .martyr-group-card--resistance,
body.page-shell:not(.admin-shell) .congress-card,
body.page-shell:not(.admin-shell) .main-column .news-section,
body.page-shell:not(.admin-shell) .main-column .iran-map-section,
body.page-shell:not(.admin-shell) .main-column .widget-container,
body.page-shell:not(.admin-shell) .featured-martyrs-section,
body.page-shell:not(.admin-shell) .filter-groups-section,
body.page-shell:not(.admin-shell) .sidebar-widget,
body.page-shell:not(.admin-shell) .birthday-widget,
body.page-shell:not(.admin-shell) .anniversary-widget {
  background: var(--nm-surface-raised) !important;
  border: 1px solid var(--nm-border) !important;
  border-radius: var(--nm-radius-lg) !important;
  box-shadow: var(--nm-shadow-xs) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.page-shell:not(.admin-shell) .card:hover,
body.page-shell:not(.admin-shell) .featured-martyr-card:hover,
body.page-shell:not(.admin-shell) .quick-access-link:hover,
body.page-shell:not(.admin-shell) .news-card:hover,
body.page-shell:not(.admin-shell) .book-card:hover,
body.page-shell:not(.admin-shell) .martyr-card:hover,
body.page-shell:not(.admin-shell) .search-result-card:hover,
body.page-shell:not(.admin-shell) .martyr-card-square:hover,
body.page-shell:not(.admin-shell) .related-martyr-item:hover,
body.page-shell:not(.admin-shell) .book-related-martyr-item:hover,
body.page-shell:not(.admin-shell) .book-related-martyr-item:focus-visible,
body.page-shell:not(.admin-shell) .province-content-card:hover,
body.page-shell:not(.admin-shell) .province-content-card:focus-visible,
body.page-shell:not(.admin-shell) .featured-martyr-item:hover,
body.page-shell:not(.admin-shell) .martyr-group-card:hover,
body.page-shell:not(.admin-shell) .martyr-group-card:focus-visible,
body.page-shell:not(.admin-shell) .congress-card:hover,
body.page-shell:not(.admin-shell) .congress-card:focus-visible,
body.page-shell:not(.admin-shell) .news-item:hover {
  border-color: var(--nm-border-strong) !important;
  box-shadow: var(--nm-shadow-sm) !important;
  transform: none !important;
}

/* ========== HORIZONTAL CARDS — shared Nomaydan row language ========== */
body.page-shell:not(.admin-shell) .martyr-card-square::before {
  background: linear-gradient(90deg, var(--nm-azure), var(--nm-charcoal)) !important;
  height: 3px !important;
  opacity: 0 !important;
}

body.page-shell:not(.admin-shell) .news-item::before {
  background: linear-gradient(180deg, var(--nm-azure), var(--nm-charcoal)) !important;
  width: 3px !important;
  border-radius: 0 !important;
  opacity: 0.7 !important;
}

body.page-shell:not(.admin-shell) .martyr-card-square:hover::before,
body.page-shell:not(.admin-shell) .news-item:hover::before {
  opacity: 1 !important;
}

body.page-shell:not(.admin-shell) .martyr-card-square .martyr-name,
body.page-shell:not(.admin-shell) .related-martyr-info h4,
body.page-shell:not(.admin-shell) .province-content-card-title,
body.page-shell:not(.admin-shell) .congress-card-title,
body.page-shell:not(.admin-shell) .featured-martyr-details h4,
body.page-shell:not(.admin-shell) .martyr-group-title,
body.page-shell:not(.admin-shell) .book-related-martyr-item {
  color: var(--nm-heading, var(--nm-azure)) !important;
}

body.page-shell:not(.admin-shell) .news-item h3 a,
body.page-shell:not(.admin-shell) .news-item h3 {
  color: var(--nm-heading, var(--nm-azure)) !important;
}

body.page-shell:not(.admin-shell) .news-item h3 a:hover {
  color: var(--nm-heading, var(--nm-azure-700)) !important;
}

/* List-view martyr rows: quiet meta, not azure chips */
body.page-shell:not(.admin-shell) .martyrs-grid.list-view .detail-item {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: var(--nm-fs-xs) !important;
  color: var(--nm-text-muted) !important;
  gap: 0.35rem !important;
}

body.page-shell:not(.admin-shell) .martyrs-grid.list-view .detail-item i {
  color: var(--nm-heading, var(--nm-azure)) !important;
  font-size: var(--nm-fs-xs) !important;
}

body.page-shell:not(.admin-shell) .martyrs-grid.list-view .martyr-name {
  color: var(--nm-heading, var(--nm-azure)) !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-semibold) !important;
  text-align: start !important;
}

body.page-shell:not(.admin-shell) .martyrs-grid.list-view .martyr-image-container,
body.page-shell:not(.admin-shell) .martyrs-grid.list-view .martyr-card-square .martyr-image {
  border-radius: var(--nm-radius-md) !important;
}

body.page-shell:not(.admin-shell) .martyr-card-square:hover .martyr-image {
  transform: none !important;
}

/* Related / book chips: raised row, sharp radius, square thumb frame */
body.page-shell:not(.admin-shell) .related-martyr-item,
body.page-shell:not(.admin-shell) .book-related-martyr-item,
body.page-shell:not(.admin-shell) .featured-martyr-item {
  background: var(--nm-surface-raised) !important;
  background-image: none !important;
  gap: 0.75rem !important;
}

body.page-shell:not(.admin-shell) .book-related-martyr-item {
  border-radius: var(--nm-radius-lg) !important;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem !important;
}

body.page-shell:not(.admin-shell) .related-martyr-image,
body.page-shell:not(.admin-shell) .book-related-martyr-item img,
body.page-shell:not(.admin-shell) .featured-martyr-avatar {
  border-radius: var(--nm-radius-md) !important;
  border: 1px solid var(--nm-border) !important;
}

body.page-shell:not(.admin-shell) .featured-martyr-avatar {
  border-width: 1px !important;
  border-color: var(--nm-border) !important;
  overflow: hidden !important;
}

body.page-shell:not(.admin-shell) .related-martyr-item:hover .related-martyr-image,
body.page-shell:not(.admin-shell) .book-related-martyr-item:hover img {
  border-color: var(--nm-border-strong) !important;
}

body.page-shell:not(.admin-shell) .related-martyr-info p,
body.page-shell:not(.admin-shell) .featured-martyr-details p,
body.page-shell:not(.admin-shell) .province-content-card-summary,
body.page-shell:not(.admin-shell) .congress-card-summary,
body.page-shell:not(.admin-shell) .news-item-date,
body.page-shell:not(.admin-shell) .news-item p {
  color: var(--nm-text-muted) !important;
}

body.page-shell:not(.admin-shell) .news-item-image,
body.page-shell:not(.admin-shell) .province-content-card-media,
body.page-shell:not(.admin-shell) .congress-card-media {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--nm-azure-50) !important;
}

body.page-shell:not(.admin-shell) .news-item-image {
  border-radius: var(--nm-radius-md) !important;
  overflow: hidden !important;
}

body.page-shell:not(.admin-shell) .news-item-image img:hover,
body.page-shell:not(.admin-shell) a.province-content-card:hover .province-content-card-media img,
body.page-shell:not(.admin-shell) .congress-card:hover .congress-card-media img {
  transform: none !important;
}

body.page-shell:not(.admin-shell) .martyr-group-card--resistance {
  background: var(--nm-surface-raised) !important;
  background-image: none !important;
}

body.page-shell:not(.admin-shell) .martyr-group-card:hover::before,
body.page-shell:not(.admin-shell) .martyr-group-card:focus-visible::before {
  transform: none !important;
}

/* Kill glow rings / neon */
body.page-shell:not(.admin-shell) * {
  --fm-ring: transparent;
  --mg-accent-glow: transparent;
}

body.page-shell:not(.admin-shell) .featured-martyr-card,
body.page-shell:not(.admin-shell) .featured-martyr-media,
body.page-shell:not(.admin-shell) .commander-card img,
body.page-shell:not(.admin-shell) .slide-content {
  filter: none !important;
}

/* ========== SLIDER ========== */
body.page-shell:not(.admin-shell) .home-hero-slider,
body.page-shell:not(.admin-shell) .image-slider,
body.page-shell:not(.admin-shell) .slider-container {
  border-radius: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

body.page-shell:not(.admin-shell) .slide-content {
  background: linear-gradient(transparent, rgba(15, 36, 56, 0.72)) !important;
  backdrop-filter: none !important;
}

body.page-shell:not(.admin-shell) .slide-content h1,
body.page-shell:not(.admin-shell) .slide-content p {
  color: var(--nm-cream) !important;
}

body.page-shell:not(.admin-shell) .prev-btn,
body.page-shell:not(.admin-shell) .next-btn {
  background: var(--nm-azure) !important;
  color: var(--nm-cream) !important;
  border: 1px solid rgba(241, 231, 208, 0.25) !important;
  border-radius: var(--nm-radius-md) !important;
  box-shadow: none !important;
  min-width: 2.5rem !important;
  min-height: 2.5rem !important;
}

body.page-shell:not(.admin-shell) .indicator {
  background: rgba(241, 231, 208, 0.45) !important;
  border-radius: 2px !important;
  width: 1.25rem !important;
  height: 4px !important;
}

body.page-shell:not(.admin-shell) .indicator.active {
  background: var(--nm-gold) !important;
}

/* ========== SECTION / WIDGET AZURE BARS (unified NM) ========== */
body.page-shell:not(.admin-shell) .widget-header,
body.page-shell:not(.admin-shell) .sidebar-section > h3,
body.page-shell:not(.admin-shell) .news-section-header,
body.page-shell:not(.admin-shell) .news-section:not(:has(.news-section-header)) > h2,
body.page-shell:not(.admin-shell) .iran-map-section > h2,
body.page-shell:not(.admin-shell) .books-widget-header,
body.page-shell:not(.admin-shell) .congress-widget-header,
body.page-shell:not(.admin-shell) .featured-martyrs-header,
body.page-shell:not(.admin-shell) .martyr-groups-header,
body.page-shell:not(.admin-shell) .faq-section > h2,
body.page-shell:not(.admin-shell) .page-header.nm-bar,
body.page-shell:not(.admin-shell) .content-section > .section-header,
body.page-shell:not(.admin-shell) .virtual-martyrs .section-header,
body.page-shell:not(.admin-shell) .virtual-martyrs-section .section-header h1,
body.page-shell:not(.admin-shell) .memorial-map-header {
  position: relative !important;
  overflow: hidden !important;
  background: var(--nm-azure) !important;
  background-image: none !important;
  color: var(--nm-cream) !important;
  border: none !important;
  border-radius: var(--nm-radius-lg) var(--nm-radius-lg) 0 0 !important;
  padding: 1.1rem 1.35rem !important;
  margin: 0 !important;
  box-shadow: none !important;
  z-index: 1 !important;
}

body.page-shell:not(.admin-shell) .memorial-map-header {
  border-radius: var(--nm-radius-md) !important;
  padding: 2rem 0 !important;
  margin-bottom: 2rem !important;
}

/* Knot pattern on azure / dark surfaces */
body.page-shell:not(.admin-shell) .widget-header::before,
body.page-shell:not(.admin-shell) .sidebar-section > h3::before,
body.page-shell:not(.admin-shell) .news-section-header::before,
body.page-shell:not(.admin-shell) .news-section:not(:has(.news-section-header)) > h2::before,
body.page-shell:not(.admin-shell) .iran-map-section > h2::before,
body.page-shell:not(.admin-shell) .books-widget-header::before,
body.page-shell:not(.admin-shell) .congress-widget-header::before,
body.page-shell:not(.admin-shell) .featured-martyrs-header::before,
body.page-shell:not(.admin-shell) .martyr-groups-header::before,
body.page-shell:not(.admin-shell) .faq-section > h2::before,
body.page-shell:not(.admin-shell) .memorial-map-header::before,
body.page-shell:not(.admin-shell) .virtual-martyrs-section .section-header h1::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  height: auto !important;
  background-image: var(--nm-pattern) !important;
  background-repeat: repeat !important;
  background-size: var(--nm-pattern-size) !important;
  background-position: top center !important;
  opacity: 0.3 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  display: block !important;
}

/* Gold accent line under azure bars */
body.page-shell:not(.admin-shell) .widget-header::after,
body.page-shell:not(.admin-shell) .sidebar-section > h3::after,
body.page-shell:not(.admin-shell) .news-section-header::after,
body.page-shell:not(.admin-shell) .iran-map-section > h2::after,
body.page-shell:not(.admin-shell) .books-widget-header::after,
body.page-shell:not(.admin-shell) .congress-widget-header::after,
body.page-shell:not(.admin-shell) .featured-martyrs-header::after,
body.page-shell:not(.admin-shell) .martyr-groups-header::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset-inline: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: auto !important;
  height: 3px !important;
  border-radius: 0 !important;
  background: var(--nm-gold) !important;
  opacity: 1 !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* Titles / icons / leads on azure bars → cream (do NOT clear bar background) */
body.page-shell:not(.admin-shell) .widget-header,
body.page-shell:not(.admin-shell) .sidebar-section > h3,
body.page-shell:not(.admin-shell) .news-section-header,
body.page-shell:not(.admin-shell) .iran-map-section > h2,
body.page-shell:not(.admin-shell) .books-widget-header,
body.page-shell:not(.admin-shell) .featured-martyrs-header,
body.page-shell:not(.admin-shell) .martyr-groups-header {
  color: #fff !important;
}

body.page-shell:not(.admin-shell) .widget-header h3,
body.page-shell:not(.admin-shell) .widget-header i,
body.page-shell:not(.admin-shell) .sidebar-section > h3 i,
body.page-shell:not(.admin-shell) .news-section-header h2,
body.page-shell:not(.admin-shell) .news-section-header h2 i,
body.page-shell:not(.admin-shell) .news-section-header .news-section-view-all,
body.page-shell:not(.admin-shell) .iran-map-section > h2 i,
body.page-shell:not(.admin-shell) .books-widget-header h2,
body.page-shell:not(.admin-shell) .books-widget-header h2 i,
body.page-shell:not(.admin-shell) .books-widget-header .books-count,
body.page-shell:not(.admin-shell) .featured-martyrs-header h2,
body.page-shell:not(.admin-shell) .featured-martyrs-header h2 i,
body.page-shell:not(.admin-shell) .featured-martyrs-lead,
body.page-shell:not(.admin-shell) .martyr-groups-header h2,
body.page-shell:not(.admin-shell) .martyr-groups-header h2 i,
body.page-shell:not(.admin-shell) .martyr-groups-header .martyr-groups-lead {
  color: #fff !important;
  position: relative !important;
  z-index: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  background: none !important;
  background-image: none !important;
}

body.page-shell:not(.admin-shell) .featured-martyrs-lead,
body.page-shell:not(.admin-shell) .martyr-groups-header .martyr-groups-lead,
body.page-shell:not(.admin-shell) .section-lead {
  color: rgba(241, 231, 208, 0.88) !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

body.page-shell:not(.admin-shell) .news-section-header .news-section-view-all:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* Soft decorative curves on featured / groups headers (NM cream, not purple) */
body.page-shell:not(.admin-shell) .featured-martyrs-header > .nm-curve,
body.page-shell:not(.admin-shell) .martyr-groups-header > .nm-curve {
  display: none;
}

body.page-shell:not(.admin-shell) .featured-martyrs-body,
body.page-shell:not(.admin-shell) .martyr-groups-body {
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(23, 59, 94, 0.05), transparent 55%),
    radial-gradient(80% 60% at 0% 100%, rgba(66, 80, 76, 0.06), transparent 50%),
    var(--nm-surface-raised) !important;
}

body.page-shell:not(.admin-shell) .section-title i {
  color: var(--nm-heading, var(--nm-azure)) !important;
}

/* ========== BADGES ========== */
body.page-shell:not(.admin-shell) .badge,
body.page-shell:not(.admin-shell) .status-badge,
body.page-shell:not(.admin-shell) .tag,
body.page-shell:not(.admin-shell) .chip,
body.page-shell:not(.admin-shell) .filter-chip {
  border-radius: var(--nm-radius-sm) !important;
  background: var(--nm-azure-50) !important;
  border: 1px solid var(--nm-azure-100) !important;
  color: var(--nm-heading, var(--nm-azure-700)) !important;
  font-size: var(--nm-fs-xs) !important;
  font-weight: var(--nm-fw-medium) !important;
  min-height: 1.375rem !important;
  padding: 0.1rem 0.45rem !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

/* ========== FOOTER ========== */
body.page-shell:not(.admin-shell) .footer {
  background: var(--nm-azure) !important;
  color: var(--nm-cream) !important;
  border-top: 2px solid var(--nm-gold) !important;
  margin-top: 3rem !important;
  padding: 2.5rem 0 1.25rem !important;
  position: relative !important;
  overflow: hidden !important;
}

body.page-shell:not(.admin-shell) .footer::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background-image: var(--nm-pattern) !important;
  background-repeat: repeat !important;
  background-size: var(--nm-pattern-size) !important;
  opacity: 0.28 !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

body.page-shell:not(.admin-shell) .footer > * {
  position: relative !important;
  z-index: 1 !important;
}

body.page-shell:not(.admin-shell) .footer-content {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)) !important;
  gap: 1.5rem 2rem !important;
}

body.page-shell:not(.admin-shell) .footer-section h3,
body.page-shell:not(.admin-shell) .footer-section h4 {
  color: var(--nm-cream) !important;
  margin: 0 0 0.75rem !important;
  font-size: var(--nm-fs-sm) !important;
}

body.page-shell:not(.admin-shell) .footer-section p,
body.page-shell:not(.admin-shell) .footer-section li,
body.page-shell:not(.admin-shell) .footer-bottom {
  color: rgba(241, 231, 208, 0.88) !important;
  font-size: 0.875rem !important;
}

body.page-shell:not(.admin-shell) .footer-section ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-shell:not(.admin-shell) .footer-section a {
  color: var(--nm-cream) !important;
  text-decoration: none !important;
  background-image: linear-gradient(var(--nm-cream), var(--nm-cream)) !important;
  background-position: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-size: 0 1px !important;
  transition: background-size 0.18s ease !important;
}

body.page-shell:not(.admin-shell) .footer-section a:hover {
  color: #fff !important;
  background-size: 100% 1px !important;
}

body.page-shell:not(.admin-shell) .footer-bottom {
  margin-top: 1.5rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid rgba(241, 231, 208, 0.18) !important;
  text-align: center !important;
}

/* ========== FLOATING CONTROLS ========== */
body.page-shell:not(.admin-shell) .nav-lang-switcher {
  position: fixed !important;
  inset-inline-end: max(1rem, env(safe-area-inset-right)) !important;
  inset-block-end: max(1rem, env(safe-area-inset-bottom)) !important;
  inset-inline-start: auto !important;
  inset-block-start: auto !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.625rem !important;
  margin: 0 !important;
  z-index: 1400 !important;
  pointer-events: none;
}

body.page-shell:not(.admin-shell) .nav-lang-switcher > * {
  pointer-events: auto;
  position: relative;
  z-index: auto;
}

body.page-shell:not(.admin-shell) .nav-lang-switcher .lang-switcher-btn,
body.page-shell:not(.admin-shell) .nav-lang-switcher .theme-toggle-btn,
body.page-shell:not(.admin-shell) .scroll-top-btn {
  background: var(--nm-surface-raised) !important;
  border: 1px solid var(--nm-border) !important;
  color: var(--nm-heading, var(--nm-azure)) !important;
  border-radius: var(--nm-radius-md) !important;
  box-shadow: var(--nm-shadow-sm) !important;
  backdrop-filter: none !important;
  min-height: 2.5rem !important;
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  padding: 0 !important;
}

body.page-shell:not(.admin-shell) .lang-switcher-dropdown {
  background: var(--nm-surface-raised) !important;
  border: 1px solid var(--nm-border) !important;
  border-radius: var(--nm-radius-md) !important;
  box-shadow: var(--nm-shadow-md) !important;
  overflow: hidden !important;
}

body.page-shell:not(.admin-shell) .lang-switcher-dropdown:not([hidden]) {
  display: block !important;
  top: auto !important;
}

body.page-shell:not(.admin-shell) .lang-option {
  color: var(--nm-text) !important;
  padding: 0.55rem 0.85rem !important;
  display: block !important;
}

body.page-shell:not(.admin-shell) .lang-option.active,
body.page-shell:not(.admin-shell) .lang-option:hover {
  background: var(--nm-azure-50) !important;
  color: var(--nm-heading, var(--nm-azure-700)) !important;
}

/* ========== PAGINATION / TABLES / ALERTS ========== */
body.page-shell:not(.admin-shell) .pagination a,
body.page-shell:not(.admin-shell) .pagination span {
  border: 1px solid var(--nm-border) !important;
  border-radius: var(--nm-radius-md) !important;
  background: var(--nm-surface-raised) !important;
  color: var(--nm-text) !important;
  min-width: 2.5rem !important;
  min-height: 2.5rem !important;
}

body.page-shell:not(.admin-shell) .pagination .active,
body.page-shell:not(.admin-shell) .pagination .current {
  background: var(--nm-azure) !important;
  border-color: var(--nm-azure) !important;
  color: #fff !important;
}

body.page-shell:not(.admin-shell) table {
  background: var(--nm-surface-raised) !important;
  border: 1px solid var(--nm-border) !important;
}

body.page-shell:not(.admin-shell) table th {
  background: var(--nm-azure-50) !important;
  color: var(--nm-heading, var(--nm-azure)) !important;
  border-bottom: 1px solid var(--nm-border) !important;
}

body.page-shell:not(.admin-shell) .alert,
body.page-shell:not(.admin-shell) .flash-message,
body.page-shell:not(.admin-shell) .notice {
  border-radius: var(--nm-radius-md) !important;
  border: 1px solid var(--nm-border) !important;
  border-inline-start-width: 3px !important;
  box-shadow: none !important;
}

/* ========== SIDEBAR / STATS ========== */
body.page-shell:not(.admin-shell) .sidebar-stat-num,
body.page-shell:not(.admin-shell) .stat-number,
body.page-shell:not(.admin-shell) .stat-num {
  color: var(--nm-heading, var(--nm-azure)) !important;
  font-weight: 600 !important;
}

body.page-shell:not(.admin-shell) .left-sidebar,
body.page-shell:not(.admin-shell) .sidebar {
  background: transparent !important;
}

/* ========== AUTH ========== */
body.page-shell:not(.admin-shell) .auth-page,
body.page-shell:not(.admin-shell) .login-page {
  background: transparent !important;
}

/* ========== DARK ========== */
html[data-theme="dark"] body.page-shell:not(.admin-shell) {
  --azure: var(--nm-heading, var(--nm-azure-300)) !important;
  --surface-alt: var(--nm-surface-sunken) !important;
  --primary: var(--nm-azure-300) !important;
  --primary-dark: var(--nm-azure-400) !important;
  --primary-soft: var(--nm-azure-50) !important;
  --shadow-sm: var(--nm-shadow-sm) !important;
  --shadow-md: var(--nm-shadow-md) !important;
  --shadow-lg: var(--nm-shadow-md) !important;
  --shadow-glow: none !important;
}

html[data-theme="dark"] body.page-shell:not(.admin-shell) .header,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .top-header,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .card,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .widget-container,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .stat-card,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .featured-martyrs-section,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .news-section,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .iran-map-section,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .search-input-group {
  background: var(--nm-surface) !important;
  border-color: var(--nm-border) !important;
  color: var(--nm-text) !important;
  box-shadow: var(--nm-shadow-sm) !important;
}

/* Readable titles & azure-ink text (brand azure stays deep for fills) */
html[data-theme="dark"] body.page-shell:not(.admin-shell) h1:not(.nm-on-azure),
html[data-theme="dark"] body.page-shell:not(.admin-shell) h2:not(.nm-on-azure),
html[data-theme="dark"] body.page-shell:not(.admin-shell) h3:not(.nm-on-azure),
html[data-theme="dark"] body.page-shell:not(.admin-shell) h4:not(.nm-on-azure),
html[data-theme="dark"] body.page-shell:not(.admin-shell) .page-title,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .section-title,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .page-header h1,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .news-item h3,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .news-item h3 a,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .widget-header h3,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .stat-card .stat-value,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .stat-number,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .featured-martyr-name,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .martyr-name,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .commander-name,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .book-title,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .books-card-title,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .congress-card-title,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .profile-name,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .result-title,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .result-title a {
  color: var(--nm-heading, var(--nm-cream)) !important;
}

/* Keep footer headings on brand azure surfaces */
html[data-theme="dark"] body.page-shell:not(.admin-shell) .footer h1,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .footer h2,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .footer h3,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .footer h4,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-pattern-bg:not(.nm-pattern-bg--cream) h1,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-pattern-bg:not(.nm-pattern-bg--cream) h2,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-pattern-bg:not(.nm-pattern-bg--cream) h3 {
  color: var(--nm-cream) !important;
}

html[data-theme="dark"] body.page-shell:not(.admin-shell) p,
html[data-theme="dark"] body.page-shell:not(.admin-shell) li,
html[data-theme="dark"] body.page-shell:not(.admin-shell) label,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .form-group label,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .meta,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .text-muted {
  color: var(--nm-text-secondary);
}

html[data-theme="dark"] body.page-shell:not(.admin-shell) input,
html[data-theme="dark"] body.page-shell:not(.admin-shell) select,
html[data-theme="dark"] body.page-shell:not(.admin-shell) textarea,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-input,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-select,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-textarea {
  background: var(--nm-surface-raised) !important;
  color: var(--nm-text) !important;
  border-color: var(--nm-border) !important;
}

html[data-theme="dark"] body.page-shell:not(.admin-shell) input::placeholder,
html[data-theme="dark"] body.page-shell:not(.admin-shell) textarea::placeholder,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .search-input::placeholder,
html[data-theme="dark"] body.page-shell:not(.admin-shell) .nm-input::placeholder {
  color: var(--nm-text-muted) !important;
  opacity: 1;
}

/* ========== MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  body.page-shell:not(.admin-shell) *,
  body.page-shell:not(.admin-shell) *::before,
  body.page-shell:not(.admin-shell) *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.page-shell:not(.admin-shell) .footer.nm-pattern-bg{background-color:var(--nm-azure)!important;color:var(--nm-cream)!important;--nm-pattern-opacity:.28}
body.page-shell:not(.admin-shell) .footer.nm-pattern-bg a{color:var(--nm-cream)!important}

/* ========== NO yellow/gold widget fills (gold = accent only) ========== */
body.page-shell:not(.admin-shell) .sidebar-section,
body.page-shell:not(.admin-shell) .widget-container,
body.page-shell:not(.admin-shell) .widget,
body.page-shell:not(.admin-shell) .stat-card,
body.page-shell:not(.admin-shell) .quick-access-link,
body.page-shell:not(.admin-shell) .commander-card,
body.page-shell:not(.admin-shell) .featured-martyr-card,
body.page-shell:not(.admin-shell) .news-item,
body.page-shell:not(.admin-shell) .book-card,
body.page-shell:not(.admin-shell) .book-item,
body.page-shell:not(.admin-shell) .content-section,
body.page-shell:not(.admin-shell) .profile-sidebar-widget,
body.page-shell:not(.admin-shell) .related-martyr-card,
body.page-shell:not(.admin-shell) .related-martyr-item,
body.page-shell:not(.admin-shell) .book-related-martyr-item,
body.page-shell:not(.admin-shell) .martyr-card-square,
body.page-shell:not(.admin-shell) .province-content-card,
body.page-shell:not(.admin-shell) .featured-martyr-item,
body.page-shell:not(.admin-shell) .martyr-group-card--resistance,
body.page-shell:not(.admin-shell) .martyr-profile-header,
body.page-shell:not(.admin-shell) .content-card,
body.page-shell:not(.admin-shell) .writing-form-section,
body.page-shell:not(.admin-shell) .congress-card,
body.page-shell:not(.admin-shell) .thesis-card,
body.page-shell:not(.admin-shell) .map-info,
body.page-shell:not(.admin-shell) .selected-province-info {
  background: var(--nm-surface-raised) !important;
  background-image: none !important;
  border-color: var(--nm-border) !important;
}

/* Quote band: لاجوردی → ذغالی (dark brand fill; exclude from surface wipe above) */
body.page-shell:not(.admin-shell) .widget.quote-widget {
  background: linear-gradient(145deg, var(--nm-azure) 0%, var(--nm-charcoal) 100%) !important;
  background-image: linear-gradient(145deg, var(--nm-azure) 0%, var(--nm-charcoal) 100%) !important;
  border-color: var(--nm-charcoal-700) !important;
  color: var(--nm-cream, #f1e7d0) !important;
}

body.page-shell:not(.admin-shell) .widget.quote-widget .quote-text,
body.page-shell:not(.admin-shell) .widget.quote-widget .quote-author,
body.page-shell:not(.admin-shell) .widget.quote-widget .quote-author span {
  color: var(--nm-cream, #f1e7d0) !important;
}

body.page-shell:not(.admin-shell) .widget.quote-widget .quote-icon,
body.page-shell:not(.admin-shell) .widget.quote-widget .quote-icon i {
  color: rgba(241, 231, 208, 0.28) !important;
}

body.page-shell:not(.admin-shell) .widget.quote-widget .quote-author i {
  color: var(--nm-cream, #f1e7d0) !important;
}

body.page-shell:not(.admin-shell) .detail-item,
body.page-shell:not(.admin-shell) .sidebar-stat,
body.page-shell:not(.admin-shell) .stat-item,
body.page-shell:not(.admin-shell) .map-info {
  background: var(--nm-azure-50) !important;
  background-image: none !important;
  border-color: var(--nm-azure-100) !important;
}

body.page-shell:not(.admin-shell) .quick-access-link:hover,
body.page-shell:not(.admin-shell) .detail-item:hover {
  background: var(--nm-surface-raised) !important;
}

/* ========== RESTORE NM KNOT PATTERNS (kill minimal-theme wipe) ========== */
body.page-shell:not(.admin-shell) .section-pattern::before,
body.page-shell:not(.admin-shell) .section-pattern-alt::before,
body.page-shell:not(.admin-shell) .section-pattern-news::before,
body.page-shell:not(.admin-shell) .section-pattern-map::before,
body.page-shell:not(.admin-shell) .section-pattern-sidebar::before,
body.page-shell:not(.admin-shell) .page-header::before,
body.page-shell:not(.admin-shell) .about-section::before,
body.page-shell:not(.admin-shell) .contact-section::before,
body.page-shell:not(.admin-shell) .faq-section::before,
body.page-shell:not(.admin-shell) .search-results-header::before,
body.page-shell:not(.admin-shell) .filters-bar::before,
body.page-shell:not(.admin-shell) .advanced-search-form-container::before,
body.page-shell:not(.admin-shell) .special-categories::before,
body.page-shell:not(.admin-shell) .map-info::before,
body.page-shell:not(.admin-shell) .iran-map-section::before,
body.page-shell:not(.admin-shell) .auth-page-header::before,
body.page-shell:not(.admin-shell) .auth-forms-container::before,
body.page-shell:not(.admin-shell) .virtual-martyrs-section::before,
body.page-shell:not(.admin-shell) .profile-header::before,
body.page-shell:not(.admin-shell) .golzar-section::before {
  content: "" !important;
  position: absolute !important;
  inset-inline: 0 !important;
  top: 0 !important;
  height: 64px !important;
  background-image: var(--nm-pattern) !important;
  background-repeat: repeat !important;
  background-size: var(--nm-pattern-size) !important;
  background-position: top center !important;
  opacity: 0.07 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  display: block !important;
}

/* Martyr profile azure cover strip keeps color + knot pattern */
body.page-shell:not(.admin-shell) .martyr-profile-header::before {
  content: "" !important;
  position: absolute !important;
  inset-inline: 0 !important;
  top: 0 !important;
  height: 4.5rem !important;
  background-color: var(--nm-azure) !important;
  background-image: var(--nm-pattern) !important;
  background-repeat: repeat !important;
  background-size: var(--nm-pattern-size) !important;
  background-blend-mode: soft-light !important;
  opacity: 1 !important;
  z-index: 0 !important;
  display: block !important;
}

body.page-shell:not(.admin-shell) .memorial-map-header > *,
body.page-shell:not(.admin-shell) .congress-widget-header > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Soft cream curve blobs on featured/groups (replace purple/teal circles) */
body.page-shell:not(.admin-shell) .featured-martyrs-section,
body.page-shell:not(.admin-shell) .martyr-groups-section {
  position: relative !important;
  overflow: hidden !important;
}

body.page-shell:not(.admin-shell) .featured-martyrs-body::before,
body.page-shell:not(.admin-shell) .martyr-groups-body::before {
  content: "" !important;
  position: absolute !important;
  inset-inline-start: -48px !important;
  top: -56px !important;
  width: 160px !important;
  height: 160px !important;
  border-radius: 50% !important;
  background: rgba(23, 59, 94, 0.05) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

body.page-shell:not(.admin-shell) .featured-martyrs-body::after,
body.page-shell:not(.admin-shell) .martyr-groups-body::after {
  content: "" !important;
  position: absolute !important;
  inset-inline-end: -40px !important;
  bottom: -60px !important;
  width: 180px !important;
  height: 180px !important;
  border-radius: 50% !important;
  background: rgba(66, 80, 76, 0.08) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

body.page-shell:not(.admin-shell) .featured-martyrs-body > *,
body.page-shell:not(.admin-shell) .martyr-groups-body > * {
  position: relative !important;
  z-index: 1 !important;
}

/* ========== LEFTOVER BOOTSTRAP / LEGACY COLORS ========== */
body.page-shell:not(.admin-shell) .map-info,
body.page-shell:not(.admin-shell) .stat-card,
body.page-shell:not(.admin-shell) .activity-item,
body.page-shell:not(.admin-shell) .category-item,
body.page-shell:not(.admin-shell) .quote-box,
body.page-shell:not(.admin-shell) .empty-state {
  background: var(--nm-azure-50) !important;
  border-color: var(--nm-border) !important;
  color: var(--nm-text) !important;
}

body.page-shell:not(.admin-shell) .special-categories li a,
body.page-shell:not(.admin-shell) .supporters-list li,
body.page-shell:not(.admin-shell) .map-info p,
body.page-shell:not(.admin-shell) .selected-province-info p {
  color: var(--nm-text-secondary) !important;
}

body.page-shell:not(.admin-shell) .iran-map svg path {
  fill: var(--nm-charcoal-100) !important;
  stroke: var(--nm-charcoal-200) !important;
}

body.page-shell:not(.admin-shell) .iran-map svg path:hover,
body.page-shell:not(.admin-shell) .iran-map svg path.selected {
  fill: var(--nm-azure) !important;
  stroke: var(--nm-azure-700) !important;
}

body.page-shell:not(.admin-shell) .iran-map svg path.sea,
body.page-shell:not(.admin-shell) .iran-map svg #seas path {
  fill: var(--nm-azure-300) !important;
  stroke: var(--nm-azure-400) !important;
}

/* Page header strip on inner pages — keep clear gap under sticky navbar */
body.page-shell:not(.admin-shell) .page-header,
body.page-shell:not(.admin-shell) .profile-page-header,
body.page-shell:not(.admin-shell) .auth-page-header,
body.page-shell:not(.admin-shell) .search-results-header,
body.page-shell:not(.admin-shell) .advanced-search-form-container {
  margin-top: 1.25rem !important;
}

body.page-shell:not(.admin-shell) .page-header {
  background: var(--nm-surface-raised) !important;
  border: 1px solid var(--nm-border) !important;
  border-radius: var(--nm-radius-lg) !important;
  box-shadow: var(--nm-shadow-xs) !important;
  position: relative !important;
  overflow: hidden !important;
}

body.page-shell:not(.admin-shell) .page-header::after {
  content: "" !important;
  position: absolute !important;
  inset-inline: 0 !important;
  top: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, var(--nm-azure), var(--nm-charcoal)) !important;
  z-index: 2 !important;
}

body.page-shell:not(.admin-shell) .page-title,
body.page-shell:not(.admin-shell) .page-header h1 {
  color: var(--nm-heading, var(--nm-azure)) !important;
}

/* Radii: sharp NM (4–6px), not old 12–14px pills */
body.page-shell:not(.admin-shell) .widget,
body.page-shell:not(.admin-shell) .widget-container,
body.page-shell:not(.admin-shell) .sidebar-section,
body.page-shell:not(.admin-shell) .news-section,
body.page-shell:not(.admin-shell) .iran-map-section,
body.page-shell:not(.admin-shell) .featured-martyrs-section,
body.page-shell:not(.admin-shell) .martyr-groups-section,
body.page-shell:not(.admin-shell) .books-widget,
body.page-shell:not(.admin-shell) .congress-card,
body.page-shell:not(.admin-shell) .news-card,
body.page-shell:not(.admin-shell) .martyr-card-square,
body.page-shell:not(.admin-shell) .related-martyr-item,
body.page-shell:not(.admin-shell) .book-related-martyr-item,
body.page-shell:not(.admin-shell) .province-content-card,
body.page-shell:not(.admin-shell) .featured-martyr-item,
body.page-shell:not(.admin-shell) .martyr-group-card,
body.page-shell:not(.admin-shell) .martyr-group-card--resistance {
  border-radius: var(--nm-radius-lg) !important;
}

/* Top header / nav polish */
body.page-shell:not(.admin-shell) .main-nav {
  background: var(--nm-azure) !important;
}

body.page-shell:not(.admin-shell) .nav-menu {
  background: transparent !important;
}

@media (max-width: 992px) {
  body.page-shell:not(.admin-shell) .nav-menu {
    background: var(--nm-azure) !important;
  }
}

body.page-shell:not(.admin-shell) .header-search .nm-input,
body.page-shell:not(.admin-shell) .header-search input {
  border-color: var(--nm-border-strong) !important;
  border-radius: var(--nm-radius-md) !important;
}

body.page-shell:not(.admin-shell) .header-search button,
body.page-shell:not(.admin-shell) .header-search .search-btn {
  background: var(--nm-azure) !important;
  color: #fff !important;
  border-radius: var(--nm-radius-md) !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
}


/* ========== AZURE BAR CONTENT ABOVE PATTERN ========== */
body.page-shell:not(.admin-shell) .widget-header > *,
body.page-shell:not(.admin-shell) .sidebar-section > h3 > *,
body.page-shell:not(.admin-shell) .news-section-header > *,
body.page-shell:not(.admin-shell) .books-widget-header > *,
body.page-shell:not(.admin-shell) .congress-widget-header > *,
body.page-shell:not(.admin-shell) .featured-martyrs-header > *,
body.page-shell:not(.admin-shell) .martyr-groups-header > *,
body.page-shell:not(.admin-shell) .iran-map-section > h2 > * {
  position: relative !important;
  z-index: 1 !important;
}

/* ========== TEXT ON DARK SURFACES (contrast fix) ========== */
/* Footer: force light text on all nested nodes (override global p/a/li) */
body.page-shell:not(.admin-shell) .footer,
body.page-shell:not(.admin-shell) .footer p,
body.page-shell:not(.admin-shell) .footer li,
body.page-shell:not(.admin-shell) .footer span,
body.page-shell:not(.admin-shell) .footer small,
body.page-shell:not(.admin-shell) .footer h1,
body.page-shell:not(.admin-shell) .footer h2,
body.page-shell:not(.admin-shell) .footer h3,
body.page-shell:not(.admin-shell) .footer h4,
body.page-shell:not(.admin-shell) .footer h5,
body.page-shell:not(.admin-shell) .footer a,
body.page-shell:not(.admin-shell) .footer-bottom,
body.page-shell:not(.admin-shell) .footer-bottom p,
body.page-shell:not(.admin-shell) .footer-section,
body.page-shell:not(.admin-shell) .footer-section p,
body.page-shell:not(.admin-shell) .footer-section li,
body.page-shell:not(.admin-shell) .footer-section a,
body.page-shell:not(.admin-shell) .footer-section h3,
body.page-shell:not(.admin-shell) .footer-section h4 {
  color: var(--nm-cream) !important;
}

body.page-shell:not(.admin-shell) .footer a:hover,
body.page-shell:not(.admin-shell) .footer-section a:hover,
body.page-shell:not(.admin-shell) .footer-bottom a:hover {
  color: #fff !important;
}

/* Azure / charcoal chrome: titles, icons, links → light */
body.page-shell:not(.admin-shell) .navbar,
body.page-shell:not(.admin-shell) .navbar .nav-item,
body.page-shell:not(.admin-shell) .navbar .nav-link,
body.page-shell:not(.admin-shell) .navbar .nav-list,
body.page-shell:not(.admin-shell) .widget-header,
body.page-shell:not(.admin-shell) .widget-header *,
body.page-shell:not(.admin-shell) .sidebar-section > h3,
body.page-shell:not(.admin-shell) .sidebar-section > h3 *,
body.page-shell:not(.admin-shell) .news-section-header,
body.page-shell:not(.admin-shell) .news-section-header *,
body.page-shell:not(.admin-shell) .iran-map-section > h2,
body.page-shell:not(.admin-shell) .iran-map-section > h2 *,
body.page-shell:not(.admin-shell) .books-widget-header,
body.page-shell:not(.admin-shell) .books-widget-header *,
body.page-shell:not(.admin-shell) .congress-widget-header,
body.page-shell:not(.admin-shell) .congress-widget-header *,
body.page-shell:not(.admin-shell) .featured-martyrs-header,
body.page-shell:not(.admin-shell) .featured-martyrs-header *,
body.page-shell:not(.admin-shell) .martyr-groups-header,
body.page-shell:not(.admin-shell) .martyr-groups-header *,
body.page-shell:not(.admin-shell) .faq-section > h2,
body.page-shell:not(.admin-shell) .faq-section > h2 *,
body.page-shell:not(.admin-shell) .memorial-map-header,
body.page-shell:not(.admin-shell) .memorial-map-header *,
body.page-shell:not(.admin-shell) .content-section > .section-header,
body.page-shell:not(.admin-shell) .content-section > .section-header *,
body.page-shell:not(.admin-shell) .virtual-martyrs .section-header,
body.page-shell:not(.admin-shell) .virtual-martyrs .section-header *,
body.page-shell:not(.admin-shell) .profile-sidebar > * > h3,
body.page-shell:not(.admin-shell) .qr-code-section > h3,
body.page-shell:not(.admin-shell) .related-martyrs-section > h3,
body.page-shell:not(.admin-shell) .share-section > h3,
body.page-shell:not(.admin-shell) .grave-location-section > h3 {
  color: #fff !important;
}

/* Soft secondary line on azure headers */
body.page-shell:not(.admin-shell) .featured-martyrs-lead,
body.page-shell:not(.admin-shell) .martyr-groups-header .martyr-groups-lead,
body.page-shell:not(.admin-shell) .featured-martyrs-header .section-lead,
body.page-shell:not(.admin-shell) .martyr-groups-header .section-lead {
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Primary / solid buttons: always white label */
body.page-shell:not(.admin-shell) .membership-btn,
body.page-shell:not(.admin-shell) .membership-btn *,
body.page-shell:not(.admin-shell) .search-btn,
body.page-shell:not(.admin-shell) .search-btn *,
body.page-shell:not(.admin-shell) .btn-primary,
body.page-shell:not(.admin-shell) .btn-primary *,
body.page-shell:not(.admin-shell) a.btn-primary,
body.page-shell:not(.admin-shell) .nm-btn--primary,
body.page-shell:not(.admin-shell) .nm-btn--primary *,
body.page-shell:not(.admin-shell) .nm-btn--secondary,
body.page-shell:not(.admin-shell) .nm-btn--secondary *,
body.page-shell:not(.admin-shell) button[type="submit"]:not(.theme-toggle-btn):not(.lang-switcher-btn),
body.page-shell:not(.admin-shell) .form-submit,
body.page-shell:not(.admin-shell) .scroll-top-btn,
body.page-shell:not(.admin-shell) .scroll-top-btn * {
  color: #fff !important;
}

/* Floating lang / theme on dark chips */
body.page-shell:not(.admin-shell) .nav-lang-switcher .theme-toggle-btn,
body.page-shell:not(.admin-shell) .nav-lang-switcher .lang-switcher-btn,
body.page-shell:not(.admin-shell) .nav-lang-switcher button {
  color: var(--nm-cream) !important;
}

body.page-shell:not(.admin-shell) .nav-lang-switcher .theme-toggle-btn i,
body.page-shell:not(.admin-shell) .nav-lang-switcher .lang-switcher-btn i,
body.page-shell:not(.admin-shell) .nav-lang-switcher button i {
  color: inherit !important;
}

/* Map / province CTAs sitting on dark fills */
body.page-shell:not(.admin-shell) .province-btn,
body.page-shell:not(.admin-shell) .map-province-btn,
body.page-shell:not(.admin-shell) .iran-map-tooltip,
body.page-shell:not(.admin-shell) .selected-province-info .btn,
body.page-shell:not(.admin-shell) .show-province-martyrs,
body.page-shell:not(.admin-shell) a.show-province-martyrs {
  color: #fff !important;
}

/* Profile/auth-style inputs with leading icons — keep text clear of icon in RTL/LTR */
body.page-shell:not(.admin-shell) .input-group input,
body.page-shell:not(.admin-shell) .input-group select {
  padding-inline-start: 2.75rem !important;
  padding-inline-end: 0.85rem !important;
}

body.page-shell:not(.admin-shell) .input-group select {
  padding-inline-end: 2.5rem !important;
  background-position: left 0.85rem center;
}

body.page-shell:not(.admin-shell) .input-group:has(.password-toggle) input {
  padding-inline-end: 2.75rem !important;
}

body.page-shell:not(.admin-shell) .input-group .input-icon {
  inset-inline-start: 0.85rem !important;
  inset-inline-end: auto !important;
}

/* ========== KIT METRICS NORMALIZE (final) ==========
   Heights, type scale, weights, radii — aligned to
   https://nomaydan.ir/design/ui-kit (Sonnat / Farhang)
*/
body.page-shell:not(.admin-shell) {
  --nm-focus-ring: var(--nm-focus-ring);
}

/* Titles: 600 only — never 800/900 in UI */
body.page-shell:not(.admin-shell) h1,
body.page-shell:not(.admin-shell) h2,
body.page-shell:not(.admin-shell) h3,
body.page-shell:not(.admin-shell) h4,
body.page-shell:not(.admin-shell) h5,
body.page-shell:not(.admin-shell) h6,
body.page-shell:not(.admin-shell) .page-title,
body.page-shell:not(.admin-shell) .section-title,
body.page-shell:not(.admin-shell) .widget-title,
body.page-shell:not(.admin-shell) .card-title,
body.page-shell:not(.admin-shell) .auth-title,
body.page-shell:not(.admin-shell) .stat-value,
body.page-shell:not(.admin-shell) .stat-number {
  font-weight: var(--nm-fw-semibold) !important;
  letter-spacing: 0 !important;
}

/* Compact type overrides — kill leftover oversized display sizes */
body.page-shell:not(.admin-shell) .widget-header h2,
body.page-shell:not(.admin-shell) .widget-header h3,
body.page-shell:not(.admin-shell) .sidebar-section > h3,
body.page-shell:not(.admin-shell) .news-section-header h2,
body.page-shell:not(.admin-shell) .books-widget-header h2,
body.page-shell:not(.admin-shell) .congress-widget-header h2,
body.page-shell:not(.admin-shell) .featured-martyrs-header h2,
body.page-shell:not(.admin-shell) .martyr-groups-header h2,
body.page-shell:not(.admin-shell) .iran-map-section > h2,
body.page-shell:not(.admin-shell) .memorial-map-header h2,
body.page-shell:not(.admin-shell) .content-section > .section-header h2 {
  font-size: var(--nm-fs-base) !important;
  line-height: var(--nm-lh-snug) !important;
}

body.page-shell:not(.admin-shell) .stat-number,
body.page-shell:not(.admin-shell) .stat-value,
body.page-shell:not(.admin-shell) .nm-stat__value {
  font-size: var(--nm-fs-lg) !important;
  line-height: 1.2 !important;
}

body.page-shell:not(.admin-shell) .news-card h3,
body.page-shell:not(.admin-shell) .news-item h3,
body.page-shell:not(.admin-shell) .book-card h3,
body.page-shell:not(.admin-shell) .martyr-card h3,
body.page-shell:not(.admin-shell) .featured-martyr-name,
body.page-shell:not(.admin-shell) .commander-card h3,
body.page-shell:not(.admin-shell) .search-result-card h3,
body.page-shell:not(.admin-shell) .card-title,
body.page-shell:not(.admin-shell) .birthday-widget h3,
body.page-shell:not(.admin-shell) .anniversary-widget h3 {
  font-size: var(--nm-fs-sm) !important;
  line-height: var(--nm-lh-snug) !important;
}

body.page-shell:not(.admin-shell) .slide-content h1 {
  font-size: var(--nm-fs-xl) !important;
  line-height: var(--nm-lh-tight) !important;
  font-weight: var(--nm-fw-semibold) !important;
  text-shadow: none !important;
}

body.page-shell:not(.admin-shell) .slide-content p {
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-regular) !important;
  line-height: var(--nm-lh-relaxed) !important;
}

body.page-shell:not(.admin-shell) .quote-text,
body.page-shell:not(.admin-shell) .featured-martyrs-lead,
body.page-shell:not(.admin-shell) .section-lead,
body.page-shell:not(.admin-shell) .page-subtitle,
body.page-shell:not(.admin-shell) .nm-page-head__desc,
body.page-shell:not(.admin-shell) .nm-lead {
  font-size: var(--nm-fs-sm) !important;
  line-height: var(--nm-lh-relaxed) !important;
}

body.page-shell:not(.admin-shell) .quote-icon {
  font-size: var(--nm-fs-xl) !important;
}

body.page-shell:not(.admin-shell) .footer-section h3,
body.page-shell:not(.admin-shell) .footer-section h4 {
  font-size: var(--nm-fs-sm) !important;
}

body.page-shell:not(.admin-shell) .footer-section p,
body.page-shell:not(.admin-shell) .footer-section li,
body.page-shell:not(.admin-shell) .footer-bottom {
  font-size: var(--nm-fs-sm) !important;
}

/* Body / captions */
body.page-shell:not(.admin-shell) p,
body.page-shell:not(.admin-shell) li,
body.page-shell:not(.admin-shell) td,
body.page-shell:not(.admin-shell) .text-body {
  font-weight: var(--nm-fw-regular);
  line-height: var(--nm-lh-relaxed);
}

body.page-shell:not(.admin-shell) small,
body.page-shell:not(.admin-shell) .meta,
body.page-shell:not(.admin-shell) .caption,
body.page-shell:not(.admin-shell) .text-muted,
body.page-shell:not(.admin-shell) .breadcrumb {
  font-size: var(--nm-fs-xs) !important;
  font-weight: var(--nm-fw-regular) !important;
  line-height: var(--nm-lh-snug) !important;
}

/* Controls: 40px @ ≥640px, 14px type, 4px radius */
body.page-shell:not(.admin-shell) .btn,
body.page-shell:not(.admin-shell) .btn-primary,
body.page-shell:not(.admin-shell) .btn-secondary,
body.page-shell:not(.admin-shell) .btn-outline,
body.page-shell:not(.admin-shell) .btn-ghost,
body.page-shell:not(.admin-shell) .btn-gold,
body.page-shell:not(.admin-shell) .nm-btn,
body.page-shell:not(.admin-shell) .pagination a,
body.page-shell:not(.admin-shell) .pagination .page-link,
body.page-shell:not(.admin-shell) .form-submit {
  border-radius: var(--nm-radius-md) !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  box-shadow: none !important;
}

body.page-shell:not(.admin-shell) .btn-sm,
body.page-shell:not(.admin-shell) .nm-btn--sm {
  min-height: var(--nm-control-h-sm, 2rem) !important;
  font-size: var(--nm-fs-xs) !important;
  padding: 0.25rem 0.75rem !important;
}

body.page-shell:not(.admin-shell) .btn-lg,
body.page-shell:not(.admin-shell) .nm-btn--lg {
  min-height: var(--nm-control-h-lg, 2.75rem) !important;
  font-size: var(--nm-fs-base) !important;
}

/* Gold CTA: dark label on gold (kit) */
body.page-shell:not(.admin-shell) .btn-gold,
body.page-shell:not(.admin-shell) .btn-gold *,
body.page-shell:not(.admin-shell) .cta-gold,
body.page-shell:not(.admin-shell) .cta-gold *,
body.page-shell:not(.admin-shell) .nm-btn--gold,
body.page-shell:not(.admin-shell) .nm-btn--gold * {
  color: var(--nm-azure-900) !important;
}

/* No status pills — sharp 2px badges only (except true avatars/dots) */
body.page-shell:not(.admin-shell) .pill:not(.avatar):not(.nm-avatar),
body.page-shell:not(.admin-shell) .badge-pill:not(.avatar),
body.page-shell:not(.admin-shell) .rounded-full:not(img):not(.avatar):not(.nm-avatar):not(.status-dot):not(.indicator) {
  border-radius: var(--nm-radius-sm) !important;
}

body.page-shell:not(.admin-shell) .rounded-xl,
body.page-shell:not(.admin-shell) .rounded-2xl,
body.page-shell:not(.admin-shell) .rounded-lg {
  border-radius: var(--nm-radius-lg) !important;
}

body.page-shell:not(.admin-shell) .rounded-md,
body.page-shell:not(.admin-shell) .rounded {
  border-radius: var(--nm-radius-md) !important;
}

/* Pagination tiles */
body.page-shell:not(.admin-shell) .pagination a,
body.page-shell:not(.admin-shell) .pagination span,
body.page-shell:not(.admin-shell) .pagination .page-link {
  min-width: 2rem !important;
  min-height: 2rem !important;
  border-radius: var(--nm-radius-md) !important;
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
}

/* Tabs */
body.page-shell:not(.admin-shell) .tab,
body.page-shell:not(.admin-shell) .nav-tabs .nav-link,
body.page-shell:not(.admin-shell) .filter-chip {
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
  border-radius: var(--nm-radius-md) !important;
}

/* Icon buttons / floating controls */
body.page-shell:not(.admin-shell) .scroll-top-btn,
body.page-shell:not(.admin-shell) .nav-lang-switcher .lang-switcher-btn,
body.page-shell:not(.admin-shell) .nav-lang-switcher .theme-toggle-btn,
body.page-shell:not(.admin-shell) .icon-btn,
body.page-shell:not(.admin-shell) .nm-icon-btn {
  width: var(--nm-control-h, 2.5rem) !important;
  height: var(--nm-control-h, 2.5rem) !important;
  min-width: var(--nm-control-h, 2.5rem) !important;
  min-height: var(--nm-control-h, 2.5rem) !important;
  border-radius: var(--nm-radius-md) !important;
}

/* Labels */
body.page-shell:not(.admin-shell) label,
body.page-shell:not(.admin-shell) .form-label,
body.page-shell:not(.admin-shell) .nm-label {
  font-size: var(--nm-fs-sm) !important;
  font-weight: var(--nm-fw-medium) !important;
  color: var(--nm-text) !important;
}

/* Focus ring: turquoise (kit) */
body.page-shell:not(.admin-shell) :focus-visible {
  outline: 2px solid var(--nm-border-focus) !important;
  outline-offset: 2px !important;
}

body.page-shell:not(.admin-shell) .btn:focus-visible,
body.page-shell:not(.admin-shell) .btn-primary:focus-visible,
body.page-shell:not(.admin-shell) .nm-btn:focus-visible {
  outline: 2px solid var(--nm-border-focus) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* Motion: short kit timings */
body.page-shell:not(.admin-shell) .btn,
body.page-shell:not(.admin-shell) .nav-link,
body.page-shell:not(.admin-shell) a,
body.page-shell:not(.admin-shell) input,
body.page-shell:not(.admin-shell) select,
body.page-shell:not(.admin-shell) textarea,
body.page-shell:not(.admin-shell) .card {
  transition-duration: var(--nm-duration-fast, 0.12s) !important;
  transition-timing-function: var(--nm-ease, cubic-bezier(0.25, 0.1, 0.25, 1)) !important;
}

/* ========== Mobile homepage layout safety (loads last) ========== */
@media (max-width: 768px) {
  body.page-shell:not(.admin-shell) .homepage-layout {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.page-shell:not(.admin-shell) .homepage-layout .main-column {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.page-shell:not(.admin-shell) .homepage-layout .sidebar,
  body.page-shell:not(.admin-shell) .homepage-layout .sidebar-left {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.page-shell:not(.admin-shell) .home-hero-slider,
  body.page-shell:not(.admin-shell) .home-hero-slider.image-slider-fullwidth {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
  }

  body.page-shell:not(.admin-shell) .home-hero-slider .slider-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
  }

  body.page-shell:not(.admin-shell) .home-hero-slider .slide-image,
  body.page-shell:not(.admin-shell) .image-slider .slide-image {
    object-fit: contain !important;
    object-position: center center !important;
  }

  body.page-shell:not(.admin-shell) .news-section {
    flex: none !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.page-shell:not(.admin-shell) .iran-map-section,
  body.page-shell:not(.admin-shell) .featured-martyrs-section,
  body.page-shell:not(.admin-shell) .martyr-groups-section {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.page-shell:not(.admin-shell) .iran-map,
  body.page-shell:not(.admin-shell) .iran-map svg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  body.page-shell:not(.admin-shell) .featured-martyrs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.page-shell:not(.admin-shell) .news-item-content {
    flex-direction: column !important;
  }

  body.page-shell:not(.admin-shell) .news-item-image {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 180px !important;
  }
}

