/**
 * 5D Website - RTL & Arabic Styles
 * Cairo font and RTL-specific adjustments
 */

/* ============================================
   ARABIC FONT OVERRIDE - CAIRO FOR ALL ELEMENTS
   ============================================ */
body,
* {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.hero-subtitle,
.hero-badge,
.section-title,
.section-subtitle,
.section-label,
.dimension-label,
.dimension-desc,
.bento-title,
.bento-text,
.product-title,
.product-text,
.product-featured-card h3,
.product-featured-card p,
.product-featured-features,
.product-rest-card h4,
.product-rest-card p,
.product-badge,
.product-badge-lg,
.product-badge-sm,
.cta-title,
.cta-text,
.page-title,
.service-title,
.btn,
.navbar-menu,
.navbar-actions,
.clients-label,
.stats-card,
.stat-label,
.why-title,
.why-text,
.tech-item span,
.footer,
input,
textarea,
select,
button,
a,
span,
p,
li,
div {
  font-family: 'Cairo', sans-serif !important;
}

/* ============================================
   RTL DIRECTION FIXES
   ============================================ */

/* Navbar */
.navbar-menu {
  flex-direction: row;
}

.navbar-actions {
  flex-direction: row;
}

/* Hero */
.hero-content {
  text-align: right;
}

@media (min-width: 1024px) {
  .hero-visual {
    right: auto;
    left: 5%;
  }

  .hero-content {
    max-width: 55%;
    margin-right: 0;
    margin-left: auto;
  }
}

/* Section headers */
.section-header {
  text-align: center;
}

/* Breadcrumb */
.breadcrumb {
  flex-direction: row;
}

/* Content grids */
.content-grid {
  direction: rtl;
}

.content-grid > * {
  direction: rtl;
}

.content-text {
  text-align: right;
}

.content-text h3 {
  text-align: right;
}

.content-grid.reverse {
  direction: ltr;
}

.content-grid.reverse > * {
  direction: rtl;
}

/* Contact items (inside content-grid which already has direction: rtl,
   so flex-direction: row flows right-to-left naturally) */
.contact-item {
  flex-direction: row;
  text-align: right;
}

/* Product features */
.product-feature {
  flex-direction: row;
}

.product-feature i {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* Lists */
.legal-content ul {
  margin-right: 1.5rem;
  margin-left: 0;
  padding-right: 0;
}

/* Footer */
.footer-grid {
  direction: rtl;
}

.footer-social {
  justify-content: flex-start;
}

.footer-links {
  text-align: right;
}

.footer-bottom {
  flex-direction: row;
}

/* Floating label form elements */
.form-floating .form-control {
  text-align: right;
}

.form-floating label {
  left: auto;
  right: 1rem;
  transform-origin: right center;
}

.form-floating select.form-control {
  background-position: left 1rem center;
  padding-left: 2.5rem;
  padding-right: 1rem;
}

/* Cards */
.value-card,
.benefit-card,
.bento-card {
  text-align: right;
}

.value-icon,
.benefit-icon,
.bento-icon {
  margin-right: 0;
  margin-left: auto;
}

/* Job cards */
.job-card {
  flex-direction: row;
}

.job-info {
  text-align: right;
}

.job-meta {
  flex-direction: row;
}

.job-meta span {
  flex-direction: row;
}

.job-actions {
  flex-direction: row;
}

@media (max-width: 768px) {
  .job-card {
    align-items: stretch;
    text-align: right;
  }
}

.jd-modal-header {
  flex-direction: row;
}

.jd-modal-footer {
  justify-content: flex-start;
}

.jd-modal-body .jd-overview,
.jd-modal-body .jd-section-title {
  text-align: right;
}

.jd-modal-body .jd-list li {
  flex-direction: row;
  text-align: right;
}

/* Process steps - flip connector lines */
.process-step::after {
  right: auto;
  left: -1rem;
  background: linear-gradient(270deg, var(--color-primary), transparent);
}

/* Pricing features */
.pricing-features li {
  flex-direction: row;
  text-align: right;
}

.pricing-features li i {
  margin-left: 0.75rem;
  margin-right: 0;
}

/* Service feature tags */
.service-feature-tag {
  flex-direction: row;
}

.service-feature-tag i {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* Bento tags */
.bento-tags {
  justify-content: flex-start;
}

/* Tech items */
.tech-item {
  flex-direction: row;
}

/* Contact card items */
.contact-card-item {
  flex-direction: row;
  text-align: right;
}

.contact-card-content {
  text-align: right;
}

.contact-card-content a[href^="tel:"],
.contact-card-content a[href^="mailto:"] {
  direction: ltr;
  unicode-bidi: embed;
}

/* Stats card */
.stats-card {
  direction: rtl;
}

/* Why cards */
.why-card {
  text-align: right;
}

.why-icon {
  margin-right: 0;
  margin-left: auto;
}

/* Scroll indicator */
.scroll-indicator {
  direction: ltr;
}

/* WhatsApp FAB - keep on right for Arabic too */
.whatsapp-fab {
  right: 2rem;
  left: auto;
}

/* Language switcher */
.footer-lang {
  flex-direction: row;
}

.footer-lang img {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* Team stats */
.team-stats {
  direction: rtl;
}

/* Mobile menu */
@media (max-width: 968px) {
  .navbar-menu {
    text-align: right;
  }

  .navbar-menu a {
    justify-content: flex-end;
  }
}

/* Dimensions grid - center aligned, no RTL needed */
.dimensions-grid {
  direction: ltr;
}

/* Client logos - center aligned */
.clients-grid {
  direction: ltr;
}

/* Products grid */
@media (min-width: 968px) {
  .product-item {
    direction: rtl;
  }

  .product-item:nth-child(even) {
    direction: ltr;
  }

  .product-item:nth-child(even) .product-content {
    direction: rtl;
  }
}

/* Map card */
.map-card {
  direction: ltr;
}

/* Products Featured Section - RTL Adjustments */
.products-featured-row {
  direction: rtl;
}

.product-featured-card {
  direction: rtl;
  text-align: right;
}

.product-featured-content {
  text-align: right;
}

.product-featured-features {
  direction: rtl;
  text-align: right;
}

.product-featured-features span {
  flex-direction: row;
  text-align: right;
}

.product-featured-features i {
  margin-left: 0.5rem;
  margin-right: 0;
}

.products-more-label {
  text-align: center;
}

.products-rest-grid {
  direction: rtl;
}

.product-rest-card {
  direction: rtl;
  text-align: right;
}

.product-rest-content {
  text-align: right;
}

.product-rest-link {
  flex-direction: row;
}

.product-rest-link i {
  margin-left: 0;
  margin-right: 0.5rem;
}

.product-badge-lg,
.product-badge-sm {
  font-family: 'Cairo', sans-serif !important;
}

/* Product/Service Pages - Feature Cards RTL */
.feature-card {
  text-align: right;
}

.feature-icon {
  margin-right: 0;
  margin-left: auto;
}

.feature-list {
  direction: rtl;
}

.feature-list li {
  flex-direction: row;
  text-align: right;
}

.feature-list li i {
  margin-left: 0;
  margin-right: 0;
}

.content-card {
  text-align: right;
}

.content-icon {
  margin-right: 0;
  margin-left: auto;
}

/* Service Hero Section RTL */
.service-hero-content {
  direction: rtl;
  text-align: right;
}

.service-badge {
  flex-direction: row;
}

.service-features {
  direction: rtl;
  justify-content: flex-start;
}

.service-feature-tag {
  flex-direction: row;
}
