/* Carousel Container */
.carousel-container {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  z-index: 1;
}

/* Slides */
.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slides .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.carousel-slides .slide.active {
  z-index: 2;
}

.slide-content {
  text-align: center;
  max-width: 1000px;
  padding: 40px;
  z-index: 10;
  /* Por encima del fondo neuronal */
  position: relative;
}

/* Slide Backgrounds */
.slide-bg {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-image: var(--slide-bg, none);
  transform-origin: center center;
  background-color: var(--color-fondo-card);
}
.slide-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Typography */
.slide-subtitle {
  font-family: var(--jost);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: #f8ceb3;
  margin-bottom: 20px;
  overflow: hidden;
}

.slide-title {
  font-family: var(--jost);
  font-size: clamp(48px, 9vw, 100px);
  font-weight: var(--peso-light);
  line-height: 1.3;
  color: #fff;
  letter-spacing: -0.02rem;
  margin-bottom: 20px;
}

.slide-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.slide-title .char {
  display: inline-block;
}

.slide-description {
  font-family: var(--jost);
  font-size: 20px;
  font-weight: var(--peso-light);
  line-height: 1.8;
  letter-spacing: 0.025rem;
  color: rgba(235, 235, 235, 0.8);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

/* Buttons */
.slide-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-mask {
  overflow: hidden;
  display: inline-block;
}

.slide .btn {
  font-family: var(--jost);
  padding: 18px 45px;
  font-size: 13px;
  font-weight: var(--peso-medio);
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  display: block;
  text-decoration: none;
}

.slide .btn-primary {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.slide .btn-primary:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
  box-shadow: none;
}

.slide .btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  box-shadow: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.slide .btn--outline::before {
  display: none;
}

.slide .btn--outline:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
  box-shadow: none;
}

.slide .btn-secondary {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.slide .btn-secondary:hover {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 10px 40px rgba(255, 255, 255, 0.1);
  color: #fff;
  opacity: 0.5;
}

.slide .btn::before {
  display: none;
}

.slide .btn:hover {
  transform: none;
}

.slide .btn-primary:hover {
  box-shadow: none;
}



/* Navigation */
.carousel-nav {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 100;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-dot svg {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.dot-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
}

.dot-progress {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: butt;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
}

.nav-dot.active {
  background: #fff;
}

.nav-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Arrow Navigation */
.carousel-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 100;
  pointer-events: none;
}

.arrow {
  position: relative;
  width: 60px;
  height: 60px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.35s ease, background-color 0.35s ease;
  pointer-events: all;
  overflow: hidden;
  /* Actúa como máscara */
}

.arrow:hover {
  background-color: #fff;
  border-color: #fff;
}

.arrow-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Posición inicial de los íconos */
.arrow-prev .arrow-icon-1 {
  transform: translateX(0);
}

.arrow-prev .arrow-icon-2 {
  transform: translateX(80px);
  /* Completamente fuera a la derecha */
}

.arrow-next .arrow-icon-1 {
  transform: translateX(0);
}

.arrow-next .arrow-icon-2 {
  transform: translateX(-80px);
  /* Completamente fuera a la izquierda */
}

/* Efecto hover para flecha izquierda */
.arrow-prev:hover .arrow-icon-1 {
  transform: translateX(-80px);
  /* Sale hacia la izquierda */
}

.arrow-prev:hover .arrow-icon-2 {
  transform: translateX(0);
  /* Entra desde la derecha */
}

/* Efecto hover para flecha derecha */
.arrow-next:hover .arrow-icon-1 {
  transform: translateX(80px);
  /* Sale hacia la derecha */
}

.arrow-next:hover .arrow-icon-2 {
  transform: translateX(0);
  /* Entra desde la izquierda */
}

/* Cambio de color del ícono en hover */
.arrow:hover .arrow-icon {
  color: #000;
}

/* Progress Bar */
.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  background: #fff;
  width: 0%;
  z-index: 100;
}

/* Slide Counter */
.slide-counter {
  position: absolute;
  bottom: 45px;
  right: 30px;
  z-index: 100;
  display: flex;
  pointer-events: none;
  align-items: center;
}

.digit-mask {
  height: 32px;
  overflow: hidden;
  position: relative;
  width: 20px;
  display: flex;
  justify-content: center;
}

.digit-mask .digit {
  font-family: var(--jost);
  font-size: 35px;
  font-weight: 400;
  color: #fff;
  display: block;
  line-height: 35px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .slide-content {
    padding: 0 60px;
    width: 100%;
  }

  .slide-description {
    font-size: 17px;
    margin-bottom: 20px;
  }

  .btn {
    padding: 15px 30px;
    font-size: 12px;
  }

  .carousel-arrows {
    display: flex;
    padding: 0 10px;
  }

  .arrow {
    width: 40px;
    height: 40px;
  }

  .arrow svg {
    width: 18px;
    height: 18px;
  }

  .slide-counter {
    bottom: 40px;
    right: 20px;
  }
}

/* Custom Cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    height 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    background-color 0.3s ease;
}

#custom-cursor.active {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}