/*
 * RTL (Right-to-Left) Stylesheet for Numero eSIM Theme
 *
 * This stylesheet provides RTL-specific overrides for Arabic and other RTL languages
 *
 * @package Numero
 */

/* ==========================================================================
   Base RTL Overrides
   ========================================================================== */

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

/* ==========================================================================
   Typography - Use Tajawal for RTL languages
   ========================================================================== */
body.rtl,
html[dir="rtl"] body {
    font-family: var(--numero-font-family-rtl, 'Tajawal', 'Segoe UI', 'Arial', sans-serif);
}

/* ==========================================================================
   Header
   ========================================================================== */
/* RTL header inherits natural flow - no overrides needed for flexbox layout */

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
body.rtl .breadcrumb-list {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Blog Cards
   ========================================================================== */
body.rtl .blog-card-content {
    text-align: start;
}

body.rtl .blog-card-meta {
    flex-direction: row-reverse;
    justify-content: start;
}

body.rtl .blog-card-link {
    /* flex-direction: row-reverse; */
}

body.rtl .blog-card-link:hover .arrow {
    transform: translateX(-4px);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
body.rtl .pagination .prev,
body.rtl .pagination .next {
    transform: scaleX(-1);
}

/* ==========================================================================
   App Promo Section
   ========================================================================== */
body.rtl .app-promo-card {
    flex-direction: row-reverse;
}

body.rtl .app-promo-content {
    text-align: center;
}

body.rtl .app-store-buttons {
    flex-direction: row-reverse;
}

body.rtl .app-store-btn {
    /* Icon stays at the start in RTL (right side) */
}

body.rtl .app-store-btn-text {
    text-align: start;
    align-items: flex-start;
}

/* body.rtl .app-rating {
    flex-direction: row-reverse;
} */

body.rtl .rating-card {
    flex-direction: column;
}

body.rtl .rating-card .app-store-btn {
    /* Icon stays at the start in RTL (right side) */
}

body.rtl .rating-info {
    flex-direction: row-reverse;
}

body.rtl .rating-item {
    flex-direction: row-reverse;
}

/* RTL Mobile - Stack rating cards vertically */
@media screen and (max-width: 768px) {
    body.rtl .app-rating {
        flex-direction: column;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
body.rtl .site-footer {
    border-radius: 200px 200px 0 0;
}

body.rtl .footer-main {
    direction: rtl;
}

body.rtl .footer-column {
    text-align: right;
}

body.rtl .footer-column h4 {
    text-align: right;
}

body.rtl .footer-links {
    align-items: flex-start;
}

body.rtl .footer-links li {
    text-align: right;
    width: 100%;
}

body.rtl .footer-links a {
    display: inline-flex;
    justify-content: flex-start;
}

body.rtl .footer-brand {
    text-align: right;
}

body.rtl .footer-bottom {
    flex-direction: column;
    text-align: center;
}

body.rtl .footer-bottom-links {
    flex-direction: row-reverse;
    justify-content: center;
}

/* Social links list RTL */
body.rtl .social-links-list {
    align-items: flex-start;
}

body.rtl .social-link-item {
    flex-direction: row;
    justify-content: flex-start;
}

body.rtl .social-link-item svg {
    order: 0;
}

body.rtl .social-link-item span {
    order: 1;
}

body.rtl .social-links {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Single Post
   ========================================================================== */
body.rtl .single-post-header {
    text-align: start;
}

body.rtl .single-post-meta {
    /* flex-direction: row-reverse; */
    justify-content: flex-start;
}

body.rtl .single-post-content {
    text-align: start;
}

body.rtl .entry-content {
    text-align: start;
}

body.rtl .single-post-author-mini {
    justify-content: flex-start;
}

body.rtl .author-mini-info {
    align-items: flex-start;
    text-align: start;
}

body.rtl .author-box {
    text-align: start;
}

body.rtl .author-box-content {
    text-align: start;
}

body.rtl .entry-content ul,
body.rtl .entry-content ol {
    padding-right: var(--numero-spacing-lg);
    padding-left: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */
body.rtl input,
body.rtl textarea,
body.rtl select {
    text-align: right;
}

body.rtl .search-form {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
body.rtl .btn {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Margins & Padding Swap
   ========================================================================== */
body.rtl .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

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

/* ==========================================================================
   Mobile Responsive RTL
   ========================================================================== */

/* Tablet RTL (iPad Pro/Air) - Apply mobile-like styles */
@media screen and (max-width: 1024px) {
    body.rtl .site-footer {
        border-radius: 0 !important;
    }
    
    body.rtl .footer-main {
        text-align: center !important;
        grid-template-columns: 1fr !important;
    }
    
    body.rtl .footer-brand {
        text-align: center !important;
    }
    
    body.rtl .footer-description {
        text-align: center !important;
    }
    
    body.rtl .footer-logo {
        display: flex !important;
        justify-content: center !important;
    }
    
    body.rtl .footer-column {
        text-align: center !important;
    }
    
    body.rtl .footer-column h4 {
        text-align: center !important;
    }
    
    body.rtl .footer-links {
        align-items: center !important;
    }
    
    body.rtl .footer-links li {
        text-align: center !important;
        width: 100%;
    }
    
    body.rtl .footer-links a {
        justify-content: center !important;
    }
    
    body.rtl .social-links-list {
        align-items: center !important;
    }
    
    body.rtl .social-link-item {
        flex-direction: row;
        justify-content: center !important;
    }
    
    body.rtl .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .footer-bottom-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    body.rtl .app-promo-card {
        flex-direction: column;
    }
    
    body.rtl .app-promo-image {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 768px) {
    body.rtl .nav-menu {
        flex-direction: column;
        align-items: flex-end;
    }
    
    body.rtl .header-inner {
        flex-direction: row-reverse;
    }
    
    body.rtl .mobile-menu-toggle {
        order: -1;
    }
    
    body.rtl .app-promo-card {
        flex-direction: column;
    }
    
    body.rtl .app-promo-image {
        margin-left: auto;
        margin-right: auto;
    }
    
    body.rtl .app-store-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    body.rtl .site-footer {
        border-radius: 0;
    }
    
    body.rtl .footer-main {
        text-align: center;
    }
    
    body.rtl .footer-brand {
        text-align: center;
    }
    
    body.rtl .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .footer-bottom-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    body.rtl .footer-column {
        text-align: center;
    }
    
    body.rtl .footer-column h4 {
        text-align: center;
    }
    
    body.rtl .footer-links {
        align-items: center;
    }
    
    body.rtl .footer-links li {
        text-align: center;
        width: 100%;
    }
    
    body.rtl .footer-links a {
        justify-content: center;
    }
    
    body.rtl .social-links-list {
        align-items: center;
    }
    
    body.rtl .social-link-item {
        flex-direction: row;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    body.rtl .footer-main {
        text-align: center;
    }
    
    body.rtl .footer-column {
        text-align: center;
    }
    
    body.rtl .footer-column h4 {
        text-align: center;
    }
    
    body.rtl .footer-links {
        align-items: center;
    }
    
    body.rtl .footer-links li {
        text-align: center;
        width: 100%;
    }
    
    body.rtl .footer-links a {
        justify-content: center;
    }
    
    body.rtl .footer-brand {
        text-align: center;
    }
    
    body.rtl .social-links {
        justify-content: center;
    }
    
    body.rtl .social-links-list {
        align-items: center;
    }
    
    body.rtl .social-link-item {
        flex-direction: row;
        justify-content: center;
    }
    
    body.rtl .footer-bottom-links {
        gap: var(--numero-spacing-md);
    }
}

/* ==========================================================================
   Widget Areas RTL
   ========================================================================== */
body.rtl .widget {
    text-align: right;
}

body.rtl .widget ul {
    padding-right: 0;
}

body.rtl .widget li {
    text-align: right;
}

/* ==========================================================================
   Comments RTL
   ========================================================================== */
body.rtl .comment-list {
    padding-right: 0;
}

body.rtl .comment-content {
    text-align: right;
}

body.rtl .comment-author {
    text-align: right;
}

body.rtl .reply {
    text-align: left;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */
body.rtl .nav-previous,
body.rtl .nav-next {
    direction: rtl;
}

body.rtl .nav-links {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Error Page RTL
   ========================================================================== */
body.rtl .error-404 {
    text-align: center;
}

/* ==========================================================================
   Related Posts RTL
   ========================================================================== */
body.rtl .related-posts .section-title {
    text-align: right;
}

/* ==========================================================================
   Category & Tags
   ========================================================================== */
body.rtl .cat-links,
body.rtl .tags-links {
    direction: rtl;
    text-align: right;
}

body.rtl .entry-footer {
    text-align: right;
}
