
:root {
  --form-primary: #031f30;
  --form-secondary: #1a5066;
  --form-accent: #5dbaf0;
  --form-success: #2ecc71;
  --form-error: #e74c3c;
  --form-bg: rgba(248, 248, 248, 0.98);
  --form-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  --form-radius: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contenedor principal del formulario */
.form {
  font-family: "Julius Sans One", sans-serif;
  margin: 0 auto;
  padding: 30px 40px;
  width: 85%;
  max-width: 950px;
  background: var(--form-bg);
  border-radius: var(--form-radius);
  box-shadow: var(--form-shadow);
  border: none;
  position: relative;
  overflow: hidden;
  animation: formSlideIn 0.6s ease-out;
}

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

/* Decoración superior con gradiente animado */
.form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--form-primary),
    var(--form-accent),
    var(--form-primary)
  );
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Secciones del formulario */
.form2 {
  width: 48%;
  float: left;
  padding: 25px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  border: 1px solid rgba(93, 186, 240, 0.2);
  transition: var(--transition-smooth);
  animation: sectionFadeIn 0.5s ease-out backwards;
  box-sizing: border-box;
}

.form2:first-of-type {
  animation-delay: 0.1s;
  margin-right: 2%;
}

.form2:last-of-type {
  animation-delay: 0.2s;
  float: right;
  margin-left: 2%;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form2:hover {
  box-shadow: 0 5px 20px rgba(93, 186, 240, 0.15);
  border-color: var(--form-accent);
}

/* Títulos de sección */
.form2 h4 {
  font-family: "Julius Sans One", sans-serif;
  text-align: center;
  font-size: 1.4em;
  text-transform: uppercase;
  color: var(--form-primary);
  margin: 0 0 25px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--form-accent);
  position: relative;
}

.form2 h4::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: var(--form-accent);
  border-radius: 2px;
}

.form2 h4.subtitle {
  font-size: 1em;
  margin: 25px 0 10px 0;
  padding: 10px 0;
  text-align: left;
  border-bottom: 1px dashed var(--form-secondary);
  color: var(--form-secondary);
}

.form2 h4.subtitle::after {
  display: none;
}

/* Lista de campos */
.form ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.form li {
  width: 60%;
  float: left;
  margin: 10px 0;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Labels */
.form li.label,
label.label2 {
  font-family: "Julius Sans One", sans-serif;
  text-align: left;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  width: 40%;
  color: var(--form-primary);
  padding-top: 12px;
  padding-right: 12px;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.form li.label span.red {
  color: var(--form-error) !important;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Inputs, selects y textareas */
.form li input,
.form li select,
.form li textarea {
  width: 85%;
  padding: 12px 15px;
  font-size: 14px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--form-primary);
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form li input:hover,
.form li select:hover,
.form li textarea:hover {
  border-color: var(--form-accent);
}

.form li input:focus,
.form li select:focus,
.form li textarea:focus {
  border-color: var(--form-accent);
  box-shadow:
    0 0 0 4px rgba(93, 186, 240, 0.2),
    0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Placeholder styling */
.form li input::placeholder,
.form li textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

/* Select específico */
.form li select {
  width: 92%;
  cursor: pointer;
  background-color: #fff !important;
  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='%231a5066' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Campos de fecha */
.form li input[type="date"] {
  cursor: pointer;
}

.form li input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(30%) sepia(80%) saturate(400%) hue-rotate(170deg);
  transition: var(--transition-smooth);
}

.form li input[type="date"]:hover::-webkit-calendar-picker-indicator {
  filter: invert(50%) sepia(80%) saturate(500%) hue-rotate(170deg);
  transform: scale(1.2);
}

/* Campos numéricos */
.form li input[type="number"] {
  width: 120px !important;
  text-align: center;
  font-weight: bold;
}

/* Radio buttons */
.radio {
  color: var(--form-secondary);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
}

.form li input[type="radio"] {
  width: 20px !important;
  height: 20px;
  margin: 0 5px;
  cursor: pointer;
  accent-color: var(--form-accent);
  transition: var(--transition-smooth);
}

.form li input[type="radio"]:hover {
  transform: scale(1.2);
}

.form li div.radio {
  width: 100%;
  padding: 5px 0;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.form li div.radio hr.clear {
  background-color: transparent;
  border: 0;
  border-bottom: #545454 1px dotted;
}

/* Textarea */
.form li textarea {
  resize: vertical;
  min-height: 80px;
}

/* Estados de validación - Éxito */
.form li input.valid,
.form li select.valid {
  border-color: var(--form-success);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232ecc71' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 40px;
}

/* Estados de validación - Error */
.form li input.bad,
.form li select.bad {
  border-color: var(--form-error) !important;
  background-color: rgba(231, 76, 60, 0.05) !important;
  animation: shake 0.5s ease-in-out;
}

.enviar_boton{
  width: 100%;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

/* Checkbox */
.form li input[type="checkbox"] {
  width: 22px !important;
  height: 22px;
  cursor: pointer;
  accent-color: var(--form-accent);
}

/* Botón de envío - SUPER MEJORADO */
.form li input[type="submit"] {
  width: 100%;
  padding: 16px 40px;
  font-family: "Julius Sans One", sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--form-primary) 0%,
    var(--form-secondary) 100%
  );
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 5px 20px rgba(3, 31, 48, 0.3);
  position: relative;
  overflow: hidden;
}

.form li input[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.5s;
}

.form li input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(3, 31, 48, 0.4);
  background: linear-gradient(
    135deg,
    var(--form-secondary) 0%,
    var(--form-accent) 100%
  );
}

.form li input[type="submit"]:hover::before {
  left: 100%;
}

.form li input[type="submit"]:active {
  transform: translateY(-1px);
}

/* Campos de fecha específicos */
.form li input#from,
.form li input#to {
  width: 150px;
  float: left;
}

/* Clearfix */
.form hr.clear {
  clear: both;
  border: 0;
  margin: 0;
}

.form hr.clear2 {
  clear: both;
  background-color: transparent;
  margin: 5px 0;
  border: 0;
}

.clear {
  clear: both;
}

/* reCAPTCHA estilizado */
.g-recaptcha {
  transform: scale(0.95);
  transform-origin: left center;
  margin: 10px 0;
}

/* Label2 específico */
label.label2 {
  display: inline-block;
  padding-left: 20px;
  padding-right: 5px;
}

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

@media only screen and (max-width: 900px) {
  .form {
    width: 95%;
    padding: 20px;
  }

  .form2 {
    width: 100%;
    float: none;
    margin-bottom: 20px;
  }

  .form2:last-of-type {
    float: none;
  }
}

@media only screen and (max-width: 768px) {
  .form {
    width: 98%;
    padding: 15px;
    border-radius: 15px;
  }

  .form2 {
    padding: 15px;
  }

  .form li {
    width: 100%;
    float: none;
    margin-bottom: 15px;
  }

  .form li.label {
    width: 100%;
    text-align: left;
    padding: 0 0 5px 5px;
  }

  .form li input,
  .form li select,
  .form li textarea {
    width: 100%;
  }

  .form li select {
    width: 100%;
  }

  .form li input#from,
  .form li input#to {
    width: 100%;
    float: none;
    margin-bottom: 10px;
  }

  .form2 h4 {
    font-size: 1.2em;
  }

  .form li input[type="number"] {
    width: 100% !important;
  }

  label.label2 {
    display: block;
    padding-left: 0;
    margin-top: 10px;
  }

  .g-recaptcha {
    transform: scale(0.85);
  }
}

@media only screen and (max-width: 480px) {
  .form {
    padding: 10px;
  }

  .form li input[type="submit"] {
    padding: 14px 20px;
    font-size: 14px;
  }

  .g-recaptcha {
    transform: scale(0.77);
  }
}
