/* Aniyab UI — Contact us
 * From Figma: Contact us - desktop / Contact us - Mobile
 */

.ay-contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ay-bg-lighter, #FEFEFE);
  font-family: var(--ay-font-family, dana, DanaFaNum, IRANSansfanum, Tahoma, sans-serif);
  color: var(--ay-text-main, #404040);
  padding-block: 32px 64px;
}

.ay-contact *,
.ay-contact *::before,
.ay-contact *::after {
  box-sizing: border-box;
}

/* ── Decorative call glow ── */
.ay-contact__glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: url("/images/contact-us/call-glow.png") center / contain no-repeat;
  opacity: 0.9;
}

.ay-contact__glow--start {
  width: 355px;
  height: 355px;
  top: 0;
  left: -26px;
  filter: blur(10px);
}

.ay-contact__glow--end {
  width: 429px;
  height: 429px;
  right: -107px;
  bottom: 40px;
  filter: blur(25px);
  transform: scaleX(-1);
}

.ay-contact__inner {
  width: min(1222px, calc(100% - 32px));
  margin-inline: auto;
}

.ay-contact__breadcrumb {
  margin-bottom: 24px;
  overflow: hidden;
}

/* ── Page head ── */
.ay-contact__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 40px;
}

.ay-contact__title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ay-contact__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--ay-text-main, #404040);
  border-radius: 8px;
  text-decoration: none;
}

.ay-contact__back:hover,
.ay-contact__back:focus-visible {
  color: var(--ay-brand-primary-light, #0545A6);
}

.ay-contact__back:focus-visible {
  outline: 2px solid var(--ay-brand-primary-light, #0545A6);
  outline-offset: 2px;
}

.ay-contact__back svg {
  width: 24px;
  height: 24px;
  display: block;
}

[dir="ltr"] .ay-contact__back svg {
  transform: scaleX(-1);
}

.ay-contact__title {
  margin: 0;
  font-weight: var(--ay-type-display-md-weight, 500);
  font-size: var(--ay-type-display-md-size, 24px);
  line-height: var(--ay-type-display-md-line, 40px);
  color: var(--ay-text-title, #302E2E);
}

.ay-contact__sub {
  margin: 0;
  font-weight: 500;
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  color: var(--ay-text-secondary, #737373);
}

/* ── Layout ── */
.ay-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 40px;
}

.ay-contact__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.ay-contact__pair {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 24px;
}

.ay-contact__pair > * {
  flex: 1 1 0;
  min-width: 0;
}

/* ── Cards ── */
.ay-contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--ay-bg-lighter, #FEFEFE);
  border: 1px solid var(--ay-border-light, #E7E5E4);
  border-radius: 8px;
  min-width: 0;
}

.ay-contact-card--lg {
  border-radius: var(--ay-radius-card, 16px);
}

.ay-contact-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ay-contact-card__title {
  margin: 0;
  font-weight: var(--ay-type-text-xl-bold-weight, 700);
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  color: var(--ay-text-title, #302E2E);
}

.ay-contact-card__hint {
  margin: 0;
  font-weight: 500;
  font-size: var(--ay-type-text-lg-size, 14px);
  line-height: var(--ay-type-text-lg-line, 28px);
  color: var(--ay-text-secondary, #737373);
}

/* ── Call card ── */
.ay-contact-call__body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ay-contact-call__phones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.ay-contact-call__phone {
  font-weight: 500;
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  color: var(--ay-text-title, #302E2E);
  text-decoration: none;
  unicode-bidi: isolate;
  transition: color 0.15s ease;
}

.ay-contact-call__phone:hover,
.ay-contact-call__phone:focus-visible {
  color: var(--ay-brand-primary-light, #0545A6);
  text-decoration: none;
}

.ay-contact-call__sep {
  font-size: 14px;
  line-height: 28px;
  color: var(--ay-text-title, #302E2E);
}

.ay-contact-call__btn {
  flex: none;
}

.ay-contact-call__btn .ay-btn__icon {
  color: var(--ay-brand-primary-dark, #022251);
}

/* ── Social card ── */
.ay-contact-social {
  justify-content: space-between;
  gap: 20px;
}

.ay-contact-social__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ay-contact-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ay-text-main, #404040);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ay-contact-social__link:hover {
  background: var(--ay-brand-primary-paler, #EBF1FB);
  text-decoration: none;
  transform: scale(1.05);
}

.ay-contact-social__link:active {
  transform: scale(0.94);
}

.ay-contact-social__link:focus-visible {
  outline: 2px solid var(--ay-brand-primary-light, #0545A6);
  outline-offset: 2px;
}

.ay-contact-social__link svg,
.ay-contact-social__link img {
  display: block;
  width: 24px;
  height: 24px;
}

/* ── Email card ── */
.ay-contact-mail__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ay-contact-mail__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.ay-contact-mail__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--ay-text-title, #302E2E);
  font-weight: 500;
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ay-contact-mail__link:hover,
.ay-contact-mail__link:focus-visible {
  color: var(--ay-brand-primary-light, #0545A6);
  text-decoration: none;
}

.ay-contact-mail__icon {
  display: inline-flex;
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--ay-text-secondary, #737373);
}

.ay-contact-mail__icon svg {
  width: 100%;
  height: 100%;
}

.ay-contact-mail__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ay-contact-copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 6px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ay-brand-primary-light, #0545A6);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ay-contact-copy:hover {
  background: var(--ay-brand-primary-paler, #EBF1FB);
}

.ay-contact-copy:focus-visible {
  outline: 2px solid var(--ay-brand-primary-light, #0545A6);
  outline-offset: 1px;
}

.ay-contact-copy svg {
  display: block;
  width: 20px;
  height: 20px;
}

.ay-contact-copy__done {
  display: none !important;
}

.ay-contact-copy.is-copied {
  color: var(--ay-success, #129A44);
}

.ay-contact-copy.is-copied .ay-contact-copy__idle {
  display: none;
}

.ay-contact-copy.is-copied .ay-contact-copy__done {
  display: block !important;
}

.ay-contact-copy__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ay-text-title, #302E2E);
  color: var(--ay-text-contrast, #FFFFFF);
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ay-contact-copy__tip:empty {
  display: none;
}

.ay-contact-copy.is-copied .ay-contact-copy__tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── SMS card ── */
.ay-contact-sms {
  justify-content: space-between;
}

.ay-contact-sms__number .ay-contact-mail__text {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── Offices ── */
.ay-contact-offices {
  gap: 32px;
}

.ay-contact-office {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ay-contact-office__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ay-contact-office__title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: var(--ay-type-text-xl-bold-weight, 700);
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  color: var(--ay-text-title, #302E2E);
}

.ay-contact-office__icon {
  display: inline-flex;
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--ay-text-secondary, #737373);
}

.ay-contact-office__icon svg {
  width: 100%;
  height: 100%;
}

.ay-contact-office__address {
  margin: 0;
  font-weight: 500;
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  color: var(--ay-text-main, #404040);
  text-align: justify;
}

.ay-contact-map {
  position: relative;
  height: 127px;
  border-radius: var(--ay-radius-card, 16px);
  background: #E5E3DF;
}

.ay-contact-map__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.ay-contact-map::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transition: background-color 0.2s ease;
}

.ay-contact-map:hover::after {
  background: rgba(0, 0, 0, 0.28);
}

.ay-contact-map__btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 112px;
  height: 48px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ay-bg-white, #FFFFFF);
  color: var(--ay-text-title, #302E2E);
  font-weight: 500;
  font-size: var(--ay-type-text-lg-size, 14px);
  line-height: 28px;
  text-decoration: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: var(--ay-elevation-sm, 0px 1px 8px rgba(163, 163, 163, 0.25));
  transition: box-shadow 0.15s ease, color 0.15s ease;
}

.ay-contact-map__btn:hover,
.ay-contact-map__btn[aria-expanded="true"] {
  color: var(--ay-brand-primary, #002D71);
  text-decoration: none;
  box-shadow: var(--ay-elevation-md, 0px 4px 12px rgba(163, 163, 163, 0.25));
}

.ay-contact-map__btn:focus-visible {
  outline: 2px solid var(--ay-bg-white, #FFFFFF);
  outline-offset: 3px;
}

.ay-contact-map__btn > span:last-child {
  padding-inline: 8px;
}

.ay-contact-map__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.ay-contact-map__icon svg {
  width: 100%;
  height: 100%;
}

.ay-contact-map__menu {
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--ay-border-light, #E7E5E4);
  border-radius: 12px;
  background: var(--ay-bg-white, #FFFFFF);
  box-shadow: var(--ay-elevation-lg, 0px 4px 24px rgba(163, 163, 163, 0.25));
  transform: translateX(-50%);
  animation: ay-contact-pop 0.16s ease-out;
}

.ay-contact-map__menu[hidden] {
  display: none;
}

.ay-contact-map__option {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ay-text-main, #404040);
  font-weight: 500;
  font-size: var(--ay-type-text-lg-size, 14px);
  line-height: 28px;
  text-decoration: none;
  white-space: nowrap;
}

.ay-contact-map__option:hover,
.ay-contact-map__option:focus-visible {
  background: var(--ay-bg-dark, #F4F4F5);
  color: var(--ay-brand-primary, #002D71);
  text-decoration: none;
  outline: none;
}

@keyframes ay-contact-pop {
  from { opacity: 0; transform: translate(-50%, -4px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Form ── */
.ay-contact-form-card {
  align-self: stretch;
}

.ay-contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
}

.ay-contact-form__title {
  margin: 0;
  font-weight: var(--ay-type-text-xl-bold-weight, 700);
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: var(--ay-type-text-xl-line, 28px);
  color: var(--ay-text-title, #302E2E);
}

.ay-contact-form__alert {
  border-radius: 8px;
  scroll-margin-top: 120px;
}

.ay-contact-form__alert:focus {
  outline: none;
}

.ay-contact-form__alert.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ay-contact-form__draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--ay-brand-primary-paler, #EBF1FB);
  color: var(--ay-brand-primary, #002D71);
  font-weight: 500;
  font-size: var(--ay-type-text-md-size, 12px);
  line-height: var(--ay-type-text-md-line, 24px);
}

.ay-contact-form__draft[hidden] {
  display: none;
}

.ay-contact-form__draft-clear {
  flex: none;
  padding: 0 4px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--ay-brand-primary-light, #0545A6);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ay-contact-form__draft-clear:hover {
  text-decoration: underline;
}

.ay-contact-form__fields {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1 1 auto;
}

.ay-contact-field.ay-field {
  max-width: none;
}

.ay-contact-field .ay-field__label {
  text-align: start;
}

.ay-contact-field .ay-field__input {
  text-align: start;
}

.ay-contact-field__ltr {
  direction: ltr;
}

[dir="rtl"] .ay-contact-field__ltr {
  text-align: right;
}

.ay-contact-field__ltr::placeholder {
  direction: rtl;
}

.ay-contact-field .ay-field__hint {
  text-align: start;
}

.ay-contact-field .ay-field__hint:empty {
  display: none;
}

.ay-contact-field.is-error .ay-field__hint {
  animation: ay-contact-hint-in 0.18s ease-out;
}

@keyframes ay-contact-hint-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.ay-contact-field.is-valid .ay-field__control {
  --ay-field-border: var(--ay-border-dark, #D6D3D1);
}

.ay-contact-field .ay-contact-field__area {
  height: 172px;
  min-height: 108px;
  max-height: 420px;
}

.ay-contact-field .ay-field__control--area {
  min-height: 144px;
  padding-block: 10px;
}

.ay-contact-field__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
}

.ay-contact-field__count {
  flex: none;
  margin-inline-start: auto;
  font-weight: 500;
  font-size: var(--ay-type-text-md-size, 12px);
  line-height: var(--ay-type-text-md-line, 24px);
  color: var(--ay-text-tertiary, #A3A3A3);
  font-variant-numeric: tabular-nums;
}

.ay-contact-field__count:empty {
  display: none;
}

.ay-contact-field__count.is-short {
  color: var(--ay-warning-dark, #856504);
}

/* Select */
.ay-field__control.ay-contact-select {
  position: relative;
  padding-inline-end: 40px;
  cursor: pointer;
}

.ay-contact-select__input {
  cursor: pointer;
  background: transparent;
}

.ay-contact-select__input:invalid,
.ay-contact-select__input.is-placeholder {
  color: var(--ay-text-secondary, #737373);
}

.ay-contact-select__input option {
  color: var(--ay-text-main, #404040);
}

.ay-contact-select__chevron {
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: var(--ay-text-secondary, #737373);
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.ay-contact-select:focus-within .ay-contact-select__chevron {
  color: var(--ay-text-main, #404040);
}

.ay-contact-select__chevron svg {
  width: 100%;
  height: 100%;
}

/* Captcha */
.ay-contact-captcha__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ay-contact-captcha__question {
  flex: none;
  min-width: 72px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--ay-bg-dark, #F4F4F5);
  color: var(--ay-text-title, #302E2E);
  font-weight: 700;
  font-size: var(--ay-type-text-xl-size, 16px);
  line-height: 48px;
  text-align: center;
  letter-spacing: 0.5px;
  user-select: none;
}

.ay-field__control.ay-contact-captcha__control {
  width: 96px;
  flex: none;
}

.ay-contact-captcha__control .ay-field__input {
  text-align: center !important;
  font-weight: 700;
  font-size: 16px;
}

/* Submit */
.ay-contact-form__submit {
  margin-top: 12px;
}

.ay-contact-form__submit.is-pending {
  --ay-btn-bg: var(--ay-bg-dark, #F4F4F5);
  --ay-btn-bg-hover: var(--ay-bg-dark, #F4F4F5);
  --ay-btn-border: var(--ay-bg-dark, #F4F4F5);
  --ay-btn-border-hover: var(--ay-bg-dark, #F4F4F5);
  --ay-btn-color: var(--ay-text-disable, #BBBAB9);
  --ay-btn-color-hover: var(--ay-text-disable, #BBBAB9);
}

/* ── Tablet ── */
@media (max-width: 1199.98px) {
  .ay-contact__grid {
    gap: 24px;
  }

  .ay-contact__pair {
    flex-direction: column;
  }
}

@media (max-width: 991.98px) {
  .ay-contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ay-contact__pair {
    flex-direction: row-reverse;
  }

  .ay-contact__glow--end {
    bottom: 30%;
  }
}

/* ── Mobile ── */
@media (max-width: 767.98px) {
  .ay-contact {
    padding-block: 16px 40px;
  }

  .ay-contact__glow--start {
    width: 220px;
    height: 220px;
    left: -60px;
    top: -10px;
    opacity: 0.7;
  }

  .ay-contact__glow--end {
    width: 260px;
    height: 260px;
    right: -110px;
    bottom: 22%;
    opacity: 0.6;
  }

  .ay-contact__breadcrumb {
    margin-bottom: 16px;
  }

  .ay-contact__head {
    gap: 0;
    margin-bottom: 24px;
  }

  .ay-contact__title {
    font-size: var(--ay-type-text-xl-size, 16px);
    line-height: var(--ay-type-text-xl-line, 28px);
  }

  .ay-contact__back,
  .ay-contact__back svg {
    width: 20px;
    height: 20px;
  }

  .ay-contact__sub {
    font-size: var(--ay-type-text-lg-size, 14px);
    line-height: var(--ay-type-text-lg-line, 28px);
  }

  .ay-contact__grid,
  .ay-contact__info {
    gap: 16px;
  }

  .ay-contact__pair {
    flex-direction: column;
    gap: 16px;
  }

  .ay-contact-card {
    padding: 16px;
    gap: 12px;
  }

  .ay-contact-card__title,
  .ay-contact-form__title,
  .ay-contact-office__title {
    font-size: var(--ay-type-text-lg-size, 14px);
    line-height: var(--ay-type-text-lg-line, 28px);
  }

  .ay-contact-card__hint {
    font-size: var(--ay-type-text-md-size, 12px);
    line-height: var(--ay-type-text-md-line, 24px);
  }

  .ay-contact-call__body {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 8px;
  }

  .ay-contact-call__btn {
    margin-inline-start: -8px;
  }

  .ay-contact-call__phone,
  .ay-contact-mail__link,
  .ay-contact-office__address {
    font-size: var(--ay-type-text-lg-size, 14px);
    line-height: var(--ay-type-text-lg-line, 28px);
  }

  .ay-contact-social {
    gap: 12px;
  }

  .ay-contact-social__list {
    justify-content: space-between;
  }

  .ay-contact-social__link {
    width: 44px;
    height: 44px;
  }

  .ay-contact-offices {
    gap: 24px;
  }

  .ay-contact-office {
    gap: 16px;
  }

  .ay-contact-office__icon {
    width: 24px;
    height: 24px;
  }

  .ay-contact-map {
    height: 120px;
    border-radius: 12px;
  }

  .ay-contact-form {
    gap: 16px;
  }

  .ay-contact-form__fields {
    gap: 16px;
  }

  .ay-contact-field .ay-field__input {
    font-size: 16px;
  }

  .ay-contact-field .ay-contact-field__area {
    height: 120px;
  }

  .ay-contact-field .ay-field__control--area {
    min-height: 124px;
  }

  .ay-contact-form__submit {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ay-contact-map__menu,
  .ay-contact-copy__tip,
  .ay-contact-field.is-error .ay-field__hint,
  .ay-contact-form__alert.is-leaving {
    animation: none;
    transition: none;
  }
}
