/* Header RTL Styles */
.header-container {
    direction: rtl;
}

.logo-section {
    margin-right: 0;
    margin-left: auto; /* This will push the logo to the far right in RTL */
}

.main-nav {
    flex-direction: row-reverse;
    left: auto;
    right: 50%;
    transform: translateX(50%);
}
.main-nav a:nth-child(1) { order: 5; }
.main-nav a:nth-child(2) { order: 4; }
.main-nav a:nth-child(3) { order: 3; }
.main-nav a:nth-child(4) { order: 2; }
.main-nav a:nth-child(5) { order: 1; }

.nav-link::after {
    left: auto;
    right: 0;
}

.lang-button {
    flex-direction: row-reverse;
}

/* Footer RTL Styles */
.footer-grid {
    direction: rtl;
}

.footer-middle {
    direction: rtl;
}

.footer-section {
    text-align: right;
}

.footer-links {
    align-items: flex-end;
}

.social-section {
    text-align: right;
}

.social-links {
    flex-direction: row-reverse;
}

/* RTL Mobile Menu */
.mobile-menu {
    text-align: right;
}
.mobile-menu a:nth-child(1) { order: 5; }
.mobile-menu a:nth-child(2) { order: 4; }
.mobile-menu a:nth-child(3) { order: 3; }
.mobile-menu a:nth-child(4) { order: 2; }
.mobile-menu a:nth-child(5) { order: 1; }

/* RTL Desktop Styles */
@media screen and (min-width: 1025px) {
    .footer-section {
        text-align: right;
    }

    .footer-links {
        align-items: flex-start;
    }

    .social-section {
        text-align: right;
    }

    .social-links {
        justify-content: flex-start;
    }

    .copyright {
        text-align: right;
    }
}

/* RTL Mobile Styles */
@media screen and (max-width: 1024px) {
    .footer-section,
    .social-section,
    .footer-links,
    .copyright {
        text-align: center;
        align-items: center;
    }
}


/* Blog RTL Styles */
.blog-category {
    font-family: inherit;
}

.blog-card-meta {
    direction: rtl;
}

.blog-date,
.blog-read-time {
    flex-direction: row-reverse;
}

.blog-pagination .prev .icon {
    transform: scaleX(-1);
}

.blog-pagination .next .icon {
    transform: scaleX(-1);
}

/* Comments RTL Styles */
.comment-item {
    flex-direction: row-reverse;
}

.comment-meta {
    flex-direction: row-reverse;
}

.comment-date {
    flex-direction: row-reverse;
}

.comment-form {
    direction: rtl;
}

.comment-form label {
    text-align: right;
}

.comment-submit-btn {
    justify-self: end;
}

.nav-previous img {
    transform: scaleX(-1);
}

.nav-next img {
    transform: scaleX(-1);
}

/* Post Navigation RTL Styles */
.rtl .post-nav-link.prev img {
    transform: scaleX(-1); /* Flip the left arrow */
}

.rtl .post-nav-link.next img {
    transform: scaleX(-1); /* Flip the right arrow */
}



/* Align text to the right */
.rtl .post-nav-content {
    text-align: right;
}