.site-main:has(.contact-page) {
  width: min(860px, calc(100% - 28px));
}

.contact-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-hero {
  border-radius: 24px;
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(16, 58, 50, .94), rgba(32, 90, 76, .78)),
    var(--green);
  border: 1px solid var(--line);
  display: grid;
  align-items: end;
}

.contact-hero-inner {
  padding: 30px 26px;
}

.contact-hero h1 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
}

.contact-hero p {
  margin: 0;
  max-width: 40rem;
  color: rgba(247, 243, 233, .9);
  line-height: 1.8;
  font-weight: 600;
}

.contact-alert {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  line-height: 1.6;
}

.contact-alert.ok {
  background: rgba(236, 253, 243, .95);
  color: #067647;
  border: 1px solid #abefc6;
}

.contact-alert.err {
  background: rgba(254, 243, 242, .95);
  color: #b42318;
  border: 1px solid #fecdca;
}

.contact-panel {
  border-radius: 22px;
  background: var(--ivory);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .16);
  padding: 22px;
  color: var(--green);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-field label {
  font-weight: 800;
  color: var(--green);
  font-size: .92rem;
}

.contact-field label span {
  color: #b42318;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(16, 58, 50, .22);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--green);
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.contact-field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.7;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 164, 107, .22);
}

.contact-error {
  color: #b42318;
  font-size: .82rem;
  font-weight: 700;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.contact-submit {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  background: linear-gradient(135deg, #103A32, #205A4C);
  color: #F7F3E9;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(16, 58, 50, .28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.contact-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(16, 58, 50, .34);
}

.contact-note {
  margin: 0;
  color: rgba(16, 58, 50, .68);
  font-weight: 700;
  font-size: .86rem;
  line-height: 1.6;
}

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

  .contact-panel {
    padding: 16px;
  }
}
