@charset "UTF-8";
/*
Theme Name: Nila
Description: RTL Stylesheet for right-to-left languages (Arabic, Persian, Hebrew, etc.)
Version: 1.0.0
*/

/**
 * Table of Contents
 * 
 * 1.0 - Text Direction
 * 2.0 - Layout
 * 3.0 - Navigation
 * 4.0 - Typography
 * 5.0 - Forms
 * 6.0 - Components
 */

/* ==========================================================================
   1.0 - Text Direction
   ========================================================================== */

body {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

/* ==========================================================================
   2.0 - Layout
   ========================================================================== */

.site-branding {
    text-align: right;
}

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

.main-navigation {
    text-align: right;
}

.content-area {
    float: right;
}

.sidebar {
    float: left;
}

/* ==========================================================================
   3.0 - Navigation
   ========================================================================== */

.nav-menu,
.footer-menu {
    text-align: right;
}

.nav-menu li,
.footer-menu li {
    float: right;
}

.nav-menu a,
.footer-menu a {
    padding-right: 1rem;
    padding-left: 1rem;
}

.menu-toggle {
    left: 0;
    right: auto;
}

/* Submenu positioning */
.nav-menu .sub-menu {
    left: auto;
    right: 0;
    text-align: right;
}

.nav-menu .sub-menu li {
    float: none;
}

/* ==========================================================================
   4.0 - Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    text-align: right;
}

blockquote {
    border-left: none;
    border-right: 4px solid #0073aa;
    padding-left: 0;
    padding-right: 1.5rem;
}

/* Lists */
ul, ol {
    margin-left: 0;
    margin-right: 1.5rem;
    padding-left: 0;
    padding-right: 0;
}

li {
    text-align: right;
}

/* ==========================================================================
   5.0 - Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    text-align: right;
    direction: rtl;
}

input[type="checkbox"],
input[type="radio"] {
    margin-left: 0.5rem;
    margin-right: 0;
}

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

.search-form .search-field {
    padding-left: 2.5rem;
    padding-right: 1rem;
}

.search-form .search-submit {
    left: 0;
    right: auto;
}

/* ==========================================================================
   6.0 - Components
   ========================================================================== */

/* Breadcrumb */
.nila-breadcrumb {
    direction: rtl;
}


/* Buttons */
.button,
.btn,
button {
    text-align: center;
}

/* Icons */
.icon-left {
    margin-left: 0.5rem;
    margin-right: 0;
}

.icon-right {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Social icons */
.footer-social a,
.social-icons a {
    margin-left: 0.5rem;
    margin-right: 0;
}

.footer-social a:first-child,
.social-icons a:first-child {
    margin-right: 0;
}

/* Post meta */
.entry-meta {
    text-align: right;
}

.entry-meta > span {
    margin-left: 1rem;
    margin-right: 0;
}

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

/* Comments */
.comment-list {
    text-align: right;
}

.comment-list .children {
    margin-left: 0;
    margin-right: 2rem;
}

.comment-author .avatar {
    float: right;
    margin-left: 1rem;
    margin-right: 0;
}

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

.widget ul {
    list-style-position: inside;
}

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

.pagination .page-numbers {
    margin-left: 0.25rem;
    margin-right: 0;
}

.pagination .page-numbers:first-child {
    margin-right: 0;
}

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

/* WooCommerce RTL styles */
.woocommerce-page {
    direction: rtl;
}

.woocommerce .product-category,
.woocommerce .product {
    text-align: right;
}

.woocommerce .price {
    direction: ltr;
    text-align: left;
}

.woocommerce .star-rating {
    float: right;
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Cart */
.woocommerce-cart .cart-collaterals {
    float: left;
}

/* Mobile menu */
.mobile-menu-content {
    left: auto;
    right: -300px;
}

.mobile-menu-content.active {
    right: 0;
}

/* Dark mode toggle */
.dark-mode-toggle {
    left: 20px;
    right: auto;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .header-actions {
        margin-left: auto;
        margin-right: 0;
    }
    
    .content-area,
    .sidebar {
        float: none;
    }
}

/* Persian/Arabic specific font adjustments */
body.rtl {
    font-family: "Vazirmatn", "Tahoma", Arial, sans-serif;
    line-height: 1.8;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
    font-weight: 700;
    line-height: 1.5;
}

/* Fix numbers in RTL context */
.rtl .number,
.rtl .price,
.rtl .date,
.rtl .time {
    direction: ltr;
    display: inline-block;
}

/* Utility classes for RTL */
.rtl .text-left {
    text-align: right !important;
}

.rtl .text-right {
    text-align: left !important;
}

.rtl .float-left {
    float: right !important;
}

.rtl .float-right {
    float: left !important;
}

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

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