/** Moshaverr Unified 87 — final visual consistency and resilient media. */
:root {
  --msh-v87-navy: #0b1734;
  --msh-v87-navy-soft: #15264a;
  --msh-v87-gold: #c8a24a;
  --msh-v87-gold-soft: #f4ead2;
  --msh-v87-ink: #182230;
  --msh-v87-muted: #667085;
  --msh-v87-surface: #fff;
  --msh-v87-line: rgba(15, 34, 66, .11);
  --msh-v87-radius: 24px;
  --msh-v87-shadow: 0 18px 48px rgba(11, 23, 52, .09);
}

body.msh-v87-final {
  color: var(--msh-v87-ink);
  background: #f7f9fc;
}

body.msh-v87-final :where(.msh-shell, .site-container, .container) {
  width: min(100% - 32px, 1240px);
  margin-inline: auto;
}

body.msh-v87-final :where(.msh-builder-section, .msh-section, .article-news-section) {
  scroll-margin-top: 112px;
}

body.msh-v87-final :where(.msh-builder-hero__visual, .msh-builder-image-text__media, .article-news-card figure, .msh-service-card__media) {
  overflow: hidden;
  border-radius: var(--msh-v87-radius);
  background:
    radial-gradient(circle at 78% 18%, rgba(200,162,74,.20), transparent 38%),
    linear-gradient(145deg, #eef2f8, #dce4ef);
}

body.msh-v87-final :where(.msh-builder-hero__visual, .msh-builder-image-text__media) img,
body.msh-v87-final :where(.article-news-card figure, .msh-service-card__media) img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

body.msh-v87-final .msh-builder-hero__visual img {
  min-height: clamp(320px, 42vw, 560px);
}

body.msh-v87-final .msh-media-failed {
  min-height: 240px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(200,162,74,.22), transparent 33%),
    linear-gradient(145deg, #102142, #081327);
}

body.msh-v87-final .msh-media-failed::after {
  content: "مرکز مشاوره اقتصادی و سرمایه‌گذاری";
  max-width: 18rem;
  padding: 24px;
  color: #fff;
  font-weight: 800;
  line-height: 1.9;
  text-align: center;
}

body.msh-v87-final .msh-builder-image-placeholder {
  min-height: 280px;
  border: 1px solid rgba(200,162,74,.28);
  background:
    linear-gradient(135deg, transparent 42%, rgba(255,255,255,.12) 42% 58%, transparent 58%),
    radial-gradient(circle at 72% 24%, rgba(200,162,74,.26), transparent 34%),
    linear-gradient(145deg, #13274d, #081327);
}

body.msh-v87-final :where(.article-news-card, .msh-builder-card, .msh-service-card, .msh-panel, .msh-card) {
  border: 1px solid var(--msh-v87-line);
  border-radius: var(--msh-v87-radius);
  box-shadow: var(--msh-v87-shadow);
}

body.msh-v87-final :where(.article-news-card, .msh-builder-card, .msh-service-card) {
  overflow: hidden;
  background: var(--msh-v87-surface);
}

body.msh-v87-final :where(.article-news-card__body > p, .msh-builder-card__body > p, .msh-article-card p, .msh-service-card p) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

body.msh-v87-final .article-news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--msh-v87-muted);
  font-size: .82rem;
}

body.msh-v87-final .article-news-card__meta span:not(:first-child)::before {
  content: "•";
  margin-inline-end: 10px;
  color: var(--msh-v87-gold);
}

body.msh-v87-final :where(.msh-button--gold, .button-primary, .home-primary-button) {
  background: linear-gradient(135deg, #d4b15b, #b88b2c);
  color: #111827;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(184,139,44,.22);
}

body.msh-v87-final :where(.entry-content, .msh-shortcode-content, .msh-builder-page) > :first-child {
  margin-top: 0;
}

body.msh-v87-final :where(.entry-content, .msh-shortcode-content, .msh-builder-page) > :last-child {
  margin-bottom: 0;
}

body.msh-v87-final img[hidden],
body.msh-v87-final img.msh-image-failed {
  display: none !important;
}

@media (max-width: 782px) {
  body.msh-v87-final :where(.msh-shell, .site-container, .container) {
    width: min(100% - 22px, 1240px);
  }

  body.msh-v87-final :where(.msh-builder-hero, .msh-builder-image-text) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.msh-v87-final .msh-builder-hero__visual img {
    min-height: 250px;
    max-height: 390px;
  }

  body.msh-v87-final :where(.msh-builder-cards, .msh-builder-query-grid, .msh-article-grid, .article-news-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.msh-v87-final .article-news-card__meta span:nth-child(n+3) {
    display: none;
  }
}
