/* ============================================
   Persian Fonts - Vazirmatn & IRANSans
   ============================================ */

/* Vazirmatn - For Headings */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2'),
       url('/assets/fonts/Vazirmatn-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

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

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

/* IRANSans - For Body Text */
@font-face {
  font-family: 'IRANSans';
  src: url('/assets/fonts/IRANSans-Regular.woff2') format('woff2'),
       url('/assets/fonts/IRANSans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: 'IRANSans';
  src: url('/assets/fonts/IRANSans-Medium.woff2') format('woff2'),
       url('/assets/fonts/IRANSans-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSans';
  src: url('/assets/fonts/IRANSans-Light.woff2') format('woff2'),
       url('/assets/fonts/IRANSans-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   RTL Persian Font Application
   ============================================ */

html[dir="rtl"] {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* FontAwesome - Keep Original Font */
html[dir="rtl"] [class*="fa-"],
html[dir="rtl"] .fa,
html[dir="rtl"] .far,
html[dir="rtl"] .fas,
html[dir="rtl"] .fab,
html[dir="rtl"] .fal,
html[dir="rtl"] i[class*="fa-"] {
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free" !important;
}

/* Scroll Top Button */
html[dir="rtl"] .scroll-top,
html[dir="rtl"] .scroll-top span {
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free" !important;
  right: 95%;
}

/* Search Component */
html[dir="rtl"] .nav-search button,
html[dir="rtl"] .nav-search .searchbutton {
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free" !important;
}

/* Social Icons */
html[dir="rtl"] .social-style-one i,
html[dir="rtl"] .social-style-two i,
html[dir="rtl"] .social-style-three i,
html[dir="rtl"] .social-icons i,
html[dir="rtl"] .social-links i,
html[dir="rtl"] .social i {
  font-family: "Font Awesome 5 Brands" !important;
}

/* Headings - Vazirmatn Font (RTL) */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .h1,
html[dir="rtl"] .h2,
html[dir="rtl"] .h3,
html[dir="rtl"] .h4,
html[dir="rtl"] .h5,
html[dir="rtl"] .h6 {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

/* Headlines */
html[dir="rtl"] .headline {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] .headline h1,
html[dir="rtl"] .headline h2 {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

/* Section Titles */
html[dir="rtl"] .section-title {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

html[dir="rtl"] .section-title h2,
html[dir="rtl"] .section-title h3 {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

/* Card Titles */
html[dir="rtl"] .card-title,
html[dir="rtl"] .card h3 {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
}

/* Navigation & Menus */
html[dir="rtl"] .navigation,
html[dir="rtl"] nav,
html[dir="rtl"] .navbar {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Buttons */
html[dir="rtl"] .btn,
html[dir="rtl"] button {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Links */
html[dir="rtl"] a {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Body Text */
html[dir="rtl"] p,
html[dir="rtl"] span,
html[dir="rtl"] li,
html[dir="rtl"] label,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] .form-control {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Persian Numbers Support */
html[dir="rtl"] .number,
html[dir="rtl"] .price,
html[dir="rtl"] .counter {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Persian Symbols & Punctuation */
html[dir="rtl"] {
  --persian-char-spacing: 0;
  letter-spacing: var(--persian-char-spacing);
}

/* Improve Persian Text Rendering */
html[dir="rtl"] {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Footer Text */
html[dir="rtl"] .footer {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] .footer h4,
html[dir="rtl"] .footer h5 {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
}

/* Blog & Articles */
html[dir="rtl"] .blog-content,
html[dir="rtl"] article,
html[dir="rtl"] .post-content {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] .blog-title,
html[dir="rtl"] article h1,
html[dir="rtl"] article h2 {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

/* Form Labels & Placeholders */
html[dir="rtl"] .form-label,
html[dir="rtl"] .form-control::placeholder {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Modal & Popup */
html[dir="rtl"] .modal-body,
html[dir="rtl"] .modal-title,
html[dir="rtl"] .popup {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] .modal-title {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

/* Badge & Labels */
html[dir="rtl"] .badge,
html[dir="rtl"] .label,
html[dir="rtl"] .tag {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
}

/* Tooltips */
html[dir="rtl"] .tooltip,
html[dir="rtl"] .tooltip-inner {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Tab & Accordion */
html[dir="rtl"] .nav-tabs,
html[dir="rtl"] .accordion {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] .accordion-button {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
}

/* Table */
html[dir="rtl"] table,
html[dir="rtl"] .table {
  font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] thead {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
}

/* ============================================
   LTR Fallback (English & German)
   ============================================ */

html[dir="ltr"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3,
html[dir="ltr"] h4,
html[dir="ltr"] h5,
html[dir="ltr"] h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
