/**
 * RTL (Right-to-Left) Stylesheet for Arabic
 * Version: 2.0.0
 */

/* ============================================
   RTL LAYOUT ADJUSTMENTS
   ============================================ */

body.rtl-layout,
body.lang-ar {
    direction: rtl;
    text-align: right;
}

/* Header adjustments */
.rtl-layout .header-contact a,
.lang-ar .header-contact a {
    margin-left: 0;
    margin-right: var(--spacing-md);
}

.rtl-layout .header-main .container,
.lang-ar .header-main .container {
    flex-direction: row-reverse;
}

/* Navigation */
.rtl-layout .main-navigation ul,
.lang-ar .main-navigation ul {
    flex-direction: row-reverse;
}

/* Hero section */
.rtl-layout .hero-image,
.lang-ar .hero-image {
    right: auto;
    left: 0;
}

.rtl-layout .hero-content,
.lang-ar .hero-content {
    margin-right: auto;
    margin-left: 0;
}

/* Service cards */
.rtl-layout .service-card-link,
.lang-ar .service-card-link {
    flex-direction: row-reverse;
}

/* About section */
.rtl-layout .about-feature,
.lang-ar .about-feature {
    flex-direction: row-reverse;
}

/* Contact items */
.rtl-layout .contact-item,
.lang-ar .contact-item {
    flex-direction: row-reverse;
}

/* Contact info card readability (fix white-on-white when combined with .glass-card) */
.contact-section .contact-info.glass-card {
    background: var(--color-primary);
    color: var(--color-white);
}

.contact-section .contact-info.glass-card h3 {
    color: var(--color-white);
}

.contact-section .contact-info .contact-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.contact-section .contact-info .contact-label {
    margin: 0 0 4px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
}

.contact-section .contact-info .contact-value {
    margin: 0;
    color: var(--color-white);
}

.contact-section .contact-info a.contact-value {
    text-decoration: none;
}

.contact-section .contact-info a.contact-value:hover {
    text-decoration: underline;
}

/* Footer */
.rtl-layout .footer-main,
.lang-ar .footer-main {
    direction: rtl;
}

/* WhatsApp button */
.rtl-layout .whatsapp-float,
.lang-ar .whatsapp-float {
    right: auto;
    left: 30px;
}

/* Text alignment */
.rtl-layout .text-left,
.lang-ar .text-left {
    text-align: right;
}

.rtl-layout .text-right,
.lang-ar .text-right {
    text-align: left;
}

/* Flexbox adjustments */
.rtl-layout .flex-between,
.lang-ar .flex-between {
    flex-direction: row-reverse;
}

/* Buttons with icons */
.rtl-layout .btn-icon,
.lang-ar .btn-icon {
    flex-direction: row-reverse;
}

/* Form labels */
.rtl-layout .form-label,
.lang-ar .form-label {
    text-align: right;
}

/* Lists */
.rtl-layout ul,
.rtl-layout ol,
.lang-ar ul,
.lang-ar ol {
    padding-right: var(--spacing-lg);
    padding-left: 0;
}

/* Arrows and icons direction */
.rtl-layout .arrow-right::before,
.lang-ar .arrow-right::before {
    content: '←';
}

.rtl-layout .arrow-left::before,
.lang-ar .arrow-left::before {
    content: '→';
}

/* Mobile menu - Enhanced with !important to ensure RTL works */
@media (max-width: 768px) {
    .rtl-layout .main-navigation,
    .lang-ar .main-navigation,
    [dir="rtl"] .main-navigation {
        transform: translateX(100%) !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .rtl-layout .main-navigation.active,
    .lang-ar .main-navigation.active,
    [dir="rtl"] .main-navigation.active {
        transform: translateX(0) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

