/* =============================================
   AMPER · Formulario de contacto corporativo
   ============================================= */

.amper-cf7 {
  background: #ffffff;
  border-top: 4px solid #99D600;
  border-radius: 4px;
  padding: 20px 36px 18px;
  box-shadow: 0 4px 24px rgba(14, 65, 86, .08);
  font-family: 'Montserrat', sans-serif;
}

/* Grid de columnas */
.acf-row {
  display: flex;
  gap: 24px;
  margin-bottom: 0;
}

/* Campo individual */
.acf-field {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
  margin-bottom: 6px;
}

.acf-field--full {
  flex-basis: 100%;
}

/* Eliminar márgenes que CF7 añade automáticamente */
.amper-cf7 .wpcf7-form-control-wrap {
  display: block;
  margin: 0;
  padding: 0;
}

.amper-cf7 br {
  display: none;
}

.amper-cf7 p {
  margin: 0;
  padding: 0;
}

/* Label estático */
.acf-field label {
  font-size: 11px;
  font-weight: 700;
  color: #7a9aaa;
  letter-spacing: .8px;
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1;
}

.acf-field label span {
  color: #99D600;
}

/* Inputs y textarea */
.amper-cf7 input[type="text"],
.amper-cf7 input[type="email"],
.amper-cf7 input[type="tel"],
.amper-cf7 textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 2px solid #c8d4d9;
  border-radius: 0;
  background: transparent;
  padding: 3px 0 5px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  color: #0e4156;
  outline: none;
  transition: border-color .2s ease;
  resize: none;
  line-height: 1.3;
}

.amper-cf7 input[type="text"]:focus,
.amper-cf7 input[type="email"]:focus,
.amper-cf7 input[type="tel"]:focus,
.amper-cf7 textarea:focus {
  border-bottom-color: #99D600;
}

.amper-cf7 textarea {
  height: 75px;
}

/* Placeholder */
.amper-cf7 input::placeholder,
.amper-cf7 textarea::placeholder {
  color: #c8d4d9;
  font-size: 14px;
}

/* Mensajes de error CF7 */
.amper-cf7 .wpcf7-not-valid-tip {
  font-size: 11px;
  color: #e05252;
  margin-top: 2px;
  display: block;
  line-height: 1;
}

.amper-cf7 .wpcf7-not-valid {
  border-bottom-color: #e05252 !important;
}

/* Texto legal */
.acf-legal {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #7a9aaa;
}

.acf-legal a {
  color: #0e4156;
  text-decoration: underline;
}

/* Footer: recaptcha + botón */
.acf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Botón */
.amper-cf7 input[type="submit"] {
  background: #0e4156;
  color: #ffffff;
  border: 2px solid #0e4156;
  border-radius: 3px;
  padding: 11px 28px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.amper-cf7 input[type="submit"]:hover {
  background: #99D600;
  border-color: #99D600;
}

/* Mensaje de éxito/error tras envío */
.amper-cf7 .wpcf7-response-output {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  border: none;
}

.amper-cf7 .wpcf7-mail-sent-ok {
  background: #f0fae0;
  color: #4a7a00;
}

.amper-cf7 .wpcf7-mail-sent-ng,
.amper-cf7 .wpcf7-spam-blocked {
  background: #fdeaea;
  color: #c0392b;
}

.amper-cf7 .wpcf7-form-control-wrap ~ br,
.amper-cf7 span > br {
  display: none;
}

/* Responsive */
@media (max-width: 640px) {
  .amper-cf7 {
    padding: 16px 16px 14px;
  }
  .acf-row {
    flex-direction: column;
    gap: 0;
  }
  .acf-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .amper-cf7 input[type="submit"] {
    width: 100%;
    text-align: center;
  }
}