/* ============ Reset & base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1b5055 0%, #216369 50%, #2a7a80 100%);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

/* ============ Contenedor principal ============ */
.form-container {
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 248, 106, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 560px;
  padding: 45px 45px 40px;
  position: relative;
}

/* ============ Logo superior ============ */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}
.brand img { height: 42px; width: auto; }
.brand span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
}

/* ============ Títulos ============ */
h1.title {
  color: #d4f86a;
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 700;
}
p.description {
  color: #d9ecec;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 32px;
}

/* ============ Campos ============ */
label {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: .2px;
}
label .req { color: #d4f86a; }

.input-group {
  position: relative;
  margin-bottom: 18px;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  color: #1f3b4d;
  font-family: inherit;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.input-group select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23216369' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
  cursor: pointer;
}

.input-group textarea {
  resize: vertical;
  min-height: 120px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: #d4f86a;
  box-shadow: 0 0 0 4px rgba(212, 248, 106, 0.15);
}

.input-group input.invalido,
.input-group select.invalido,
.input-group textarea.invalido {
  border-color: #e53935;
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: #8a9aa0;
}

/* ============ Honeypot (invisible para humanos) ============ */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============ Captcha ============ */
.captcha-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 6px;
}
.captcha-img-box {
  background: #fff;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  position: relative;
}
.captcha-img-box img {
  display: block;
  height: 52px;
  width: auto;
  user-select: none;
}
.captcha-img-box::after {
  content: '↻';
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 11px;
  color: #216369;
  opacity: .55;
  pointer-events: none;
}
.captcha-wrap input {
  flex: 1;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  color: #1f3b4d;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  text-align: center;
}
.captcha-wrap input:focus { border-color: #d4f86a; }

/* ============ Mensajes de error ============ */
.error {
  display: block;
  color: #ffb3b3;
  font-size: 12.5px;
  min-height: 15px;
  margin-top: 4px;
}

/* ============ Botón principal ============ */
button.submit-btn {
  width: 100%;
  background-color: #d4f86a;
  color: #1f3b4d;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 12px;
  transition: background-color .2s, transform .1s;
}
button.submit-btn:hover { background-color: #c5ea57; }
button.submit-btn:active { transform: translateY(1px); }
button.submit-btn:disabled {
  background-color: #a9c451;
  cursor: not-allowed;
  opacity: .8;
}

/* ============ Respuesta global ============ */
.respuesta {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14.5px;
  display: none;
  line-height: 1.4;
}
.respuesta.ok {
  display: block;
  background: rgba(212, 248, 106, 0.12);
  border: 1px solid #d4f86a;
  color: #eaffb0;
}
.respuesta.error {
  display: block;
  background: rgba(229, 57, 53, 0.15);
  border: 1px solid #e57373;
  color: #ffd0d0;
}

/* ============ Footer del form ============ */
.form-footer {
  margin-top: 22px;
  font-size: 12px;
  color: #a8c7c7;
  text-align: center;
  line-height: 1.5;
}
.form-footer a { color: #d4f86a; text-decoration: none; }

/* ============ Responsive ============ */
@media (max-width: 520px) {
  .form-container { padding: 30px 22px; border-radius: 12px; }
  h1.title { font-size: 26px; }
  .captcha-wrap { flex-direction: column; }
  .captcha-img-box img { height: 46px; }
}