
/* ===========================
   IranSans Font + Tailwind Integration + Editor Styles
   نسخه یکپارچه
   =========================== */

/* ====== IranSans Normal ====== */
@font-face {
  font-family: 'IRANSans';
  src: url('/asset/font/IRANSansX-Bold.woff2') format('woff2'),
       url('/asset/font/IRANSansX-Bold.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ====== IranSans Bold ====== */
@font-face {
  font-family: 'IRANSans';
  src: url('/asset/font/IRANSansX-Regular.woff2') format('woff2'),
       url('/asset/font/IRANSansX-Regular.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ====== اعمال فونت روی کل سایت ====== */
html, body {
  font-family: 'IRANSans', sans-serif !important;
}

/* ====== هماهنگی با کلاس‌های تایپوگرافی Tailwind ====== */
.prose,
.prose * {
  font-family: 'IRANSans', sans-serif !important;
}

/* ====== برای TinyMCE و محتوای ادیتور ====== */
.editor-content {
  line-height: 1.9;
  font-size: 1rem;
  color: #374151;
  font-family: 'IRANSans', sans-serif !important;
}

/* ====== عناوین ====== */
.editor-content h1 {
  font-size: 2.25rem;
  font-weight: bold;
  color: #0f172a;
  margin: 1.5rem 0 1rem;
  border-bottom: 3px solid #facc15;
  padding-bottom: 0.4rem;
}

.editor-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.25rem 0 0.75rem;
}

.editor-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #334155;
  margin: 1rem 0 0.5rem;
}

.editor-content h4,
.editor-content h5,
.editor-content h6 {
  font-weight: 600;
  color: #475569;
  margin: 0.75rem 0 0.5rem;
}

/* ====== پاراگراف ====== */
.editor-content p {
  margin-bottom: 1rem;
  text-align: justify;
  line-height: 1.9;
}

/* ====== لیست‌ها ====== */
.editor-content ul {
  list-style-type: disc;
  padding-right: 1.5rem;
  margin-bottom: 1rem;
}

.editor-content ol {
  list-style-type: decimal;
  padding-right: 1.5rem;
  margin-bottom: 1rem;
}

.editor-content li {
  margin-bottom: 0.5rem;
}

/* ====== لینک ====== */
.editor-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed #2563eb;
  transition: all 0.2s ease;
}

.editor-content a:hover {
  color: #1d4ed8;
  border-bottom: 1px solid #facc15;
}

/* ====== نقل‌قول ====== */
.editor-content blockquote {
  border-right: 5px solid #facc15;
  background: #fffbea;
  padding: 1rem 1.25rem;
  font-style: italic;
  color: #4b5563;
  margin: 1rem 0;
  border-radius: 0.5rem;
}

/* ====== تصاویر ====== */
.editor-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin: 1rem 0;
  transition: transform 0.3s ease;
}

.editor-content img:hover {
  transform: scale(1.02);
}

/* ====== جداول ====== */
.editor-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.editor-content th,
.editor-content td {
  border: 1px solid #d1d5db;
  padding: 0.75rem 1rem;
  text-align: right;
}

.editor-content th {
  background-color: #facc15;
  color: #0f172a;
  font-weight: 700;
}

/* ====== حالت موبایل ====== */
@media (max-width: 768px) {
  .editor-content {
    font-size: 0.95rem;
    line-height: 1.8;
  }
  .editor-content h1 { font-size: 1.75rem; }
  .editor-content h2 { font-size: 1.5rem; }
  .editor-content h3 { font-size: 1.25rem; }
  .editor-content img { border-radius: 0.5rem; }
  .editor-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .editor-content blockquote { font-size: 0.95rem; }
}

/* ====== حالت خیلی کوچک ====== */
@media (max-width: 480px) {
  .editor-content { font-size: 0.9rem; }
  .editor-content h1 { font-size: 1.5rem; }
  .editor-content h2 { font-size: 1.3rem; }
  .editor-content h3 { font-size: 1.1rem; }
  .editor-content blockquote { padding: 0.75rem; }
}
