/* English Contact page ONLY. Layout corrections scoped to its existing design system. */
html[lang^="en"] body.tw-contact-page .tw-contact-page-shell,
html[lang^="en"] body.tw-contact-page .tw-contact-hero__copy,
html[lang^="en"] body.tw-contact-page .tw-contact-info__heading,
html[lang^="en"] body.tw-contact-page .tw-contact-services-card,
html[lang^="en"] body.tw-contact-page .tw-contact-services-card__head,
html[lang^="en"] body.tw-contact-page .tw-contact-form-stage,
html[lang^="en"] body.tw-contact-page .tw-contact-side-column,
html[lang^="en"] body.tw-contact-page .tw-contact-channels__head,
html[lang^="en"] body.tw-contact-page .tw-contact-global__content,
html[lang^="en"] body.tw-contact-page .tw-contact-faq__content {
  direction: ltr !important;
}
/* Preserve intentionally centered card titles and image contents. */
html[lang^="en"] body.tw-contact-page .tw-contact-hero__copy,
html[lang^="en"] body.tw-contact-page .tw-contact-info__heading,
html[lang^="en"] body.tw-contact-page .tw-contact-services-card__head,
html[lang^="en"] body.tw-contact-page .tw-contact-form-card__head,
html[lang^="en"] body.tw-contact-page .tw-contact-channels__head,
html[lang^="en"] body.tw-contact-page .tw-contact-global__head,
html[lang^="en"] body.tw-contact-page .tw-contact-faq__head,
html[lang^="en"] body.tw-contact-page .tw-contact-faq-item__question,
html[lang^="en"] body.tw-contact-page .tw-contact-faq-item__answer {
  text-align: left !important;
}
html[lang^="en"] body.tw-contact-page .tw-contact-info__heading,
html[lang^="en"] body.tw-contact-page .tw-contact-services-card__head,
html[lang^="en"] body.tw-contact-page .tw-contact-global__title-row {
  direction: ltr !important;
}
html[lang^="en"] body.tw-contact-page .tw-contact-field input,
html[lang^="en"] body.tw-contact-page .tw-contact-field textarea,
html[lang^="en"] body.tw-contact-page .tw-contact-field select {
  direction: ltr !important;
  text-align: left !important;
}
html[lang^="en"] body.tw-contact-page .tw-contact-field input::placeholder,
html[lang^="en"] body.tw-contact-page .tw-contact-field textarea::placeholder {
  text-align: left !important;
}
html[lang^="en"] body.tw-contact-page .tw-contact-field__icon {
  left: 13px !important;
  right: auto !important;
}
html[lang^="en"] body.tw-contact-page .tw-contact-field input,
html[lang^="en"] body.tw-contact-page .tw-contact-field textarea,
html[lang^="en"] body.tw-contact-page .tw-contact-field select {
  padding-left: 44px !important;
  padding-right: 13px !important;
}
html[lang^="en"] body.tw-contact-page .tw-contact-info-card__primary,
html[lang^="en"] body.tw-contact-page a[href^="tel:"],
html[lang^="en"] body.tw-contact-page a[href^="mailto:"] {
  direction: ltr;
  unicode-bidi: isolate;
}
/* FAQ: image remains unflipped, only image/text column order mirrors on desktop. */
@media (min-width: 1101px) {
  html[lang^="en"] body.tw-contact-page .tw-contact-hero__copy {
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: clamp(38px, 3.6vw, 72px) !important;
    padding-right: clamp(22px, 2.3vw, 42px) !important;
    background: linear-gradient(270deg, rgba(3,20,38,0) 0%,rgba(3,20,38,.04) 8%,rgba(3,20,38,.18) 18%,rgba(3,20,38,.45) 36%,rgba(3,20,38,.72) 56%,rgba(3,20,38,.92) 77%,#031426 100%) !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-hero__visual::before {
    background: linear-gradient(270deg, rgba(3,20,38,0) 0%,rgba(3,20,38,0) 48%,rgba(3,20,38,.08) 57%,rgba(3,20,38,.22) 64%,rgba(3,20,38,.48) 72%,rgba(3,20,38,.78) 82%,rgba(3,20,38,.94) 91%,#031426 100%) !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-form-card {
    margin-left: auto !important;
    margin-right: clamp(24px, 3.6vw, 72px) !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column {
    left: clamp(18px, 2.2vw, 46px) !important;
    right: auto !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-side-visual-stage {
    left: clamp(18px, 2.2vw, 46px) !important;
    right: auto !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-faq__inner {
    grid-template-columns: minmax(0,69.8%) minmax(0,30.2%) !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-faq__visual {
    grid-column: 2 !important;
    grid-row: 1 !important;
    border-right: 0 !important;
    border-left: 1px solid rgba(17,94,143,.70) !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-faq__content {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
}
@media (max-width: 1100px) {
  html[lang^="en"] body.tw-contact-page .tw-contact-hero__copy {
    margin-inline: auto !important;
    background: none !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-form-card {
    margin-inline: auto !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column,
  html[lang^="en"] body.tw-contact-page .tw-contact-side-visual-stage {
    left: auto !important;
    right: auto !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-faq__visual {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-faq__content {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}
/* Keep maps and FAQ imagery in their original direction. The hero visual is intentionally mirrored for English to match the reversed composition of the Persian reference. */
html[lang^="en"] body.tw-contact-page .tw-contact-global__visual img,
html[lang^="en"] body.tw-contact-page .tw-contact-faq__visual img {
  scale: 1 1;
}
html[lang^="en"] body.tw-contact-page .tw-contact-hero__visual img {
  transform: scaleX(-1) !important;
  transform-origin: center center !important;
}

/* Cards retain their imagery and flags, with labels on the reading-start side. */
html[lang^="en"] body.tw-contact-page .tw-contact-global-card__body { text-align: left !important; }
html[lang^="en"] body.tw-contact-page .tw-contact-global-card h3 { left: clamp(12px,.82vw,16px) !important; right: auto !important; }
html[lang^="en"] body.tw-contact-page .tw-contact-global-flag { left: clamp(10px,.66vw,13px) !important; right: auto !important; }
html[lang^="en"] body.tw-contact-page .tw-contact-info-card__primary,
html[lang^="en"] body.tw-contact-page .tw-contact-info-card--hours p {
  font-variant-numeric: lining-nums tabular-nums;
}


/* v1.1 desktop mirroring fixes requested after live visual review */
@media (min-width: 1101px) {
  /* Contact information section must be a true mirror of the Persian composition. */
  html[lang^="en"] body.tw-contact-page .tw-contact-info__heading {
    left: clamp(22px, 1.75vw, 38px) !important;
    right: auto !important;
    text-align: left !important;
    direction: ltr !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-info__grid {
    direction: rtl !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-services-card,
  html[lang^="en"] body.tw-contact-page .tw-contact-services-card__head {
    direction: ltr !important;
    text-align: left !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-services-card__grid {
    direction: ltr !important;
  }

  /* Restore the Send a Message media block to the correct left-column position. */
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column {
    width: min(43%, 900px) !important;
    left: clamp(18px, 2.2vw, 46px) !important;
    right: auto !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column .tw-contact-side-visual-stage {
    position: relative !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 0 0 12px !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column .tw-contact-side-visual {
    width: 100% !important;
  }
}


/* v1.2 spacing fix for the form + channels section after live review */
@media (min-width: 1101px) {
  html[lang^="en"] body.tw-contact-page .tw-contact-form-stage {
    display: grid !important;
    grid-template-columns: minmax(0, 44.5%) minmax(0, 55.5%) !important;
    column-gap: clamp(24px, 2.1vw, 40px) !important;
    row-gap: 0 !important;
    align-items: start !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-form-stage > .tw-contact-side-column {
    grid-column: 1 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-width: 0 !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-form-stage > .tw-contact-form-card {
    grid-column: 2 !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-width: 0 !important;
  }
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column .tw-contact-channels,
  html[lang^="en"] body.tw-contact-page .tw-contact-side-column .tw-contact-side-visual-stage,
  html[lang^="en"] body.tw-contact-page .tw-contact-form-card__inner,
  html[lang^="en"] body.tw-contact-page .tw-contact-form-card__body {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}
