/*
 Nikzadnet Persian Typography 1.0.0
 فونت اصلی خوانا + نستعلیق برای تیترهای نمایشی
*/

/* فونت‌های فارسی آنلاین؛ در صورت در دسترس بودن از نسخه محلی سیستم استفاده می‌شود. */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Nastaliq+Urdu:wght@400;500;600;700&display=swap');

:root {
  --nk-text-main: #17243a;
  --nk-text-secondary: #52647b;
  --nk-heading: #102a43;
  --nk-accent: #087f8c;
  --nk-accent-dark: #075985;
  --nk-accent-soft: #e7f8f6;
  --nk-surface: #ffffff;
}

/* پایه خوانا و فارسی */
body.nk-persian-typography-active,
body.nk-persian-typography-active button,
body.nk-persian-typography-active input,
body.nk-persian-typography-active textarea,
body.nk-persian-typography-active select {
  font-family:
    "Noto Naskh Arabic",
    "Vazirmatn",
    "Tahoma",
    "Arial",
    sans-serif;
  color: var(--nk-text-main);
  font-size: 18px;
  line-height: 2;
  text-rendering: optimizeLegibility;
}

/* اندازه‌های متناسب */
body.nk-persian-typography-active p,
body.nk-persian-typography-active li,
body.nk-persian-typography-active label,
body.nk-persian-typography-active input,
body.nk-persian-typography-active textarea {
  font-size: clamp(17px, 1.05vw, 20px);
  line-height: 2;
}

body.nk-persian-typography-active small,
body.nk-persian-typography-active .small,
body.nk-persian-typography-active .meta,
body.nk-persian-typography-active .caption {
  font-size: 14px;
  line-height: 1.8;
  color: var(--nk-text-secondary);
}

/* تیترهای فارسی با حس نستعلیق */
body.nk-persian-typography-active h1,
body.nk-persian-typography-active h2,
body.nk-persian-typography-active h3,
body.nk-persian-typography-active h4,
body.nk-persian-typography-active .site-title,
body.nk-persian-typography-active .hero-title,
body.nk-persian-typography-active .section-title {
  font-family:
    "Noto Nastaliq Urdu",
    "IranNastaliq",
    "Nastaliq",
    "Noto Naskh Arabic",
    serif;
  font-weight: 600;
  color: var(--nk-heading);
  line-height: 1.9;
  letter-spacing: 0;
  text-wrap: balance;
}

/* سایز تیترها: متوسط رو به بزرگ، بدون شلوغی */
body.nk-persian-typography-active h1,
body.nk-persian-typography-active .hero-title {
  font-size: clamp(32px, 3.8vw, 64px);
}

body.nk-persian-typography-active h2,
body.nk-persian-typography-active .section-title {
  font-size: clamp(27px, 2.7vw, 44px);
}

body.nk-persian-typography-active h3 {
  font-size: clamp(23px, 2vw, 32px);
}

body.nk-persian-typography-active h4 {
  font-size: clamp(20px, 1.5vw, 27px);
}

/* اگر تیتر انگلیسی یا برند است، خوانایی مدرن حفظ شود */
body.nk-persian-typography-active .logo,
body.nk-persian-typography-active .brand,
body.nk-persian-typography-active .site-brand,
body.nk-persian-typography-active code,
body.nk-persian-typography-active pre {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

/* تضاد رنگی حرفه‌ای برای متن‌ها */
body.nk-persian-typography-active p,
body.nk-persian-typography-active li {
  color: var(--nk-text-secondary);
}

body.nk-persian-typography-active a {
  color: var(--nk-accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .2s ease, opacity .2s ease;
}

body.nk-persian-typography-active a:hover {
  color: var(--nk-accent);
}

/* تیترهای روی پس‌زمینه تیره */
body.nk-persian-typography-active .hero h1,
body.nk-persian-typography-active .hero h2,
body.nk-persian-typography-active .site-hero h1,
body.nk-persian-typography-active .site-hero h2,
body.nk-persian-typography-active [class*="hero"] h1,
body.nk-persian-typography-active [class*="hero"] h2 {
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .18);
}

/* برچسب‌ها و متن‌های تاکیدی */
body.nk-persian-typography-active strong,
body.nk-persian-typography-active b {
  color: #123b56;
  font-weight: 700;
}

body.nk-persian-typography-active .accent,
body.nk-persian-typography-active .highlight,
body.nk-persian-typography-active .eyebrow {
  color: var(--nk-accent);
  font-weight: 700;
}

/* دکمه‌ها؛ خوانا و نه بیش از حد بزرگ */
body.nk-persian-typography-active button,
body.nk-persian-typography-active .button,
body.nk-persian-typography-active a.button,
body.nk-persian-typography-active .wp-block-button__link,
body.nk-persian-typography-active input[type="submit"] {
  font-family: "Noto Naskh Arabic", "Tahoma", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0;
}

/* کارت‌ها */
body.nk-persian-typography-active .card h3,
body.nk-persian-typography-active .project-card h3,
body.nk-persian-typography-active .video-card h3,
body.nk-persian-typography-active article h2,
body.nk-persian-typography-active article h3 {
  color: var(--nk-heading);
  line-height: 1.8;
}

/* نوارها و منوها کمی کوچک‌تر تا حرفه‌ای بمانند */
body.nk-persian-typography-active nav a,
body.nk-persian-typography-active aside a,
body.nk-persian-typography-active .sidebar a {
  font-family: "Noto Naskh Arabic", "Tahoma", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

/* موبایل */
@media (max-width: 782px) {
  body.nk-persian-typography-active {
    font-size: 17px;
  }

  body.nk-persian-typography-active h1,
  body.nk-persian-typography-active .hero-title {
    font-size: clamp(29px, 9vw, 42px);
  }

  body.nk-persian-typography-active h2,
  body.nk-persian-typography-active .section-title {
    font-size: clamp(25px, 7vw, 35px);
  }
}

/* کاهش حرکت و جلوگیری از مشکل دسترسی */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: .01ms !important;
  }
}
