/* ============================================================
   ISRAND RTL STYLESHEET
   Applied automatically for Dari (dr) and Pashto (ps)
   via Polylang language detection
============================================================ */

html[dir="rtl"],
.rtl-lang {
    direction: rtl;
    text-align: right;
}

/* Typography — Arabic/Naskh fonts for Dari & Pashto */
.rtl-lang body,
.rtl-lang p,
.rtl-lang li,
.rtl-lang td {
    font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', system-ui, sans-serif;
    line-height: 1.9; /* Arabic script needs more line height */
    font-size: 1.05em;
}

/* Headings use Noto for readability */
.rtl-lang h1,
.rtl-lang h2,
.rtl-lang h3,
.rtl-lang h4 {
    font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', system-ui, sans-serif;
    font-weight: 700;
}

/* ============================================================
   LAYOUT FLIPS
============================================================ */
/* Flex row reversal */
.rtl-lang .site-header__inner,
.rtl-lang .footer-bottom__inner,
.rtl-lang .cta-strip__inner {
    flex-direction: row-reverse;
}

/* Nav */
.rtl-lang .primary-nav__list { flex-direction: row-reverse; }
.rtl-lang .primary-nav__list li ul { left: auto; right: 0; }

/* Eyebrow */
.rtl-lang .eyebrow { flex-direction: row-reverse; }

/* Grid: reverse column order where needed */
.rtl-lang .home-hero__content { margin-left: auto; margin-right: 0; }
.rtl-lang .home-hero__network { right: auto; left: -2rem; }

/* Border-left → border-right */
.rtl-lang .problem-card { border-left: none; border-right: 3px solid rgba(212,175,55,0.25); padding-left: 1.4rem; padding-right: 1.8rem; }
.rtl-lang .problem-card::after { left: auto; right: 0; transform-origin: right; }
.rtl-lang .division-card { border-left: none; border-right: 3px solid var(--gold); padding-left: 1.5rem; padding-right: 1.5rem; }
.rtl-lang .timeline { padding-left: 0; padding-right: 2.5rem; }
.rtl-lang .timeline::before { left: auto; right: 0; }
.rtl-lang .timeline__dot { left: auto; right: -2.5rem; transform: translateX(calc(50% - 0.5px)); }
.rtl-lang .timeline__item { padding-left: 0; padding-right: 1.5rem; }
.rtl-lang .home-hero__quote { border-left: none; border-right: 3px solid var(--gold); }
.rtl-lang .philosophy-quote-block { direction: rtl; }

/* Sector button active state */
.rtl-lang .sector-btn.active { border-left: none; border-right: 3px solid var(--gold); padding-left: 1.2rem; padding-right: calc(1.2rem - 3px); }

/* Form labels */
.rtl-lang .form-group { text-align: right; }
.rtl-lang .form-group input,
.rtl-lang .form-group select,
.rtl-lang .form-group textarea {
    text-align: right;
    direction: rtl;
}
.rtl-lang .form-group select { background-position: left 1rem center; padding-right: 1rem; padding-left: 2.5rem; }

/* VMV list */
.rtl-lang .vmv-list li { padding-left: 0; padding-right: 1rem; }
.rtl-lang .vmv-list li::before { left: auto; right: 0; }

/* Sector list */
.rtl-lang .sector-list__item { flex-direction: row-reverse; }

/* Language switcher */
.rtl-lang .footer-bottom__right { flex-direction: row-reverse; }

/* Breadcrumb */
.rtl-lang .breadcrumb { direction: rtl; }

/* Button clip-path (mirrors the cut corner) */
.rtl-lang .btn--primary {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.rtl-lang .form-submit {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* Card top border (origin flip) */
.rtl-lang .card::before { transform-origin: right; }
.rtl-lang .project-card::before { transform-origin: right; }

/* Footer */
.rtl-lang .footer-nav a { text-align: right; }
.rtl-lang .footer-contact li { text-align: right; }
.rtl-lang .footer-brand { text-align: right; }
.rtl-lang .footer-brand__desc { text-align: right; }
.rtl-lang .footer-logo { flex-direction: row-reverse; }

/* Pillars */
.rtl-lang .pillar { border-right: none; border-left: 1px solid rgba(26,45,90,0.12); }
.rtl-lang .pillar:first-child { border-left: 1px solid rgba(26,45,90,0.12); }
.rtl-lang .pillar:last-child { border-left: none; }

/* Mobile nav */
.rtl-lang .mobile-nav__list a { text-align: right; }

/* ============================================================
   DARI-SPECIFIC (dr)
   Dari uses Persian/Farsi numerals in some contexts
============================================================ */
.lang-dr .stat-item__number,
.lang-dr [data-target] {
    font-family: 'Noto Naskh Arabic', monospace;
}

/* ============================================================
   PASHTO-SPECIFIC (ps)
   Pashto has some unique letterforms
============================================================ */
.lang-ps body {
    font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', system-ui, sans-serif;
}
