/*
 * Contact section: white cards with a soft shadow and an 8px radius on the
 * page background. The theme's global .card chrome (radius, shadow, margin,
 * hover scale) is reset here, and the quote form uses the gray filled fields
 * of the original Gutenberg block.
 *
 * Mobile-first: the unqueried rules below hold the phone (<=991px) cascade;
 * the @media (min-width: 992px) block at the end restores the desktop
 * (>=992px) values of every declaration the phone cascade overrides.
 */

.ergostil-contact {
  padding: 60px 0 80px;
}

.ergostil-contact__container {
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 20px;
}

.ergostil-contact .card {
  margin-right: 0;
  background-color: #fff;
  border: 1px solid #ececf1;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: none;
}

.ergostil-contact .card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: none;
}

/* The image card is fully covered by its image: no border ring. */
.ergostil-contact .card.ergostil-contact__media {
  border: 0;
}

.ergostil-contact .ergostil-contact__title {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  color: #2d2d3f;
}

.ergostil-contact .ergostil-contact__subtitle {
  max-width: 540px;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: #555;
}

.ergostil-contact .ergostil-contact__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #2d2d3f;
}

/* Phone (<=767px): 16px text so iOS Safari does not auto-zoom on focus;
   the desktop value (13px) is restored from min-width: 768px below. */
.ergostil-contact .form-control {
  padding: 7px 14px;
  font-size: 16px;
  color: #555;
  background-color: #ebebeb;
  border: 0;
  border-radius: 4px;
}

.ergostil-contact .form-control::placeholder {
  color: #888;
  font-size: 16px;
  opacity: 1;
}

.ergostil-contact .form-control:focus {
  background-color: #e0e0e0;
  border-color: transparent;
}

.ergostil-contact textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* 12px vertical padding grows the submit button to ~45px tall (>=44px tap
   target); horizontal padding scales with it so the button keeps its
   proportions. */
.ergostil-contact .btn-dark {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background-color: #2d2d3f;
  border-color: #2d2d3f;
  border-radius: 4px;
}

.ergostil-contact .btn-dark:hover,
.ergostil-contact .btn-dark:focus {
  color: #fff;
  background-color: #1a1a2e;
  border-color: #1a1a2e;
}

/* Showroom image overlay. */
.ergostil-contact .ergostil-contact__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.45);
}

.ergostil-contact .ergostil-contact__overlay span {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
}

.ergostil-contact .ergostil-contact__overlay p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

/* Info cards. */
.ergostil-contact .ergostil-contact__icon {
  font-size: 24px;
  color: #222;
}

.ergostil-contact .ergostil-contact__info-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #2d2d3f;
}

.ergostil-contact .ergostil-contact__info-value {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}

.ergostil-contact .ergostil-contact__info-subtitle {
  margin: 0;
  font-size: 12px;
  color: #888;
}

/* Phone (<=991px) overrides, folded into the base cascade (mobile-first).
   The desktop values are restored by the min-width: 992px block below. */
.ergostil-contact {
  padding: 40px 0 60px;
}

.ergostil-contact .ergostil-contact__header {
  margin-bottom: 30px;
}

/* Tablet and up: back to the designed 13px fields (no auto-zoom concern on
   larger viewports; desktop is unchanged from the original design). */
@media (min-width: 768px) {
  .ergostil-contact .form-control {
    font-size: 13px;
  }

  .ergostil-contact .form-control::placeholder {
    font-size: 13px;
  }
}

/* Desktop (>=992px): restore the values the phone cascade overrides.
   The header's margin-bottom reset below is a no-op in practice: the element
   carries Bootstrap's mb-5 utility (margin-bottom: 3rem !important), which
   outranks both the phone value above and this reset at every width. */
@media (min-width: 992px) {
  .ergostil-contact {
    padding: 60px 0 80px;
  }

  .ergostil-contact .ergostil-contact__header {
    margin-bottom: 0;
  }
}
