/*
 * RTL Stylesheet for HF Foundation Blocks Theme
 * Automatically loaded when Arabic (or any RTL language) is active via Polylang.
 * Mirrors the entire LTR layout for right-to-left reading.
 */

/* ===================== BASE ===================== */
body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif;
}

/* ===================== HERO ===================== */
.hf-hero__links {
    right: auto;
    left: 24px;
}

/* ===================== MENU BAR ===================== */
.hf-menu-bar {
    /* Keep centered — transform: translateX(-50%) works for both LTR/RTL */
}

.hf-menu-bar__search {
    margin-left: 0;
    margin-right: auto;
}

.hf-menu-bar__search input {
    text-align: right;
}

/* ===================== MENU DROPDOWNS ===================== */
.hf-menu {
    /* Flex direction stays row — just flip alignment */
}

.hf-menu a {
    font-weight: 700;
}

.hf-menu .dashicons-admin-home {
    margin-right: 0;
    margin-left: 4px;
}

.hf-menu .dropdown {
    left: auto;
    right: 0;
}

.hf-menu .dropdown a {
    text-align: right;
}

/* ===================== MAIN CONTENT: VIDEO + SIDEBAR ===================== */
.hf-main-content {
    flex-direction: row-reverse;
}

/* ===================== SIDEBAR ===================== */
.hf-sidebar {
    /* Already column direction — no change needed */
}

.hf-sidebar__link {
    text-align: center;
}

.hf-sidebar__label {
    text-align: center;
}

/* ===================== OUR PROJECTS ===================== */
.hf-projects {
    text-align: center; /* stays centered */
}

.hf-projects h2,
.hf-projects__labels p {
    text-align: center;
}

/* ===================== PARTNERS ===================== */
.hf-partners {
    text-align: center;
}

/* ===================== FOOTER ===================== */
.hf-footer__subscribe-bar {
    /* flex layout — flip text alignment */
    text-align: right;
}

.hf-footer__subscribe-bar form {
    flex-direction: row-reverse;
}

.hf-footer__subscribe-bar input {
    border-radius: 0 3px 3px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.45);
    border-left: none;
    text-align: right;
}

.hf-footer__subscribe-bar button {
    border-radius: 3px 0 0 3px;
    border-left: 1px solid rgba(255, 255, 255, 0.45);
    border-right: none;
}

.hf-footer__inner {
    /* Grid stays — already balanced */
}

.hf-footer__quick-lists {
    /* flex layout — keep gap, just flip alignment */
}

.hf-footer__contact .contact-line--icon {
    /* flex layout with gap — already works */
}

/* ===================== BREADCRUMBS ===================== */
.hf-breadcrumbs {
    text-align: right;
}

.hf-breadcrumbs span {
    margin: 0 2px;
}

/* ===================== PAGE CONTENT ===================== */
.hf-page-title {
    text-align: right;
}

/* ===================== ABOUT US ===================== */
.hf-about__section-heading,
.hf-about__mv-heading,
.hf-about__board-heading {
    text-align: right;
}

.hf-about__text-content {
    text-align: right;
}

.hf-about__mission-vision {
    /* Grid — stays as-is */
}

.hf-about__mv-card p {
    text-align: right;
}

.hf-about__trustee-name {
    text-align: center;
}

/* ===================== CONTACT US ===================== */
.hf-contact__line {
    text-align: right;
}

.hf-contact__field label {
    text-align: right;
}

.hf-contact__field input,
.hf-contact__field textarea {
    text-align: right;
}

/* ===================== PROJECTS PAGE ===================== */
.hf-projects-page__item h4 {
    text-align: center;
}

/* ===================== LANGUAGE SWITCHER ===================== */
.hf-lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

.hf-lang-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s;
}

.hf-lang-switcher__item:hover {
    background: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    color: #fff;
}

.hf-lang-switcher__item--current {
    background: rgba(255, 255, 255, 0.55);
    color: #333;
    border-color: transparent;
    cursor: default;
}

/* Flag-only variant for compact header */
.hf-lang-switcher--flags {
    gap: 6px;
}

.hf-lang-switcher--flags .hf-lang-switcher__item {
    padding: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    border: 1px solid transparent;
    line-height: 0;
}

.hf-lang-switcher--flags .hf-lang-switcher__item:hover {
    background: rgba(255, 255, 255, 0.35);
}

.hf-lang-switcher--flags .hf-lang-switcher__item--current {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.3);
}

/* ===================== PUBLICATIONS ===================== */
.page-id-44 .entry-content {
    text-align: right;
}

/* ===================== RESPONSIVE RTL ===================== */
@media (max-width: 900px) {
    .hf-main-content {
        flex-direction: column;
    }
    .hf-footer__subscribe-bar {
        flex-direction: column;
        text-align: center;
    }
    .hf-footer__subscribe-bar form {
        flex-direction: row-reverse;
    }
}

@media (max-width: 768px) {
    .hf-hero__links {
        left: 14px;
        right: auto;
    }
    .hf-menu-bar__search {
        margin-right: 0;
    }
    .hf-menu-bar__search input {
        text-align: right;
    }
}
