/**
 * Kouini Caravane - RTL (Right-to-Left) Styles for Arabic
 * Applied when body has class "rtl" or html dir="rtl"
 */

/* ==================== BASE RTL ==================== */
html[dir="rtl"] body,
body.rtl {
    direction: rtl;
    text-align: right;
}

/* ==================== TOP BAR ==================== */
html[dir="rtl"] .top-bar-left,
html[dir="rtl"] .top-bar-right {
    direction: rtl;
}

html[dir="rtl"] .top-bar .container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .top-bar-left {
    flex-direction: row-reverse;
}

html[dir="rtl"] .top-bar-right {
    flex-direction: row-reverse;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* ==================== HEADER / NAV ==================== */
html[dir="rtl"] .header .container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .navbar ul {
    flex-direction: row-reverse;
}

html[dir="rtl"] .menu-toggle-lbl {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .logo {
    margin-right: 0;
    margin-left: auto;
}

/* ==================== HERO ==================== */
html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .hero-accent-line {
    margin-right: 0;
    margin-left: auto;
}

html[dir="rtl"] .cta-buttons {
    justify-content: flex-start;
    flex-direction: row-reverse;
}

/* ==================== SECTIONS ==================== */
html[dir="rtl"] .section-header {
    text-align: center;
}

html[dir="rtl"] .about-lead {
    text-align: right;
}

/* ==================== STATS ==================== */
html[dir="rtl"] .stats {
    direction: rtl;
}

/* ==================== SERVICES / CARDS ==================== */
html[dir="rtl"] .service-card,
html[dir="rtl"] .reason,
html[dir="rtl"] .build-option {
    text-align: right;
}

/* ==================== CARAVAN CARDS ==================== */
html[dir="rtl"] .caravan-footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .caravan-badge {
    left: auto;
    right: 15px;
}

html[dir="rtl"] .condition-badge {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .product-image-count-badge {
    left: auto;
    right: 10px;
}

/* ==================== CONTACT ==================== */
html[dir="rtl"] .contact-wrapper {
    direction: rtl;
}

html[dir="rtl"] .contact-form-grid {
    direction: rtl;
}

html[dir="rtl"] .input-icon-wrapper i {
    left: auto;
    right: 15px;
}

html[dir="rtl"] .input-icon-wrapper input {
    padding-left: 14px;
    padding-right: 45px;
}

html[dir="rtl"] .textarea-wrapper i {
    left: auto !important;
    right: 15px !important;
}

html[dir="rtl"] .textarea-wrapper textarea {
    padding-left: 14px !important;
    padding-right: 45px !important;
}

/* ==================== FOOTER ==================== */
html[dir="rtl"] .footer-content {
    direction: rtl;
}

html[dir="rtl"] .footer-section {
    text-align: right;
}

html[dir="rtl"] .footer-section ul li a i.fa-chevron-right {
    transform: rotate(180deg);
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .social-links-footer {
    justify-content: flex-start;
}

html[dir="rtl"] .newsletter-input-group {
    flex-direction: row-reverse;
}

/* ==================== BREADCRUMB ==================== */
html[dir="rtl"] .breadcrumb,
html[dir="rtl"] [style*="display: flex"][style*="gap: 10px"] {
    flex-direction: row-reverse;
}

/* ==================== PRODUCT DETAIL ==================== */
html[dir="rtl"] .product-detail-container {
    direction: rtl;
}

html[dir="rtl"] .product-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .detail-info {
    text-align: right;
}

html[dir="rtl"] .sidebar-form {
    text-align: right;
}

html[dir="rtl"] .sidebar-form label {
    text-align: right;
}

/* ==================== AMENAGEMENT ==================== */
html[dir="rtl"] .amenagement-detail-grid {
    direction: rtl;
}

html[dir="rtl"] .back-btn-hover {
    flex-direction: row-reverse;
}

/* ==================== TESTIMONIALS ==================== */
html[dir="rtl"] .testimonial {
    text-align: right;
}

html[dir="rtl"] .quote-icon {
    text-align: right;
}

/* ==================== CTA ==================== */
html[dir="rtl"] .cta {
    text-align: center;
}

/* ==================== BUTTONS ==================== */
html[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 8px;
}

/* ==================== MISC ==================== */
html[dir="rtl"] .text-center {
    text-align: center;
}

/* ==================== LANGUAGE SELECTOR ==================== */
html[dir="rtl"] .lang-selector {
    direction: ltr;
}

.active-lang {
    color: var(--primary-color, #E30613) !important;
    font-weight: 700;
}

/* ==================== MOBILE RTL ==================== */
@media (max-width: 992px) {
    html[dir="rtl"] .navbar {
        text-align: right;
    }
    
    html[dir="rtl"] .navbar ul {
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .amenagement-detail-grid {
        grid-template-columns: 1fr !important;
    }
    
    html[dir="rtl"] .contact-wrapper {
        flex-direction: column;
    }
}
