/* ============================================================
   CALL US — CONSULTATION
   consultation.css
   ------------------------------------------------------------
   نسخه‌ی نهایی — رفع مشکل date fields
   ============================================================ */

/* ============================================================
   01 — SECTION
   ============================================================ */
.consultation {
  position: relative;
  padding: clamp(6rem, 12vh, 10rem) var(--pad);
  overflow: hidden;
  z-index: 2;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* ============================================================
   02 — BACKGROUND
   ============================================================ */
.consultation__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #16301F;
}

.consultation__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(3px) brightness(0.85) saturate(0.9);
  transform: scale(1.06);
  display: block;
}

.consultation__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(22, 48, 31, 0.88) 0%,
      rgba(22, 48, 31, 0.72) 30%,
      rgba(22, 48, 31, 0.35) 55%,
      rgba(22, 48, 31, 0.15) 100%
    );
}

/* ============================================================
   03 — INNER GRID
   ============================================================ */
.consultation__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 42fr 58fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

/* ============================================================
   04 — CONTENT (چپ)
   ============================================================ */
.consultation__content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 32rem;
}

.consultation__label {
  font-family: 'General Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #D4B48C;
}

.consultation__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #F5F0E8;
  margin-top: 0.5rem;
}

.consultation__line {
  display: block;
}

.consultation__line--italic {
  font-style: italic;
  font-weight: 300;
  color: #D4B48C;
  padding-left: 0.08em;
  margin-top: 0.05em;
}

/* Divider */
.consultation__divider {
  width: 100%;
  max-width: 24rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 180, 140, 0.6), rgba(212, 180, 140, 0.05));
  margin: 0.5rem 0;
}

/* Details */
.consultation__details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
}

.consultation__detail {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: #F5F0E8;
}

.consultation__detail-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #D4B48C;
  font-weight: 400;
  min-width: 28px;
}

.consultation__detail-sep {
  color: rgba(212, 180, 140, 0.5);
  font-weight: 300;
}

.consultation__detail-text {
  font-weight: 300;
  letter-spacing: 0.005em;
}

/* Channels */
.consultation__channels {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.consultation__channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(212, 180, 140, 0.55);
  color: #D4B48C;
  background: rgba(212, 180, 140, 0.03);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.consultation__channel:hover {
  background: #D4B48C;
  color: #16301F;
  border-color: #D4B48C;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(212, 180, 140, 0.4);
}

.consultation__channel svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.consultation__channel:hover svg {
  transform: scale(1.1);
}

/* ============================================================
   05 — FORM WRAP
   ============================================================ */
.consultation__form-wrap {
  position: relative;
}

.consult-form {
  position: relative;
  background: #FFFFFF;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.4),
    0 10px 30px rgba(0, 0, 0, 0.25);
  max-height: 88vh;
  overflow-y: auto;
}

/* گوشه‌های طلایی */
.consult-form__corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #D4B48C;
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  z-index: 2;
}

.consult-form__corner--tl {
  top: 12px; left: 12px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.consult-form__corner--br {
  bottom: 12px; right: 12px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* ============================================================
   06 — FORM HEADER
   ============================================================ */
.consult-form__header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 180, 140, 0.35);
  text-align: center;
}

.consult-form__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: #0A0A0A;
}

.consult-form__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: #6B6B6B;
  letter-spacing: 0.005em;
}

/* ============================================================
   07 — FIELDSET
   ============================================================ */
.consult-form__fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  padding: 0;
  margin: 0;
}

.consult-form__legend {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 180, 140, 0.3);
  width: 100%;
  margin-bottom: 0.5rem;
}

.consult-form__legend-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #B8976E;
  font-weight: 400;
}

.consult-form__legend-sep {
  color: rgba(212, 180, 140, 0.6);
  font-size: 0.85rem;
}

.consult-form__legend-text {
  font-family: 'General Sans', sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #B8976E;
}

/* ============================================================
   08 — GRID
   ============================================================ */
.consult-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1.5rem;
}

/* ============================================================
   09 — FIELD
   ============================================================ */
.field {
  position: relative;
  padding: 1.15rem 0 0.5rem;
  border-bottom: 1px solid rgba(10, 10, 10, 0.14);
  transition: border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 46px;
}

.field--full {
  grid-column: 1 / -1;
}

.field:focus-within {
  border-bottom-color: #D4B48C;
}

/* Label */
.field label {
  position: absolute;
  top: 1.2rem;
  left: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: #6B6B6B;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.3s ease,
    font-size 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
}

.field__required {
  color: #B8976E;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Inputs */
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.4rem 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #0A0A0A;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1;
}

.field textarea {
  min-height: 40px;
}

/* Floating label */
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label {
  transform: translateY(-1.35rem);
  font-size: 0.62rem;
  color: #B8976E;
  letter-spacing: 0.05em;
}

/* ============================================================
   10 — ⚡ DATE FIELD — رفع مشکل mm/dd/yyyy
   ============================================================ */
.field input[type="date"] {
  color: #0A0A0A;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding-right: 1.75rem;
}

/* پنهان کردن placeholder داخلی (mm/dd/yyyy) */
.field input[type="date"]::-webkit-datetime-edit {
  color: transparent;
}

.field input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  color: transparent;
}

.field input[type="date"]::-webkit-datetime-edit-text {
  color: transparent;
}

.field input[type="date"]::-webkit-datetime-edit-month-field,
.field input[type="date"]::-webkit-datetime-edit-day-field,
.field input[type="date"]::-webkit-datetime-edit-year-field {
  color: transparent;
}

/* وقتی کاربر تاریخ انتخاب کرد → نمایش بده */
.field input[type="date"]:valid::-webkit-datetime-edit,
.field input[type="date"]:valid::-webkit-datetime-edit-fields-wrapper,
.field input[type="date"]:valid::-webkit-datetime-edit-text,
.field input[type="date"]:valid::-webkit-datetime-edit-month-field,
.field input[type="date"]:valid::-webkit-datetime-edit-day-field,
.field input[type="date"]:valid::-webkit-datetime-edit-year-field {
  color: #0A0A0A;
}

/* وقتی focus → نمایش بده */
.field input[type="date"]:focus::-webkit-datetime-edit,
.field input[type="date"]:focus::-webkit-datetime-edit-fields-wrapper,
.field input[type="date"]:focus::-webkit-datetime-edit-text,
.field input[type="date"]:focus::-webkit-datetime-edit-month-field,
.field input[type="date"]:focus::-webkit-datetime-edit-day-field,
.field input[type="date"]:focus::-webkit-datetime-edit-year-field {
  color: #0A0A0A;
}

/* آیکون تقویم — طلایی */
.field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
  filter: brightness(0) saturate(100%) invert(70%) sepia(20%) saturate(800%) hue-rotate(350deg);
  transition: opacity 0.3s ease;
  padding: 0;
  margin-left: 0;
}

.field input[type="date"]:hover::-webkit-calendar-picker-indicator,
.field input[type="date"]:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* Firefox */
.field input[type="date"] {
  -moz-appearance: textfield;
}

.field input[type="date"]::-moz-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

/* ============================================================
   11 — SELECT
   ============================================================ */
.field__select {
  position: relative;
  width: 100%;
}

.field__select-caret {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #B8976E;
  pointer-events: none;
  z-index: 2;
}

.field select {
  cursor: pointer;
  padding-right: 1.25rem;
}

.field select option {
  background: #FFFFFF;
  color: #0A0A0A;
  padding: 0.5rem;
}

/* ============================================================
   12 — HINT
   ============================================================ */
.field__hint {
  font-size: 0.68rem;
  font-weight: 400;
  color: #B8976E;
  margin-top: 0.4rem;
  opacity: 0.8;
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

/* ============================================================
   13 — CHECKBOX
   ============================================================ */
.consult-form__consent {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(212, 180, 140, 0.25);
}

.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #3D3D3D;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox__mark {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: #2D5A3D;
  border: 1px solid #2D5A3D;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: all 0.3s ease;
  margin-top: 2px;
}

.checkbox__mark svg {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: scale(1);
}

.checkbox input:not(:checked) ~ .checkbox__mark {
  background: transparent;
  border-color: rgba(10, 10, 10, 0.25);
  color: transparent;
}

.checkbox input:not(:checked) ~ .checkbox__mark svg {
  transform: scale(0.3);
}

.checkbox:hover .checkbox__mark {
  border-color: #2D5A3D;
}

.checkbox input:focus-visible ~ .checkbox__mark {
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.2);
}

.checkbox__label {
  color: #3D3D3D;
  font-weight: 400;
}

/* ============================================================
   14 — SUBMIT
   ============================================================ */
.consult-form__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  font-family: 'General Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  background: #2D5A3D;
  color: #FFFFFF;
  border: 1px solid #2D5A3D;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
  margin-top: 0.25rem;
}

.consult-form__btn:hover {
  background: #3D7A52;
  border-color: #3D7A52;
  box-shadow: 0 14px 40px rgba(45, 90, 61, 0.3);
}

.consult-form__btn-arrow {
  font-size: 1rem;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.consult-form__btn:hover .consult-form__btn-arrow {
  transform: translateX(5px);
}

.consult-form__note {
  font-size: 0.78rem;
  color: #2D5A3D;
  min-height: 1.2em;
  text-align: center;
  font-family: 'Inter', sans-serif;
  margin-top: 0.25rem;
}

.consult-form__note.is-error {
  color: #A33;
}

/* Scrollbar */
.consult-form::-webkit-scrollbar {
  width: 4px;
}
.consult-form::-webkit-scrollbar-track {
  background: transparent;
}
.consult-form::-webkit-scrollbar-thumb {
  background: rgba(212, 180, 140, 0.4);
  border-radius: 2px;
}

/* ============================================================
   15 — RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .consultation__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .consultation__content {
    max-width: 100%;
    text-align: center;
    align-items: center;
  }

  .consultation__divider {
    margin-left: auto;
    margin-right: auto;
  }

  .consultation__details {
    align-items: center;
  }

  .consultation__channels {
    justify-content: center;
  }

  .consult-form {
    max-height: none;
    overflow-y: visible;
  }

  .consultation__overlay {
    background:
      linear-gradient(
        180deg,
        rgba(22, 48, 31, 0.7) 0%,
        rgba(22, 48, 31, 0.85) 50%,
        rgba(22, 48, 31, 0.95) 100%
      );
  }
}

@media (max-width: 900px) {
  .consultation {
    padding: 5rem var(--pad);
    min-height: auto;
  }

  .consult-form__grid {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .consult-form {
    padding: 1.5rem;
  }

  .consultation__bg img {
    filter: blur(8px) brightness(0.6);
  }
}

@media (max-width: 500px) {
  .consult-form {
    padding: 1.25rem;
  }

  .consult-form__title {
    font-size: 1.2rem;
  }

  .consultation__title {
    font-size: 2.2rem;
  }

  .consultation__channel {
    width: 48px;
    height: 48px;
  }

  .consultation__detail {
    font-size: 0.95rem;
  }

  .consult-form__corner--tl,
  .consult-form__corner--br {
    width: 20px;
    height: 20px;
  }
}

/* ============================================================
   16 — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .field,
  .field label,
  .checkbox__mark,
  .consult-form__btn,
  .consultation__channel {
    transition: none;
  }

  .consultation__bg img {
    filter: blur(3px) brightness(0.85);
    transform: none;
  }

  .consultation__channel:hover {
    transform: none;
  }
}

/* توی consultation.css، این‌ها رو جایگزین کن */

.consult-form {
  /* max-height رو حذف کن یا به 90vh تغییر بده */
  max-height: none;      /* ⚡ حذف محدودیت */
  overflow-y: visible;   /* ⚡ بدون اسکرول داخلی */
  padding: clamp(1.25rem, 2vw, 1.75rem);   /* ⚡ padding کمتر */
  gap: 1rem;             /* ⚡ gap کمتر */
}

.consult-form__header {
  padding-bottom: 0.75rem;   /* از 1rem کمتر */
}

.consult-form__fieldset {
  gap: 0.25rem;              /* از 0.5 کمتر */
}

.consult-form__legend {
  padding-bottom: 0.4rem;    /* از 0.5 کمتر */
  margin-bottom: 0.35rem;    /* از 0.5 کمتر */
}

.field {
  padding: 1rem 0 0.4rem;    /* از 1.15rem/0.5 کمتر */
  min-height: 42px;          /* از 46 کمتر */
}

.field textarea {
  min-height: 36px;          /* از 40 کمتر */
}

.consult-form__consent {
  padding-top: 0.6rem;       /* از 0.75 کمتر */
}

.consult-form__btn {
  padding: 0.9rem 1.5rem;    /* از 1rem کمتر */
  margin-top: 0.15rem;
}


/* ============================================================
   FIELD — فاصله‌ی بیشتر بین label و متن
   ============================================================ */
.field {
  position: relative;
  padding: 1.75rem 0 0.5rem;      /* ⚡ از 1.15rem به 1.75rem */
  border-bottom: 1px solid rgba(10, 10, 10, 0.14);
  transition: border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 56px;               /* ⚡ از 46 به 56 */
}

/* Label — موقعیت اولیه (وسط فیلد) */
.field label {
  position: absolute;
  top: 1.65rem;                   /* ⚡ از 1.2 به 1.65 */
  left: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: #6B6B6B;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.3s ease,
    font-size 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
}

/* Inputs — فاصله‌ی بیشتر از label */
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.6rem 0 0.25rem;      /* ⚡ از 0.4 به 0.6 */
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #0A0A0A;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;            /* ⚡ فاصله از label */
}

.field textarea {
  min-height: 60px;               /* ⚡ از 40 به 60 */
  margin-top: 0.5rem;
}

/* Floating label — وقتی کاربر تایپ می‌کنه یا focus */
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label {
  transform: translateY(-1.65rem);   /* ⚡ از 1.35 به 1.65 — بیشتر بالا می‌ره */
  font-size: 0.6rem;
  color: #B8976E;
  letter-spacing: 0.05em;
}