/* ==========================================================================
   News Phase 2 - Visual Presentation Styling (Persian RTL Editorial)
   ========================================================================== */

:root {
  --emerald-dark: #08241a;
  --emerald-main: #0e3d2e;
  --emerald-subtle: #144d3b;
  --emerald-light: #e8f0ec;
  --gold-primary: #c49826;
  --gold-accent: #d4af37;
  --gold-soft: #f4e8c1;
  --gold-bg: #fffbf0;
  --ivory-bg: #FAF8F5;
  --surface-card: #ffffff;
  --surface-warm: #FAF7F2;
  --text-primary: #122232;
  --text-body: #243648;
  --text-muted: #576b7c;
  --border-light: #E6E0D4;
  --border-emerald: #b8d1c6;
  --border-gold: rgba(196, 152, 38, 0.35);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(14, 61, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(14, 61, 46, 0.08);
  --shadow-lg: 0 16px 40px rgba(14, 61, 46, 0.12);
}

body {
  background: var(--ivory-bg) !important;
  color: var(--text-body) !important;
  font-family: 'Vazirmatn', Tahoma, sans-serif !important;
  margin: 0;
  direction: rtl;
}

.news-shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.news-main-padding {
  padding: 32px 0 64px;
}

/* ==========================================================================
   Hero Header (List Page) (Unified in site-hero-phase2.css)
   ========================================================================== */

/* ==========================================================================
   Section Header
   ========================================================================== */
.news-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.news-section-header__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.news-section-header__title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--emerald-main);
  border-radius: 3px;
}

.news-section-header__sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Lead Featured News Item
   ========================================================================== */
.news-lead-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-emerald);
}

.news-lead-card__image-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-warm);
}

.news-lead-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.news-lead-card:hover .news-lead-card__image {
  transform: scale(1.03);
}

.news-lead-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

.news-lead-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--emerald-main);
  font-weight: 600;
  margin-bottom: 12px;
}

.news-lead-card__meta svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.news-lead-card__title {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0 0 14px 0;
}

.news-lead-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

.news-lead-card__title a:hover {
  color: var(--emerald-main);
}

.news-lead-card__excerpt {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-body);
  margin: 0 0 20px 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-lead-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--emerald-main);
  color: #FFFFFF;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  width: fit-content;
  transition: background 0.18s ease, transform 0.18s ease;
  box-shadow: 0 4px 12px rgba(14, 61, 46, 0.2);
}

.news-lead-card__cta:hover {
  background: var(--emerald-dark);
  transform: translateX(-3px);
  color: #FFFFFF;
}

/* ==========================================================================
   News Grid (3-column)
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-emerald);
}

.news-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-warm);
}

.news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card__image {
  transform: scale(1.04);
}

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--emerald-main);
  font-weight: 600;
  margin-bottom: 10px;
}

.news-card__meta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.news-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.news-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.news-card__title a:hover {
  color: var(--emerald-main);
}

.news-card__excerpt {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #F2ECE1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--emerald-main);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.news-card__link:hover {
  color: var(--emerald-dark);
  transform: translateX(-3px);
}

/* ==========================================================================
   Fallback Image Design (Local CSS/SVG Motif)
   ========================================================================== */
.news-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0e3d2e 0%, #08241a 100%);
  color: var(--gold-soft);
  padding: 16px;
  text-align: center;
}

.news-image-placeholder svg {
  width: 44px;
  height: 44px;
  opacity: 0.85;
}

.news-image-placeholder span {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.8;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.news-empty-card {
  text-align: center;
  padding: 56px 24px;
  background: var(--surface-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  margin: 32px 0;
  color: var(--text-muted);
}

.news-empty-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--emerald-main);
  opacity: 0.7;
}

.news-empty-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.news-empty-card__desc {
  font-size: 0.94rem;
  margin: 0;
}

/* ==========================================================================
   Closing Pilgrimage Strip
   ========================================================================== */
.news-closing-strip {
  margin-top: 56px;
  background: linear-gradient(90deg, #08241a 0%, #0e3d2e 50%, #08241a 100%);
  border-top: 2px solid var(--gold-primary);
  border-bottom: 1px solid rgba(196, 152, 38, 0.2);
  padding: 22px 16px;
  text-align: center;
  color: #FFFFFF;
}

.news-closing-strip__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 700;
  color: var(--gold-soft);
}

.news-closing-strip__icon {
  color: var(--gold-accent);
}

/* ==========================================================================
   News Detail Page Styling
   ========================================================================== */

/* Article Breadcrumb & Header */
.article-header {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--emerald-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.article-breadcrumb a:hover {
  color: var(--emerald-dark);
  text-decoration: underline;
}

.article-breadcrumb__sep {
  color: #b0a595;
  font-size: 0.75rem;
}

.article-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid #F0EADF;
}

.article-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta__item svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--emerald-main);
  stroke-width: 2;
}

.article-gold-line {
  width: 50px;
  height: 3px;
  background: var(--gold-primary);
  border-radius: 2px;
  margin-top: 14px;
}

/* Article Container Layout */
.article-layout {
  max-width: 840px;
  margin: 0 auto;
}

/* Featured Cover Image in Detail */
.article-featured-image-wrap {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  background: var(--surface-warm);
}

.article-featured-image {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Article Body Typography */
.article-body-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.article-content {
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--text-body);
  direction: rtl;
  text-align: justify;
}

.article-content p {
  margin: 0 0 20px 0;
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* Detail Image Gallery */
.article-gallery-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px solid #F0EADF;
}

.article-gallery-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

.article-gallery-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--emerald-main);
  fill: none;
  stroke-width: 2;
}

.article-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.article-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-warm);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-gallery-item:hover img {
  transform: scale(1.04);
}

.article-gallery-caption {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-warm);
  border-top: 1px solid var(--border-light);
  line-height: 1.4;
}

/* Article Actions Footer */
.article-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.btn-news-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--surface-card);
  color: var(--emerald-main);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.btn-news-back:hover {
  background: var(--emerald-main);
  color: #FFFFFF;
  border-color: var(--emerald-main);
  transform: translateX(3px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 980px) {
  .news-lead-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-lead-card__image-wrap {
    height: 250px;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-body-card {
    padding: 28px 24px;
  }

  .article-header {
    padding: 20px 24px;
  }
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-lead-card {
    padding: 16px;
  }

  .news-lead-card__image-wrap {
    height: 200px;
  }

  .article-header {
    padding: 18px 16px;
  }

  .article-body-card {
    padding: 20px 16px;
  }

  .article-content {
    font-size: 0.98rem;
    line-height: 1.85;
    text-align: start;
  }

  .article-featured-image-wrap {
    max-height: 260px;
  }

  .article-gallery-grid {
    grid-template-columns: 1fr;
  }
}