
.custom-carousel {
  position: relative;
  overflow: hidden;
}

.custom-carousel .slide {
  display: none;
  height: 150px;
  position: relative;
  background-color: #f2f2f2;
}

.custom-carousel .slide.active {
  display: block;
}

.custom-carousel .slide .overlay {
  padding-top: 10px;
  padding-bottom: 10px;

  position: absolute;
  bottom: 20px;
  left: 14%;
  right: 29%;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 10px;
  z-index: 2;
  height: 100%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.custom-carousel .slide .overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.3);
  z-index: 1;
  border-radius: 10px;
}

.custom-carousel .slide .overlay h2,
.custom-carousel .slide .overlay p,
.custom-carousel .slide .overlay a {
  width: auto;
  max-width: fit-content;

  position: relative;
  z-index: 2;
  font-family: 'Raleway', sans-serif;
}

.custom-carousel .slide .overlay h2 {
  font-size: 1.2em;
  line-height: 1.2;
  margin: 0;
}

.custom-carousel .slide .overlay p {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 5px 0;
}

.custom-carousel .slide .overlay a {
  width: auto;
  max-width: fit-content;

  display: inline-block;
  margin-top: auto;
  padding: 6px 14px;
  background-color: #AA52A0;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
}

.custom-carousel .nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2em;
  background: transparent;
  color: #AA52A0;
  border: none;
  cursor: pointer;
  z-index: 3;
}

.custom-carousel .nav-button.prev {
  left: 10px;
}

.custom-carousel .nav-button.next {
  right: 10px;
}

/* Ajuste versión 2.19: bajar títulos del carrusel */
.bc-title { position: relative; top: 30px; }

/* Ajuste versión 2.20: bajar cualquier título dentro del carrusel */
.blog-carousel h1, .blog-carousel h2, .blog-carousel h3, .blog-carousel h4, .blog-carousel h5, .blog-carousel h6 {
  position: relative !important;
  top: 40px !important;
}

/* Ajuste versión 2.21: bajar h2 dentro del carrusel */
.blog-carousel h2 {
  position: relative !important;
  top: 30px !important;
}

/* Ajuste versión 2.22: bajar todo el carrusel */
.blog-carousel {
  margin-top: 10px !important;
}

/* Ajuste versión 2.23: bajar todo el carrusel 80px */
.blog-carousel {
  margin-top: 80px !important;
}

/* Ajuste versión 2.24: bajar h2 dentro del carrusel 60px */
.blog-carousel h2 {
  position: relative !important;
  top: 60px !important;
}

/* Ajuste versión 2.25: bajar overlay completo 60px */
.blog-carousel .overlay {
  position: relative !important;
  top: 60px !important;
}

/* Ajuste versión 2.26: padding overlay y margen h2 */
.custom-carousel .overlay {
  padding-top: 35px !important;
  box-sizing: border-box;
}
.custom-carousel .overlay h2 {
  margin-bottom: 5px !important;
}

/* Ajuste versión 2.27: subir h2 sin mover el resto del contenido */
.custom-carousel .overlay h2 {
  position: relative !important;
  top: -15px !important; /* súbelo 15px, ajustable */
  margin-bottom: 5px !important;
}

/* Ajuste versión 2.28: padding overlay y ajuste h2 */
.custom-carousel .overlay {
  padding-top: 35px !important;
  padding-bottom: 40px !important;
  box-sizing: border-box;
}
.custom-carousel .overlay h2 {
  position: relative !important;
  top: -15px !important;
  margin-bottom: 5px !important;
}

/* Ajuste versión 2.28: dar aire inferior al overlay y mantener h2 ajustado */
.custom-carousel .overlay {
  padding-top: 35px !important;
  padding-bottom: 40px !important;
  box-sizing: border-box;
}
.custom-carousel .overlay h2 {
  position: relative !important;
  top: -15px !important;
  margin-bottom: 5px !important;
}


/* Ajuste versión 2.30: overlay a ancho completo en móvil/tablet */
@media (max-width: 1024px) {
  .custom-carousel {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
  .custom-carousel .slide,
  .custom-carousel .overlay {
    width: 100vw !important;
  }
  .custom-carousel .overlay {
    background-size: cover !important;
    background-position: center !important;
  }
}



/* Ajuste versión 2.31: overlay full-bleed sin gap usando centric transform */
@media (max-width: 1024px) {
  .custom-carousel,
  .custom-carousel .slide,
  .custom-carousel .overlay {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Evita padding lateral del contenedor de Elementor que cause sangrado */
  .elementor .custom-carousel {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}



/* Ajuste versión 2.32: padding lateral para texto y flechas más cerca de los bordes en móvil/tablet */
@media (max-width: 1024px) {
  /* Asegurar aire lateral para el contenido textual dentro del overlay */
  .custom-carousel .overlay {
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box;
  }

  /* Asegurar que las flechas queden por encima del overlay y más pegadas al borde */
  .custom-carousel .nav-button {
    z-index: 3 !important;
  }
  .custom-carousel .nav-button.prev {
    left: 8px !important;
    right: auto !important;
  }
  .custom-carousel .nav-button.next {
    right: 8px !important;
    left: auto !important;
  }
}



/* Ajuste versión 2.33: aumentar altura en móvil +30px (de 150px a 180px) */
@media (max-width: 767px) {
  .custom-carousel .slide {
    height: 180px !important;
  }
}

