/*
Theme Name: TechBlog Pro
Description: RTL Stylesheet for Arabic and other RTL languages
*/

/* =================================================================
   RTL Adjustments
   ================================================================= */

body {
    direction: rtl;
    text-align: right;
}

/* Typography */
blockquote {
    border-left: none;
    border-right: 4px solid var(--color-primary);
    padding-left: 0;
    padding-right: var(--spacing-lg);
}

.single-post .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--color-primary);
}

.single-post .entry-content h2::after {
    left: auto;
    right: 0;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    padding-right: 0;
    padding-left: var(--spacing-xl);
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    padding-right: 0;
    padding-left: 2rem;
}

/* Header */
.header-container {
    direction: rtl;
}

.site-branding {
    margin-left: auto;
    margin-right: 0;
}

.header-actions {
    margin-right: auto;
    margin-left: 0;
}

/* Navigation */
.main-navigation ul {
    text-align: right;
}

@media (min-width: 1024px) {
    .main-navigation ul {
        flex-direction: row-reverse;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    direction: rtl;
}

/* Entry Meta */
.entry-meta {
    direction: rtl;
}

.entry-meta > span {
    flex-direction: row-reverse;
    margin-left: 0;
    margin-right: var(--spacing-md);
}

.entry-meta > span:first-child {
    margin-right: 0;
}

.article-card .entry-meta > span {
    margin-left: 0;
    margin-right: var(--spacing-md);
}

.article-card .entry-meta > span:first-child {
    margin-right: 0;
}

/* Post Grid */
.post-grid {
    direction: rtl;
}

/* Article Card */
.article-card-content {
    text-align: right;
}

/* Read More */
.read-more {
    flex-direction: row-reverse;
}

.read-more svg {
    transform: rotate(180deg);
}

/* Social Share */
.share-buttons {
    direction: rtl;
}

/* Author Box */
.author-box {
    direction: rtl;
    text-align: right;
}

/* Related Posts */
.related-posts {
    direction: rtl;
}

.section-title::after {
    left: auto;
    right: 0;
}

.related-posts h2::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Sidebar */
.sidebar {
    direction: rtl;
}

@media (min-width: 1024px) {
    .site-content.has-sidebar {
        grid-template-columns: 1fr 2fr;
    }
}

/* Widget */
.widget {
    text-align: right;
}

.widget ul {
    padding-right: 0;
    padding-left: 0;
}

.widget-title::after {
    left: auto;
    right: 0;
}

.widget a:hover {
    padding-right: 0;
    padding-left: var(--spacing-xs);
}

/* Footer */
.site-footer {
    direction: rtl;
    text-align: right;
}

.footer-widgets {
    direction: rtl;
}

/* Table of Contents */
.table-of-contents {
    text-align: right;
}

.table-of-contents ul {
    padding-right: 0;
    padding-left: var(--spacing-lg);
}

.table-of-contents a:hover {
    padding-right: 0;
    padding-left: var(--spacing-sm);
}

/* Post Navigation */
.post-navigation {
    direction: rtl;
}

/* Comments */
.comment-list {
    padding-right: 0;
    padding-left: 0;
    direction: rtl;
}

.comment-list .children {
    padding-right: 0;
    padding-left: var(--spacing-xl);
}

/* Search Form */
.header-search-form form {
    direction: rtl;
}

/* Back to Top */
.back-to-top {
    right: auto !important;
    left: 20px !important;
}

/* Category Badge */
.category-badge {
    direction: rtl;
}

/* Tags */
.post-tags {
    direction: rtl;
}

/* Pagination */
.pagination {
    direction: rtl;
}

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

/* 404 Page */
.error-404 {
    text-align: center;
    direction: rtl;
}

/* Responsive Tables */
.entry-content table {
    direction: rtl;
}

.entry-content table th,
.entry-content table td {
    text-align: right;
}

/* Code blocks - keep LTR for code */
.entry-content pre,
.entry-content code {
    direction: ltr;
    text-align: left;
}

/* Keep numbers and dates LTR */
.entry-meta time,
.post-date,
.reading-time {
    direction: ltr;
    display: inline-block;
}