/* ========================================
   MyCoupon — Contact Page
   مطابق طرح تاییدشده
======================================== */

body {
  overflow-x: hidden;
}

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

.mc-contact-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  padding-top: 14px;
  padding-bottom: 42px;

  direction: rtl;
  overflow-x: clip;
}

/* Header */
.mc-contact-hero {
  display: flex;
  align-items: center;
  gap: 14px;

  margin: 0 0 22px;
}

.mc-contact-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  flex: 0 0 52px;

  border-radius: 14px;

  background: color-mix(in srgb, var(--brand) 7%, var(--white));
  color: var(--brand);
}

.mc-contact-hero__icon svg,
.mc-contact-info-icon svg,
.mc-contact-submit svg,
.mc-contact-action svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mc-contact-hero__icon svg {
  width: 24px;
  height: 24px;
}

.mc-contact-hero h1 {
  margin: 0 0 5px;

  color: var(--ink);

  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.4;
  font-weight: 800;
}

.mc-contact-hero p {
  margin: 0;

  color: var(--ink-alt);

  font-size: 13px;
  line-height: 1.9;
}

/* Layout */
.mc-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .95fr);
  gap: 22px;
  align-items: stretch;

  width: 100%;
  min-width: 0;
}

.mc-contact-form-card,
.mc-contact-info-card {
  min-width: 0;

  border: 1px solid var(--line);
  border-radius: 16px;

  background: var(--white);
}

/* Form */
.mc-contact-form-card {
  padding: 24px 26px;
}

.mc-contact-form-head {
  margin-bottom: 19px;
}

.mc-contact-form-head h2 {
  margin: 0 0 4px;

  color: var(--ink);

  font-size: 20px;
  line-height: 1.5;
  font-weight: 800;
}

.mc-contact-form-head p {
  margin: 0;

  color: var(--muted);

  font-size: 11.5px;
}

.mc-contact-form {
  display: grid;
  gap: 14px;

  min-width: 0;
}

.mc-contact-fields-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;

  min-width: 0;
}

.mc-contact-field {
  display: grid;
  gap: 7px;

  min-width: 0;
}

.mc-contact-field label {
  color: var(--ink);

  font-size: 12px;
  font-weight: 600;
}

.mc-contact-field label span {
  color: var(--brand);
}

.mc-contact-field input,
.mc-contact-field textarea {
  display: block;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  margin: 0;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: var(--white);
  color: var(--ink);

  font: inherit;
  font-size: 13px;

  outline: none;

  transition: border-color .16s ease;
}

.mc-contact-field input {
  height: 44px;
  padding: 0 12px;
}

.mc-contact-field textarea {
  min-height: 148px;
  padding: 11px 12px;

  resize: vertical;

  line-height: 1.9;
}

.mc-contact-field input:focus,
.mc-contact-field textarea:focus {
  border-color: var(--brand);
}

.mc-contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  justify-self: start;

  min-width: 145px;
  height: 43px;
  padding: 0 18px;

  border: 1px solid var(--brand);
  border-radius: 9px;

  background: var(--brand);
  color: var(--white);

  font: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.mc-contact-submit svg {
  width: 16px;
  height: 16px;
}

/* Info */
.mc-contact-info-card {
  display: flex;
  flex-direction: column;

  padding: 26px 24px;
}

.mc-contact-info-section {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;

  flex: 1 1 0;

  align-content: center;
}

.mc-contact-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;

  border-radius: 12px;

  background: color-mix(in srgb, var(--brand) 7%, var(--white));
  color: var(--muted);
}

.mc-contact-info-icon svg {
  width: 22px;
  height: 22px;
}

.mc-contact-info-section h2 {
  margin: 2px 0 7px;

  color: var(--ink);

  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

.mc-contact-info-section p {
  margin: 0 0 11px;

  color: var(--ink-alt);

  font-size: 12.5px;
  line-height: 1.95;
}

.mc-contact-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  color: var(--brand);

  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.mc-contact-action svg {
  width: 14px;
  height: 14px;
}

.mc-contact-divider {
  display: block;

  height: 1px;
  margin: 22px 0;

  background: var(--line);
}

.mc-contact-alert {
  margin-bottom: 16px;
  padding: 10px 12px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: var(--surface-muted);
  color: var(--ink-alt);

  font-size: 12.5px;
  line-height: 1.8;
}

.mc-contact-alert.is-error {
  color: var(--brand);
}

.mc-contact-hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Tablet */
@media (max-width: 900px) {
  .mc-contact-grid {
    grid-template-columns: 1fr;
  }

  .mc-contact-info-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .mc-contact-divider {
    display: none;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .mc-contact-page {
    padding-top: 8px;
    padding-bottom: 28px;
  }

  .mc-contact-hero {
    align-items: flex-start;
    margin-bottom: 17px;
  }

  .mc-contact-hero__icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .mc-contact-hero h1 {
    font-size: 23px;
  }

  .mc-contact-hero p {
    font-size: 12px;
  }

  .mc-contact-form-card {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .mc-contact-fields-row {
    grid-template-columns: 1fr;
  }

  .mc-contact-submit {
    width: 100%;
    justify-self: stretch;
  }

  .mc-contact-info-card {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    border-radius: 14px;
  }

  .mc-contact-divider {
    display: block;
    margin: 4px 0;
  }
}

/* جلوگیری از overflow افقی */
.mc-contact-page img,
.mc-contact-page svg,
.mc-contact-page input,
.mc-contact-page textarea,
.mc-contact-page button {
  max-width: 100%;
}


/* ========================================
   Final sidebar — contact first, guides below
======================================== */

.mc-contact-info-card {
  padding: 22px;
}

.mc-contact-contact-block > h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 800;
}

.mc-contact-contact-list {
  display: grid;
  gap: 14px;
}

.mc-contact-contact-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.mc-contact-contact-item .mc-contact-info-icon {
  width: 42px;
  height: 42px;
}

.mc-contact-contact-item strong {
  display: block;
  margin: 1px 0 3px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}

.mc-contact-contact-item address,
.mc-contact-contact-item a {
  display: inline-block;
  margin: 0;
  color: var(--ink-alt);
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.95;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.mc-contact-contact-item a:hover {
  color: var(--brand);
}

.mc-contact-guide-block {
  display: grid;
  gap: 16px;
}

.mc-contact-guide-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.mc-contact-guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--surface-muted);
  color: var(--muted);
}

.mc-contact-guide-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mc-contact-guide-item h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 700;
}

.mc-contact-guide-item p {
  margin: 0;
  color: var(--ink-alt);
  font-size: 12px;
  line-height: 1.95;
}

@media (max-width: 900px) {
  .mc-contact-info-card {
    display: block;
  }

  .mc-contact-contact-list,
  .mc-contact-guide-block {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .mc-contact-info-card {
    padding: 18px 14px;
  }

  .mc-contact-contact-item,
  .mc-contact-guide-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .mc-contact-contact-item .mc-contact-info-icon,
  .mc-contact-guide-icon {
    width: 38px;
    height: 38px;
  }
}


/* ========================================
   Contact Final v2
======================================== */

/* ستون اطلاعات تماس سمت راست و بدون کادر */
.mc-contact-grid {
  direction: rtl;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}

.mc-contact-info-card {
  grid-column: 1;
  grid-row: 1;

  padding: 2px 2px 2px 10px;

  border: 0;
  border-radius: 0;
  background: transparent;
}

.mc-contact-form-card {
  grid-column: 2;
  grid-row: 1;
}

/* جمع‌وجورتر شدن ستون اطلاعات */
.mc-contact-contact-block > h2 {
  margin-bottom: 14px;
}

.mc-contact-contact-list {
  gap: 12px;
}

.mc-contact-divider {
  margin: 18px 0;
}

.mc-contact-guide-block {
  gap: 14px;
}

/* موضوع به صورت Select */
.mc-contact-select-wrap {
  position: relative;
  min-width: 0;
}

.mc-contact-field select {
  display: block;

  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;

  padding: 0 12px 0 38px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: var(--white);
  color: var(--ink);

  font: inherit;
  font-size: 13px;

  outline: none;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
}

.mc-contact-field select:focus {
  border-color: var(--brand);
}

.mc-contact-select-arrow {
  position: absolute;
  left: 12px;
  top: 50%;

  width: 16px;
  height: 16px;

  transform: translateY(-50%);

  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;

  pointer-events: none;
}

@media (max-width: 900px) {
  .mc-contact-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mc-contact-form-card {
    grid-column: 1;
    grid-row: 1;
  }

  .mc-contact-info-card {
    grid-column: 1;
    grid-row: 2;
    padding: 2px 0 0;
  }
}


/* Contact final v3 tweaks */
.mc-contact-field select,
.mc-contact-field option,
.mc-contact-field optgroup {
  font-family: inherit !important;
  font-size: 14px;
}

.mc-contact-field select {
  direction: rtl;
  text-align: right;
}

.mc-contact-field select option {
  direction: rtl;
}


/* لینک داخل متن همکاری */
.mc-contact-inline-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.mc-contact-inline-link:hover {
  text-decoration: underline;
}


/* ========================================
   Contact Final v5 — فرم با آیکن
======================================== */

.mc-contact-input-wrap {
  position: relative;
  min-width: 0;
}

.mc-contact-input-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;

  transform: translateY(-50%);

  color: var(--muted);

  pointer-events: none;
}

.mc-contact-input-icon svg {
  width: 19px;
  height: 19px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mc-contact-input-wrap input {
  padding-right: 42px;
}

.mc-contact-textarea-wrap textarea {
  padding-right: 42px;
}

.mc-contact-textarea-icon {
  top: 18px;
  transform: none;
}

.mc-contact-field input::placeholder,
.mc-contact-field textarea::placeholder {
  color: var(--muted);
  opacity: .85;
}

.mc-contact-input-wrap:focus-within .mc-contact-input-icon {
  color: var(--brand);
}

/* قواعد نسخه قبلی select دیگر روی فرم اعمال نشوند */
.mc-contact-select-wrap,
.mc-contact-select-arrow {
  display: none;
}


/* ========================================
   Contact Final v6 — right column polish
======================================== */

.mc-contact-contact-block > h2 {
  font-size: 17px;
}

.mc-contact-contact-item strong {
  font-size: 13px;
}

.mc-contact-contact-item address,
.mc-contact-contact-item a {
  font-size: 13.5px;
  line-height: 2;
}

.mc-contact-guide-item h3 {
  font-size: 14.5px;
}

.mc-contact-guide-item p {
  font-size: 13px;
  line-height: 2;
}

.mc-contact-guide-icon {
  width: 42px;
  height: 42px;
}

.mc-contact-guide-icon svg {
  width: 21px;
  height: 21px;
}


/* ========================================
   Contact mobile hardening
   - header must remain visible
   - no horizontal page overflow
======================================== */
body.page-template-page-contact,
body.page-template-page-contact .site-main,
body.page-template-page-contact .mc-contact-page,
body.page-template-page-contact .mc-contact-grid,
body.page-template-page-contact .mc-contact-form-card,
body.page-template-page-contact .mc-contact-info-card {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.page-template-page-contact {
  overflow-x: hidden !important;
}

body.page-template-page-contact .site-main,
body.page-template-page-contact .mc-contact-page {
  overflow-x: clip !important;
}

@media (max-width: 768px) {
  body.page-template-page-contact .site-header,
  body.page-template-page-contact .header-row,
  body.page-template-page-contact .site-branding.header-logo,
  body.page-template-page-contact .site-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.page-template-page-contact .site-header {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
  }

  body.page-template-page-contact .header-row {
    display: grid !important;
  }

  body.page-template-page-contact .mc-contact-page {
    width: 100% !important;
    padding-inline: 16px !important;
  }
}


/* Contact page width correction */
body .mc-contact-page.container{
  width:calc(100% - 32px);
  max-width:1120px !important;
  margin-inline:auto !important;
  padding-inline:0;
}
@media(max-width:640px){
  body .mc-contact-page.container{width:calc(100% - 24px);max-width:100% !important}
}
