/* =========================================
   صفحه مطالعه کامل خبر — هم‌سبک لیست اخبار (سفید / روشن)
   ========================================= */

.article-page {
  --navy: #0d1f4e;
  --blue-mid: #2f6fd6;
  --poster-blue: #204397;
  --muted: #5b6b85;
  --line: #e4eefb;
  padding: 28px 0 80px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(196, 163, 90, 0.08), transparent 42%),
    linear-gradient(180deg, #f3f6fb 0%, #f7f9fc 40%, #fff 100%);
  min-height: 70vh;
}

.article-card {
  max-width: 860px;
  margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.article-loading,
.article-error {
  text-align: center;
  color: var(--muted);
  padding: 72px 16px;
  margin: 0;
  font-size: 0.98rem;
}

.article-loading i {
  color: var(--blue-mid);
  margin-inline-end: 8px;
}

.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.article-back:hover {
  gap: 12px;
  color: var(--poster-blue);
}

.article-poster {
  position: relative;
  overflow: hidden;
  margin: 0 0 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 40, 90, 0.14);
}

.article-poster::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: -28%;
  right: -28%;
  top: 48%;
  bottom: 0;
  background: var(--poster-blue);
  border-radius: 50% 50% 0 0 / 32% 32% 0 0;
  pointer-events: none;
}

.article-poster-stage {
  position: relative;
  z-index: 2;
  padding: 22px 22px 8px;
  background: transparent;
}

.article-cover-wrap {
  position: relative;
  margin: 0;
  border: 2.5px solid var(--poster-blue);
  border-radius: 0 56px 0 56px;
  overflow: hidden;
  background: #edf2fb;
  aspect-ratio: 16 / 9.5;
  box-shadow: 0 10px 24px rgba(16, 40, 90, 0.12);
}

.article-card .cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  border-radius: 0;
  transform: scale(1.02);
  transform-origin: center 28%;
}

.article-poster-body {
  position: relative;
  z-index: 1;
  margin-top: -14px;
  padding: 36px 28px 30px;
  text-align: center;
  color: #fff;
}

.article-poster.is-text-only .article-poster-body {
  margin-top: 0;
  padding: 36px 28px 32px;
}

.article-poster-body h1 {
  color: #fff !important;
  margin: 0 0 14px !important;
}

.article-poster-body .lead {
  color: rgba(255, 255, 255, 0.92) !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center;
}

.article-poster-body .meta {
  color: rgba(255, 255, 255, 0.88) !important;
  justify-content: center;
  margin: 0 0 16px !important;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.88rem;
}

.article-poster-body .meta i {
  color: #fff !important;
}

.article-content {
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px 36px;
  box-shadow: 0 12px 32px rgba(16, 40, 90, 0.08);
}

.article-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(30, 79, 163, 0.92);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 6px 16px rgba(15, 48, 110, 0.2);
}

.article-badge-inline {
  position: static;
  box-shadow: none;
}

.article-card .meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.article-card .meta i {
  color: var(--blue-mid);
}

.article-card h1 {
  color: var(--page-text, var(--navy));
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 800;
  line-height: 1.55;
  margin: 0 0 14px;
}

.article-card .lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
  margin: 0 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  text-align: justify;
  text-justify: inter-word;
}

.article-body {
  color: var(--page-text, #243552);
  font-size: 1.02rem;
  line-height: 2;
  text-align: justify;
  text-justify: inter-word;
}

.article-body p {
  margin-bottom: 16px;
  text-align: justify;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--navy);
  margin: 28px 0 12px;
  line-height: 1.5;
  font-weight: 800;
}

.article-body ul,
.article-body ol {
  margin: 0 0 18px;
  padding-inline-start: 1.4em;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 18px 0;
  border: 1px solid var(--line);
}

.article-body a {
  color: var(--blue-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--navy);
}

.article-body blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-inline-start: 3px solid var(--blue-mid);
  background: #f3f7fd;
  border-radius: 0 12px 12px 0;
  color: var(--muted);
}

body.lang-en .article-card h1,
body.lang-en .article-card .lead,
body.lang-en .article-body,
body.lang-en .article-card .meta {
  text-align: left;
}

body.lang-en .article-body blockquote {
  border-inline-start: none;
  border-inline-end: none;
  border-left: 3px solid var(--blue-mid);
  border-radius: 12px 0 0 12px;
}

/* گالری تصاویر خبر */
.article-gallery {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-gallery-title {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
}

.article-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.article-gallery-item {
  appearance: none;
  border: 2px solid var(--blue-mid);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: #e8f0fb;
  cursor: pointer;
  aspect-ratio: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 48, 110, 0.14);
}

.article-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
}

.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 18, 40, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.article-lightbox img {
  max-width: min(920px, 92vw);
  max-height: 84vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.article-lightbox-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 22px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.article-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.article-lightbox-nav.prev {
  inset-inline-start: 18px;
}

.article-lightbox-nav.next {
  inset-inline-end: 18px;
}

.article-lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .article-page {
    padding: calc(var(--header-clear, 72px) + 8px) 0 40px;
  }

  .article-page .container {
    width: min(100% - 20px, 860px);
    padding-inline: 0;
  }

  .article-card {
    padding: 0;
    border-radius: 0;
  }

  .article-toolbar {
    margin-bottom: 12px;
    gap: 8px;
  }

  .article-back {
    font-size: 0.86rem;
    padding: 8px 0;
  }

  .article-poster {
    margin-bottom: 16px;
    border-radius: 10px;
  }

  .article-poster::after {
    top: 46%;
    left: -34%;
    right: -34%;
    border-radius: 50% 50% 0 0 / 34% 34% 0 0;
  }

  .article-poster-stage {
    padding: 14px 14px 10px;
  }

  .article-cover-wrap {
    border-radius: 0 28px 0 28px;
    aspect-ratio: 16 / 10;
    border-width: 2px;
  }

  .article-card .cover {
    max-height: none;
    height: 100%;
    object-position: center 30%;
  }

  .article-badge {
    top: 10px;
    inset-inline-start: 10px;
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .article-poster-body {
    padding: 28px 16px 22px;
    margin-top: -4px;
  }

  .article-poster.is-text-only .article-poster-body {
    padding: 22px 16px 20px;
  }

  .article-poster-body h1,
  .article-card h1 {
    font-size: 1.15rem !important;
    line-height: 1.55 !important;
    margin-bottom: 10px !important;
  }

  .article-poster-body .lead,
  .article-card .lead {
    font-size: 0.88rem !important;
    line-height: 1.75 !important;
    margin-bottom: 10px !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
  }

  .article-poster-body .meta,
  .article-card .meta {
    font-size: 0.8rem !important;
    margin: 0 0 14px !important;
    padding: 7px 12px !important;
    gap: 6px;
  }

  .article-content {
    padding: 16px 14px 22px;
    border-radius: 10px;
  }

  .article-body {
    font-size: 0.95rem;
    line-height: 1.85;
  }

  .article-body p {
    margin-bottom: 14px;
  }

  .article-body h2,
  .article-body h3,
  .article-body h4 {
    margin: 20px 0 10px;
    font-size: 1.05rem;
  }

  .article-body img {
    margin: 14px 0;
    border-radius: 10px;
  }

  .article-gallery {
    margin-top: 20px;
    padding-top: 16px;
  }

  .article-gallery-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .article-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .article-lightbox {
    padding: 12px;
  }

  .article-lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .article-lightbox-nav.prev {
    inset-inline-start: 8px;
  }

  .article-lightbox-nav.next {
    inset-inline-end: 8px;
  }

  .article-lightbox-close {
    top: 10px;
    inset-inline-end: 10px;
    width: 38px;
    height: 38px;
  }
}
