/**
 * IRANSans Web Font — Persian/Dari Typography
 *
 * Source: https://www.entekhab.ir/ (reference implementation)
 * Font weights available:
 * - Light: 300
 * - Regular: 400
 * - Medium: 500
 * - Bold: 700
 *
 * NOTE: We do NOT use a separate FaNum variant because master.blade.php
 * already converts Western numerals to Persian via JavaScript.
 */

/* ═══════════════════════════════════════════════════════════
   WOFF2 (Primary — Modern Browsers)
   ═══════════════════════════════════════════════════════════ */

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

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

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

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

/* ═══════════════════════════════════════════════════════════
   FaNum variant — Persian numerals baked into the font glyph
   Used as secondary family for counter/stat elements
   ═══════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'IRANSansFaNum';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('woff2/IRANSansWebFaNum_Medium.woff2') format('woff2');
}

/* ═══════════════════════════════════════════════════════════
   RTL TYPOGRAPHY — IRANSans as primary Dari/Persian font
   Matches entekhab.ir: body 15px/24px, weight 400
   ═══════════════════════════════════════════════════════════ */

:root {
    --font-rtl-primary: 'IRANSans', Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body,
html[dir="rtl"] .body,
body.rtl-mode {
    font-family: var(--font-rtl-primary) !important;
    font-weight: 400;
}

/* Body text — entekhab.ir uses 15px/24px (line-height 1.6) */
html[dir="rtl"] body {
    font-size: 15px !important;
    line-height: 1.6 !important;
    letter-spacing: normal;
}

html[dir="rtl"] p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    letter-spacing: normal;
}

html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] .faq-accordion-body,
html[dir="rtl"] .accordion-body {
    letter-spacing: normal;
}

/* Headings — IRANSans renders wider than Dibaj, so sizes stay close to
   the LTR scale with minor RTL compensation */
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"] .page-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .heading {
    font-family: var(--font-rtl-primary) !important;
    letter-spacing: normal;
}

/* Navigation */
html[dir="rtl"] nav,
html[dir="rtl"] nav a,
html[dir="rtl"] .nav-link,
html[dir="rtl"] #header nav a,
html[dir="rtl"] .header-nav-main nav > ul > li > a {
    font-family: var(--font-rtl-primary) !important;
}

/* Buttons */
html[dir="rtl"] .btn,
html[dir="rtl"] button,
html[dir="rtl"] input[type="submit"],
html[dir="rtl"] input[type="button"] {
    font-family: var(--font-rtl-primary) !important;
}

/* Forms */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] .form-control {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] label,
html[dir="rtl"] .form-label {
    font-family: var(--font-rtl-primary) !important;
}

/* Footer */
html[dir="rtl"] footer,
html[dir="rtl"] #footer,
html[dir="rtl"] .footer {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] footer h1,
html[dir="rtl"] footer h2,
html[dir="rtl"] footer h3,
html[dir="rtl"] footer h4,
html[dir="rtl"] footer h5,
html[dir="rtl"] footer h6 {
    font-family: var(--font-rtl-primary) !important;
}

/* Counter/Impact Numbers */
html[dir="rtl"] .counter,
html[dir="rtl"] .impact-number,
html[dir="rtl"] .stat-number,
html[dir="rtl"] .counter-number {
    font-family: var(--font-rtl-primary) !important;
    font-weight: 700;
}

/* Service Cards */
html[dir="rtl"] .service-card-new__content h5,
html[dir="rtl"] .service-card-grid .service-content h5,
html[dir="rtl"] .service-title,
html[dir="rtl"] .service-card-new__content p,
html[dir="rtl"] .service-card-grid .service-content p,
html[dir="rtl"] .service-description {
    font-family: var(--font-rtl-primary) !important;
}

/* ═══════════════════════════════════════════════════════════
   RTL FONT OVERRIDES — Replace hardcoded LTR fonts
   ═══════════════════════════════════════════════════════════ */

html[dir="rtl"] .mfp-close,
html[dir="rtl"] .mfp-close-btn-in .mfp-close,
html[dir="rtl"] .style-switcher-open-loader .style-switcher-tooltip > strong,
html[dir="rtl"] .default-font {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .testimonial blockquote p,
html[dir="rtl"] .testimonial-style-3 blockquote p,
html[dir="rtl"] .testimonial-style-4 blockquote p,
html[dir="rtl"] .testimonial-style-5 blockquote p,
html[dir="rtl"] .testimonial.testimonial-style-3 blockquote p,
html[dir="rtl"] .testimonial.testimonial-style-4 blockquote p,
html[dir="rtl"] .testimonial.testimonial-style-5 blockquote p,
html[dir="rtl"] .testimonial-alternarive-font blockquote p,
html[dir="rtl"] .img-thumbnail.img-thumbnail-hover-icon:after {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .highlighted-word,
html[dir="rtl"] .home-concept strong,
html[dir="rtl"] .testimonials .testimonial-author,
html[dir="rtl"] [class*="highlighted-word"],
html[dir="rtl"] .testimonial-author {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .toggle .toggle-title:after,
html[dir="rtl"] .toggle.toggle-faqs .toggle > label:before,
html[dir="rtl"] .toggle.toggle-faqs .toggle > .toggle-title:before {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .alternative-font,
html[dir="rtl"] .alternative-font-2,
html[dir="rtl"] .alternative-font-3,
html[dir="rtl"] .alternative-font-4,
html[dir="rtl"] .alternative-font-5,
html[dir="rtl"] .alternative-font-6,
html[dir="rtl"] .alternative-font-7,
html[dir="rtl"] .alternative-font-8 {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] blockquote,
html[dir="rtl"] .testimonial blockquote,
html[dir="rtl"] .testimonial blockquote p,
html[dir="rtl"] .testimonial cite,
html[dir="rtl"] .testimonial .testimonial-author {
    font-family: var(--font-rtl-primary) !important;
}

/* Catch-all for RTL — excluding icon fonts */
html[dir="rtl"] *:not(.fa):not(.fas):not(.far):not([class*="icon-"]):not(i[class]) {
    font-family: var(--font-rtl-primary) !important;
}

/* Porto text size classes */
html[dir="rtl"] .text-1,
html[dir="rtl"] .text-2,
html[dir="rtl"] .text-3,
html[dir="rtl"] .text-4,
html[dir="rtl"] .text-5,
html[dir="rtl"] .text-6,
html[dir="rtl"] .text-7,
html[dir="rtl"] .text-8,
html[dir="rtl"] .text-9,
html[dir="rtl"] .text-10,
html[dir="rtl"] .text-11,
html[dir="rtl"] .text-12,
html[dir="rtl"] .text-13,
html[dir="rtl"] .text-14,
html[dir="rtl"] .text-15 {
    font-family: var(--font-rtl-primary) !important;
}

/* Line height classes */
html[dir="rtl"] .line-height-1,
html[dir="rtl"] .line-height-2,
html[dir="rtl"] .line-height-3,
html[dir="rtl"] .line-height-4,
html[dir="rtl"] .line-height-5,
html[dir="rtl"] .line-height-6,
html[dir="rtl"] .line-height-7,
html[dir="rtl"] .line-height-8,
html[dir="rtl"] .line-height-9,
html[dir="rtl"] .line-height-10,
html[dir="rtl"] .line-height-11,
html[dir="rtl"] .line-height-12,
html[dir="rtl"] .line-height-13,
html[dir="rtl"] .line-height-14,
html[dir="rtl"] .line-height-15 {
    font-family: var(--font-rtl-primary) !important;
}

/* ═══════════════════════════════════════════════════════════
   PHONE NUMBERS, CONTACT, NUMERIC ELEMENTS
   ═══════════════════════════════════════════════════════════ */

html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .phone,
html[dir="rtl"] .phone-number,
html[dir="rtl"] .tel,
html[dir="rtl"] .email,
html[dir="rtl"] .contact-info,
html[dir="rtl"] .floating-contact-bar,
html[dir="rtl"] .floating-contact-bar__link,
html[dir="rtl"] .floating-contact-bar span {
    font-family: var(--font-rtl-primary) !important;
    direction: ltr;
    unicode-bidi: embed;
}

html[dir="rtl"] [data-plugin-counter],
html[dir="rtl"] [data-to],
html[dir="rtl"] .custom-highlight-text-1,
html[dir="rtl"] .impact-stat-item,
html[dir="rtl"] .impact-number-wrapper,
html[dir="rtl"] .impact-number-wrapper strong,
html[dir="rtl"] .impact-unit,
html[dir="rtl"] .stat-item,
html[dir="rtl"] .stat-number,
html[dir="rtl"] .portfolio-stat-item,
html[dir="rtl"] .portfolio-stat-number {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .price,
html[dir="rtl"] .amount,
html[dir="rtl"] .quantity,
html[dir="rtl"] .percentage,
html[dir="rtl"] .number,
html[dir="rtl"] .count,
html[dir="rtl"] .total {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .date,
html[dir="rtl"] .time,
html[dir="rtl"] .datetime,
html[dir="rtl"] time {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] td,
html[dir="rtl"] th {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .badge,
html[dir="rtl"] .label,
html[dir="rtl"] .tag {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .pagination,
html[dir="rtl"] .page-link,
html[dir="rtl"] .page-item {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] ol,
html[dir="rtl"] ol li::marker {
    font-family: var(--font-rtl-primary) !important;
}

/* ═══════════════════════════════════════════════════════════
   RTL LAYOUT FIXES (carried over from dibaj)
   ═══════════════════════════════════════════════════════════ */

html[dir="rtl"] .hero .row,
html[dir="rtl"] section.hero .row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .custom-section-1 .row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .custom-section-1 .col-xl-8 {
    text-align: right !important;
}

html[dir="rtl"] .custom-section-1 .col-xl-4 {
    text-align: right !important;
}

html[dir="rtl"] .hero .text-lg-start,
html[dir="rtl"] section.hero .text-lg-start {
    text-align: right !important;
}

html[dir="rtl"] .hero .d-flex.justify-content-lg-start {
    justify-content: flex-end !important;
}

html[dir="rtl"] .hero .feature-box {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero .feature-box .feature-box-info {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
    text-align: right !important;
}

/* RTL Navigation font sizing — IRANSans renders wider than Dibaj,
   so nav text can be slightly smaller (24px vs 26.1px) */
html[dir="rtl"]:root #header .header-nav-main.header-nav-main-text-capitalize nav > ul > li > a,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a.nav-link,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a.dropdown-item,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a.dropdown-toggle,
html[dir="rtl"]:root .header-nav-main nav > ul > li > a,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a:hover,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a:focus,
html[dir="rtl"]:root #header .header-nav-main nav > ul > li > a.active {
    font-family: var(--font-rtl-primary) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 30px !important;
    letter-spacing: normal !important;
    text-transform: uppercase !important;
}

html[dir="rtl"] #header .header-nav-main nav > ul > li > a > .fa-caret-down,
html[dir="rtl"] .header-nav-main nav > ul > li > a > .fa-caret-down {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .header-nav-main nav > ul > li .dropdown-menu a {
    font-family: var(--font-rtl-primary) !important;
    font-size: 1rem !important;
    text-align: right !important;
}

html[dir="rtl"] .header-top .header-row {
    font-family: var(--font-rtl-primary) !important;
    font-size: 0.95rem !important;
}

html[dir="rtl"] .header-nav-features .dropdown-toggle,
html[dir="rtl"] .header-nav-features .dropdown-menu a {
    font-family: var(--font-rtl-primary) !important;
}

/* Marquee */
html[dir="rtl"] .marquee {
    direction: ltr;
}

html[dir="rtl"] .marquee .marquee__content {
    animation-direction: reverse !important;
}

html[dir="rtl"] .marquee p,
html[dir="rtl"] .marquee span,
html[dir="rtl"] .marquee a {
    font-family: var(--font-rtl-primary) !important;
}

html[dir="rtl"] .custom-bg-gradient-1 .marquee p {
    direction: rtl;
}

/* RTL Font sizing — IRANSans is wider/thicker than Dibaj, so
   body & paragraph can be smaller (15px matches entekhab.ir) */
html[dir="rtl"] .custom-hero-font-1,
html[dir="rtl"] .hero-primary {
    font-size: 2.5rem !important;
    line-height: 1.3 !important;
}

@media (max-width: 991px) {
    html[dir="rtl"] .custom-hero-font-1,
    html[dir="rtl"] .hero-primary {
        font-size: 1.8rem !important;
    }
}

/* Featured projects */
html[dir="rtl"] .featured-projects-item,
html[dir="rtl"] .project-item {
    text-align: right !important;
}

html[dir="rtl"] .featured-projects-item .row,
html[dir="rtl"] .project-item .row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .project-number,
html[dir="rtl"] .featured-number {
    text-align: right !important;
}

/* Client logos */
html[dir="rtl"] .client-logos-infinite-wrapper {
    direction: ltr;
}

html[dir="rtl"] .client-logos-infinite-track {
    animation-direction: reverse !important;
}

/* Testimonials */
html[dir="rtl"] .testimonial-card,
html[dir="rtl"] .testimonial-header {
    text-align: right !important;
}

html[dir="rtl"] .testimonial-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .testimonial-info {
    text-align: right !important;
    margin-right: 1rem;
    margin-left: 0;
}

/* Service cards & grid */
html[dir="rtl"] .services-grid,
html[dir="rtl"] .services-showcase-new .row,
html[dir="rtl"] #what-we-do-services .owl-carousel {
    direction: rtl;
}

html[dir="rtl"] .service-card-new,
html[dir="rtl"] .service-card {
    text-align: right !important;
}

/* FAQ */
html[dir="rtl"] .accordion .card,
html[dir="rtl"] .accordion-item,
html[dir="rtl"] .faq-item {
    text-align: right !important;
}

html[dir="rtl"] .accordion-button,
html[dir="rtl"] .accordion-header {
    flex-direction: row-reverse;
    text-align: right !important;
}

html[dir="rtl"] .accordion-button::after {
    margin-right: auto;
    margin-left: 0;
}

/* Contact form */
html[dir="rtl"] .contact-form label,
html[dir="rtl"] .form-label,
html[dir="rtl"] form label {
    text-align: right !important;
    display: block;
}

html[dir="rtl"] .contact-form input,
html[dir="rtl"] .contact-form textarea,
html[dir="rtl"] form input[type="text"],
html[dir="rtl"] form input[type="email"],
html[dir="rtl"] form input[type="tel"],
html[dir="rtl"] form textarea {
    text-align: right !important;
    direction: rtl;
}

/* Buttons RTL icon positioning */
html[dir="rtl"] .btn .fa-arrow-right,
html[dir="rtl"] .btn .fas.fa-arrow-right {
    transform: rotate(180deg);
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .btn .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* Footer */
html[dir="rtl"] #footer,
html[dir="rtl"] footer {
    text-align: right !important;
}

html[dir="rtl"] footer ul {
    padding-right: 0;
}

html[dir="rtl"] footer ul li {
    text-align: right !important;
}

/* What we do */
html[dir="rtl"] #what-we-do-services ul {
    direction: rtl;
}

html[dir="rtl"] #what-we-do-services li {
    text-align: right !important;
}

html[dir="rtl"] .owl-carousel .owl-stage {
    direction: ltr;
}

/* Impact numbers */
html[dir="rtl"] .impact-number-wrapper {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[dir="rtl"] .impact-unit {
    margin-right: 0.5rem;
    margin-left: 0;
}

html[dir="rtl"] .impact-stat-item {
    text-align: right !important;
}
