/* ==========================================================
   CONTACT PAGE
   ========================================================== */

/* ===== Intro ===== */
.ibe-contact-intro {
  background: #FAF5EE;
  padding: 3rem 2rem 2.5rem;
}
.ibe-contact-intro__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.ibe-contact-intro__title {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  color: #434142;
  letter-spacing: 0;
  margin: 0 0 1.1rem 0;
}
.ibe-contact-intro__lede {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(26, 26, 26, 0.78);
  margin: 0 auto;
  max-width: 580px;
}

/* ===== Talk to us ===== */
.ibe-contact-form {
  background: #FAF5EE;
  padding: clamp(2.5rem, 5vw, 4.5rem) 2rem clamp(3rem, 6vw, 5rem);
}
.ibe-contact-form__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.ibe-contact-form__title {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  color: #434142;
  letter-spacing: 0;
  margin: 0;
}

/* ===== Form ===== */
.ibe-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-top: -41px;
}
.ibe-field {
  position: relative;
  display: block;
}
.ibe-field__label {
  position: absolute;
  left: 0;
  top: 12px;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: 0.9375rem;
  color: #434142;
  pointer-events: none;
  transition: transform 0.3s var(--ibe-transition), font-size 0.3s var(--ibe-transition), color 0.3s var(--ibe-transition);
  transform-origin: left center;
}
.ibe-field input,
.ibe-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.28);
  background: transparent;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: #434142;
  padding: 10px 0 10px 0;
  outline: none;
  resize: none;
  transition: border-color 0.3s ease;
}
.ibe-field textarea {
  min-height: 90px;
  line-height: 1.6;
}
.ibe-field--tall { grid-row: span 3; }
.ibe-field--tall textarea { min-height: 150px; }

.ibe-field input:focus,
.ibe-field textarea:focus {
  border-bottom-color: #FF4749;
}

.ibe-field input:focus + .ibe-field__label,
.ibe-field input:not(:placeholder-shown) + .ibe-field__label,
.ibe-field textarea:focus + .ibe-field__label,
.ibe-field textarea:not(:placeholder-shown) + .ibe-field__label,
.ibe-field:has(input:focus) .ibe-field__label,
.ibe-field:has(input:not(:placeholder-shown)) .ibe-field__label,
.ibe-field:has(textarea:focus) .ibe-field__label,
.ibe-field:has(textarea:not(:placeholder-shown)) .ibe-field__label,
.ibe-field.is-focused .ibe-field__label,
.ibe-field.has-value .ibe-field__label {
  transform: translateY(-22px) scale(0.82);
  color: rgba(26, 26, 26, 0.7);
}

/* CF7 compatibility: span wrapper + field variants */
.ibe-field .wpcf7-form-control-wrap { display: block; }
.ibe-field--full { grid-column: 1 / -1; }

/* CF7 inputs inside .ibe-field — match native field styling */
.ibe-cf7-wrap .ibe-field input[type="text"],
.ibe-cf7-wrap .ibe-field input[type="email"],
.ibe-cf7-wrap .ibe-field input[type="tel"],
.ibe-cf7-wrap .ibe-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.28);
  background: transparent;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: #434142;
  padding: 10px 0;
  outline: none;
  resize: none;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  border-radius: 0;
}
.ibe-cf7-wrap .ibe-field textarea { height:135px; min-height: 90px; line-height: 1.6; }
.ibe-cf7-wrap .ibe-field input:focus,
.ibe-cf7-wrap .ibe-field textarea:focus { border-bottom-color: #FF4749; }
.ibe-cf7-wrap .ibe-field input::placeholder,
.ibe-cf7-wrap .ibe-field textarea::placeholder { color: transparent; }

/* ===== Submit ===== */
.ibe-form__submit {
  position: relative;
  display: inline-block;
  background: transparent;
  border: 0;
  padding: 0 0 6px 0;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #434142;
  cursor: pointer;
  transition: color 0.45s var(--ibe-transition);
}
.ibe-form__submit span { display: inline-block; }
.ibe-form__submit::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 56px;
  background: #FF4749;
  transition: width 0.45s var(--ibe-transition);
}
.ibe-form__submit:hover { color: #FF4749; }
.ibe-form__submit:hover::before { width: 100%; }

/* ===== Offices ===== */
.ibe-offices {
  background: #FAF5EE;
  padding: clamp(2.5rem, 5vw, 4rem) 2rem clamp(3.5rem, 7vw, 6rem);
}
.ibe-offices__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.ibe-office__name {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: #434142;
  letter-spacing: 0;
  margin: 0 0 1.1rem 0;
}
.ibe-office__label {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: #434142;
  margin: 0 0 0.35rem 0;
}
.ibe-office__addr {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(26, 26, 26, 0.78);
  margin: 0 0 1.5rem 0;
}
.ibe-office__map {
  position: relative;
  display: inline-block;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #434142;
  text-decoration: none;
  padding-bottom: 6px;
  transition: color 0.45s var(--ibe-transition);
}
.ibe-office__map span { display: inline-block; }
.ibe-office__map::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 80px;
  background: #FF4749;
  transition: width 0.45s var(--ibe-transition);
}
.ibe-office__map:hover { color: #FF4749; }
.ibe-office__map:hover::before { width: 100%; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ibe-contact-form__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .ibe-form__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .ibe-field--tall { grid-row: auto; }
  .ibe-offices__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 700px) {
  .ibe-contact-intro { padding: 2rem 1.25rem 1.5rem; }
  .ibe-contact-form { padding: 2rem 1.25rem 2.5rem; }
  .ibe-offices { padding: 2rem 1.25rem 3rem; }
}

/* ===== RTL ===== */
[dir="rtl"] .ibe-field__label { left: auto; right: 0; transform-origin: right center; }
[dir="rtl"] .ibe-form__submit::before,
[dir="rtl"] .ibe-office__map::before { left: auto; right: 0; }

/* ===== Form feedback ===== */
.ibe-form__feedback {
  margin-top: 1.25rem;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
}
.ibe-form__feedback--ok  { color: #2e7d32; }
.ibe-form__feedback--err { color: #c62828; }

/* ===== CF7 form ===== */
.ibe-cf7-notice {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-size: 0.88rem;
  color: rgba(26, 26, 26, 0.55);
  font-style: italic;
  margin: 0;
}

.ibe-cf7-wrap .wpcf7 { width: 100%; }
.ibe-cf7-wrap .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.ibe-cf7-name-email,
.ibe-cf7-company-phone,
.ibe-cf7-position-phone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}
.ibe-cf7-wrap .wpcf7-form-control-wrap { display: block; }

.ibe-cf7-wrap input[type="text"],
.ibe-cf7-wrap input[type="email"],
.ibe-cf7-wrap input[type="tel"],
.ibe-cf7-wrap textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.28);
  background: transparent;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: #434142;
  padding: 10px 0;
  outline: none;
  resize: none;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  border-radius: 0;
}
.ibe-cf7-wrap textarea { min-height: 90px; line-height: 1.6; }

.ibe-cf7-wrap input[type="text"]:focus,
.ibe-cf7-wrap input[type="email"]:focus,
.ibe-cf7-wrap input[type="tel"]:focus,
.ibe-cf7-wrap textarea:focus { border-bottom-color: #FF4749; }

.ibe-cf7-wrap input[type="submit"],
.ibe-cf7-wrap .wpcf7-submit {
  display: inline-block;
  background-color: transparent;
  background-image: linear-gradient(#FF4749, #FF4749);
  background-size: 70px 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  border: 0;
  padding: 0 0 6px 0;
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #434142;
  cursor: pointer;
  transition: background-size 0.45s var(--ibe-transition), color 0.45s var(--ibe-transition);
}
.ibe-cf7-wrap input[type="submit"]:hover,
.ibe-cf7-wrap .wpcf7-submit:hover {
  background-size: 100% 1px;
  color: #FF4749;
}

.ibe-cf7-wrap .wpcf7-not-valid { border-bottom-color: #FF4749 !important; }
.ibe-cf7-wrap .wpcf7-not-valid-tip {
  font-size: 0.72rem;
  color: #FF4749;
  margin-top: 3px;
  display: block;
}
.ibe-cf7-wrap .wpcf7-response-output {
  font-size: 0.85rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 0;
  margin-left: 0;
}
.ibe-cf7-wrap .wpcf7-response-output:empty { display: none; }
.ibe-cf7-wrap .wpcf7-mail-sent-ok { border-color: #2e7d32; color: #2e7d32; }
.ibe-cf7-wrap .wpcf7-mail-sent-ng,
.ibe-cf7-wrap .wpcf7-aborted { border-color: #c62828; color: #c62828; }
.ibe-cf7-wrap .wpcf7-spam-blocked { border-color: #e65100; color: #e65100; }

@media (max-width: 700px) {
  .ibe-cf7-name-email,
  .ibe-cf7-company-phone,
  .ibe-cf7-position-phone { grid-template-columns: 1fr; gap: 2rem; }
}
[dir="rtl"] .ibe-cf7-wrap .wpcf7-not-valid-tip { text-align: right; }
