/*
Theme Name: Daralefte Professional
Theme URI: https://darolefta.org
Author: Custom Engineering
Description: قالب کاملاً بومی، مینیمال و بهینه‌سازی‌شده برای پایگاه جامع فتاوا و احکام شرعی
Version: 1.1.0
Text Domain: darolefta
*/

/* ========================================================
   ۱. بارگذاری ۱۰۰٪ محلی فونت وزیرمتن
======================================================== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ========================================================
   ۲. متغیرهای سراسری (Design Tokens)
======================================================== */
:root {
  --turquoise-deep: #0e4c55;
  --turquoise-base: #147482;
  --turquoise-mid:  #2aa1b3;
  --turquoise-soft: #a5dbe4;
  --turquoise-mist: #eaf6f8;
  --turquoise-light:#f3fafb;
  --gold-accent:    #c99a53;
  --neutral-900:    #0f1d21;
  --neutral-700:    #334e55;
  --neutral-500:    #637e86;
  --neutral-200:    #d9e9ec;
  --surface:        #ffffff;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-subtle: 0 4px 20px -2px rgba(14, 76, 85, 0.06);
  --shadow-elevated: 0 16px 36px -6px rgba(14, 76, 85, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   ۳. ریست و استایل‌های پایه
======================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background-color: var(--turquoise-light);
  color: var(--neutral-900);
  line-height: 1.7;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s var(--ease);
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================================
   ۴. دکمه‌ها و عناصر عمومی
======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}
.btn-solid { background: var(--turquoise-base); color: #fff; }
.btn-solid:hover { background: var(--turquoise-deep); }
.btn-ghost { background: var(--turquoise-mist); border-color: var(--neutral-200); color: var(--turquoise-deep); }
.btn-ghost:hover { background: #ddf0f3; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 60px 0 24px;
}
.tazhib-group { display: flex; align-items: center; gap: 12px; }
.tazhib-symbol { width: 28px; height: 28px; color: var(--gold-accent); flex-shrink: 0; }
.section-title { font-size: 1.35rem; font-weight: 800; color: var(--turquoise-deep); }
.link-all { font-size: 0.86rem; font-weight: 700; color: var(--turquoise-base); display: inline-flex; align-items: center; gap: 4px; }

/* ساختارهای شبکه (Grid) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.split-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 32px; }
.books-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* ========================================================
   ۵. هدر و ناوبری (دسکتاپ)
======================================================== */
.top-strip {
  background: var(--turquoise-deep);
  color: #b7dbe0;
  font-size: 0.8rem;
  padding: 8px 0;
}
.top-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.nav-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* لوگو و عنوان در سمت راست */
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.main-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
}
.brand-info .site-brand-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.25;
}
.brand-info .site-brand-title a {
  color: var(--turquoise-deep);
}
.brand-info .site-brand-desc {
  font-size: 0.72rem;
  color: var(--neutral-500);
  display: block;
}

/* منوی میانی */
.main-nav-wrapper {
  display: flex;
  align-items: center;
}
.theme-primary-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  list-style: none;
}
.theme-primary-nav > li {
  position: relative;
  list-style: none;
  padding: 24px 0;
}
.theme-primary-nav > li > a {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--neutral-700);
  white-space: nowrap;
}
.theme-primary-nav > li:hover > a {
  color: var(--turquoise-base);
}

/* زیرمنوها در دسکتاپ */
.theme-primary-nav ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  max-height: 380px;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(14, 76, 85, 0.15);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 8px 0;
  z-index: 10000;
  list-style: none;
}
.theme-primary-nav > li:hover > ul.sub-menu {
  display: block;
}
.theme-primary-nav ul.sub-menu li {
  list-style: none;
}
.theme-primary-nav ul.sub-menu li a {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--neutral-700);
  display: block;
  white-space: nowrap;
}
.theme-primary-nav ul.sub-menu li a:hover {
  background: var(--turquoise-mist);
  color: var(--turquoise-deep);
}

/* دکمه‌های ثبت و پیگیری در سمت چپ هدر (دسکتاپ) */
.header-left-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.desktop-cta-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-cta-ask {
  background-color: var(--turquoise-deep);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(14, 76, 85, 0.2);
  transition: all 0.25s ease;
}
.btn-cta-ask:hover {
  background-color: var(--turquoise-base);
}
.btn-cta-track {
  background-color: var(--turquoise-mist);
  color: var(--turquoise-deep);
  border: 1.5px solid var(--turquoise-soft);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}
.btn-cta-track:hover {
  background-color: #d2eef2;
}

.mobile-menu-btn,
.mobile-nav-header,
.mobile-cta-wrapper,
.mobile-overlay {
  display: none;
}

/* ========================================================
   ۶. بخش هیرو و جستجو
======================================================== */
.hero-turquoise {
  padding: 50px 0 35px;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, #e2f4f7 0%, var(--turquoise-light) 80%);
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 99px;
  background: rgba(20, 116, 130, 0.08);
  color: var(--turquoise-base);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-turquoise h2 {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--turquoise-deep);
  margin-bottom: 10px;
}
.hero-turquoise p {
  color: var(--neutral-500);
  margin-bottom: 24px;
}
.search-box {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 6px 8px 6px 20px;
  display: flex;
  align-items: center;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-subtle);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
}

/* ========================================================
   ۷. کارت‌های مطالب، مسائل روز، مصوبات و صوت
======================================================== */
.trend-card {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s var(--ease);
}
.trend-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--turquoise-soft);
}
.trend-thumb {
  height: 190px;
  position: relative;
  overflow: hidden;
}
.trend-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(14, 76, 85, 0.85);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
}
.trend-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.trend-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--turquoise-deep);
  margin-bottom: 8px;
}
.trend-body p {
  font-size: 0.88rem;
  color: var(--neutral-500);
  line-height: 1.6;
  margin-bottom: 16px;
}
.trend-foot {
  font-size: 0.8rem;
  color: #8da4a9;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #f1f7f8;
  padding-top: 14px;
}

/* مصوبات */
.resolution-row {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  transition: all 0.25s var(--ease);
}
.resolution-row:hover {
  border-color: var(--turquoise-base);
  transform: translateX(-4px);
  box-shadow: var(--shadow-subtle);
}
.resolution-img {
  width: 80px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.resolution-data {
  flex: 1;
  min-width: 0;
}
.resolution-data span.badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--turquoise-base);
  display: block;
  margin-bottom: 2px;
}
.resolution-data h4 {
  font-size: 0.96rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* صوت */
.audio-card {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  transition: all 0.25s var(--ease);
}
.audio-cover {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.audio-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 76, 85, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}
.audio-content {
  flex: 1;
  min-width: 0;
}
.audio-content h5 {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.audio-waveform {
  height: 3px;
  background: var(--neutral-200);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.audio-waveform-fill {
  height: 100%;
  background: var(--turquoise-base);
}

/* کتابخانه سه‌بعدی */
.book-card-pro {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s var(--ease);
}
.book-card-pro:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--turquoise-soft);
}
.book-mockup-wrapper {
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
  perspective: 800px;
}
.book-spine-mockup {
  width: 125px;
  height: 175px;
  position: relative;
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
  box-shadow: -8px 8px 18px rgba(14, 76, 85, 0.2);
}
.book-details h4 {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--turquoise-deep);
  margin-bottom: 6px;
}
.book-details p {
  font-size: 0.82rem;
  color: var(--neutral-500);
  line-height: 1.5;
  margin-bottom: 14px;
}
.book-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed var(--neutral-200);
  font-size: 0.78rem;
}

/* هاب ویدیو و بنتو گالری */
.video-hub-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}
.video-main-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9.5;
  background: #000;
}
.play-pulsar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--turquoise-base);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.video-stage-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(14, 76, 85, 0.95) 100%);
  padding: 20px;
  color: white;
}
.video-playlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.playlist-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--turquoise-mist);
  cursor: pointer;
}
.playlist-thumb {
  width: 95px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-bento {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: 190px 190px;
  gap: 18px;
}
.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.bento-card.big {
  grid-row: span 2;
}
.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14, 76, 85, 0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: white;
}

/* ========================================================
   ۸. استایل صفحات داخلی، فتاوا و منابع فقهی
======================================================== */
.fatwa-single-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  padding: 40px;
  box-shadow: var(--shadow-subtle);
}
.fatwa-meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--neutral-500);
}
.fatwa-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--turquoise-deep);
  line-height: 1.5;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--neutral-200);
  padding-bottom: 20px;
}
.fatwa-question-box {
  background: var(--turquoise-mist);
  border-right: 4px solid var(--turquoise-mid);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}
.box-tag {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--turquoise-deep);
  margin-bottom: 10px;
}
.fatwa-answer-box {
  background: #ffffff;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 30px;
  position: relative;
}
.answer-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-accent);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.answer-body {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--neutral-900);
}
.fatwa-signature {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed var(--neutral-200);
  text-align: left;
  color: var(--turquoise-base);
  font-size: 0.9rem;
}
.fatwa-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}
.fatwa-sources-container {
  margin-top: 28px;
  background: #f8fafc;
  border: 1px solid var(--neutral-200);
  border-right: 4px solid var(--gold-accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.sources-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--turquoise-deep);
  margin-bottom: 8px;
}
.sources-content {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.9;
}

/* مقالات و بلاگ */
.single-article-content {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  padding: 35px;
}
.post-cover-image {
  margin: 20px 0 25px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sidebar-box {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  padding: 24px;
  height: fit-content;
}
.sidebar-list {
  list-style: none;
}
.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}
.sidebar-list li a:hover {
  color: var(--turquoise-base);
}
.pagination-wrapper {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}
.pagination-wrapper .page-numbers {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  margin: 0 4px;
  font-weight: 700;
  color: var(--neutral-700);
}
.pagination-wrapper .page-numbers.current {
  background: var(--turquoise-base);
  color: #fff;
  border-color: var(--turquoise-base);
}

/* فرم‌ها و دیدگاه‌ها */
.custom-form-styled .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.custom-form-styled label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--neutral-700);
}
.custom-form-styled input,
.custom-form-styled select,
.custom-form-styled textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--neutral-900);
  background: #fff;
  transition: border-color 0.2s ease;
}
.custom-form-styled input:focus,
.custom-form-styled select:focus,
.custom-form-styled textarea:focus {
  outline: none;
  border-color: var(--turquoise-base);
}

.comments-list-custom .comment {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
  list-style: none;
}
.comments-list-custom .comment-author {
  font-weight: 700;
  color: var(--turquoise-deep);
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.comments-list-custom .comment-content {
  font-size: 0.88rem;
  color: var(--neutral-700);
  line-height: 1.7;
}

/* ========================================================
   ۹. فوتر
======================================================== */
.site-footer {
  background: #09262b;
  color: #b3d1d6;
  margin-top: 80px;
  padding: 60px 0 24px;
  border-top: 3px solid var(--turquoise-base);
  width: 100%;
  clear: both;
  display: block;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1.2fr 1.4fr;
  gap: 36px;
  margin-bottom: 40px;
  text-align: right;
}
.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
}
.footer-brand-title h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
}
.footer-icon {
  color: var(--gold-accent);
}
.footer-desc {
  font-size: 0.86rem;
  line-height: 1.85;
  color: #a1c4ca;
}
.footer-heading {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}
.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 2px;
  background: var(--gold-accent);
  border-radius: 2px;
}
.footer-links-list,
.site-footer ul {
  list-style: none;
}
.footer-links-list li,
.site-footer ul li {
  font-size: 0.84rem;
  color: #b3d1d6;
  margin-bottom: 10px;
  line-height: 1.6;
}
.footer-links-list li a,
.site-footer ul li a {
  color: #b3d1d6;
  transition: all 0.25s ease;
  display: inline-block;
}
.footer-links-list li a:hover,
.site-footer ul li a:hover {
  color: #ffffff;
  transform: translateX(-4px);
}
.footer-address {
  font-size: 0.84rem;
  line-height: 1.8;
  color: #a1c4ca;
}
.footer-bottom-bar {
  border-top: 1px solid rgba(165, 219, 228, 0.12);
  padding-top: 22px;
  text-align: center;
  font-size: 0.82rem;
  color: #719398;
}

/* ========================================================
   ۱۰. مدیاکوئری‌های اختصاصی تبلت و موبایل (Mobile Responsive)
======================================================== */
@media (max-width: 1024px) {
  .books-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .video-hub-grid, .split-layout { grid-template-columns: 1fr; }
  .gallery-bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .bento-card.big { grid-column: span 2; height: 260px; }
  .bento-card { height: 180px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 992px) {
  /* تنظیم دکمه همبرگری */
  .mobile-menu-btn {
    display: flex;
    background: #f0f7f8;
    border: 1.5px solid #d9e9ec;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
  }
  .mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--turquoise-deep);
    border-radius: 2px;
  }

  /* مخفی‌سازی عناصر مختص دسکتاپ */
  .desktop-only {
    display: none !important;
  }

  /* نوار اعلان بالا */
  .top-strip-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  /* لوگو و هدر */
  .nav-inner {
    height: 68px;
  }
  .main-logo-img {
    width: 44px;
    height: 44px;
  }
  .brand-info .site-brand-title {
    font-size: 1rem;
  }
  .brand-info .site-brand-desc {
    display: none;
  }

  /* لایه تاریک پشت منو */
  .mobile-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 38, 43, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* کشوی منوی موبایل */
  .main-nav-wrapper {
    position: fixed;
    top: 0;
    right: -320px;
    width: 290px;
    max-width: 85%;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    transition: right 0.35s var(--ease);
    overflow-y: auto;
  }
  .main-nav-wrapper.active {
    right: 0;
  }

  /* سربرگ داخل کشوی موبایل */
  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
  }
  .mobile-nav-title {
    font-weight: 800;
    color: var(--turquoise-deep);
    font-size: 1.05rem;
  }
  .mobile-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
  }

  /* دکمه‌های ثبت و پیگیری داخل منوی موبایل */
  .mobile-cta-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
  }
  .mobile-cta-wrapper .btn-cta-ask,
  .mobile-cta-wrapper .btn-cta-track {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  /* منوی عمودی موبایل */
  .theme-primary-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .theme-primary-nav > li {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid #f1f5f9;
  }
  .theme-primary-nav > li.menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .theme-primary-nav > li > a {
    padding: 12px 6px;
    display: block;
    flex: 1;
  }

  /* فلش اختصاصی برای باز کردن زیرمنو */
  .dropdown-toggle-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f0f7f8;
    border-radius: 6px;
    cursor: pointer;
    color: var(--turquoise-deep);
    font-size: 14px;
    transition: transform 0.3s ease, background 0.3s ease;
    user-select: none;
    flex-shrink: 0;
  }
  .theme-primary-nav > li.menu-item-has-children.submenu-open .dropdown-toggle-arrow {
    transform: rotate(180deg);
    background: var(--turquoise-soft);
  }

  /* زیرمنوهای آکاردئونی موبایل */
  .theme-primary-nav ul.sub-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    background: #f8fafc;
    width: 100%;
    padding: 6px 14px;
    margin: 4px 0 10px 0;
    border-right: 3px solid var(--turquoise-base);
    border-radius: 8px;
  }
  .theme-primary-nav > li.menu-item-has-children.submenu-open > ul.sub-menu {
    display: block;
  }
  .theme-primary-nav ul.sub-menu li a {
    padding: 8px 6px;
    font-size: 0.84rem;
  }

  /* هیرو موبایل */
  .hero-turquoise {
    padding: 35px 15px 25px;
  }
  .hero-turquoise h2 {
    font-size: 1.45rem;
    line-height: 1.4;
  }
  .hero-turquoise p {
    font-size: 0.88rem;
    margin-bottom: 20px;
  }
  .search-box {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
  }
  .search-box input {
    width: 100%;
    padding: 6px 0;
    text-align: center;
  }
  .search-box button {
    width: 100%;
    border-radius: 8px;
  }
}

@media (max-width: 768px) {
  .grid-3, .books-grid, .gallery-bento { grid-template-columns: 1fr; }
  .bento-card.big { grid-column: auto; height: 220px; }
  .fatwa-single-box { padding: 20px; }
  .fatwa-title { font-size: 1.25rem; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .site-footer { padding: 40px 0 20px; }
}
/* ========================================================
   قفل کامل اسکرول بدنه و تثبیت کشوی موبایل (Drawer Fix)
======================================================== */
html.menu-open-lock,
body.menu-open-lock {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}

@media (max-width: 992px) {
  /* ۱. کشوی ثابت که کل ارتفاع را پر می‌کند و همیشه می‌چسبد */
  .main-nav-wrapper {
    position: fixed !important;
    top: 0 !important;
    right: -320px !important;
    width: 300px !important;
    max-width: 85% !important;
    height: 100vh !important;
    height: 100dvh !important; /* سازگار با مرورگرهای موبایل جدید */
    background: #ffffff !important;
    z-index: 999999 !important;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* اگر نوار ادمین وردپرس فعال باشد منو از زیر آن شروع شود */
  .admin-bar .main-nav-wrapper {
    top: 46px !important;
    height: calc(100vh - 46px) !important;
  }

  .main-nav-wrapper.active {
    right: 0 !important;
  }

 

  .mobile-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* ۲. ساختار گرید آیتم‌های دارای زیرمنو (حل مشکل رفتن زیرنویس زیر متن) */
  .theme-primary-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .theme-primary-nav > li {
    width: 100% !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 0 !important;
    position: relative !important;
  }

  /* استفاده از گرید برای کنار هم قرار گرفتن تمیز عنوان و دکمه فلش */
  .theme-primary-nav > li.menu-item-has-children {
    display: grid !important;
    grid-template-columns: 1fr 42px !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
  }

  /* عنوان دسته */
  .theme-primary-nav > li.menu-item-has-children > a {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    padding: 14px 6px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--turquoise-deep, #0e4c55) !important;
    display: block !important;
  }

  /* دکمه فلش روبروی عنوان */
  .dropdown-toggle-arrow {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: #eaf6f8 !important;
    border-radius: 8px !important;
    color: var(--turquoise-deep, #0e4c55) !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: transform 0.25s ease, background 0.25s ease !important;
    margin-left: 4px !important;
  }

  /* چرخش فلش هنگام باز بودن */
  .theme-primary-nav > li.menu-item-has-children.submenu-open > .dropdown-toggle-arrow {
    transform: rotate(180deg) !important;
    background: #c3e8ed !important;
  }

  /* باکس زیرمنو که در ردیف دوم و سرتاسری پهن می‌شود */
  .theme-primary-nav ul.sub-menu {
    display: none !important;
    grid-column: 1 / 3 !important; /* هر دو ستون را می‌گیرد */
    grid-row: 2 / 3 !important;
    width: 100% !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin: 4px 0 12px 0 !important;
    border-right: 3px solid var(--turquoise-base, #147482) !important;
    list-style: none !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    position: static !important;
  }

  .theme-primary-nav > li.menu-item-has-children.submenu-open > ul.sub-menu {
    display: block !important;
  }

  .theme-primary-nav ul.sub-menu li {
    width: 100% !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    padding: 0 !important;
  }

  .theme-primary-nav ul.sub-menu li:last-child {
    border-bottom: none !important;
  }

  .theme-primary-nav ul.sub-menu li a {
    padding: 10px 8px !important;
    font-size: 0.88rem !important;
    color: var(--neutral-700, #334e55) !important;
    display: block !important;
    font-weight: 500 !important;
  }
}
/* ========================================================
   اصلاح ریسپانسیو مصوبات و جلوگیری از بیرون‌زدگی در موبایل
======================================================== */

/* شکسته‌شدن صحیح متن عنوان مصوبه در تمام نمایشگرها */
.resolution-data h4 {
  white-space: normal !important; /* لغو خط ممتد برای جلوگیری از سرریز */
  word-break: break-word !important;
  line-height: 1.5 !important;
  margin-bottom: 4px !important;
}

.resolution-data p {
  font-size: 0.82rem !important;
  color: var(--neutral-500, #637e86) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* بهینه‌سازی اختصاصی برای صفحات تبلت و موبایل */
@media (max-width: 600px) {
  .resolution-row {
    flex-wrap: wrap !important; /* در صورت کمبود جا المان‌ها زیر هم بروند */
    gap: 12px !important;
    padding: 12px !important;
    position: relative !important;
  }

  .resolution-img {
    width: 65px !important;
    height: 55px !important;
  }

  .resolution-data {
    flex: 1 1 calc(100% - 85px) !important; /* پر کردن بقیه فضای ردیف اول */
  }

  .resolution-data h4 {
    font-size: 0.9rem !important;
  }

  /* دکمه متن سند در موبایل به صورت ردیف کامل در پایین کارت قرار بگیرد */
  .resolution-row .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 7px 10px !important;
    margin-top: 4px !important;
  }
}
/* ========================================================
   اصلاح کنتراست رنگ متن‌ها مطابق استاندارد WCAG AAA
======================================================== */

/* تغییر رنگ متغیر به خاکستری تیره‌تر و استاندارد */
:root {
  --neutral-500: #425960; /* کنتراست کاملاً بهینه در برابر زمینه سفید و روشن */
}

/* ۱. متن خلاصه در کارت‌های مقالات و فتاوا */
.trend-body p {
  font-size: 0.88rem !important;
  color: #334d54 !important; /* نسبت کنتراست بالای 6.8:1 */
  line-height: 1.65 !important;
  margin-bottom: 16px !important;
}

/* ۲. تاریخ و متن فوتر کارت‌ها */
.trend-foot {
  color: #4b666d !important;
}

/* ۳. خلاصه متن در ردیف‌های مصوبات */
.resolution-data p {
  font-size: 0.84rem !important;
  color: #334d54 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ۴. برچسب دسته‌بندی بالای مصوبات */
.resolution-data span.badge {
  color: #0b5560 !important; /* تیره کردن فیروزه‌ای برای خوانایی ۱۰۰٪ */
}

/* ۵. متن توضیحات هیرو */
.hero-turquoise p {
  color: #2b4950 !important;
}
/* ========================================================
   استایل اختصاصی چاپ رسمی فتوا (Print Friendly)
======================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt !important;
  }

  .site-header,
  .top-strip,
  .site-footer,
  .fatwa-actions-bar,
  .mobile-overlay,
  .search-box,
  #menuToggle {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .fatwa-single-box {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .fatwa-question-box {
    background: #f7f7f7 !important;
    border-right: 3pt solid #333 !important;
    color: #000 !important;
    margin-bottom: 20pt !important;
  }

  .fatwa-answer-box {
    border: 1pt solid #ccc !important;
    padding: 15pt !important;
  }

  .fatwa-sources-container {
    background: #fafafa !important;
    border: 1pt solid #ddd !important;
    border-right: 3pt solid #666 !important;
  }

  .fatwa-signature {
    margin-top: 30pt !important;
    text-align: left !important;
    font-weight: bold !important;
  }
}
/* ========================================================
   طراحی مدرن سینگل کتاب (Single Book Platform)
======================================================== */

.book-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--neutral-500, #425960);
  margin-bottom: 24px;
}

.book-breadcrumb a:hover {
  color: var(--turquoise-base, #147482);
}

.book-breadcrumb .active {
  color: var(--turquoise-deep, #0e4c55);
  font-weight: 700;
}

/* ساختار دو ستونه صفحه کتاب */
.book-single-stage {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: start;
}

/* ستون مشخصات و جلد سه‌بعدی */
.book-aside-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200, #d9e9ec);
  border-radius: var(--radius-xl, 20px);
  padding: 30px 24px;
  box-shadow: var(--shadow-subtle, 0 4px 20px -2px rgba(14, 76, 85, 0.06));
  position: sticky;
  top: 96px;
}

.book-cover-3d-wrapper {
  perspective: 900px;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.book-cover-3d {
  width: 175px;
  height: 250px;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  box-shadow: -10px 12px 24px rgba(14, 76, 85, 0.22);
  transform: rotateY(-12deg) rotateX(4deg);
  transition: transform 0.4s var(--ease);
}

.book-cover-3d:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.03);
}

/* دکمه دانلود عریض و پرکنتراست */
.book-download-box {
  margin-bottom: 24px;
}

.btn-book-download {
  background: var(--turquoise-deep, #0e4c55);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: var(--radius-md, 10px);
  font-weight: 800;
  font-size: 0.94rem;
  box-shadow: 0 6px 16px rgba(14, 76, 85, 0.25);
  transition: all 0.25s ease;
}

.btn-book-download:hover {
  background: var(--turquoise-base, #147482);
  transform: translateY(-2px);
}

.book-dl-meta {
  display: block;
  text-align: center;
  font-size: 0.76rem;
  color: var(--neutral-500, #425960);
  margin-top: 8px;
}

/* شناسنامه مشخصات کتاب */
.book-specs-table {
  border-top: 1px solid #edf4f5;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.spec-label {
  color: var(--neutral-500, #425960);
}

.spec-val {
  color: var(--neutral-900, #0f1d21);
  font-weight: 700;
}

/* ستون محتوا و متن کتاب */
.book-main-content {
  background: #ffffff;
  border: 1px solid var(--neutral-200, #d9e9ec);
  border-radius: var(--radius-xl, 20px);
  padding: 36px 40px;
  box-shadow: var(--shadow-subtle, 0 4px 20px -2px rgba(14, 76, 85, 0.06));
}

.book-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--turquoise-base, #147482);
  display: inline-block;
  margin-bottom: 6px;
}

.book-main-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--turquoise-deep, #0e4c55);
  line-height: 1.45;
  margin-bottom: 12px;
}

.book-sub-meta {
  font-size: 0.85rem;
  color: var(--neutral-500, #425960);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--neutral-200, #d9e9ec);
  margin-bottom: 24px;
}

.book-section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--turquoise-deep, #0e4c55);
  margin-bottom: 14px;
}

.book-text-flow {
  font-size: 1rem;
  line-height: 1.95;
  color: var(--neutral-900, #0f1d21);
  margin-bottom: 30px;
}

.book-text-flow p {
  margin-bottom: 16px;
}

/* پیام کپی‌رایت شرعی */
.book-rights-callout {
  background: var(--turquoise-mist, #eaf6f8);
  border-right: 4px solid var(--turquoise-base, #147482);
  border-radius: var(--radius-md, 10px);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.callout-icon {
  color: var(--turquoise-base, #147482);
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-text {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--neutral-700, #334e55);
}

/* ریسپانسیو برای تبلت و موبایل */
@media (max-width: 900px) {
  .book-single-stage {
    grid-template-columns: 1fr;
  }
  .book-aside-card {
    position: static;
    padding: 24px 18px;
  }
  .book-main-content {
    padding: 24px 18px;
  }
  .book-main-title {
    font-size: 1.35rem;
  }
}
/* ========================================================
   ساختار باکس‌های ماژولار و تفکیک‌شده ایندکس
======================================================== */

.index-module-box {
  background: #ffffff;
  border: 1px solid var(--neutral-200, #d9e9ec);
  border-radius: var(--radius-xl, 20px);
  padding: 32px 28px;
  margin-bottom: 36px;
  box-shadow: 0 4px 20px -2px rgba(14, 76, 85, 0.05);
  position: relative;
  overflow: hidden;
}

/* خط ظریف دکوراتیو بالای هر باکس */
.index-module-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #c99738, #147482);
}

.index-module-box .section-header {
  margin-top: 0;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid #edf4f5;
}

/* بهینه‌سازی باکس‌های دوقلو در موبایل */
@media (max-width: 768px) {
  .index-module-box {
    padding: 22px 16px;
    margin-bottom: 24px;
    border-radius: 16px;
  }
}
/* ========================================================
   کادربندی اختصاصی و تفکیک کارت‌های پرسش و پاسخ
======================================================== */

.grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

.question-pure-card {
  background: #fbfdfd !important;
  border: 1px solid #dbe8ea !important;
  border-radius: 14px !important;
  padding: 20px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  position: relative !important;
  box-shadow: 0 2px 10px rgba(14, 76, 85, 0.04) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.question-pure-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 22px rgba(14, 76, 85, 0.09) !important;
  border-color: #0e8494 !important;
}

.cat-breadcrumb-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #fff8e8 !important;
  border: 1px solid #ebd49d !important;
  color: #946200 !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  margin-bottom: 12px !important;
}

.question-pure-card h3 a {
  color: var(--turquoise-deep, #0e4c55) !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.question-pure-card p {
  font-size: 0.84rem !important;
  color: #435b62 !important;
  line-height: 1.65 !important;
  margin-top: 8px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr !important;
  }
}