.modal2 {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.modal2.show {
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal2-content {
  background-color: #fefefe;
  margin: auto;
  padding: 30px;
  max-width: 700px;
  width: 100%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  border-radius: 45px;
}

.modal2.show .modal2-content {
  transform: scale(1);
}

.close2 {
  position: absolute;
  right: 25px;
  top: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close2:hover,
.close2:focus {
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

/* FORM STYLES */
.modal2-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.form-group2 {
  width: 100%;
  margin-bottom: 5px;
}

.modal2 input[type="text"],
.modal2 input[type="email"],
.modal2 input[type="tel"],
.modal2 select,
.modal2 textarea {
  width: 100%;
  padding: 14px 18px;
  margin: 6px 0;
  display: inline-block;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
}

.modal2 textarea {
  min-height: 120px;
  resize: vertical;
  border-radius: 12px;
  font-family: inherit;
  line-height: 1.5;
}

.modal2 input:focus,
.modal2 select:focus,
.modal2 textarea:focus {
  outline: none;
  border-color: #3a0ca3;
  box-shadow: 0 0 0 2px rgba(58, 12, 163, 0.15);
  background-color: #fff;
}

/* Estilos específicos para móviles */
@media (max-width: 768px) {
  .modal2 {
    padding: 10px;
    align-items: flex-start;
  }
  
  .modal2-content {
    margin: 20px 0;
    padding: 25px 20px;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .close2 {
    right: 15px;
    top: 10px;
    font-size: 24px;
  }
  
  .modal2-form {
    gap: 12px;
  }
  
  .modal2 h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-right: 20px;
  }
  
  .modal2 p {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }
  
  .modal2 input[type="text"],
  .modal2 input[type="email"],
  .modal2 input[type="tel"],
  .modal2 select,
  .modal2 textarea {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 10px;
  }
  
  .modal2 textarea {
    min-height: 100px;
  }
  
  .btn-submit {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 10px;
    margin-top: 5px;
  }
}

.modal2 .btn-submit2 {
  background: #3a0ca3;
  color: white;
  padding: 14px 28px;
  margin: 16px 0;
  border: none;
  border-radius: 45px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  transition: all 0.3s ease;
}

.modal2 .btn-submit2:hover {
  background: #480ca8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(58, 12, 163, 0.4);
}

/* RESPONSIVE STYLES */
@media (max-width: 768px) {
  .modal2 .modal2-content {
    width: 90%;
    padding: 20px 15px;
    margin: 20px auto;
    border-radius: 35px;
  }
  
  .modal2 input[type="text"],
  .modal2 input[type="email"],
  .modal2 input[type="tel"],
  .modal2 select,
  .modal2 textarea {
    padding: 10px 15px;
    font-size: 15px;
  }
  
  .modal2 .btn-submit2 {
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* ANIMATIONS */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.modal2.show {
  animation: modalFadeIn 0.3s ease-out;
}

.modal2.show .modal2-content {
  animation: modalSlideIn 0.3s ease-out;
}
</style>
