:root {
  --amhon-green:  #0B3F29;
  --amhon-yellow: #F0E527;
  --amhon-grey:   #485156;
  --amhon-cyan:   #00BCE4;
  --amhon-error:  #78280F;
  --font-base: 'Lato', system-ui, sans-serif;
  --border: #c7ccce;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 400;
  color: var(--amhon-grey);
  background: #eef0f1;
  line-height: 1.5;
}

.site-header {
  background: var(--amhon-green);
  padding: 20px 16px;
  text-align: center;
}

#logo-amhon {
  max-height: 80px;
  width: auto;
  mix-blend-mode: screen;
}

main {
  padding: 24px 16px 48px;
}

.card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  padding: 28px 22px;
}

h1 {
  font-weight: 900;
  text-transform: uppercase;
  color: var(--amhon-green);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.intro {
  margin: 0 0 24px;
  color: var(--amhon-grey);
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 700;
  color: var(--amhon-green);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--amhon-grey);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amhon-green);
  outline-offset: 1px;
  border-color: var(--amhon-green);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--amhon-error);
}

.error {
  color: var(--amhon-error);
  font-size: 0.875rem;
  font-weight: 700;
  margin: 4px 0 0;
  min-height: 0;
}
.error:empty { display: none; }

.hint {
  font-size: 0.9rem;
  margin: 0 0 14px;
}

.fecha-limite {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--amhon-green);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 24px;
}
.fecha-limite-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--amhon-yellow);
}
.fecha-limite-valor {
  font-weight: 900;
  font-size: 1.1rem;
}

.descripcion {
  margin: 0 0 28px;
  color: var(--amhon-grey);
  font-size: 0.95rem;
  line-height: 1.6;
}
.descripcion p { margin: 0 0 12px; }
.descripcion p:last-child { margin-bottom: 0; }
.descripcion ul.instituciones {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.descripcion ul.instituciones li {
  position: relative;
  padding: 4px 0 4px 22px;
  line-height: 1.4;
}
.descripcion ul.instituciones li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amhon-green);
}
.descripcion .aviso {
  background: #fff8e1;
  border-left: 4px solid var(--amhon-yellow);
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #5a4a00;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider span {
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amhon-grey);
  white-space: nowrap;
}

.phone-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.phone-wrapper:focus-within {
  outline: 3px solid var(--amhon-green);
  outline-offset: 1px;
  border-color: var(--amhon-green);
}
.phone-prefix {
  background: #f0f0f0;
  color: var(--amhon-grey);
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.phone-wrapper input {
  border: none;
  border-radius: 0;
  flex: 1;
}
.phone-wrapper input:focus-visible {
  outline: none;
  border-color: transparent;
}

/* Asistentes */
.asistentes {
  border: none;
  border-left: 4px solid var(--amhon-green);
  background: #f5f5f5;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 16px;
  margin: 0 0 24px;
}

legend {
  font-weight: 900;
  text-transform: uppercase;
  color: var(--amhon-green);
  padding: 0 8px 0 0;
  font-size: 1.1rem;
}

.asistente {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.asistente-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.asistente-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--amhon-green);
}

/* Botones */
.btn {
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 12px 20px;
  border: 2px solid transparent;
}

.btn-secondary {
  background: #fff;
  color: var(--amhon-green);
  border-color: var(--amhon-green);
}
.btn-secondary:hover:not(:disabled) { background: #f0f5f2; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--amhon-green);
  color: #fff;
  width: 100%;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary:hover:not(:disabled) { background: #0d4d32; }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }

.btn-remove {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  background: #fcebe6;
  color: var(--amhon-error);
  border: 1px solid #e6bcb0;
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
}
.btn-remove:hover { background: #f8ddd5; }

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.field-check input { margin-top: 4px; flex-shrink: 0; }
.field-check label {
  color: var(--amhon-grey);
  font-weight: 400;
  margin-bottom: 0;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn-primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mensaje del formulario */
.form-message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  display: none;
}
.form-message.success {
  display: block;
  background: #e7f3ec;
  color: var(--amhon-green);
  border-left: 4px solid var(--amhon-green);
}
.form-message.failure {
  display: block;
  background: #fcebe6;
  color: var(--amhon-error);
  border-left: 4px solid var(--amhon-error);
}

@media (min-width: 600px) {
  .card { padding: 36px 40px; }
  h1 { font-size: 1.75rem; }
}
