/* DSN 2027 readability, responsive form, and family-list layout fixes */

.header-nav {
  font-size: 0.88rem;
}

.detail-label {
  font-size: 0.98rem;
}

/* Reunion details: Date now occupies the combined footprint of the old
   Year + Date cards, while Location and Registration retain their relative size. */
.details-grid {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 1fr);
}

.detail-card-date {
  min-width: 0;
}

.detail-value-date {
  max-width: 100%;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.16;
  text-wrap: balance;
}

/* Vertical breathing room between reunion details and Family List. */
.family-list-section {
  padding-top: 30px !important;
}

/* ONE shared outer container. The two areas stay related, while a true
   internal gutter keeps the artwork and form from looking merged. */
.family-list-shell {
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr) !important;
  column-gap: 28px !important;
  row-gap: 0;
  align-items: stretch;
  background: rgba(245,242,237,.42);
}

.family-list-intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  background: var(--cream);
  border-right: 0 !important;
}

/* Never stretch or crop the approved artwork. */
.family-list-intro img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: top center !important;
  flex: 0 0 auto;
}

.form-wrap,
.family-form,
.form-grid,
.form-grid > *,
.field {
  min-width: 0;
}

/* Normal padding inside the form. The 28px grid gutter creates the
   negative space between the two visual areas. */
.form-wrap {
  padding: 24px 30px 22px;
}

.form-grid {
  gap: 16px 22px;
}

.field label {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 3px;
  font-size: 1rem;
  line-height: 1.35;
}

.field textarea {
  min-height: 96px;
}

.consent-row {
  gap: 11px;
  margin: 16px 0;
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 1.45;
}

.consent-row input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.submit-button {
  min-height: 50px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 700;
}

.form-status {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.footer-contact {
  font-size: 0.94rem;
  line-height: 1.45;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.footer-facebook svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

@media (max-width: 900px) {
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-card-date {
    grid-column: 1 / -1;
  }

  .family-list-section {
    padding-top: 24px !important;
  }

  .family-list-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    column-gap: 0 !important;
    row-gap: 20px !important;
  }

  .family-list-intro {
    border-right: 0 !important;
    border-bottom: 0 !important;
  }

  .family-list-intro img {
    width: min(100%, 520px) !important;
    margin: 0 auto;
  }

  .form-wrap {
    padding: 24px 28px 22px;
  }
}

@media (max-width: 680px) {
  .legacy p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .detail-card-date {
    grid-column: auto;
  }

  .detail-value-date {
    font-size: 1.55rem;
  }

  .family-list-section {
    padding-top: 20px !important;
  }

  .family-list-shell {
    row-gap: 16px !important;
  }

  .detail-card {
    min-height: 140px;
  }

  .form-wrap {
    padding: 22px 18px 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field label {
    margin-bottom: 7px;
    font-size: 1rem;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 48px;
    padding: 12px 13px;
    font-size: 1rem;
  }

  .field textarea {
    min-height: 108px;
  }

  .consent-row {
    font-size: 1rem;
  }

  .submit-button {
    min-height: 52px;
    font-size: 1rem;
  }

  .form-status {
    font-size: 0.96rem;
  }

  .footer-contact {
    font-size: 0.98rem;
  }

  .footer-links {
    align-items: center;
  }

  .family-list-intro img {
    width: 100% !important;
    max-width: 520px !important;
  }
}
