/**
 * RTL (Right-to-Left) Styles for Arabic Language
 *
 * This file contains RTL-specific styles that override LTR defaults
 * when the site is displayed in Arabic or other RTL languages.
 *
 * @package beit
 */

/* Import Cairo font for Arabic text */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* ==========================================================================
   Base RTL Adjustments
   ========================================================================== */

body.rtl {
    direction: rtl;
    text-align: right;
}

/* ==========================================================================
   Typography RTL
   ========================================================================== */

.rtl {
    font-family: 'Cairo', 'Tajawal', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
}

.rtl body,
.rtl h1,
.rtl h2,
.rtl h3,
.rtl h4,
.rtl h5,
.rtl h6 {
    font-family: 'Cairo', 'Tajawal', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   Hero Section RTL
   ========================================================================== */

/* Hero content alignment for RTL */
.rtl .hero-slider .max-w-2xl {
    margin-right: 0;
    margin-left: auto;
}

/* Hero slider navigation buttons */
.rtl .hero-slider-prev {
    right: 0;
    left: auto;
}

.rtl .hero-slider-next {
    left: 0;
    right: auto;
}



/* Animation adjustments for RTL */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* RTL animations - must be tied to .swiper-slide-active like LTR version */
.rtl .swiper-slide-active .hero-title-animate {
    animation: slideInFromRight 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

.rtl .swiper-slide-active .hero-description-animate {
    animation: slideInFromRight 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

.rtl .swiper-slide-active .hero-buttons-animate {
    animation: slideInFromRight 0.8s ease-out forwards;
    animation-delay: 0.6s;
}

/* Override the initial opacity:0 for active slide in RTL - ensure visibility after animation */
.rtl .swiper-slide-active .hero-title-animate,
.rtl .swiper-slide-active .hero-description-animate,
.rtl .swiper-slide-active .hero-buttons-animate,
.rtl .swiper-slide-active .hero-or-animate,
.rtl .swiper-slide-active .hero-video-button {
    animation-fill-mode: forwards;
}

/* ==========================================================================
   Initiatives & Partners Sliders RTL
   ========================================================================== */

/* Initiatives slider navigation */
.rtl .initiatives-button-prev {
    right: 0.5rem;
    left: auto;
}

.rtl .initiatives-button-next {
    left: 0.5rem;
    right: auto;
}

/* Partners slider navigation */
.rtl .partners-button-prev {
    right: 0.5rem;
    left: auto;
}

.rtl .partners-button-next {
    left: 0.5rem;
    right: auto;
}

/* ==========================================================================
   Menu & Navigation RTL
   ========================================================================== */

/* Mobile menu toggle */
.rtl .lg\\:hidden {
    margin-left: 0;
    margin-right: auto;
}

/* Menu items alignment */
.rtl #primary-menu {
    direction: rtl;
}

/* Dropdown menus */
.rtl .dropdown-menu {
    right: auto;
    left: 0;
}

/* ==========================================================================
   Our Story Section RTL
   ========================================================================== */

/* Tagline positioning */
.rtl .absolute.bottom-4.right-4 {
    right: auto;
    left: 1rem;
}

/* ==========================================================================
   General RTL Utilities
   ========================================================================== */

/* Text alignment */
.rtl .text-left {
    text-align: right !important;
}

.rtl .text-right {
    text-align: left !important;
}

/* Float adjustments */
.rtl .float-left {
    float: right !important;
}

.rtl .float-right {
    float: left !important;
}

/* Margin & Padding adjustments */
.rtl .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.rtl .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* ==========================================================================
   Programs Page RTL
   ========================================================================== */

/* Image overlay text positioning */
.rtl .absolute.bottom-0.left-0 {
    left: auto;
    right: 0;
}

/* Programs layout - swap image and content order for RTL */
.rtl .md\\:order-1 {
    order: 1;
}

.rtl .md\\:order-2 {
    order: 2;
}

/* Ensure proper text alignment in programs */
.rtl .justify-start {
    justify-content: flex-start;
}

.rtl .sm\\:justify-end {
    justify-content: flex-end;
}

.rtl .form-field {
    direction: rtl;
    text-align: right;
}

.rtl .flex.flex-wrap.items-center.gap-4>p {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    direction: rtl;
    width: 100%;
}