/**
 * Taachco LTR compatibility layer.
 * Loaded only when WordPress is running in an LTR locale.
 */
html[dir="ltr"] body {
  direction: ltr;
}

/* Directional icons are emitted with the correct class/path in PHP.
 * Contact Form 7 markup can still contain the legacy RTL arrow class, so keep
 * one narrowly scoped fallback for that editor-authored form markup.
 */
html[dir="ltr"] .ta-contact-info .bi-arrow-left::before { content: "\f138"; }

/* Hero. */
html[dir="ltr"] .ta-home-hero-widget__actions {
  direction: ltr;
}

/* Internal hero and breadcrumbs. */
html[dir="ltr"] .ta-internal-hero .ta-internal-hero__content {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}
html[dir="ltr"] .ta-internal-hero .ta-internal-hero__breadcrumb,
html[dir="ltr"] .ta-internal-hero .ta-internal-hero__breadcrumb ol {
  direction: ltr;
}

/* Service detail: mirror the two-column composition while keeping text LTR. */
html[dir="ltr"] .ta-service-detail .ta-service-detail__layout {
  grid-template-columns: minmax(0, 1fr) var(--ta-service-detail-media-width);
  grid-template-areas: "content media";
  direction: ltr;
}
html[dir="ltr"] .ta-service-detail .ta-service-detail__content,
html[dir="ltr"] .ta-service-detail .ta-service-detail__media {
  direction: ltr;
}

/* About page. */
html[dir="ltr"] .ta-about__tab {
  border-left: 0;
  border-right: 1px solid #e3e8ee;
}
html[dir="ltr"] .ta-about__tab:last-child {
  border-right: 0;
}
html[dir="ltr"] .ta-about__copy {
  text-align: left;
}
html[dir="ltr"] .ta-about__heading::after {
  right: auto;
  left: 0;
}
html[dir="ltr"] .ta-about__section-title::after,
html[dir="ltr"] .ta-about__board-main .ta-about__heading::after {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 767px) {
  html[dir="ltr"] .ta-about__tab {
    border-right: 0;
  }
  html[dir="ltr"] .ta-about__tab.is-active::after {
    right: auto;
    left: 16px;
  }
}

/* Services CTA defaults are authored for the Persian presentation. */
html[dir="ltr"] .ta-services-cta__content {
  text-align: left !important;
}

/* Contact Form 7 component. */
html[dir="ltr"] .ta-contact-info .ta-contact-form {
  direction: ltr;
}

/* Project archive. */
html[dir="ltr"] .ta-projects-archive,
html[dir="ltr"] .ta-projects-archive__pagination {
  direction: ltr;
}
html[dir="ltr"] .ta-projects-archive__dates > div + div {
  border-right: 0;
  border-left: 1px solid var(--tap-border);
}
@media (max-width: 575px) {
  html[dir="ltr"] .ta-projects-archive__dates > div + div {
    border-left: 0;
  }
}

/* Projects map. */
html[dir="ltr"] .ta-project-map {
  direction: ltr;
}
html[dir="ltr"] .ta-project-map__featured {
  right: auto;
  left: 18px;
}

/* Single project. Keep the existing main/sidebar physical placement, switch text flow. */
html[dir="ltr"] .ta-single-project,
html[dir="ltr"] .ta-single-project__layout {
  direction: ltr;
}
html[dir="ltr"] .ta-single-project__main,
html[dir="ltr"] .ta-single-project__sidebar {
  direction: ltr;
}
html[dir="ltr"] .ta-single-project__section-title {
  padding-right: 0;
  padding-left: 14px;
}
html[dir="ltr"] .ta-single-project__section-title::before {
  right: auto;
  left: 0;
}
html[dir="ltr"] .ta-single-project__timeline li:not(:last-child)::after {
  left: 50%;
  right: -50%;
}
@media (max-width: 767px) {
  html[dir="ltr"] .ta-single-project__timeline li {
    text-align: left;
    padding-right: 12px;
    padding-left: 70px;
  }
  html[dir="ltr"] .ta-single-project__timeline-icon {
    right: auto;
    left: 0;
  }
  html[dir="ltr"] .ta-single-project__timeline li:not(:last-child)::after {
    right: auto;
    left: 24px;
  }
}

/* Blog archive: mirror sidebars and switch all content flow to LTR. */
html[dir="ltr"] .ta-blog-archive__layout {
  grid-template-areas: "info main media";
  direction: ltr;
}
html[dir="ltr"] .ta-blog-archive__media-sidebar,
html[dir="ltr"] .ta-blog-archive__main,
html[dir="ltr"] .ta-blog-archive__info-sidebar {
  direction: ltr;
}
html[dir="ltr"] .ta-blog-search i {
  margin-left: 0;
  margin-right: 8px;
}
html[dir="ltr"] .ta-blog-select > span {
  padding-left: 0;
  border-left: 0;
  padding-right: 8px;
  border-right: 1px solid #edf1f4;
}
html[dir="ltr"] .ta-blog-archive__list-head h3::after {
  right: auto;
  left: 0;
}
@media (max-width: 767px) {
  html[dir="ltr"] .ta-blog-archive__layout {
    direction: ltr;
  }
}

/* Single blog. */
html[dir="ltr"] .ta-single-blog__left-sidebar,
html[dir="ltr"] .ta-single-blog__article,
html[dir="ltr"] .ta-single-blog__right-sidebar {
  direction: ltr;
}
html[dir="ltr"] .ta-single-blog__content blockquote {
  padding: 20px 20px 20px 56px;
}
html[dir="ltr"] .ta-single-blog__content blockquote::before {
  right: auto;
  left: 18px;
}
@media (max-width: 767px) {
  html[dir="ltr"] .ta-single-blog__layout {
    direction: ltr;
  }
  html[dir="ltr"] .ta-single-blog__content blockquote {
    padding-right: 20px;
    padding-left: 48px;
  }
}

/* Single news. */
html[dir="ltr"] .ta-single-news {
  direction: ltr;
}
html[dir="ltr"] .ta-single-news__meta span + span::before {
  margin-left: 0;
  margin-right: 28px;
}

/* Generic bidi safety for user-entered technical/contact values. */
html[dir="ltr"] a[href^="tel:"],
html[dir="ltr"] a[href^="mailto:"] {
  unicode-bidi: plaintext;
}

/* Mirror directional hover motion. */
html[dir="ltr"] .ta-footer .ta-footer__links a:hover {
  transform: translateX(4px);
}

/* Directional hover motion follows the LTR forward direction. */
html[dir="ltr"] .ta-latest-projects .ta-latest-projects__all:hover i,
html[dir="ltr"] .ta-latest-projects .ta-latest-projects__read-more:hover i {
  transform: translateX(calc(var(--ta-projects-icon-hover-shift) * -1));
}
html[dir="ltr"] .ta-latest-news .ta-latest-news__all:hover i,
html[dir="ltr"] .ta-latest-news .ta-latest-news__read-more:hover i,
html[dir="ltr"] .ta-services-list .ta-services-list__more:hover i {
  transform: translateX(calc(var(--ta-news-icon-hover-shift) * -1));
}
html[dir="ltr"] .ta-projects-archive__more:hover i {
  transform: translateX(4px);
}

/* Projects archive: keep the date icon at the leading edge in LTR. */
html[dir="ltr"] .ta-projects-archive__dates > div {
  grid-template-columns: auto minmax(0, 1fr);
}

html[dir="ltr"] .ta-projects-archive__dates span,
html[dir="ltr"] .ta-projects-archive__dates strong {
  grid-column: 2;
}

html[dir="ltr"] .ta-projects-archive__dates i {
  grid-column: 1;
}
