/* ==========================================================
   مجله فقه نمایش
   طراحی استاندارد با زبان بصری یکپارچه (سرمه‌ای/کرم/طلایی)
   فونت وزیرمتن اجباری
   ========================================================== */

/* ---------- اجبار فونت وزیرمتن ---------- */
.fn-page,
.fn-page * {
  font-family: 'Vazirmatn', system-ui, -apple-system, Tahoma, sans-serif !important;
}

.fn-page {
  background: var(--cream);
  padding-top: 90px;
  color: var(--ink);
}

/* ---------- منوی چسبان مجله ---------- */
.fn-toc {
  position: sticky;
  top: 80px;
  z-index: 50;
  background: rgba(247, 243, 234, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ece4d2;
  padding: 14px 0;
  box-shadow: 0 4px 12px rgba(11, 30, 51, 0.04);
}
.fn-toc ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.fn-toc li a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
  border: 1px solid rgba(200, 163, 90, 0.3);
  border-radius: 999px;
  background: var(--paper);
  transition: var(--trans);
  text-decoration: none;
}
.fn-toc li a:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #fff;
  border-color: var(--gold-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(200, 163, 90, 0.3);
}

/* ---------- تصویر اصلی مجله ---------- */
.fn-hero {
  padding: 30px 0 50px;
}
.fn-hero img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(11, 30, 51, 0.18);
  display: block;
}

/* ---------- بخش‌ها ---------- */
.fn-section {
  padding: 60px 0;
}
.fn-section-dark {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #f4eee1;
}
.fn-section-dark .fn-section-title span {
  color: var(--gold-300);
}
.fn-section-dark .fn-scholar-name {
  color: var(--gold-300);
  background: rgba(200, 163, 90, 0.12);
  border-color: rgba(233, 207, 154, 0.4);
}
.fn-section-dark .fn-content-text:not(.fn-text-light) {
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
}
.fn-section-dark .fn-content-text:not(.fn-text-light) h4,
.fn-section-dark .fn-content-text:not(.fn-text-light) h4 a,
.fn-section-dark .fn-content-text:not(.fn-text-light) p {
  color: var(--ink);
}

/* ---------- هدر بخش ---------- */
.fn-section-head {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}
.fn-section-title {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 900;
  display: inline-block;
  padding: 0 20px;
  position: relative;
}
.fn-section-title span {
  color: #710e11;
  position: relative;
  z-index: 1;
}
.fn-section-title::before,
.fn-section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
  transform: translateY(-50%);
}
.fn-section-title::before {
  right: 100%;
  margin-right: 16px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}
.fn-section-title::after {
  left: 100%;
  margin-left: 16px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

/* ---------- سرمقاله ---------- */
.fn-editorial-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 30px;
  align-items: start;
  background: var(--paper);
  padding: 32px;
  border-radius: 18px;
  border: 1px solid #ece4d2;
  box-shadow: 0 8px 24px rgba(11, 30, 51, 0.08);
  position: relative;
  overflow: hidden;
}
.fn-editorial-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold-400), var(--gold-600));
}
.fn-editorial-img img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(11, 30, 51, 0.12);
  border: 3px solid var(--gold-400);
}
.fn-editorial-text h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 16px;
  line-height: 1.9;
}
.fn-editorial-text h4 a {
  color: var(--navy-800);
  text-decoration: none;
  transition: var(--trans);
}
.fn-editorial-text h4 a:hover {
  color: var(--gold-600);
}
.fn-editorial-text p {
  font-size: 1rem;
  line-height: 2.2;
  color: var(--ink);
  text-align: justify;
}

/* ---------- بلوک اساتید ---------- */
.fn-scholar-block {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px dashed #e5ddc9;
}
.fn-section-dark .fn-scholar-block {
  border-bottom-color: rgba(233, 207, 154, 0.2);
}
.fn-scholar-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fn-scholar-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy-800);
  padding: 10px 22px;
  background: linear-gradient(135deg, rgba(200, 163, 90, 0.15), rgba(200, 163, 90, 0.08));
  border: 1.5px solid rgba(200, 163, 90, 0.35);
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ---------- ردیف محتوا ---------- */
.fn-content-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}
.fn-content-row:last-child {
  margin-bottom: 0;
}
.fn-content-row.fn-reversed {
  grid-template-columns: 3fr 1fr;
}
.fn-content-row.fn-offset-row {
  grid-template-columns: 1fr;
}
.fn-offset {
  grid-column: 2 / -1;
  padding-right: calc(25% + 24px);
}

/* ---------- تصویر استاد ---------- */
.fn-scholar-img {
  background: linear-gradient(135deg, #f7f3ea, #ede4cc);
  padding: 12px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid #ece4d2;
}
.fn-scholar-img.fn-sticky {
  position: sticky;
  top: 160px;
}
.fn-scholar-img img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 10px;
  transition: var(--trans);
  display: block;
  margin: 0 auto;
}
.fn-scholar-img:hover img {
  transform: scale(1.04);
}

/* ---------- متن محتوا ---------- */
.fn-content-text {
  background: var(--paper);
  padding: 24px 28px;
  border-radius: 16px;
  border: 1px solid #ece4d2;
  box-shadow: 0 4px 16px rgba(11, 30, 51, 0.05);
  transition: var(--trans);
}
.fn-content-text:hover {
  box-shadow: 0 12px 32px rgba(11, 30, 51, 0.1);
  border-color: var(--gold-400);
  transform: translateY(-2px);
}
.fn-content-text.fn-text-light {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(233, 207, 154, 0.25);
  color: #f4eee1;
}
.fn-content-text.fn-text-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-400);
}

.fn-article-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.9;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-400);
  color: var(--navy-800);
}
.fn-article-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--trans);
  display: block;
}
.fn-article-title a:hover {
  color: var(--gold-600);
}
.fn-text-light .fn-article-title {
  color: var(--gold-300);
}
.fn-text-light .fn-article-title a {
  color: var(--gold-300);
}
.fn-text-light .fn-article-title a:hover {
  color: #fff;
}

.fn-content-text p {
  font-size: 0.95rem;
  line-height: 2.1;
  color: var(--ink);
  text-align: justify;
  margin: 0;
}
.fn-text-light p {
  color: #e0d8c2;
}

/* ---------- تصویر پایانی ---------- */
.fn-footer-image {
  padding: 30px 0 60px;
}
.fn-footer-image img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(11, 30, 51, 0.15);
  display: block;
}

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 992px) {
  .fn-editorial-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .fn-editorial-img {
    max-width: 380px;
    margin: 0 auto;
  }
  .fn-content-row,
  .fn-content-row.fn-reversed {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .fn-offset {
    grid-column: 1;
    padding-right: 0;
  }
  .fn-scholar-img.fn-sticky {
    position: relative;
    top: 0;
  }
  .fn-scholar-img img {
    max-width: 200px;
  }
  .fn-toc {
    top: 70px;
  }
  .fn-toc ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .fn-toc li {
    flex-shrink: 0;
  }
}

@media (max-width: 600px) {
  .fn-page {
    padding-top: 80px;
  }
  .fn-section {
    padding: 40px 0;
  }
  .fn-editorial-row,
  .fn-content-text {
    padding: 20px;
  }
  .fn-section-title {
    font-size: 1.3rem;
  }
  .fn-section-title::before,
  .fn-section-title::after {
    width: 40px;
  }
  .fn-scholar-name {
    font-size: 0.95rem;
    padding: 8px 16px;
  }
  .fn-article-title {
    font-size: 0.98rem;
  }
  .fn-content-text p {
    font-size: 0.9rem;
    line-height: 2;
  }
  .fn-toc li a {
    font-size: 0.78rem;
    padding: 6px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fn-content-text,
  .fn-scholar-img img,
  .fn-toc li a {
    transition: none;
  }
  .fn-content-text:hover,
  .fn-toc li a:hover {
    transform: none;
  }
}