/**
 * RTL (Right-to-Left) Styles for Arabic Language
 * 
 * This file contains layout adjustments for Arabic language
 * Loaded only when Arabic is the active language
 * 
 * @package Abajora
 */

/* ========================================
   GENERAL RTL LAYOUT
======================================== */

html[lang="ar"],
html[lang="ar-SA"],
body.lang-ar {
    direction: rtl !important;
    text-align: right !important;
}

/* ========================================
   HEADER RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .header,
body.lang-ar .header {
    direction: rtl;
}

html[lang="ar"] .header .navigate,
body.lang-ar .header .navigate {
    flex-direction: row-reverse;
}

html[lang="ar"] .header .navigate ul,
body.lang-ar .header .navigate ul {
    flex-direction: row-reverse;
}

html[lang="ar"] .header .navigate .lang,
body.lang-ar .header .navigate .lang {
    order: -1;
}

html[lang="ar"] .header .navigate .cart,
body.lang-ar .header .navigate .cart {
    order: 1;
}

/* ========================================
   MOBILE HEADER RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .mobile-header,
body.lang-ar .mobile-header {
    direction: rtl;
}

html[lang="ar"] .mobile-header .navigate,
body.lang-ar .mobile-header .navigate {
    flex-direction: row-reverse;
}

html[lang="ar"] .mobile-header .mobile-list,
body.lang-ar .mobile-header .mobile-list {
    text-align: right;
    direction: rtl;
}

html[lang="ar"] .mobile-header .menu-list,
body.lang-ar .mobile-header .menu-list {
    text-align: right;
}

/* ========================================
   MAIN CONTENT RTL ADJUSTMENTS
======================================== */

html[lang="ar"] main,
body.lang-ar main {
    direction: rtl;
}

/* Card List RTL */
html[lang="ar"] .card-list,
body.lang-ar .card-list {
    direction: rtl;
}

html[lang="ar"] .card,
body.lang-ar .card {
    text-align: right;
}

html[lang="ar"] .card-info,
body.lang-ar .card-info {
    text-align: right;
}

html[lang="ar"] .card-title,
body.lang-ar .card-title {
    text-align: right;
}

html[lang="ar"] .card-price,
body.lang-ar .card-price {
    text-align: right;
}

/* ========================================
   WOOCOMMERCE RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .woocommerce,
html[lang="ar"] .woocommerce-page,
body.lang-ar .woocommerce,
body.lang-ar .woocommerce-page {
    direction: rtl;
}

/* Product Grid RTL */
html[lang="ar"] .woocommerce .products,
html[lang="ar"] .woocommerce ul.products,
body.lang-ar .woocommerce .products,
body.lang-ar .woocommerce ul.products {
    direction: rtl;
}

html[lang="ar"] .woocommerce .product,
html[lang="ar"] .woocommerce li.product,
body.lang-ar .woocommerce .product,
body.lang-ar .woocommerce li.product {
    text-align: right;
}

/* Single Product RTL */
html[lang="ar"] .woocommerce div.product .product-details,
body.lang-ar .woocommerce div.product .product-details {
    direction: rtl;
}

html[lang="ar"] .woocommerce div.product .summary,
body.lang-ar .woocommerce div.product .summary {
    text-align: right;
}

html[lang="ar"] .woocommerce div.product .product_title,
body.lang-ar .woocommerce div.product .product_title {
    text-align: right;
}

html[lang="ar"] .woocommerce div.product .price,
body.lang-ar .woocommerce div.product .price {
    text-align: right;
}

html[lang="ar"] .woocommerce div.product .woocommerce-product-details__short-description,
body.lang-ar .woocommerce div.product .woocommerce-product-details__short-description {
    text-align: right;
}

/* Quantity Controls RTL */
html[lang="ar"] .woocommerce div.product .quantity,
body.lang-ar .woocommerce div.product .quantity {
    flex-direction: row-reverse;
}

/* Cart RTL */
html[lang="ar"] .woocommerce table.cart,
body.lang-ar .woocommerce table.cart {
    direction: rtl;
}

html[lang="ar"] .woocommerce table.cart th,
html[lang="ar"] .woocommerce table.cart td,
body.lang-ar .woocommerce table.cart th,
body.lang-ar .woocommerce table.cart td {
    text-align: right;
}

/* Checkout RTL */
html[lang="ar"] .woocommerce-checkout,
body.lang-ar .woocommerce-checkout {
    direction: rtl;
}

html[lang="ar"] .woocommerce form .form-row,
body.lang-ar .woocommerce form .form-row {
    text-align: right;
}

html[lang="ar"] .woocommerce form .form-row label,
body.lang-ar .woocommerce form .form-row label {
    text-align: right;
}

html[lang="ar"] .woocommerce form .form-row input,
html[lang="ar"] .woocommerce form .form-row select,
html[lang="ar"] .woocommerce form .form-row textarea,
body.lang-ar .woocommerce form .form-row input,
body.lang-ar .woocommerce form .form-row select,
body.lang-ar .woocommerce form .form-row textarea {
    text-align: right;
}

/* ========================================
   PODCAST PAGES RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .podcast,
html[lang="ar"] .single-podcast,
body.lang-ar .podcast,
body.lang-ar .single-podcast {
    direction: rtl;
}

html[lang="ar"] .podcast .card-list,
body.lang-ar .podcast .card-list {
    direction: rtl;
}

html[lang="ar"] .single-podcast .product-details,
body.lang-ar .single-podcast .product-details {
    direction: rtl;
}

html[lang="ar"] .single-podcast .product-info,
body.lang-ar .single-podcast .product-info {
    text-align: right;
}

/* Audio Player RTL */
html[lang="ar"] .audio-player,
body.lang-ar .audio-player {
    direction: rtl;
}

html[lang="ar"] .audio-controls,
body.lang-ar .audio-controls {
    flex-direction: row-reverse;
}

/* ========================================
   SERVICES PAGES RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .services,
html[lang="ar"] .single-service,
body.lang-ar .services,
body.lang-ar .single-service {
    direction: rtl;
}

html[lang="ar"] .service-card,
body.lang-ar .service-card {
    text-align: right;
}

/* ========================================
   FOOTER RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .footer,
html[lang="ar"] .mobile-footer,
body.lang-ar .footer,
body.lang-ar .mobile-footer {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .footer .main_footer,
body.lang-ar .footer .main_footer {
    direction: rtl;
}

html[lang="ar"] .footer .footer_lists,
body.lang-ar .footer .footer_lists {
    direction: rtl;
}

html[lang="ar"] .footer .list,
body.lang-ar .footer .list {
    text-align: right;
}

html[lang="ar"] .footer .footer_bottom,
body.lang-ar .footer .footer_bottom {
    direction: rtl;
    justify-content: space-between;
}

html[lang="ar"] .footer .copyright,
body.lang-ar .footer .copyright {
    flex-direction: row-reverse;
}

/* ========================================
   FORMS RTL ADJUSTMENTS
======================================== */

html[lang="ar"] form,
body.lang-ar form {
    direction: rtl;
}

html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
body.lang-ar input,
body.lang-ar textarea,
body.lang-ar select {
    text-align: right;
    direction: rtl;
}

html[lang="ar"] input::placeholder,
html[lang="ar"] textarea::placeholder,
body.lang-ar input::placeholder,
body.lang-ar textarea::placeholder {
    text-align: right;
}

/* ========================================
   BUTTONS RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .button,
html[lang="ar"] .btn,
html[lang="ar"] button,
body.lang-ar .button,
body.lang-ar .btn,
body.lang-ar button {
    direction: rtl;
}

/* Share Buttons RTL */
html[lang="ar"] .share-buttons,
body.lang-ar .share-buttons {
    direction: rtl;
    justify-content: flex-start;
}

html[lang="ar"] .share-buttons button,
html[lang="ar"] .share-buttons a,
body.lang-ar .share-buttons button,
body.lang-ar .share-buttons a {
    margin: 0 0 0 2px;
}

/* ========================================
   NAVIGATION RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .breadcrumb,
html[lang="ar"] .woocommerce-breadcrumb,
body.lang-ar .breadcrumb,
body.lang-ar .woocommerce-breadcrumb {
    direction: rtl;
}

html[lang="ar"] .pagination,
html[lang="ar"] .woocommerce-pagination,
body.lang-ar .pagination,
body.lang-ar .woocommerce-pagination {
    direction: rtl;
}

/* ========================================
   ACCORDION RTL ADJUSTMENTS
======================================== */

html[lang="ar"] .accordion,
body.lang-ar .accordion {
    direction: rtl;
}

html[lang="ar"] .accordion .trigger,
body.lang-ar .accordion .trigger {
    text-align: right;
}

html[lang="ar"] .accordion .trigger::after,
body.lang-ar .accordion .trigger::after {
    left: 0;
    right: auto;
}

html[lang="ar"] .accordion .content,
body.lang-ar .accordion .content {
    text-align: right;
}

/* ========================================
   RESPONSIVE RTL ADJUSTMENTS
======================================== */

@media (max-width: 768px) {
    html[lang="ar"] .mobile-header .navigate,
    body.lang-ar .mobile-header .navigate {
        flex-direction: row-reverse;
    }
    
    html[lang="ar"] .card-list,
    body.lang-ar .card-list {
        direction: rtl;
    }
    
    html[lang="ar"] .woocommerce .products,
    body.lang-ar .woocommerce .products {
        direction: rtl;
    }
}

@media (min-width: 1200px) {
    html[lang="ar"] .woocommerce div.product .product-details,
    body.lang-ar .woocommerce div.product .product-details {
        flex-direction: row-reverse;
    }
    
    html[lang="ar"] .single-podcast .product-details,
    body.lang-ar .single-podcast .product-details {
        flex-direction: row-reverse;
    }
}

/* ========================================
   UTILITY CLASSES FOR RTL
======================================== */

.rtl-only {
    display: none;
}

html[lang="ar"] .rtl-only,
body.lang-ar .rtl-only {
    display: block;
}

.ltr-only {
    display: block;
}

html[lang="ar"] .ltr-only,
body.lang-ar .ltr-only {
    display: none;
}

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

html[lang="ar"] .text-right-rtl,
body.lang-ar .text-right-rtl {
    text-align: right;
}

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

html[lang="ar"] .text-left-rtl,
body.lang-ar .text-left-rtl {
    text-align: left;
}

/* Margin and padding utilities for RTL */
.mr-rtl {
    margin-left: 1rem;
    margin-right: 0;
}

html[lang="ar"] .mr-rtl,
body.lang-ar .mr-rtl {
    margin-right: 1rem;
    margin-left: 0;
}

.ml-rtl {
    margin-right: 1rem;
    margin-left: 0;
}

html[lang="ar"] .ml-rtl,
body.lang-ar .ml-rtl {
    margin-left: 1rem;
    margin-right: 0;
}

.pr-rtl {
    padding-left: 1rem;
    padding-right: 0;
}

html[lang="ar"] .pr-rtl,
body.lang-ar .pr-rtl {
    padding-right: 1rem;
    padding-left: 0;
}

.pl-rtl {
    padding-right: 1rem;
    padding-left: 0;
}

html[lang="ar"] .pl-rtl,
body.lang-ar .pl-rtl {
    padding-left: 1rem;
    padding-right: 0;
}

/* ========================================
   PRINT STYLES FOR RTL
======================================== */

@media print {
    html[lang="ar"],
    html[lang="ar-SA"],
    body.lang-ar {
        direction: rtl !important;
        text-align: right !important;
    }
    
    html[lang="ar"] .header,
    html[lang="ar"] .footer,
    body.lang-ar .header,
    body.lang-ar .footer {
        direction: rtl !important;
    }
}

.header {
    & .navigate {
        direction: ltr;
    }
}

.header {
    & .navigate {
        & ul {
            & a {
                font-size: 17px;
            }
        }
    }
}

.header {
    & .navigate {
        & p {
            font-size: 17px;
        }
    }
}

.header {
    & .navigate {
        & p {
            direction: rtl !important;
        }
    }
}

.footer {
    & .main_footer {
        & .footer_lists {
            & .list {
                & ul {
                    & a {
                        font-size: 16px;
                    }
                }
            }
        }
    }
}

.footer {
    & .main_footer {
        & .footer_lists {
            & .list {
                & p {
                    opacity: 0.7;
                    font-size: 20px;
                }
            }
        }
    }
}

html[lang="ar"] .footer .copyright, body.lang-ar .footer .copyright {
    direction: ltr;
}

html[lang="ar"] .audio-player, body.lang-ar .audio-player > * {
    direction: ltr !important;
}

.audio-player {
    & .player-content {
        & .volume-container {
            .volume-slider {
                direction: ltr;
            }
        }
    }
}

.audio-player {
    & .player-content {
        & .controls {
            .progress-slider {
                direction: ltr;
            }
        }
    }
}

.audio-player {
    & .player-content {
        & .controls {
            .progress-slider {
                direction: ltr;
            }
        }
    }
}

.section .slider-right {
    text-align: center !important;
}

.rtl .who-we-are-page .slider h1 {
    transform: unset !important;
}

.slider {
    & .slider-text {
        & h1 {
            width: auto;
            text-align: center;
        }
    }
}

.splide__track--draggable {
    direction: ltr !important;
}

main {
    & .card-list {
        & .card {
            .card-info {
                direction: ltr !important;
            }
        }
    }
}

.about {
    & .text-container {
        & span {
            margin: 25px;
            display: block;
        }
    }
}

.clients .arabic-text {
    text-align:center !important;
    font-size:20px;
}

.service-left {
    transform:unset !important;
}

.services {
    & .text-container {
        & p {
            font-size: 18px;
        }
    }
}