/* ============================================
   FORMULARIO DE CONTACTO - IDENTAL
   Paleta: #1c3860, #509fd8, #05a6e1, #25d366
   ============================================ */

/* SECCION PRINCIPAL */
.formulario-section {
  width: 100%;
  padding: 60px 1rem;
  background: linear-gradient(180deg, #e6f0fa 0%, #ffffff 100%);
}

.formulario-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(28, 56, 96, 0.12);
}

/* ============================================
   COLUMNA IZQUIERDA - INFORMACION
   ============================================ */

.formulario-info {
  background: linear-gradient(145deg, #1c3860 0%, #2a4a7a 100%);
  padding: 45px 35px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-content {
  max-width: 400px;
}

.info-badge {
  display: inline-block;
  background: rgba(5, 166, 225, 0.25);
  color: #7dd3fc;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  border: 1px solid rgba(125, 211, 252, 0.3);
}

.formulario-info h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 15px;
  line-height: 1.2;
}

.formulario-info > .info-content > p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 30px;
}

/* Beneficios */
.info-beneficios {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 35px;
}

.beneficio-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.beneficio-icon {
  width: 42px;
  height: 42px;
  background: rgba(5, 166, 225, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.beneficio-icon i {
  font-size: 1.1rem;
  color: #7dd3fc;
}

.beneficio-texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.beneficio-texto strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.beneficio-texto span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Contacto directo */
.info-contacto-directo {
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.info-contacto-directo > p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 15px;
}

.btn-whatsapp-form,
.btn-telefono-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn-whatsapp-form {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp-form:hover {
  background: #1fb855;
  transform: translateY(-2px);
}

.btn-telefono-form {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-telefono-form:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   COLUMNA DERECHA - FORMULARIO
   ============================================ */

.formulario-wrapper {
  padding: 40px 35px;
  background: #fff;
}

#formulario-contacto {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  width: 100%;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Grupo de campo */
.grupo-campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grupo-campo label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c3860;
  display: flex;
  align-items: center;
  gap: 4px;
}

.grupo-campo label .required {
  color: #e53e3e;
}

.grupo-campo label .opcional {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.8rem;
}

/* Input wrapper con icono */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 1rem;
  transition: color 0.3s ease;
  z-index: 1;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: "Montserrat", Arial, sans-serif;
  color: #1e293b;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
  color: #94a3b8;
}

/* Focus states */
.input-wrapper:focus-within i {
  color: #509fd8;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: #509fd8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(80, 159, 216, 0.1);
}

/* Select personalizado */
.input-wrapper select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23509fd8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 45px;
}

/* Textarea */
.textarea-wrapper {
  align-items: flex-start;
}

.textarea-wrapper i {
  top: 16px;
}

.input-wrapper textarea {
  resize: none;
  min-height: 90px;
}

/* ============================================
   MENSAJES DE ERROR
   ============================================ */

.mensaje-error {
  font-size: 0.8rem;
  color: #dc2626;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 2px;
}

.mensaje-error:not(:empty)::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
}

/* Estados de error */
.input-wrapper:has(input.error) i,
.input-wrapper:has(select.error) i {
  color: #dc2626;
}

.input-wrapper input.error,
.input-wrapper select.error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.input-wrapper input.error:focus,
.input-wrapper select.error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

/* ============================================
   BOTON DE ENVIO
   ============================================ */

.boton-enviar {
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, #05a6e1 0%, #509fd8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: "Montserrat", Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(5, 166, 225, 0.3);
  margin-top: 10px;
}

.boton-enviar i {
  font-size: 0.95rem;
  transition: transform 0.3s ease;
}

.boton-enviar:hover {
  background: linear-gradient(135deg, #0495cb 0%, #4590c5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 166, 225, 0.4);
}

.boton-enviar:hover i {
  transform: translateX(4px);
}

.boton-enviar:active {
  transform: translateY(0);
}

/* ============================================
   FOOTER DEL FORMULARIO
   ============================================ */

.form-footer {
  text-align: center;
  padding-top: 15px;
}

.form-footer p {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.form-footer i {
  color: #509fd8;
  font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet y Desktop */
@media (min-width: 768px) {
  .formulario-section {
    padding: 80px 2rem;
  }

  .formulario-container {
    grid-template-columns: 1fr 1.1fr;
  }

  .formulario-info {
    padding: 50px 40px;
  }

  .formulario-info h2 {
    font-size: 2.4rem;
  }

  .formulario-wrapper {
    padding: 50px 45px;
  }

  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop grande */
@media (min-width: 1024px) {
  .formulario-container {
    grid-template-columns: 1fr 1.2fr;
  }

  .formulario-info {
    padding: 60px 50px;
  }

  .formulario-wrapper {
    padding: 55px 50px;
  }
}

/* Movil pequeno */
@media (max-width: 480px) {
  .formulario-section {
    padding: 40px 15px;
  }

  .formulario-container {
    border-radius: 16px;
  }

  .formulario-info {
    padding: 35px 25px;
  }

  .formulario-info h2 {
    font-size: 1.8rem;
  }

  .beneficio-item {
    gap: 12px;
  }

  .beneficio-icon {
    width: 38px;
    height: 38px;
  }

  .formulario-wrapper {
    padding: 30px 22px;
  }

  .input-wrapper input,
  .input-wrapper select,
  .input-wrapper textarea {
    padding: 12px 14px 12px 44px;
    font-size: 0.9rem;
  }

  .boton-enviar {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .btn-whatsapp-form,
  .btn-telefono-form {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.formulario-container {
  animation: fadeInUp 0.6s ease-out;
}

/* Efecto de shake para errores */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.input-wrapper:has(.error) {
  animation: shake 0.4s ease-in-out;
}
