﻿/* ── User Dropdown ── */
[dir="rtl"] .user-dropdown-menu {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] .user-dropdown-item {
    text-align: right !important;
}

    [dir="rtl"] .user-dropdown-item:hover {
        padding-left: 1rem !important;
        padding-right: 1.2rem !important;
    }





/* ═══ PERSIAN (RTL) OVERRIDES ═══ */

/* ── User Dropdown ── */
[dir="rtl"] .user-dropdown-menu {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] .user-dropdown-item {
    text-align: right !important;
}

    [dir="rtl"] .user-dropdown-item:hover {
        padding-left: 1rem !important;
        padding-right: 1.2rem !important;
    }

/* ═══ PERSIAN FONT OVERRIDES ═══ */

/* Body - Vazirmatn for all text */
[dir="rtl"] body {
    font-family: 'Vazirmatn', 'Space Grotesk', sans-serif;
}

/* All headings - Vazirmatn Bold */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .hl-line span,
[dir="rtl"] .hero-title-line span,
[dir="rtl"] .s1-big,
[dir="rtl"] .s2-heading,
[dir="rtl"] .sc-bgword,
[dir="rtl"] .ph-title,
[dir="rtl"] .sec-heading,
[dir="rtl"] .hub-title,
[dir="rtl"] .lexicon-title,
[dir="rtl"] .sc-headline,
[dir="rtl"] .sq-quote,
[dir="rtl"] .cover-title,
[dir="rtl"] .proj-title,
[dir="rtl"] .pf-title,
[dir="rtl"] .nav-logo,
[dir="rtl"] .footer-logo {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.4;
}

/* Large display text */
[dir="rtl"] .s1-big,
[dir="rtl"] .sc-bgword,
[dir="rtl"] .s3-bg-word,
[dir="rtl"] .hero-title-line span {
    font-weight: 900;
    line-height: 1.3;
}

/* Italic/serif headings - Vazirmatn (Persian has no italics) */
[dir="rtl"] .hero-title-line:nth-child(2) span,
[dir="rtl"] .hero-title-line:nth-child(3) span,
[dir="rtl"] .ph-title em,
[dir="rtl"] .sec-heading em,
[dir="rtl"] .hub-title em,
[dir="rtl"] .lexicon-title em,
[dir="rtl"] .s1-sub {
    font-family: 'Vazirmatn', sans-serif;
    font-style: normal;
    font-weight: 500;
}

/* Mono/labels - Vazirmatn Medium */
[dir="rtl"] .hero-kicker,
[dir="rtl"] .hero-eyebrow,
[dir="rtl"] .ph-breadcrumb,
[dir="rtl"] .ph-num,
[dir="rtl"] .sec-label,
[dir="rtl"] .intro-label,
[dir="rtl"] .section-label,
[dir="rtl"] .s2-eyebrow,
[dir="rtl"] .nav-links a,
[dir="rtl"] .footer-nav a,
[dir="rtl"] .lang-toggle a,
[dir="rtl"] label,
[dir="rtl"] .form-label,
[dir="rtl"] .mq-item,
[dir="rtl"] .stat-l,
[dir="rtl"] .s2-sl {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    letter-spacing: 0;
}

/* Persian text doesn't need uppercase */
[dir="rtl"] .hero-kicker,
[dir="rtl"] .hero-eyebrow,
[dir="rtl"] .sec-label,
[dir="rtl"] .ph-breadcrumb,
[dir="rtl"] .ph-num,
[dir="rtl"] .intro-label,
[dir="rtl"] .section-label,
[dir="rtl"] .s2-eyebrow,
[dir="rtl"] .nav-links a,
[dir="rtl"] .footer-nav a,
[dir="rtl"] .lang-toggle a,
[dir="rtl"] .stat-l,
[dir="rtl"] .s2-sl {
    text-transform: none;
}

/* Remove letter-spacing globally in RTL */
[dir="rtl"] .nav-links a,
[dir="rtl"] .nav-cta,
[dir="rtl"] .hero-desc,
[dir="rtl"] .hero-sub,
[dir="rtl"] .intro-prose p,
[dir="rtl"] .footer-tagline,
[dir="rtl"] .footer-copy,
[dir="rtl"] .ph-desc,
[dir="rtl"] .contact-desc,
[dir="rtl"] .proj-desc,
[dir="rtl"] .pf-desc {
    letter-spacing: 0;
}

/* Fix Persian text clipping */
[dir="rtl"] .hero-headline {
    line-height: 1.5;
}

[dir="rtl"] .hl-line {
    line-height: 1.6;
}

    [dir="rtl"] .hl-line span {
        line-height: 1.6;
        padding-bottom: .1em;
    }

/* Fix big SEISMIC word for Persian */
[dir="rtl"] .s1-big {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 1.3;
}

/* Fix RESILIENCE background word */
[dir="rtl"] .s3-bg-word {
    font-size: clamp(4rem, 15vw, 12rem);
    line-height: 1.3;
}

/* Fix hero kicker */
[dir="rtl"] .hero-kicker {
    line-height: 1.6;
}

/* Fix hero sub */
[dir="rtl"] .hero-sub {
    line-height: 1.8;
}

/* Fix all Persian text that might be clipped */
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] div {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ── RTL Arrow Fixes ── */
[dir="rtl"] .proj-arrow,
[dir="rtl"] .ch-arr,
[dir="rtl"] .card-arrow,
[dir="rtl"] .topic-arrow,
[dir="rtl"] .hf-arrow {
    transform: rotate(180deg);
}

[dir="rtl"] .proj-card:hover .proj-arrow,
[dir="rtl"] .channel:hover .ch-arr {
    transform: rotate(180deg) translate(3px, -3px);
}

/* ── RTL Scroll Hint ── */
[dir="rtl"] .scroll-hint {
    direction: rtl;
}

/* ── RTL Language Toggle Mobile ── */
[dir="rtl"] .lang-toggle-mobile {
    direction: rtl;
}

/* ── RTL Dropdown Nav ── */
[dir="rtl"] .nav-dropdown-menu {
    right: 50%;
    left: auto;
    transform: translateX(50%) translateY(-10px);
}

[dir="rtl"] .nav-dropdown:hover .nav-dropdown-menu {
    transform: translateX(50%) translateY(0);
}

[dir="rtl"] .nav-dropdown-item {
    text-align: right;
}

    [dir="rtl"] .nav-dropdown-item:hover {
        padding-left: 1rem;
        padding-right: 1.2rem;
    }

/* ── RTL Footer ── */
[dir="rtl"] .footer-col a:hover {
    transform: translateX(-3px);
}

/* ── RTL Globe Badge ── */
[dir="rtl"] .globe-mini {
    margin-right: 0;
    margin-left: 4px;
}

[dir="rtl"] .live-badge {
    right: auto;
    left: -10px;
}



/* ── RTL Ticker ── */
[dir="rtl"] .hub-ticker-label {
    border-right: none;
    border-left: 1px solid rgba(239,68,68,.3);
}

[dir="rtl"] .hub-ticker-track {
    animation-direction: reverse;
}

/* ── RTL Search Results ── */
[dir="rtl"] .search-results {
    text-align: right;
}

/* ── RTL Book Inside ── */
[dir="rtl"] .book-inside {
    text-align: right;
}

[dir="rtl"] .inside-year {
    right: auto;
    left: 1rem;
}

/* ── RTL Author Card ── */
[dir="rtl"] .author-card {
    direction: rtl;
    text-align: right;
}

/* ── RTL Article Body ── */
[dir="rtl"] .article-body blockquote {
    border-left: none;
    border-right: 3px solid var(--purple);
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .article-body ul,
[dir="rtl"] .article-body ol {
    margin: 1rem 1.5rem 1.5rem 0;
}

/* ── RTL Term Card ── */
[dir="rtl"] .lexicon-term-card:hover {
    transform: translateX(-5px);
}

    [dir="rtl"] .lexicon-term-card:hover .lexicon-term-card-arrow {
        transform: translateX(-5px);
    }

/* ── RTL Breadcrumb Separator ── */
[dir="rtl"] .ph-breadcrumb-sep,
[dir="rtl"] .article-breadcrumb span {
    transform: rotate(180deg);
    display: inline-block;
}