:root {
  --ebio-contact-green: #5f9f2f;
  --ebio-contact-green-dark: #315f22;
  --ebio-contact-blue: #2159b7;
  --ebio-contact-ink: #17211a;
  --ebio-contact-muted: #5f6e62;
  --ebio-contact-paper: #ffffff;
  --ebio-contact-soft: #f2f6ef;
  --ebio-contact-line: rgba(38, 77, 43, .18);
}

.ebio-contact-page {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 78px;
  color: var(--ebio-contact-ink);
}

.ebio-contact-hero {
  max-width: 850px;
  margin: 0 auto 34px;
  text-align: center;
}

.ebio-contact-kicker {
  margin: 0 0 8px;
  color: var(--ebio-contact-green-dark);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .82rem;
}

.ebio-contact-hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 7vw, 5.3rem);
  line-height: .95;
  letter-spacing: -.045em;
}

.ebio-contact-lead {
  max-width: 760px;
  margin: 20px auto 0;
  color: var(--ebio-contact-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.72;
}

.ebio-contact-layout {
  display: grid;
  grid-template-columns: minmax(270px, .78fr) minmax(0, 1.35fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: stretch;
}

.ebio-contact-info,
.ebio-contact-form-card {
  border-radius: 30px;
  border: 1px solid var(--ebio-contact-line);
  box-shadow: 0 20px 55px rgba(27, 54, 30, .10);
}

.ebio-contact-info {
  padding: clamp(25px, 4vw, 46px);
  background:
    radial-gradient(circle at 88% 10%, rgba(131, 190, 75, .18), transparent 34%),
    linear-gradient(145deg, #f8fbf5, #eaf3e5);
}

.ebio-contact-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--ebio-contact-green-dark);
  font-size: 1.25rem;
}

.ebio-contact-mark__leaf {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ebio-contact-green);
  color: #fff;
  transform: rotate(-35deg);
}

.ebio-contact-info h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.ebio-contact-info > p {
  margin: 0;
  line-height: 1.75;
  color: var(--ebio-contact-muted);
}

.ebio-contact-email {
  display: grid;
  gap: 4px;
  margin: 30px 0;
  padding: 18px 0;
  border-top: 1px solid var(--ebio-contact-line);
  border-bottom: 1px solid var(--ebio-contact-line);
}

.ebio-contact-email span {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ebio-contact-muted);
}

.ebio-contact-email a {
  color: var(--ebio-contact-blue);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ebio-contact-warning {
  padding: 18px;
  border-radius: 19px;
  background: rgba(255, 255, 255, .68);
  border-left: 4px solid var(--ebio-contact-green);
}

.ebio-contact-warning strong {
  display: block;
  margin-bottom: 6px;
}

.ebio-contact-warning p {
  margin: 0;
  color: var(--ebio-contact-muted);
  font-size: .92rem;
  line-height: 1.6;
}

.ebio-contact-form-card {
  padding: clamp(25px, 4vw, 48px);
  background: var(--ebio-contact-paper);
}

.ebio-contact-form {
  margin: 0;
}

.ebio-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ebio-contact-field {
  display: grid;
  gap: 8px;
  margin: 0;
  font-weight: 750;
}

.ebio-contact-field--wide {
  grid-column: 1 / -1;
}

.ebio-contact-field span {
  font-size: .92rem;
}

.ebio-contact-field em {
  color: #b83131;
  font-style: normal;
}

.ebio-contact-field input,
.ebio-contact-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(38, 77, 43, .24);
  border-radius: 15px;
  background: #fbfdf9;
  color: var(--ebio-contact-ink);
  padding: 14px 16px;
  font: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.ebio-contact-field textarea {
  min-height: 190px;
  resize: vertical;
}

.ebio-contact-field input:focus,
.ebio-contact-field textarea:focus {
  border-color: var(--ebio-contact-green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(95, 159, 47, .13);
}

.ebio-contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 23px 0 19px;
  color: var(--ebio-contact-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.ebio-contact-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ebio-contact-green);
  flex: 0 0 auto;
}

.ebio-contact-consent a {
  color: var(--ebio-contact-blue);
  text-decoration: underline;
}

.ebio-contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 13px 23px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ebio-contact-green), var(--ebio-contact-green-dark));
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(49, 95, 34, .23);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ebio-contact-submit:hover,
.ebio-contact-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(49, 95, 34, .30);
}

.ebio-contact-note {
  margin: 18px 0 0;
  color: var(--ebio-contact-muted);
  font-size: .82rem;
}

.ebio-contact-notice {
  margin: 0 0 22px;
  padding: 15px 17px;
  border-radius: 14px;
  font-weight: 750;
}

.ebio-contact-notice--success {
  background: #e7f5de;
  color: #24541c;
  border: 1px solid #b8dda5;
}

.ebio-contact-notice--error {
  background: #fff1ef;
  color: #8c2d25;
  border: 1px solid #efc2bc;
}

.ebio-contact-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.ebio-back-to-top {
  position: fixed;
  right: clamp(14px, 2.2vw, 28px);
  bottom: clamp(78px, 9vh, 105px);
  z-index: 99998;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  background: linear-gradient(145deg, #6daf35, #315f22);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
  cursor: pointer;
  opacity: .94;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.ebio-back-to-top:hover,
.ebio-back-to-top:focus-visible {
  transform: translateY(-4px);
  opacity: 1;
  box-shadow: 0 15px 34px rgba(0, 0, 0, .30);
}

.ebio-back-to-top svg {
  width: 28px;
  height: 23px;
  margin-top: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ebio-back-to-top span {
  margin-top: -7px;
  font-size: .58rem;
  line-height: 1;
  letter-spacing: .09em;
  font-weight: 900;
}

/* Compatibilità con le modalità scure più comuni del tema eBioAgri. */
html[data-theme="night"] .ebio-contact-page,
body.is-night .ebio-contact-page,
body.night-mode .ebio-contact-page,
body.dark-mode .ebio-contact-page {
  --ebio-contact-ink: #f6f8f3;
  --ebio-contact-muted: #c6d0c4;
  --ebio-contact-paper: #142018;
  --ebio-contact-soft: #19271d;
  --ebio-contact-line: rgba(255, 255, 255, .16);
}

html[data-theme="night"] .ebio-contact-info,
body.is-night .ebio-contact-info,
body.night-mode .ebio-contact-info,
body.dark-mode .ebio-contact-info {
  background: linear-gradient(145deg, #17261b, #101a13);
}

html[data-theme="night"] .ebio-contact-field input,
html[data-theme="night"] .ebio-contact-field textarea,
body.is-night .ebio-contact-field input,
body.is-night .ebio-contact-field textarea,
body.night-mode .ebio-contact-field input,
body.night-mode .ebio-contact-field textarea,
body.dark-mode .ebio-contact-field input,
body.dark-mode .ebio-contact-field textarea {
  background: #101912;
  color: #fff;
  border-color: rgba(255, 255, 255, .20);
}

html[data-theme="night"] .ebio-contact-warning,
body.is-night .ebio-contact-warning,
body.night-mode .ebio-contact-warning,
body.dark-mode .ebio-contact-warning {
  background: rgba(255, 255, 255, .06);
}

@media (max-width: 780px) {
  .ebio-contact-page {
    width: min(100% - 20px, 680px);
    margin-top: 24px;
  }

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

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

  .ebio-contact-field--wide {
    grid-column: auto;
  }

  .ebio-contact-info,
  .ebio-contact-form-card {
    border-radius: 22px;
  }

  .ebio-back-to-top {
    width: 52px;
    height: 52px;
    right: 12px;
    bottom: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ebio-back-to-top,
  .ebio-contact-submit,
  .ebio-contact-field input,
  .ebio-contact-field textarea {
    transition: none;
  }
}
