/**
 * Sarv Studio - RTL Additional Styles
 * Additional RTL and Persian-specific overrides
 */

/* Re-confirm RTL direction for key elements */
body {
    direction: rtl;
    text-align: right;
}

.primary-nav {
    direction: rtl;
}

.footer-grid {
    direction: rtl;
}

/* Font overrides for Arabic numerals */
.stat-num,
.hero-stat-val {
    font-feature-settings: "lnum";
}

/* WordPress Core Overrides */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    padding: 8px 0;
}

.alignleft {
    float: right;
    margin: 0 0 16px 24px;
}

.alignright {
    float: left;
    margin: 0 24px 16px 0;
}

.aligncenter {
    display: block;
    margin: 0 auto 16px;
}

/* Gallery Images */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gallery img {
    width: 100%;
    border-radius: 8px;
}

/* Search Results */
.search-no-results {
    text-align: center;
    padding: 60px 0;
}

/* 404 */
.error-404 {
    text-align: center;
    padding: 80px 0;
}

.error-404 h1 {
    font-size: 100px;
    color: var(--color-primary);
    line-height: 1;
}

/* Admin Bar Offset */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

/* Custom Logo */
.custom-logo {
    max-height: 50px;
    width: auto;
}

/* WP Block Editor Image */
figure.wp-block-image {
    margin: 24px 0;
}

figure.wp-block-image img {
    border-radius: var(--radius);
}

/* Password Protected */
.post-password-form input[type="password"] {
    background: var(--color-dark-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    padding: 10px 14px;
    font-family: var(--font-fa);
    width: 100%;
    max-width: 320px;
}

.post-password-form input[type="submit"] {
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-dark);
    font-family: var(--font-fa);
    padding: 10px 24px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 8px;
}

/* Comments */
.comments-area {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.comment-respond {
    margin-top: 32px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: var(--color-dark-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-fa);
    padding: 10px 14px;
    margin-bottom: 12px;
    direction: rtl;
}

.comment-form textarea {
    height: 120px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    width: auto;
    background: var(--color-primary);
    color: var(--color-dark);
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 30px;
    padding: 10px 28px;
}

.comment-list {
    margin-bottom: 32px;
}

.comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.comment-author .fn {
    font-weight: 700;
    font-size: 14px;
}

.comment-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.comment-content {
    font-size: 14px;
    line-height: 1.8;
}