.contact-page {
  --contact-info-bg: linear-gradient(145deg, #f76922 0%, #e85a18 48%, #d83f31 100%);
  position: relative;
  min-height: calc(100vh - 12rem);
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem);
  box-sizing: border-box;
  background-color: #e4eaf0;
  /* SVG preferred; PNG fallback if SVG fails to load on older caches */
  background-image:
    url("../images/world-map.svg"),
    url("../images/world-map.webp");
  background-repeat: no-repeat, no-repeat;
  background-position: center 38%, center 38%;
  background-size: min(1180px, 96vw) auto, min(1180px, 96vw) auto;
}

.contact-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(238, 242, 246, 0.42) 42%,
    rgba(228, 234, 240, 0.52) 100%
  );
  pointer-events: none;
}

.contact-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    ellipse 90% 75% at 50% 40%,
    rgba(255, 255, 255, 0) 0%,
    rgba(232, 238, 244, 0.35) 100%
  );
  pointer-events: none;
}

/* Clear fixed / sticky mobile headers (public + members contact) */
body.contact-page-body .contact-page,
body.publicPageBody.contact-page-body .contact-page {
  padding-top: clamp(5rem, 14vw, 6.5rem);
}

.contact-page__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 1080px;
  margin: 0 auto;
  align-items: stretch;
}

.contact-page__info {
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  color: #fff;
  background: var(--contact-info-bg);
  background-image: var(--contact-info-bg),
    url("../images/orange-contact-vector.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right center;
  background-size: cover, auto 85%;
  box-shadow: 0 12px 40px rgba(216, 63, 49, 0.22);
}

.contact-page__info-title {
  margin: 0 0 0.5rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.contact-page__info-lead {
  margin: 0 0 1.75rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  max-width: 22rem;
}

.contact-page__detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-page__detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
}

.contact-page__detail-item img {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin-top: 2px;
  opacity: 0.95;
}

.contact-page__detail-item a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-page__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.contact-page__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-page__social a:hover,
.contact-page__social a:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.contact-page__social img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.contact-page__form-panel {
  display: flex;
  align-items: flex-start;
}

.contact-page__form-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid rgba(19, 15, 25, 0.08);
  box-shadow: 0 10px 36px rgba(19, 15, 25, 0.08);
}

.contact-page__form-title {
  margin: 0 0 0.35rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #130f19;
  letter-spacing: -0.02em;
}

.contact-page__form-intro {
  margin: 0 0 1.5rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #646464;
  max-width: 36rem;
}

.contact-page__errors {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.contact-page__errors .modalBoxError:empty {
  display: none;
}

.contact-page__field {
  margin-bottom: 1.15rem;
}

.contact-page__label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #130f19;
}

.contact-page__input,
.contact-page__textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: #130f19;
  background: #f8f9fb;
  border: 1px solid rgba(19, 15, 25, 0.12);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-page__input::placeholder,
.contact-page__textarea::placeholder {
  color: #9aa3ad;
}

.contact-page__input:hover,
.contact-page__textarea:hover {
  border-color: rgba(247, 105, 34, 0.35);
}

.contact-page__input:focus,
.contact-page__textarea:focus {
  outline: none;
  border-color: var(--8bm-orange, #f76922);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(247, 105, 34, 0.18);
}

.contact-page__textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.contact-page__submit {
  width: 100%;
  margin-top: 0.5rem;
  min-height: 48px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px !important;
}

.contact-page__success {
  visibility: hidden;
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(34, 139, 34, 0.1);
  border: 1px solid rgba(34, 139, 34, 0.25);
  text-align: center;
}

.contact-page__success p {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f6b1f;
}

@media (max-width: 900px) {
  .contact-page {
    background-position: center 22%, center 22%;
    background-size: min(920px, 130vw) auto, min(920px, 130vw) auto;
    min-height: 0;
  }

  body.contact-page-body .contact-page,
  body.publicPageBody.contact-page-body .contact-page {
    padding-top: 5.25rem;
  }

  .contact-page__layout {
    grid-template-columns: 1fr;
  }

  .contact-page__info {
    background-size: cover, 55% auto;
    background-position: center, right -10% center;
  }

  .contact-page__info-lead {
    max-width: none;
  }

  .contact-page__social {
    margin-top: 1.25rem;
    padding-top: 1rem;
  }
}

@media (max-width: 480px) {
  .contact-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact-page__form-card,
  .contact-page__info {
    border-radius: 16px;
  }
}
