/* ========================================
   NAVBAR CSS - VERSIÓN OPTIMIZADA Y LIMPIA
   ======================================== */

:root {
  --morado: #5957b8;
  --white: #fff;
  --negro-oscuro: #ffffff;
  --negro-medio: #c4c4c4;
}

/* ========================================
   ESTILOS BASE DESKTOP
   ======================================== */

.navigation {
  background-color: var(--morado);
  padding: 1.4rem 3vw;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.navigation-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1.5rem;
}

/* Contenedor del menú (logo + items) */
.menu {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-image {
  width: 170px;
  height: auto;
  border-radius: 9999px;
  margin: -2.3rem 0;
  display: block;
  transition: transform 0.3s ease;
}

.logo-link:hover .logo-image {
  transform: rotate(-3deg) scale(1.05);
}

/* Navigation items */
.navigation-items {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.navigation-item {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 0.6rem;
  white-space: nowrap;
  opacity: 0.93;
  transition: opacity 0.25s ease;
  position: relative;
}

.navigation-item:hover {
  opacity: 1;
}

.navigation-item.w--current {
  opacity: 1;
  font-weight: 600;
}

/* Underline animado en hover (solo desktop) */
@media (min-width: 992px) {
  .navigation-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: width 0.3s ease;
  }

  .navigation-item:hover::after {
    width: 80%;
  }
}

/* Botón hamburguesa (oculto en desktop) */
.menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  transition: transform 0.2s ease;
}

.menu-button:hover {
  transform: scale(1.1);
}

.menu-button:active {
  transform: scale(0.95);
}

.menu-icon-2 {
  width: 32px;
  height: auto;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

/* Animación del icono hamburguesa cuando está abierto */
.menu-button.w--open .menu-icon-2 {
  transform: rotate(90deg);
}

/* Botón Afianzate */
.button.cc-contact-us {
  flex-shrink: 0;
  background-color: var(--negro-oscuro);
  color: black;
  border-radius: 999px;
  padding: 0 1.9rem;
  font-size: 0.98rem;
  font-weight: 530;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 48px;
  transition: all 0.3s ease;
}

.button.cc-contact-us:hover {
  background-color: var(--negro-medio);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.text-block-5 {
  margin: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1200px) {
  .navigation-wrap {
    gap: 1.8rem;
  }
  
  .menu {
    gap: 2.5rem;
  }
  
  .logo-image {
    width: 155px;
    margin: -2.1rem 0;
  }
  
  .navigation-items {
    gap: 2.2rem;
  }
  
  .button.cc-contact-us {
    min-width: 140px;
    height: 46px;
    padding: 0 1.7rem;
  }
}

/* ========================================
   RESPONSIVE - MÓVIL (≤991px)
   Menú Hamburguesa
   ======================================== */


@media (max-width: 991px) {
  .navigation {
    padding: 1.2rem 0;
    position: relative;
  }

  .navigation-wrap {
    justify-content: space-between;
    padding: 0 5vw;
    position: relative;
  }

  .menu {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
    position: static;
  }

  .logo-link {
    order: 1;
  }

  .logo-image {
    width: 140px;
    margin: -1.9rem 0;
  }

  /* Mostrar hamburguesa */
  .menu-button {
    display: block;
    order: 3;
    z-index: 1001;
  }

  /* Menú móvil oculto por defecto - SIN ESPACIO BLANCO */
  .navigation-items {
    display: none;
    position: absolute;
    top: 100%; /* ✅ CAMBIO: Eliminé el calc() y el espacio extra */
    left: 0;
    right: 0;
    background: var(--morado);
    flex-direction: column;
    padding: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    gap: 0;
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, 
                transform 0.4s ease,
                max-height 0.4s ease;
  }

  /* Menú abierto - ANIMACIÓN PADRE */
  .navigation-items.is-open {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
    padding: 1rem 0;
  }

  /* Items individuales */
  .navigation-item {
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.3s ease, 
                opacity 0.4s ease,
                transform 0.4s ease;
  }

  .navigation-item:last-child {
    border-bottom: none;
  }

  /* ANIMACIÓN ESCALONADA DE ITEMS */
  .navigation-items.is-open .navigation-item {
    opacity: 1;
    transform: translateX(0);
  }

  .navigation-items.is-open .navigation-item:nth-child(1) {
    transition-delay: 0.1s;
  }

  .navigation-items.is-open .navigation-item:nth-child(2) {
    transition-delay: 0.15s;
  }

  .navigation-items.is-open .navigation-item:nth-child(3) {
    transition-delay: 0.2s;
  }

  .navigation-items.is-open .navigation-item:nth-child(4) {
    transition-delay: 0.25s;
  }

  /* Hover en móvil */
  .navigation-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* Ocultar botón Afianzate en móvil */
  .button.cc-contact-us {
    display: none;
  }
}

@media (max-width: 600px) {
  .navigation {
    padding: 1rem 0; /* ✅ CAMBIO */
  }
  
  .navigation-wrap {
    padding: 0 5vw; /* ✅ Mantener padding lateral */
  }
  
  .logo-image {
    width: 120px;
    margin: -1.6rem 0;
  }
  
  .menu-icon-2 {
    width: 28px;
  }
}

@media (max-width: 479px) {
  .navigation {
    padding: 0.8rem 0; /* ✅ CAMBIO */
  }
  
  .navigation-wrap {
    padding: 0 4vw; /* ✅ Mantener padding lateral */
  }
  
  .logo-image {
    width: 100px;
    margin: -1.4rem 0;
  }
  
  .menu-icon-2 {
    width: 26px;
  }
  
  .navigation-item {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }
}


/* ========================================
   PREVENIR CONFLICTOS CON WEBFLOW
   ======================================== */

/* Ocultar overlay de Webflow */
.w-nav-overlay {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
}

/* Resetear estados de Webflow en móvil */
@media (max-width: 991px) {
  .w-nav[data-collapse="medium"] .w-nav-menu {
    display: none;
  }
  
  .w-nav[data-collapse="medium"] .w-nav-menu.is-open {
    display: flex !important;
  }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */

/* Focus visible para teclado */
.navigation-item:focus-visible,
.menu-button:focus-visible,
.button.cc-contact-us:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
  .navigation-items,
  .navigation-item,
  .menu-button,
  .logo-image {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}





















/* ========================================
   MODAL AFIANZAR - modal.css
   Agregar en: css/modal.css
   Incluir en todas las páginas que usen
   el botón AFIANZATE o AFIANZAR
   ======================================== */


/* ========================================
   OVERLAY DEL MODAL
   ======================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}


/* ========================================
   TARJETA DEL MODAL
   ======================================== */

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  border-radius: 24px;
  padding: 40px 35px;
  box-shadow:
    0 25px 60px rgba(89, 87, 184, 0.25),
    0 10px 30px rgba(0, 0, 0, 0.12);
  border-top: 6px solid #5957b8;
  animation: modalSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  margin: auto;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ========================================
   HEADER DEL MODAL
   ======================================== */

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-header h2 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #5957b8;
  font-weight: 800;
  margin: 0;
}

#cerrarModal {
  font-size: 26px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  transition: all 0.3s ease;
}

#cerrarModal:hover {
  color: #5957b8;
  transform: rotate(90deg);
}


/* ========================================
   INPUTS FLOTANTES
   ======================================== */

.input-group {
  position: relative;
  margin-bottom: 22px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid #ddd;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  background: #f9f9ff;
  box-sizing: border-box;
  font-family: inherit;
  /* placeholder invisible para que funcione :not(:placeholder-shown) */
  color: #32343a;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: transparent;
}

.input-group textarea {
  resize: none;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: #5957b8;
  box-shadow: 0 0 0 4px rgba(89, 87, 184, 0.12);
  background: #fff;
}

/* Label flotante */
.input-group label {
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 13px;
  color: #888;
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
  top: -8px;
  left: 12px;
  font-size: 11px;
  color: #5957b8;
  background: #fff;
  padding: 0 6px;
}


/* ========================================
   CHECKBOXES
   ======================================== */

.input-group-check {
  margin-bottom: 22px;
}

.check-titulo {
  font-size: 13px;
  color: #5957b8;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  margin-top: 0;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #32343a;
  margin-bottom: 10px;
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #5957b8;
  cursor: pointer;
  flex-shrink: 0;
}


/* ========================================
   BOTÓN ENVIAR
   ======================================== */

.btn-enviar {
  width: 100%;
  padding: 14px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #5957b8 0%, #4745a0 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 25px rgba(89, 87, 184, 0.35);
  font-family: inherit;
  margin-top: 4px;
}

.btn-enviar:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(89, 87, 184, 0.45);
}

.btn-enviar:active {
  transform: translateY(0);
}


/* ========================================
   NOTIFICACIÓN DE ÉXITO
   ======================================== */

.alerta-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  animation: alertaFadeIn 0.3s ease forwards;
}

.alerta-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 50px 60px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(89, 87, 184, 0.3);
  border-top: 6px solid #5957b8;
  animation: alertaScaleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  max-width: 380px;
  width: 90%;
}

.alerta-icono {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #5957b8 0%, #4745a0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  font-size: 32px;
  color: white;
  box-shadow: 0 8px 20px rgba(89, 87, 184, 0.4);
}

.alerta-titulo {
  font-size: 20px;
  font-weight: 800;
  color: #1a1b1f;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.alerta-subtitulo {
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
  line-height: 1.6;
}

.alerta-btn {
  display: inline-block;
  padding: 12px 40px;
  border-radius: 50px;
  background: linear-gradient(135deg, #5957b8 0%, #4745a0 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(89, 87, 184, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
}

.alerta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(89, 87, 184, 0.45);
}

@keyframes alertaFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes alertaScaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1);    }
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
  .modal-card {
    padding: 30px 22px;
    border-radius: 18px;
  }

  .modal-header h2 {
    font-size: 15px;
    letter-spacing: 1.5px;
  }

  .alerta-card {
    padding: 36px 28px;
  }

  .alerta-titulo {
    font-size: 17px;
  }
}

@media (max-width: 400px) {
  .modal-card {
    padding: 24px 16px;
    border-radius: 14px;
  }
}
















/* ========================================
   BOTÓN AFIANZAR
   ======================================== */

.descripcion-boton-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}


.btn-afianzar {
  display: inline-block;
  padding: 14px 36px;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Relleno deslizante desde abajo */
.btn-afianzar::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: #000000;
  z-index: -1;
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-afianzar:hover {
  color: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2);
}

.btn-afianzar:hover::before {
  height: 100%;
}

.btn-afianzar:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
