/* =========================================================
   Theme V1 - RTL Stylesheet (Arabic Support)
   Applied only when lang=ar is active.
   ========================================================= */

body.lang-ar,
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Header RTL */
html[dir="rtl"] .header-inner {
    flex-direction: row-reverse;
}

html[dir="rtl"] .site-branding {
    flex-direction: row-reverse;
}

html[dir="rtl"] .main-navigation ul {
    flex-direction: row-reverse;
}

html[dir="rtl"] .main-navigation ul ul {
    left: auto;
    right: 0;
}

html[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

/* Language Switcher RTL */
html[dir="rtl"] .language-dropdown {
    left: 0;
    right: auto;
}

html[dir="rtl"] .language-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .language-item .lang-info {
    text-align: right;
}

/* Mobile Nav RTL */
html[dir="rtl"] .mobile-nav {
    left: -320px;
    right: auto;
    transition: left 350ms ease;
}

html[dir="rtl"] .mobile-nav.active {
    left: 0;
    right: auto;
}

/* Content RTL */
html[dir="rtl"] .entry-meta {
    flex-direction: row-reverse;
}

html[dir="rtl"] blockquote {
    border-left: none;
    border-right: 4px solid var(--color-primary);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding-right: var(--space-6);
    padding-left: var(--space-4);
}

html[dir="rtl"] .alignleft {
    float: right;
    margin-right: 0;
    margin-left: var(--space-6);
}

html[dir="rtl"] .alignright {
    float: left;
    margin-left: 0;
    margin-right: var(--space-6);
}

/* Back to top RTL */
html[dir="rtl"] .back-to-top {
    right: auto;
    left: 2rem;
}

/* Footer RTL */
html[dir="rtl"] .footer-bottom {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

/* Sidebar RTL */
html[dir="rtl"] .content-inner.has-sidebar {
    grid-template-columns: 320px 1fr;
}

html[dir="rtl"] .content-inner.sidebar-left {
    grid-template-columns: 1fr 320px;
}

/* Widget RTL */
html[dir="rtl"] .widget-title {
    text-align: right;
}

/* Pagination RTL */
html[dir="rtl"] .pagination {
    flex-direction: row-reverse;
}

/* Skip link RTL */
html[dir="rtl"] .skip-link {
    left: auto;
    right: 0;
    border-radius: 0 0 0 var(--radius-md);
}

/* Search Form RTL */
html[dir="rtl"] .search-submit {
    border-radius: var(--radius-full) 0 0 var(--radius-full);
}

html[dir="rtl"] .search-field {
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* Dropdown submenu RTL */
html[dir="rtl"] .main-navigation ul li:hover>ul {
    right: 0;
    left: auto;
}

/* Mobile menu hover RTL */
html[dir="rtl"] .mobile-nav-menu ul li a:hover {
    padding-left: var(--space-4);
    padding-right: var(--space-6);
}

/* Entry card RTL */
html[dir="rtl"] .entry-card-body {
    text-align: right;
}

/* Buttons RTL */
html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

/* Read more arrow RTL */
html[dir="rtl"] .btn svg {
    transform: scaleX(-1);
}