/* =====================================================
   RTL OVERRIDES (FINAL - ENHANCED MOBILE VERSION)
===================================================== */

html[dir="rtl"],
body{
  direction:rtl;
  font-family:'Vazirmatn',Tahoma,Arial,sans-serif;
}

/* General text */
p{
  text-align:justify;
}

/* Product cards center */
.product-card,
.product-card p,
.product-card h4{
  text-align:center;
}

/* Header menu */
.nav-desktop a{
  text-align:right;
}

/* Sticky table column in RTL */
.table-responsive td:first-child,
.table-responsive th:first-child{
  right:0;
  left:auto;
}

/* Quick contact on left */
.quick-contact{
  left:18px;
  right:auto;
}

/* Footer center */
.site-footer{
  text-align:center;
}

/* ===============================
   SECTION TITLES CENTER FIX
================================ */

.section h3{
  display:block !important;
  text-align:center !important;
  margin-left:auto;
  margin-right:auto;
}

/* Footer content center */
.site-footer,
.site-footer p{
  text-align:center !important;
}

/* ===============================
   BENEFITS TEXT ALIGN
================================ */

.section p{
  text-align:justify;
}

.benefit-item p{
  text-align:center;
}

/* ===============================
   MOBILE ENHANCEMENTS
================================ */

@media (max-width:768px){
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .category-header,
  .category-header h4,
  .section h3,
  .product-card h4{
    text-align:center !important;
  }
  
  /* Enhanced animations */
  .feature-box,
  .product-card,
  .benefit-item {
    animation: fadeInUp 0.5s ease-out;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Touch feedback */
  .nav-desktop a:active,
  .product-card:active,
  .feature-box:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }
  
  /* Better typography */
  body {
    line-height: 1.6;
  }
  
  .feature-box h4,
  .benefit-item h5,
  .product-card h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  
  /* Improved shadows */
  .product-card,
  .feature-box,
  .benefit-item {
    box-shadow: 
      0 4px 12px rgba(0,0,0,0.08),
      0 2px 4px rgba(0,0,0,0.05);
  }
  
  /* Better spacing */
  .section {
    padding: 40px 16px;
  }
  
  .feature-box,
  .product-card {
    padding: 24px 20px;
  }
  
  .row > [class*="col-"] {
    margin-bottom: 24px;
  }
  
  /* Mobile menu backdrop blur */
  .nav-desktop {
    backdrop-filter: blur(10px);
    background: rgba(46, 125, 50, 0.95);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  }
  
  /* Gradient border for cards (optional) */
  .product-card {
    border: 1px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--grad1), var(--accent)) border-box;
  }
}

/* ===============================
   MOBILE IMPROVEMENTS FOR RTL
================================ */

@media (max-width: 768px) {
  .brand h1 {
    font-size: 16px !important;
    text-align: right;
  }
  
  .nav-desktop a {
    text-align: right;
    justify-content: flex-end;
    padding-right: 20px;
  }
}