.multistep-forms {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 800px;
  width: 100%;
  margin: auto;
  padding: 70px 30px;
  border-radius: 20px;
  box-shadow: 0 0 15px 1px rgb(0 0 0 / 40%);
  position: relative;
  justify-content: space-between;
  align-items: initial;
  overflow: hidden;
}
.multistep-forms__container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}
.multistep-forms__form {
  display: none;
}

.multistep-forms__form form{
  background: transparent;
}

.multistep-forms__path,
.multistep-forms__cta-container,
.multistep-forms__step:not(.multistep-forms__step--active),
.multistep-forms__thank-you-message{
  opacity: 0;
  position: absolute;
  visibility: hidden;
  transition: opacity ease-in-out 0.3s;
  top: 116px;
  display: none;
}

.multistep-forms__cta-container{
  display: flex;
  justify-content: space-between;
}

.multistep-forms__next-button{
  width: 100%;
  max-width: 300px;
}

.multistep-forms__path--active,
.multistep-forms__cta-container--active,
.multistep-forms__step--active,
.multistep-forms__thank-you-message--active{
  opacity: 1;
  position: relative;
  visibility: visible;
}
.multistep-forms__thank-you-message--active {
  position: initial;
  display: block;
}
.multistep-forms__step {
  width: 100%;
}

.multistep-forms__step .slide-step .multistep-forms__step--active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  align-self: center;
  align-items: center;
  width: 100%;
}

.multistep-forms__next-button--active{
  display: table;
}
.multistep-forms__step:not(.multistep-forms__step--active) .multistep-forms__input {
  padding: 0px 50px;
}
.multistep-forms__select{
  display: table;
  position: relative;
}

.multistep-forms__select:after{
  content: "";
  position: absolute;
  top: 15px;
  right: 8px;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 0.1em solid #BDBDBD;
  border-top: 0.1em solid #BDBDBD;
  transform: rotate(136deg);
  margin-right: 0.5em;
  margin-left: 1em;
  z-index: 1;
}

.multistep-forms__select select{
  -webkit-appearance: none;
}

.multistep-forms__select select:focus{
  outline: 0;
}

.multistep-forms__input input::placeholder {
  color: #BDBDBD;
}

.multistep-forms__cta{
  margin: 10px; 
}
.multistep-forms__button,
.multistep-forms__button:focus {
  margin-top: 25px;
  background: #5dbc98;
  border: none;
  border-radius: 15px;
  color: #fbf1e4;
  padding: 10px 20px;
  transition: all .3s ease;
}
.multistep-forms__button:hover {
  background: #23173d;
  border: none;
  border-radius: 15px;
  color: #fbf1e4;
}
.multistep-forms__nav-buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 40px;
}

.multistep-forms__prev-button, .multistep-forms__next-button {
  width: auto;
}


@media screen and (max-width: 768px){
  .multistep-forms__cta-container{
    flex-direction: column;
  }
}

/** Animations **/
.multistep-forms__paragraph,
.multistep-forms__animation {
  -webkit-transition: all 0.5s ease;
  transition: all 0.5s ease;   
}

@-webkit-keyframes fade-in-bottom {
  0% {
    -webkit-transform: translateY(50px);
    transform: translateY(50px);
    opacity: 0;
  }

  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }

}

.multistep-forms__progress-bar {
  background: #b8dbd1;
  height: 5px;
  position: relative;
  width: 100%;
  margin-bottom: 120px;
}

.multistep-forms__progress-bar-inner {
  background: #5dbc98;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 0%;
  transition: ease-out .5s;
}

.multistep-forms__progress-bar-steps {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: space-between;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.multistep-forms__progress-number {
  position: relative;
}
.multistep-forms__progress-number-item {
  position: relative;
  padding: 0;
  width: 30px;
  height: 30px;
  font-size: 15px;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: #b8dbd1;
  color: #fbf1e4;
  transition: background-color 0.2s ease-in-out;
}
.multistep-forms__progress-number-item.active {
  background: #5dbc98;
  transition-delay: 0.3s;
}
.multistep-forms__progress-number-text {
  position: absolute;
  top: 40px;
  color: #5dbc98;
  text-align: center;
  left: -25px;
  width: 80px;
  line-height: 1;
  font-size: 14px;
}
.multistep-forms__text--before {
  margin-bottom: 10px;
}
.multistep-forms__checkbox, .multistep-forms__radio {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.multistep-forms .hs-required::after {
  content: "*";
  top: 0;
  right: -12px;
  color: #ff0000;
  margin-left: 4px;
}
.multistep-forms .hs-input.hs-required::after {
  content: "";
}
.multistep-forms label {
  display: block;
  position: relative;
  width: max-content;
  line-height: 1;
  margin-bottom: 10px;
}
.hs-error {
  border-color: red;
}
.messageError{
  display:none;
}
.multistep-forms__input input.inputError + .messageError,
.multistep-forms__input select.inputError+ .messageError,
.multistep-forms__input textarea.inputError+ .messageError{
  display:block;
  color: red;
}
.multistep-forms__button.hide {
  display: none !important;
}
.multistep-forms__button--hidden {
  opacity: 0;
  z-index: -1;
}
.multistep-forms__button--active {
  opacity: 0;
  z-index: -1;
}

/* Design - Full boxes */
/*
.multistep-forms__checkbox input, .multistep-forms__radio input{
opacity: 0;
position: absolute;
visibility: hidden;
}


.multistep-forms__checkbox input, .multistep-forms__radio input{
position: absolute;
}

.multistep-forms__checkbox--label {
padding: 15px;
border: 1px solid;
background: #fff;
font-weight: 700;
text-align: center;
width: 100%;
display: grid;
align-items: center;
}

.multistep-forms__checkbox--label input {
position: absolute;
visibility: hidden;
opacity: 0;
}

.multistep-forms__checkbox input:checked + label, .multistep-forms__radio input:checked + label {
background: #383839;
color: #fff;
}

*/

@media (max-width: 767px){
  .multistep-forms__checkbox, .multistep-forms__radio {
    gap: 10px;
    flex-wrap: wrap;
  }
}
.multistep-forms__radio-group,
.multistep-forms__checkbox-group {
  display: flex;
  align-items: center;
  gap: 5px;
}
.body-wrapper {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 100vh;
}
.multistep-forms__load {
  display: none;
}
.multistep-forms__load--active {
  display: block;
}
.multistep-forms__load .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 8px;
  margin-right: 0;
  background: #9d9ca1;
  animation: wave .8s linear infinite,fade .8s linear infinite;
}
.multistep-forms__load .dot:nth-child(2) {
  animation-delay: -.7s;
  opacity: .7;
}
.multistep-forms__load .dot:nth-child(3) {
  animation-delay: -.5s;
  opacity: .5;
}
@keyframes wave {
  0%,100%,60% {
    transform: initial
  }

  30% {
    transform: translateY(-4px)
  }
}
.score-message h3 {
  font-weight: 700;
  text-align-last: center;
  padding-bottom: 5px;
}

{# Multistep / Styles #}
.multistep-forms .slide-step-1 {
  display: grid;
  gap: 20px;
  justify-content: space-between;
  grid-template-columns: repeat(2, 1fr);
}
.multistep-forms .slide-step-1 div:first-child {
  width: 100%;
}
.multistep-forms .slide-step-1 div:nth-child(2) {
  width: 100%;
}
.multistep-forms .slide-step-1 div:nth-child(3) {
  width: 100%;
  grid-column: 1 / span 2;
}
.multistep-forms .slide-step-1 div:first-child input,
.multistep-forms .slide-step-1 div:nth-child(2) input,
.multistep-forms .slide-step-1 div:nth-child(3) input {
  width: 100%;
}
.multistep-forms input,
.multistep-forms textarea,
.multistep-forms select {
  border-radius: 5px !important;
  border: 0 !important;
  padding: 6px 12px !important;
  line-height: 1.5;
  background: #e6f2ef;
  border: 2px solid #e6f2ef !important;
}
.multistep-forms input:focus,
.multistep-forms textarea:focus,
.multistep-forms textarea:focus {
  transition: all .4s ease;
}
.multistep-forms input:focus,
.multistep-forms textarea:focus,
.multistep-forms select:focus,
.multistep-forms input:focus-visible,
.multistep-forms textarea:focus-visible,
.multistep-forms select:focus-visible {
  border-color: #5dbc98 !important;
  outline: none !important;
}
.multistep-forms select {
  height: 38px;
  border-radius: 5px;
  border: 1px solid #23173d;
  padding: 6px 12px;
}
.multistep-forms .slide-step-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.multistep-forms .slide-step-2 div:first-child,
.multistep-forms .slide-step-2 div:nth-child(2),
.multistep-forms .slide-step-2 div:nth-child(3),
.multistep-forms .slide-step-2 div:nth-child(4),
.multistep-forms .slide-step-2 div:nth-child(5) {
  grid-column: 1 / span 3;
}
.multistep-forms .slide-step-2 div:first-child input {
  width: 100%;
}
.multistep-forms .slide-step-2 div:nth-child(2) div,
.multistep-forms .slide-step-2 div:nth-child(4) div,
.multistep-forms .slide-step-2 div:nth-child(6) div,
.multistep-forms .slide-step-2 div:nth-child(7) div,
.multistep-forms .slide-step-2 div:nth-child(8) div,
.multistep-forms .slide-step-2 div:nth-child(2) div select,
.multistep-forms .slide-step-2 div:nth-child(4) div select,
.multistep-forms .slide-step-2 div:nth-child(6) div select,
.multistep-forms .slide-step-2 div:nth-child(7) div select,
.multistep-forms .slide-step-2 div:nth-child(8) div select {
  width: 100%;
}
.multistep-forms .slide-step-2 div:nth-child(3) input,
.multistep-forms .slide-step-2 div:nth-child(5) input {
  width: 100%;
}
.multistep-forms .slide-step-3 {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.multistep-forms .slide-step-3 label {
  display: inline-block !important;
  margin: 0;
  width: 100%;
  line-height: 1.3;
}
.multistep-forms .slide-step-3 textarea,
.multistep-forms .slide-step-3 .multistep-forms__input > input {
  width: 100%;
  resize: none;
  height: 38px;
  margin-top: 8px;
}
.slide-step-3 .multistep-forms__radio {
  flex-direction: row;
  gap: 20px;
}
.multistep-forms .slide-step-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.multistep-forms .slide-step-4 .multistep-forms__input > input,
.multistep-forms .slide-step-4 .multistep-forms__input > div,
.multistep-forms .slide-step-4 .multistep-forms__input > div select {
  width: 100%
}
.multistep-forms .slide-step-4 div:last-child {
  grid-column: 1 / span 2;
}
.multistep-forms .slide-step-4 div:last-child .multistep-forms__checkbox-group .multistep-forms__checkbox--label {
  margin-bottom: 0;
}
.multistep-forms__resumen-plan {
  box-shadow: 0px 0px 5px 0px rgba(143, 143, 143, 1);
  border-radius: 10px;
  overflow: hidden;
}
.multistep-forms__resumen-plan * {
  margin: 0;
  list-style: none;
  padding: 0;
}
.multistep-forms__resumen-plan-header {
  background: #5dbc98;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 20px;
}
.multistep-forms__resumen-plan-img {
  width: 150px;
}
.multistep-forms__resumen-plan-title {
  font-size: 22px;
  font-weight: 900;
  color: #fbf1e4;
}
.multistep-forms__resumen-plan-text {
  padding: 20px;
}
.multistep-forms__resumen-plan-text > ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.multistep-forms__resumen-plan-text > ul > li:not(:last-child) {
  display: grid;
  grid-template-columns: 40% 60%;
  border-bottom: 1px solid #f3f3f3;
}
.multistep-forms__resumen-plan-text-value {
  text-align: right;
}
.multistep-forms__resumen-plan-text__frecuency {
  text-transform: capitalize;
}

@media (max-width:500px) {
  .multistep-forms .slide-step-2 > div {
    grid-column: 1 / span 3;
  }
  .multistep-forms .slide-step-4 {
    display: flex;
    flex-direction: column;
  }
  .multistep-forms__progress-bar {
    margin-bottom: 70px;
  }
  .multistep-forms__progress-number-text {
    display: none;
  }
}

@media (max-width:400px) {
  .multistep-forms .slide-step-1 {
    grid-template-columns: repeat(1, 1fr);
  }
  .multistep-forms .slide-step-1 div:nth-child(3) {
    grid-column: auto;
  }
}

/* Estilos básicos para el modal */
.modal {
  display: none; /* Se oculta por defecto */
  position: fixed;
  z-index: 1000; /* Por encima del resto del contenido */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5); /* Fondo semitransparente */
}

.modal-content {
  background-color: #fff;
  margin: 15% auto; /* Centrado vertical y horizontal */
  padding: 20px;
  border: 1px solid #888;
  border-radius: 10px; /* Bordes redondeados */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Sombra */
  max-width: 400px;
  text-align: center; /* Texto centrado */
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.modal-content * {
  margin: 0;
}
.modal-message {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-button {
  margin-top: 15px;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 10px;
}

.close:hover,
.close:focus {
  color: black;
}

.multistep-forms__thank-you-message--active {
  display: none !important;
}

/* === Placeholder estilizado del campo de cupón === */
#inputCupon::placeholder {
  color: #777 !important;
  font-style: italic !important;
}

/* === FIX REAL PARA CHECKBOX CON LABEL LARGO === */

/* Mantiene checkbox alineado */
.multistep-forms__checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Override al width: max-content del label global */
.multistep-forms__checkbox-group label {
  display: inline-block !important;
  width: auto !important;
  max-width: 95% !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

/* Link estándar dentro del checkbox */
.multistep-forms__checkbox-group label a {
  color: #23173d;
  text-decoration: underline;
}

/* Espaciado normal */
.multistep-forms__checkbox {
  margin-bottom: 15px;
}

/* Que los dos últimos campos del paso 4 (los checkboxes)
   ocupen las 2 columnas del grid */
.multistep-forms .slide-step-4 > .multistep-forms__input:nth-last-child(-n+2) {
  grid-column: 1 / span 2;
}

/* Y quitamos el espacio extra debajo del label en ambos checkboxes */
.multistep-forms .slide-step-4 > .multistep-forms__input:nth-last-child(-n+2)
  .multistep-forms__checkbox-group .multistep-forms__checkbox--label {
  margin-bottom: 0;
}

/* ======== Reducir títulos SOLO de los bloques legales ======== */
.multistep-forms .slide-step-4 .hs-form-field[label*="Términos"],
.multistep-forms .slide-step-4 .hs-form-field[label*="Uso información"],
.multistep-forms .slide-step-4 .hs-form-field:nth-child(n+7) > label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #666 !important; /* más suave */
  margin-bottom: 3px !important;
}

/* ======== Reducir texto SOLO de los checkbox legales ======== */
.multistep-forms .slide-step-4 .multistep-forms__checkbox-group label {
  font-size: 12px !important;
  color: #555 !important;
  line-height: 1.25 !important;
}

/* ======== Reducir separación entre checkbox ======== */
.multistep-forms .slide-step-4 .multistep-forms__checkbox {
  margin-bottom: 3px !important;
}

.multistep-forms .slide-step-4 .multistep-forms__checkbox-group {
  margin-bottom: 3px !important;
}

/* ======== Checkbox menos llamativos ======== */
.multistep-forms .slide-step-4 input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  opacity: 0.8 !important;
}
