/* Contact page: a single centered card (illustration on top, form below),
   plus the "message sent" popup (.is-open set by the inline script in contact.hbs) */
.contact-section { padding: 4rem 0; }

.contact-form-card {
  max-width: 380px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(7, 26, 77, .1);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

/* Google Maps embed next to the form; stretches to the card's height on desktop */
.contact-map {
  height: 100%;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(7, 26, 77, .1);
  overflow: hidden;
  background: var(--blue-light);
  display: flex;
  flex-direction: column;
}
.contact-map-tabs { display: flex; gap: .4rem; padding: .5rem; background: #fff; border-bottom: 1px solid var(--border); }
.contact-map-tab {
  flex: 1;
  border: 1.5px solid var(--border);
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 10px;
  padding: .45rem .75rem;
  font-size: .85rem;
  font-weight: 700;
  transition: background .15s, color .15s, border-color .15s;
}
.contact-map-tab:hover { border-color: var(--blue); }
.contact-map-tab.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.contact-map-frames { position: relative; flex: 1; min-height: 360px; }
.contact-map-frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact-map-frames iframe[hidden] { display: none; }

.contact-form-image {
  background: var(--blue-light);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-form-image .contact-image { width: 100%; max-width: 180px; height: auto; }

.contact-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .4rem; }
.contact-subtitle { color: var(--muted); margin: 0 auto 1.25rem; max-width: 320px; font-size: .9rem; }

.contact-form-simple { text-align: left; }
.contact-form-simple .form-label { font-weight: 700; color: var(--blue-dark); font-size: .9rem; margin-bottom: .4rem; }
.contact-form-simple .form-control,
.contact-form-simple .form-select {
  background: var(--blue-light);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .95rem;
}
.contact-form-simple .form-control::placeholder { color: #7ea3d6; }
.contact-form-simple .form-control:focus,
.contact-form-simple .form-select:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 .15rem rgba(29, 78, 216, .15);
}
.form-control.is-invalid { border-color: #dc2626; }

.cf-turnstile { display: flex; justify-content: center; margin: .5rem 0 1.25rem; }
.contact-submit-pill { width: 100%; margin-top: 0; }

@media (max-width: 575px) {
  .contact-form-card { padding: 2rem 1.25rem; }
}

/* Terminal modal */
.contact-message { min-height: 104px; resize: vertical; }
.contact-popup-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(7, 26, 77, .55); }
.contact-popup-overlay.is-open { display: flex; animation: contact-popup-fade .2s ease-out; }
.contact-popup { width: 100%; max-width: 420px; padding: 2.25rem 1.75rem 1.75rem; background: #fff; border-radius: 18px; text-align: center; box-shadow: 0 24px 60px rgba(7, 26, 77, .25); animation: contact-popup-in .25s cubic-bezier(.2, .8, .3, 1); }
.contact-popup-icon { width: 64px; height: 64px; margin: 0 auto 1.1rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 1.7rem; box-shadow: 0 0 0 8px var(--blue-light); }
.contact-popup-icon.is-error { background: #dc2626; box-shadow: 0 0 0 8px #fee2e2; }
.contact-popup h2 { margin: 0 0 .6rem; font-size: 1.35rem; font-weight: 800; }
.contact-popup p { margin: 0 0 1.5rem; color: var(--muted); line-height: 1.6; }
.contact-popup p a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.contact-popup-btn { min-width: 140px; padding: .7rem 1.6rem; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font-family: var(--font-head); font-weight: 700; cursor: pointer; transition: background .2s; }
.contact-popup-btn:hover, .contact-popup-btn:focus-visible { background: var(--blue-dark); }
@keyframes contact-popup-fade { from { opacity: 0; } }
@keyframes contact-popup-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* Side-by-side layout: the form keeps its fixed width, the map takes the rest */
@media (min-width: 992px) {
  .contact-section .col-lg-auto .contact-form-card { width: 380px; }
}
