:root {
--primary-color: #008080;
--nombre-color: #00AAA2;
--secondary-color: #38b6b0;
--tertiary-color: #000000;
--dark-color: #1a1a1a;
--text-color: #333;
--light-text-color: #f0f0f0;
--white-color: #ffffff;
--light-gray-color: #f0f0f0;
--medium-gray-color: #e0e0e0;
--dark-gray-color: #1e282d;
--placeholder-color: #777;
--slogan-color: #b0b0b0;
--footer-border-color: rgb(18, 31, 35);
--hero-text-color: #444;

--font-montserrat: 'Montserrat', sans-serif;
--font-arial: Arial, sans-serif;

--shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
--shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.4);
--shadow-button: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 12px rgba(0, 0, 0, 0.1);
--shadow-button-hover: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 128, 128, 0.3);
--shadow-footer: 0 -5px 15px rgba(0, 0, 0, 0.2);

--transition-ease: all 0.3s ease;
--transition-slider: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1.000);

--animation-duration: 15s;
--total-original-items: 6;
--items-visible: 3;
--item-base-width: calc((1200px - (2 * 20px) - (var(--items-visible) - 1) * 20px) / var(--items-visible));
--item-base-margin-right: 20px;
--slide-full-width: calc(var(--total-original-items) * (var(--item-base-width) + var(--item-base-margin-right)));

--card-bg-color: #7B1B4A;
--card-bottom-color: #F0F0F0;
--button-bg-color-alt: #2196F3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-montserrat);
  color: var(--text-color);
  background-color: var(--white-color);
  padding-top: 150px;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.main-header {
  width: 100%;
  box-shadow: var(--shadow-light);
  z-index: 1000;
  background-color: var(--white-color);
  position: fixed;
  top: 0;
  left: 0;
}

.header-superior {
  width: 100%;
  height: 25px;
  background-color: var(--dark-color);
}

.header-inferior {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white-color);
  padding: 0 50px;
  height: 60px;
  position: relative;
  z-index: 10;
}

/* ===== NAVBAR MEJORADO ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-grow: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 5px;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
  position: relative;
}

/* Línea animada inferior */
.navbar li a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar li a:hover {
  color: var(--primary-color);
  background: rgba(0, 170, 162, 0.08);
}

.navbar li a:hover::after {
  width: 60%;
}

/* ===== DROPDOWN ===== */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Flecha del dropdown */
.dropdown-toggle::before {
  font-size: 0.8rem;
  transition: all 0.3s ease;
  order: 2;
}

.dropdown:hover .dropdown-toggle::before {
  transform: rotate(180deg);
}

/* ===== SUBMENU CORREGIDO ===== */
.submenu {
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 260px;
  background: white;
  padding: 8px;
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;
  list-style: none;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1000;
}

.dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li {
  width: 100%;
  margin: 0;
}

/* SOLUCIÓN: La flecha ahora es position: absolute */
.submenu a {
  display: block;
  padding: 14px 18px 14px 45px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
}

/* Flecha posicionada absolutamente */
.submenu a::before {
  content: '→';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  font-size: 1.2rem;
  color: var(--primary-color);
  opacity: 0;
  transition: all 0.3s ease;
}

.submenu a:hover {
  background: linear-gradient(135deg, rgba(0, 170, 162, 0.1), rgba(22, 50, 60, 0.05));
  padding-left: 45px;
  border-left-color: var(--primary-color);
  color: var(--primary-color);
}

.submenu a:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Eliminar el ::after de los enlaces del submenu */
.submenu a::after {
  display: none !important;
}

/* ===== BOTÓN DE CONTACTO ===== */
.btn-contact {
  background: linear-gradient(135deg, var(--primary-color), #00c4ba);
  color: var(--white-color) !important;
  padding: 12px 28px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  margin-left: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 170, 162, 0.3);
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 170, 162, 0.4);
}

.btn-contact::after {
  display: none !important;
}

/* ===== MENÚ MÓVIL ===== */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.menu-toggle::before {
  content: "☰";
}

.menu-toggle.open::before {
  content: "✖";
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 85px;
    left: 0;
    width: 100%;
    height: calc(100vh - 85px);
    background: var(--white-color);
    flex-direction: column;
    padding: 30px 20px;
    transform: translateX(-100%);
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .navbar ul {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .navbar li {
    width: 100%;
  }

  .navbar li a {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
  }

  /* Submenu móvil */
  .submenu {
    position: static;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0;
    margin-top: 8px;
  }

  .dropdown.active .submenu {
    max-height: 500px;
    padding: 8px 0;
  }

  .submenu li {
    margin: 6px 0;
  }

  .submenu a {
    background: linear-gradient(135deg, var(--primary-color), #00c4ba);
    color: var(--white-color) !important;
    border-radius: 10px;
    border: none;
    padding: 14px 20px;
  }

  .submenu a::before {
    display: none;
  }

  .submenu a:hover {
    background: linear-gradient(135deg, #00c4ba, var(--primary-color));
    padding-left: 20px;
  }

  .btn-contact {
    width: 100%;
    text-align: center;
    margin: 20px 0 0 0;
  }
}

/* ===== MÓVIL (768px o menos) ===== */
@media (max-width: 768px) {
  .navbar .submenu {
    position: static;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    max-height: 0;
    margin-top: 0;
    padding: 0;
    transition: max-height 0.4s ease;
  }

  .navbar li.dropdown:focus-within .submenu {
    max-height: 500px;
    padding: 10px 0;
  }

  .navbar .submenu li {
    margin: 8px 15px;
    border-radius: 12px;
    overflow: hidden;
  }

  .navbar .submenu li:nth-child(1) { 
    background: linear-gradient(135deg, #990099, #b84db8); 
  }
  
  .navbar .submenu li:nth-child(2) { 
    background: #00c4ba; 
  }

  .navbar .submenu li a {
    padding: 15px 20px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    text-align: center;
    border-left: none;
  }

  .navbar .submenu li a:hover {
    padding-left: 20px;
    background: rgba(255, 255, 255, 0.1);
  }

    .logo-content {
    display: none !important;
  }
  
  .logo-image {
    display: none;
  }
}

/* ===== LOGO ===== */
.logo-container {
  position: relative;
  width: 140px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 60px;
  z-index: 5;
  flex-shrink: 0;
}

.logo-content {
  position: absolute;
  top: -58px;
  left: 80%;
  transform: translateX(-35%);
  display: flex;
  align-items: center;
}

.logo-content img {
  height: 280px;
  width: auto;
}

.logo-image {
  height: 280px;
  object-fit: contain;
}



/* ===== HERO SECTION ===== */
.hero-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  margin-top: -85px;
  min-height: 50vh;
  position: relative;
}

/* Imagen de fondo del hero */
.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-text-primary {
  position: relative;
  z-index: 2;
  padding: 40px 140px;
  text-align: center;
  max-width: 900px;
  margin: 40px auto 20px auto;
  box-shadow: var(--shadow-medium);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  overflow: hidden;
}

/* Imagen de fondo del texto primary - AHORA DELANTE */
.hero-text-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1; /* Cambiado de -1 a 1 para estar delante */
}

.hero-inicio {
  color: var(--white-color);
  font-size: 3.6em;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  position: relative;
  z-index: 2; /* Cambiado de 1 a 2 para estar sobre la imagen */
}

.hero-final {
  color: var(--white-color);
  font-size: 1.8em;
  font-weight: 600;
  text-transform: uppercase;
  margin: 12px 0 0 0;
  padding-top: 12px;
  border-top: 2px solid var(--secondary-color);
  display: inline-block;
  position: relative;
  z-index: 2; /* Cambiado de 1 a 2 para estar sobre la imagen */
}

.hero-text-secundary {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 20px 100px;
  text-align: center;
  margin: 0 auto;
  border-radius: 8px;
  margin-top: -30px; 
  box-shadow: var(--shadow-light);
  position: relative;
  z-index: 2;
}

.hero-izquierda {
  font-family: var(--font-montserrat);
  color: var(--nombre-color);
  font-size: 2.6em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.hero-derecha {
  font-family: var(--font-montserrat);
  color: var(--hero-text-color);
  font-size: 2.6em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.features {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 70px;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.feature-item {
  background-color: white;
  border-radius: 15px;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-8px);
  background-color: var(--light-gray-color);
}

.feature-item img {
  width: 70px;
  height: 70px;
  margin-bottom: 10px;
  object-fit: contain;
}

.feature-item span {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1em;
  text-transform: uppercase;
}

/* ===== FRANJA INFERIOR ===== */
.hero-doble-color {
  display: flex;
  width: 100%;
  height: 35px;
}

.hero-color-left {
  background-color: var(--primary-color);
  flex-grow: 1;
}

.hero-color-right {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-arial);
  font-size: 15px;
}

/* ===== BOTÓN INFERIOR ===== */
.invest-secure-button.bottom-button {
  background-color: var(--white-color);
  color: var(--text-color);
  padding: 18px 40px;
  border-radius: 10px;
  font-size: 1.2em;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-ease);
  position: relative;
  z-index: 2;
  margin-top: 10px;
  margin-bottom: 60px;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow-light);
}

.invest-secure-button.bottom-button:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-button-hover);
}

/* ===== FORMULARIO ===== */
.hero-text-2 {
  margin-top: 5rem;
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.titulo-container {
  position: absolute;
  top: 5%;
  left: 12%;
  z-index: 2;
  text-align: left;
  color: var(--white-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.titulo-linea1 {
  font-family: var(--font-montserrat);
  font-size: 2.5em;
  margin: 0;
  color: var(--tertiary-color);
  font-weight: 700;
}

.titulo-linea2 {
  font-family: var(--font-montserrat);
  font-size: 2.8em;
  margin: 0;
  color: var(--nombre-color);
  font-weight: 700;
}

.hero-background-img {
  position: absolute;
  top: 155px;
  left: 0;
  width: 100%;
  height: 70%;
  object-fit: cover;
  z-index: 1;
}

.formulario-container {
  position: absolute;
  right: 15%;
  top: 60%;
  transform: translateY(-50%);
  width: 350px;
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Nueva clase para la imagen de fondo */
.formulario-fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  z-index: -1;
}

.formulario-contenido {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.formulario-header {
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
  color: var(--white-color);
  font-weight: 600;
  font-size: 1.1em;
  text-transform: uppercase;
}

.formulario-header h2 {
  margin: 0;
}

.formulario-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 15px;
}

.input-group,
.input-group-label {
  width: 90%;
  margin-bottom: 20px;
}

.input-group input,
.input-group-label select {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 15px;
  font-size: 1em;
  outline: none;
  box-sizing: border-box;
  background-color: var(--white-color);
  color: var(--text-color);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  padding-right: 35px;
  cursor: pointer;
}

.input-group input::placeholder {
  color: var(--placeholder-color);
}

.formulario-boton {
  background-color: var(--white-color);
  color: var(--tertiary-color);
  padding: 12px 30px;
  border: none;
  border-radius: 20px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: block;
  margin-top: 20px;
  width: 90%;
  text-align: center;
  text-transform: uppercase;
}

.formulario-boton:hover {
  background-color: var(--medium-gray-color);
}

.formulario-boton:active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  transform: scale(0.96);
}

/* ===== OVERLAY ÉXITO CON ANIMACIONES MEJORADAS ===== */
.overlay-exito {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
}

.overlay-exito.show {
  opacity: 1;
  pointer-events: auto;
}

.overlay-exito.hide {
  animation: fadeOutOverlay 0.3s ease-out forwards;
}

.mensaje-exito {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #ffffff;
  border-radius: 15px;
  color: #2d8a45;
  font-weight: 700;
  font-size: 1.3em;
  padding: 25px 35px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transform: scale(0.5) translateY(-30px);
  opacity: 0;
  transition: none;
}

.mensaje-exito.show {
  animation: slideInBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.mensaje-exito.hide {
  animation: slideOutUp 0.3s ease-in forwards;
}

.icono-check {
  font-size: 2em;
  background: #47c47f;
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
}

.mensaje-exito.show .icono-check {
  animation: checkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s forwards;
}

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

/* Animación de entrada del mensaje */
@keyframes slideInBounce {
  0% {
    transform: scale(0.5) translateY(-30px);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Animación de salida del mensaje */
@keyframes slideOutUp {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
  }
}

/* Animación del icono check */
@keyframes checkPop {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Animación de fade out del overlay */
@keyframes fadeOutOverlay {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ===== ASESORES Y CLIENTES ===== */
.heri-izquierda {
  font-family: var(--font-montserrat);
  color: var(--nombre-color);
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 0.03em;
}

.heri-derecha {
  font-family: var(--font-montserrat);
  color: var(--hero-text-color);
  font-size: 2.0em;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 10px;
  letter-spacing: 0.01em;
}

.hero-text-terciari {
  padding: 140px 20px;
  text-align: center;
  max-width: 1500px;
  margin-top: 8rem;
  border-radius: 0px;
}

/* ===== CARRUSEL INFINITO MEJORADO ===== */
.carousel-container {
  position: relative;
  width: 90%;
  max-width: 1600px;
  margin: -4rem auto;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.25);
  background-color: #ffffff;
  padding: 30px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
  gap: 0;
}

/* Desactivar transición cuando se reposiciona sin animación */
.carousel-track.no-transition {
  transition: none !important;
}

.carousel-item {
  flex: 0 0 calc(100% / 3);
  min-width: 0;
  padding: 0 15px;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

/* Estilo para los items clonados (opcional, para debugging) */
.carousel-item.clone {
  /* Los clones son idénticos visualmente */
}

.carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.client-text-wrapper {
  position: absolute;
  bottom: 35px;
  width: calc(90% - 30px);
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.92);
  padding: 10px 10px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  text-align: center;
}

.client-text-wrapper h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #00AAA2;
  margin-bottom: 7px;
  margin-top: 0;
}

.client-text-wrapper p {
  font-size: 1rem;
  color: #333;
  font-style: italic;
  margin: 0;
}

button.prev, button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  border-radius: 8px;
  z-index: 10;
  transition: all 0.3s ease;
}

button.prev:hover, button.next:hover {
  background-color: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}

button.prev:active, button.next:active {
  transform: translateY(-50%) scale(0.95);
}

button.prev:disabled, button.next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

button.prev { left: 20px; }
button.next { right: 20px; }

.hero-text-cliente {
  padding: 140px 20px;
  margin-top: 8rem;
  text-align: center;
  max-width: 1500px;
  margin: -80px auto;
  border-radius: 0px;
}

/* ===== CAROUSEL RESPONSIVE MEJORADO ===== */

/* Desktop - 3 items */
.carousel-item {
  flex: 0 0 calc(100% / 3);
  min-width: 0;
  padding: 0 15px;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

/* Tablets - 2 items */
@media (max-width: 1200px) {
  .carousel-item {
    flex: 0 0 calc(100% / 2);
  }
  
  .carousel-item img {
    height: 450px;
  }
  
  .client-text-wrapper h3 {
    font-size: 1.2rem;
  }
  
  .client-text-wrapper p {
    font-size: 0.95rem;
  }
}

/* ===== MÓVILES - 1 ITEM COMPLETO ===== */
@media (max-width: 768px) {
  .carousel-container {
    width: 90%; /* ✅ Más centrado */
    padding: 20px 15px; /* ✅ Menos padding */
    margin: -2rem auto;
    border-radius: 20px;
  }
  
  .carousel-item {
    flex: 0 0 100%; /* ✅ 100% del ancho - 1 item completo */
    padding: 0 10px; /* ✅ Menos padding entre items */
  }
  
  .carousel-item img {
    height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: 15px;
  }
  
  .client-text-wrapper {
    bottom: 25px;
    padding: 12px 15px;
    width: calc(90% - 20px); /* ✅ Ajustado para el nuevo padding */
  }
  
  .client-text-wrapper h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }
  
  .client-text-wrapper p {
    font-size: 0.9rem;
  }
  
  /* Botones más grandes y visibles en móvil */
  button.prev, button.next {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(0,0,0,0.7); /* ✅ Más visible */
  }
  
  button.prev { 
    left: 5px; /* ✅ Más cerca del borde */
  }
  
  button.next { 
    right: 5px; /* ✅ Más cerca del borde */
  }

  /* ✅ Asegurar que el track respete el 100% */
  .carousel-track {
    display: flex;
    gap: 0; /* ✅ Sin gap en móvil */
  }
}

/* Móviles pequeños - Ajustes adicionales */
@media (max-width: 480px) {
  .carousel-container {
    width: 95%; /* ✅ Aún más ancho en móviles pequeños */
    padding: 15px 10px;
  }

  .carousel-item {
    padding: 0 5px; /* ✅ Padding mínimo */
  }

  .carousel-item img {
    height: 350px;
    border-radius: 12px;
  }
  
  .client-text-wrapper {
    bottom: 20px;
    padding: 10px 12px;
  }
  
  .client-text-wrapper h3 {
    font-size: 1rem;
  }
  
  .client-text-wrapper p {
    font-size: 0.85rem;
  }
  
  button.prev, button.next {
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ===== TARJETAS INVERSIÓN ===== */
.titulo-inversion {
  margin-top: 18rem;
  text-align: center;
  margin-bottom: 5rem;
  animation: fadeInDown 1s ease forwards;
  opacity: 0;
}

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

.titulo-inversion h2 {
  color: black;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.titulo-inversion h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 5px;
  background: black;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.titulo-inversion h2:hover::after {
  width: 100%;
}

.titulo-inversion h2 span {
  font-weight: 900;
  background: linear-gradient(90deg, #008080 0%, #00b3b3 50%, #008080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.titulo-inversion p {
  color: #008080;
  font-size: 1.25rem;
  font-weight: 400;
  margin-top: 1rem;
  opacity: 0.9;
}

.cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s forwards;
  animation-delay: 0.3s;
}

@media (min-width: 768px) {
  .cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.card {
  background: linear-gradient(145deg, #008080, #006666);
  padding: 2.5rem 2rem;
  border-radius: 2rem;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #009999, #007777);
}

.card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.card:hover::after {
  top: -10%;
  left: -10%;
}

.card-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: white;
  color: black;
  margin: 0 auto 1.5rem;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.card-icon i {
  font-size: 2rem;
}

.card:hover .card-icon {
  transform: scale(1.3) rotate(10deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card h3 {
  color: white;
  font-size: 1.6rem;
  line-height: 1.6;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
}

.card p {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 500;
  color: white;
  line-height: 1.5;
}

/* ===== VIDEOS ===== */
.videos-section {
  background-color: #fafafa;
  padding: 80px 20px;
  text-align: center;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-items: center;
}

.video-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background-color: #000; /* Cambiar a negro para que no se vea raro en pantalla completa */
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* CAMBIO CLAVE: contain en vez de cover */
  display: block;
  cursor: pointer;
  z-index: 1;
  background-color: #000; /* Fondo negro para el video */
}

/* Ocultar controles hasta que se reproduzca el video */
.video-card video::-webkit-media-controls {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card video.playing::-webkit-media-controls {
  opacity: 1;
}

.video-card .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* El poster sí puede usar cover */
  display: block;
  transition: opacity 0.25s ease;
  z-index: 3;
  pointer-events: none;
}

.video-card .poster.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 70px;
  height: 70px;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.play-overlay:hover .play-icon {
  transform: scale(1.1);
}

/* ===== REDES SOCIALES FLOTANTES ===== */
.redes a {
  position: fixed;
  width: 60px;
  height: 60px;
  right: 40px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  z-index: 100;
  transition: all 0.4s ease;
  opacity: 0.95;
}

.whatsapp-float {
  background-color: #25d366;
  bottom: 40px;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

.facebook-float,
.instagram-float,
.tiktok-float {
  background-color: transparent;
  bottom: 40px;
  opacity: 0;
  pointer-events: none;
}

.redes:hover .facebook-float {
  bottom: 110px;
  opacity: 1;
  pointer-events: auto;
}

.redes:hover .instagram-float {
  bottom: 180px;
  opacity: 1;
  pointer-events: auto;
}

.redes:hover .tiktok-float {
  bottom: 250px;
  opacity: 1;
  pointer-events: auto;
}

.facebook-float img {
  width: 65px;
  height: 65px;
}

.instagram-float img {
  width: 90px;
  height: 70px;
}

.tiktok-float img {
  width: 85px;
  height: 65px;
}

.redes a:hover {
  transform: scale(1.1);
}

/* ===== FOOTER ===== */
.main-footer {
  background-color: #121f23;
  color: var(--light-text-color);
  padding: 50px 20px 20px 20px;
  font-family: var(--font-montserrat);
  box-shadow: var(--shadow-footer);
  margin-top: 180px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--footer-border-color);
}

.footer-column {
  flex: 1;
  min-width: 200px;
  padding: 10px 0;
}

.branding-column {
  min-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.footer-logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.slogan {
  font-style: italic;
  font-size: 0.95em;
  color: var(--slogan-color);
  margin-top: -5px;
  margin-bottom: 20px;
}

.contact-info p {
  margin: 8px 0;
  font-size: 0.9em;
  color: var(--slogan-color);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-icon-img {
  width: 18px;  
  height: 18px; 
  object-fit: contain;
  margin-top: 2px;
}

.footer-column h3 {
  color: var(--white-color);
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  position: relative;
}

.footer-column h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
  margin-top: 8px;
  border-radius: 2px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  text-decoration: none;
  color: var(--slogan-color);
  font-size: 0.9em;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--primary-color);
}

/* --- Estilos para Iconos Sociales --- */
.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-icons a {
  display: inline-block; 
  transition: transform 0.3s ease;
}

.social-icon-img {
  width: 24px; 
  height: 24px;
  object-fit: contain;
}

.social-icons a:hover {

  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  color: #a0a0a0;
  font-size: 0.8em;
  padding-top: 20px;
}

.imagenes-horizontal-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; 
  padding: 100px;
  max-width: 1200px;
  margin: 0px auto;
}

/* ===== MEDIA QUERIES ===== */

/* TABLETS (max-width: 992px) */
@media (max-width: 992px) {
  body {
    padding-top: 130px;
  }

  .btn-contact {
    margin-left: 20px;
  }

  .logo-container {
    width: 140px;
    height: 70px;
    margin-top: -70px;
  }

  .logo-image {
    height: 50px;
  }

  .logo-content {
    top: 8px;
  }

  .titulo-container {
    left: 5%;
    top: 5%;
    font-size: 0.9em;
  }

  .titulo-linea1 {
    font-size: 2.2em;
  }

  .titulo-linea2 {
    font-size: 2.5em;
  }

  .formulario-container {
    right: 5%;
    width: 280px;
    padding: 15px;
  }


}

/* MÓVILES (max-width: 768px) */
@media (max-width: 768px) {
  body {
    padding-top: 110px;
  }
 
  .hero-text-2 {
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .hero-background-img {
    position: relative;
    height: 300px;
    width: 100%;
    left: 0;
    top: 0;
  }

  .hero-background-img2 {
    display: none !important;
  }

  .titulo-container {
    position: static;
    margin-bottom: 20px;
    text-align: center;
    left: auto;
    top: auto;
    font-size: 1em;
  }

  .titulo-linea1 {
    font-size: 2em;
  }

  .titulo-linea2 {
    font-size: 2.3em;
  }

  .formulario-container {
    position: static;
    margin: 20px auto;
    width: 90%;
    max-width: 500px;
    right: auto;
    top: auto;
    transform: none;
    background-size: cover;
  }


}

/* MÓVILES PEQUEÑOS (max-width: 600px) */
@media (max-width: 600px) {
  .features {
    gap: 10px;
    margin-top: 50px;
    margin-bottom: 40px;
  }

  .play-icon {
    width: 50px;
    height: 50px;
  }
  
  .volume-slider {
    width: 40px;
  }
  
  .control-btn {
    font-size: 18px;
  }
}

/* MÓVILES MUY PEQUEÑOS (max-width: 480px) */
@media (max-width: 480px) {
  html, body {
    overflow-x: hidden;
  }

  .hero-text-primary,
  .hero-text-secundary,
  .navbar ul,
  .header-inferior,
  .main-header,
  .hero-content,
  .features {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
  }

  .logo-container {
    margin-top: -60px;
  }

  .logo-image {
    height: 200px;
  }

  .hero-inicio {
    font-size: 2em;
  }

  .hero-final {
    font-size: 1em;
  }

  .hero-izquierda,
  .hero-derecha {
    font-size: 1.5em;
    text-align: center;
  }

  .btn-contact {
    font-size: 0.9em;
    padding: 10px 20px;
  }

  .invest-secure-button.bottom-button {
    font-size: 1em;
    padding: 10px 25px;
  }
}

/* PANTALLAS GRANDES (min-width: 1600px) */
@media (min-width: 1600px) {
  .hero-content {
    padding: 80px 0;
    margin-top: -60px;
  }

  .hero-text-primary {
    padding: 10px 200px;
    max-width: 1100px;
    margin: 5px auto 20px auto;
    border-radius: 10px;
  }

  .hero-inicio {
    font-size: 4em;
  }

  .hero-final {
    font-size: 1.8em;
    padding-top: 15px;
  }

  .hero-text-secundary {
    padding: 15px 140px;
    margin-top: -25px;
    border-radius: 10px;
  }

  .hero-izquierda,
  .hero-derecha {
    font-size: 2.8em;
  }

  .features {
    gap: 90px;
    margin-top: 40px;
    margin-bottom: 30px;
  }

  .feature-item {
    width: 120px;
    padding: 15px;
  }

  .feature-item img {
    width: 70px;
    height: 70px;
  }

  .invest-secure-button.bottom-button {
    font-size: 1.2em;
    padding: 18px 45px;
    border-radius: 12px;
    margin-bottom: 50px;
  }

  .hero-doble-color {
    height: 35px;
  }

  .hero-color-right {
    font-size: 16px;
  }
  
  




  .hero-text-cliente,
  .hero-text-terciari {
    padding: 140px 20px;
    max-width: 3000px;
    margin: -80 auto;
  }

  .formulario-container {
    position: absolute;
    height: 78vh;             
    left: 70%;                  
    top: 50%;                   
    transform: translate(-50%, -50%);
    width: 35%;               
    max-width: 750px;           
    min-width: 500px;           
    border-radius: 20px;
    padding: 40px;             
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  }

  .formulario-header {
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 1.5em;           
  }

  .formulario-fields {
    gap: 20px;                 
  }

  .input-group,
  .input-group-label {
    width: 95%;
  }

  .input-group input,
  .input-group-label select {
    padding: 15px 20px;        
    border-radius: 18px;
    font-size: 1.3em;          
  }

  .input-group input::placeholder {
    font-size: 1.1em;          
  }

  .formulario-boton {
    padding: 20px 35px;         
    border-radius: 30px;
    font-size: 1.4em;          
    font-weight: 800;
    margin-top: 30px;
    width: 95%;
  }

  .formulario-boton:hover {
    background-color: var(--tertiary-color);
    color: var(--white-color);
    transform: scale(1.05);
  }
}

@media screen and (max-width: 900px) {

  
  .hero-text-2 {
    flex-direction: column; 
    height: auto;           
    min-height: 100vh;      
    padding: 100px 0 50px 0;
  }
  
  .hero-background-img {
    height: 100%;
    top: 0; 
    object-fit: cover;
    
  }

  .titulo-container {
    position: relative; 
    top: auto;
    left: auto;
    width: 90%;
    text-align: center; 
    margin-bottom: 30px; 
  }

  
  .titulo-linea1 {
    font-size: 1.8em;
  }
  .titulo-linea2 {
    font-size: 2.2em;
  }

  .formulario-container {
    position: relative;
    right: auto;
    top: auto;
    transform: none;    
    width: 90%;         
    max-width: 400px;  
    margin-bottom: 20px;
  }
  
  .input-group input, 
  .input-group-label select {
    font-size: 16px;
    padding: 15px;
  }
}