/* ==========================================================================
   contact.css — Rimas 2.0 Contact Page
   Owns contact-page-specific layout, form styling, overlays, and locations.
   ========================================================================== */

.contact-page {
  background:
    linear-gradient(
      180deg,
      #f6f7fb 0,
      #f6f7fb 18%,
      #eef3f9 18%,
      #eef3f9 62%,
      #f6f7fb 62%,
      #f6f7fb 100%
    );
}

.contact-page main {
  padding-bottom: 2rem;
}

.contact-page .form-section {
  width: min(90vw, 1200px);
}

.contact-hero {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
}

.contact-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

.contact-hero .lead {
  max-width: 48rem;
  margin-inline: auto;
  color: rgba(16, 35, 71, 0.84);
}

.hero-classic--contact {
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

.hero-classic--contact .hero-overlay {
  background: linear-gradient(
    90deg,
    rgba(15, 47, 84, 0.68) 0%,
    rgba(27, 79, 126, 0.42) 55%,
    rgba(15, 47, 84, 0.18) 100%
  );
}

.hero-classic--contact .hero-bg img {
  object-position: 82% center;
}

.hero-classic--contact .hero-content {
  max-width: 760px;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.hero-classic--contact .hero-title,
.hero-classic--contact .hero-subtitle {
  color: #ffffff;
}

.hero-classic--contact .hero-subtitle {
  max-width: 52ch;
}

#contact-form {
  scroll-margin-top: 88px;
}

.scroll-anchor {
  scroll-margin-top: 88px;
}

.contact-form .contact-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.contact-form .form-label {
  font-weight: 600;
  color: #24354f;
  margin-bottom: 0.45rem;
}

.contact-form .form-label__optional {
  font-weight: 500;
  color: rgba(36, 53, 79, 0.62);
}

.contact-form .form-control,
.contact-form .form-select {
  border-radius: 10px;
  border: 1px solid rgba(15, 47, 84, 0.12);
  min-height: 48px;
  box-shadow: none;
}

.contact-form textarea.form-control {
  min-height: 148px;
  resize: vertical;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: rgba(22, 104, 232, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(22, 104, 232, 0.12);
}

.contact-form .form-text {
  color: rgba(36, 53, 79, 0.72);
  font-size: 0.92rem;
}

.contact-form__info {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 47, 84, 0.08);
}

.form-subheading {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  margin-bottom: 1rem;
  color: #1c2a40;
}

.form-helper {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.form-helper.is-error {
  color: #b42318;
}

.form-helper.is-success {
  color: #067647;
}

.form-helper.is-info {
  color: #175cd3;
}

.privacy-disclosure {
  color: rgba(16, 35, 71, 0.84);
  max-width: 38rem;
}

.privacy-disclosure a {
  font-weight: 600;
}

.locations .locations-surface {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.locations-header {
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.locations-intro {
  max-width: 38rem;
  color: rgba(16, 35, 71, 0.74);
}

.locations-list {
  display: grid;
  gap: 1.25rem;
}

.location {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid rgba(15, 47, 84, 0.08);
  border-radius: 18px;
  padding: 1rem;
  background: #ffffff;
}

.location-map-image {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 47, 84, 0.08);
}

.location-map-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.location-map-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-weight: 600;
}

.location-info h3 {
  margin-bottom: 0.75rem;
  color: #1b263b;
}

.location-info p {
  margin-bottom: 0.5rem;
  color: rgba(16, 35, 71, 0.84);
}

.location-info p:last-child {
  margin-bottom: 0;
}

.location-info a {
  font-weight: 600;
}

.location-info {
  text-align: right;
  justify-self: end;
  max-width: 46rem;
}

.locations-header {
  align-items: flex-start;
}

.locations-intro {
  text-align: right;
}

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 22, 40, 0.56);
  z-index: 10000;
}

.overlay-card {
  width: min(100%, 460px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 54px rgba(6, 24, 44, 0.28);
  padding: 1.75rem 1.5rem;
  text-align: center;
  position: relative;
}

.overlay-card h2 {
  margin-bottom: 0.75rem;
  color: #1c2a40;
}

.overlay-card p {
  margin-bottom: 1.25rem;
  color: rgba(16, 35, 71, 0.82);
}

.overlay-card button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  background: #175cd3;
  color: #ffffff;
  font-weight: 600;
}

.overlay-card.error button {
  background: #b42318;
}

.checkmark,
.crossmark {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 700;
}

.checkmark {
  background: rgba(6, 118, 71, 0.12);
  color: #067647;
}

.crossmark {
  background: rgba(180, 35, 24, 0.12);
  color: #b42318;
}

.overlay.fade-out {
  animation: overlayFadeOut 0.22s ease forwards;
}

@keyframes overlayFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (max-width: 991.98px) {
  .location {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .location-info,
  .locations-intro {
    text-align: left;
    justify-self: start;
  }

  .location-map-image img {
    height: 260px;
  }
}

@media (max-width: 767.98px) {
  .contact-page {
    background:
      linear-gradient(
        180deg,
        #f6f7fb 0,
        #f6f7fb 22%,
        #eef3f9 22%,
        #eef3f9 64%,
        #f6f7fb 64%,
        #f6f7fb 100%
      );
  }

  .contact-form .contact-card,
  .locations .locations-surface,
  .contact-hero {
    border-radius: 16px;
  }

  .contact-form .d-flex.flex-column.flex-sm-row {
    align-items: stretch !important;
  }

  .contact-form .btn {
    width: 100%;
  }

  .location-map-image img {
    height: 220px;
  }
}

@media (max-width: 575.98px) {
  .contact-page .form-section {
    width: min(94vw, 1200px);
  }

  .contact-hero h1 {
    font-size: clamp(1.85rem, 7vw, 2.35rem);
  }

  .locations-header {
    margin-bottom: 1.25rem;
  }

  .overlay-card {
    padding: 1.5rem 1.1rem;
  }
}