/* Hero slider — Formación en Eneagrama */

.hero-eneagrama {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  background-color: #1a0a2e;
  background-image: url("../img/slider/fondo-eneagrama-sinnada.jpg");
  background-size: cover;
  background-position: center bottom;
  padding: 20px 0  20px;
}

@media (min-width: 768px) {
  .hero-eneagrama {
    padding:  20px 0  20px;
    display: flex;
    align-items: center;
    overflow-x: visible;
  }
}

.hero-eneagrama-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
  box-sizing: border-box;
}

/* Columna con la imagen de texto */
.hero-texto-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 1rem;
}

.hero-texto-wrap img {
  width: 100%;
  max-width: 480px;
  height: auto;
}

/* PC: imagen alineada a la izquierda */
@media (min-width: 768px) {
  .hero-texto-wrap {
    justify-content: flex-start;
  }

  .hero-texto-wrap img {
    margin-left: 0;
    margin-right: auto;
  }
}

/* Evita desbordes típicos de columnas flex */
.hero-eneagrama-inner .hero-carousel-wrap {
  min-width: 0;
}

/* Carrusel: centrado en móvil, a la derecha en PC */
.hero-carousel-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero-carousel-wrap {
    padding: 20px 0;
    justify-content: flex-end;
  }
}

.hero-carousel-glow {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero-carousel-glow {
    margin-left: auto;
    margin-right: 0;
  }
}

@media (min-width: 992px) {
  .hero-carousel-glow {
    max-width: 420px;
  }
}



/* Móvil: resplandor más contenido para no rozar el borde del viewport */
@media (max-width: 767px) {
  .hero-carousel-glow::before {
    width: 108%;
    height: 108%;
  }
}

.hero-carousel-glow .carousel {
  position: relative;
  z-index: 1;
}

.hero-carousel-glow .carousel-inner {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero-carousel-glow .carousel-item img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: 24px;
}

/* Controles circulares blancos */
.hero-eneagrama .hero-carousel-btn {
  width: 44px;
  height: 44px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  opacity: 1;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Móvil: flechas cerca del borde de la imagen */
.hero-eneagrama .carousel-control-prev.hero-carousel-btn {
  left: 6px;
}

.hero-eneagrama .carousel-control-next.hero-carousel-btn {
  right: 6px;
}

/* Escritorio: flechas en el fondo morado, alejadas del cartel */
@media (min-width: 768px) {
  .hero-eneagrama .carousel-control-prev.hero-carousel-btn {
    left: -56px;
  }

  .hero-eneagrama .carousel-control-next.hero-carousel-btn {
    right: -56px;
  }
}

.hero-eneagrama .hero-carousel-btn .hero-carousel-arrow {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  line-height: 44px;
  color: #111;
}

.hero-eneagrama .hero-carousel-btn .carousel-control-prev-icon,
.hero-eneagrama .hero-carousel-btn .carousel-control-next-icon {
  display: none;
}

/* === TABLET (768–1024 px) === */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Carrusel en col-md-6, alineado a la derecha */
  .hero-carousel-wrap {
    justify-content: flex-end;
    padding-left: 0;
  }

  /* A 768 px el col-md-6 mide ~369 px: ajustamos el glow */
  .hero-carousel-glow {
    max-width: 310px;
    margin-left: auto;
    margin-right: 0;
  }

  /* Flechas dentro del carrusel en tablet */
  .hero-eneagrama .carousel-control-prev.hero-carousel-btn {
    left: 6px;
  }
  .hero-eneagrama .carousel-control-next.hero-carousel-btn {
    right: 6px;
  }

  /* Imagen de texto: ajuste de tamaño en tablet */
  .hero-texto-wrap img {
    max-width: 360px;
  }
}

/* Móvil: texto arriba, carrusel abajo */
@media (max-width: 767px) {
  .hero-eneagrama {
    background-image: url("../img/slider/fondo-eneagrama-sinnada-movil.jpg");
    background-position: top center;
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .hero-eneagrama-inner {
    position: relative;
    z-index: 1;
  }

  /* Columna de texto: centrada, tamaño contenido */
  .hero-texto-wrap {
    justify-content: center;
    padding-right: 0;
    padding-bottom: 0;
    margin-bottom: 40px;
  }

  .hero-texto-wrap img {
    max-width: 320px;
    width: 100%;
  }

  .hero-carousel-wrap {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
  }

  .hero-carousel-glow {
    max-width: min(100%, 420px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Simula breakpoint xxl (≥1400px) de Bootstrap 5 en Bootstrap 4 */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Oculta visualmente el badge de reCAPTCHA v3 sin romper su funcionalidad */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Slider home: ajustes finales en movil */
@media (max-width: 767px) {
  /* Boton mas grande en movil */
  #rev_slider .slider-btn {
    font-size: 16px !important;
    line-height: 45px !important;
    height: 45px !important;
    max-width: 260px !important;
  }

  /* Este CTA tiene texto mas largo y necesita mas ancho fijo */
  #rev_slider #slide-duelo-layer-2 {
    width: 270px !important;
    max-width: 270px !important;
  }
}

/* Centra la imagen del slide para recorte lateral equilibrado */
.rev_slider_wrapper .tp-bgimg.defaultimg,
.rev_slider_wrapper .rev-slidebg {
  background-position: center center !important;
  object-position: center center !important;
}

@media (max-width: 767px) {
  #el_duelo .section-heading h3.font-size-32.semi-bold {
    margin-top: 30px !important;
  }
}

/* Equipo: foto completa arriba y texto debajo (sin solapamiento) */
#equipo_formativo .team-box-2 {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin: 15px 0 30px;
  background: #fff;
}

#equipo_formativo .team-box-2 img {
  width: 100%;
  height: auto;
  display: block;
  flex-shrink: 0;
}

#equipo_formativo .team-box-2-info {
  position: static;
  bottom: auto;
  left: auto;
  width: 100%;
  margin-top: 0;
  padding: 20px 25px;
  background: #fff;
}

@media (min-width: 768px) {
  #equipo_formativo .row > .col-md-4 {
    display: flex;
  }

  #equipo_formativo .team-box-2 {
    height: 100%;
    width: 100%;
  }

  #equipo_formativo .team-box-2-info {
    flex: 1;
  }

  /* Terapia individual / taller grupal: misma altura en PC */
  #modalidades .mt-30.row > .col-md-6.d-flex {
    align-items: stretch;
  }

  #modalidades .service-block.h-100 {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
  }

  #modalidades .service-block.h-100 .service-block-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 100%;
  }

  #modalidades .service-block.h-100 .service-block-content > p:has(a[href="#contacto"]) {
    margin-top: auto;
  }
}

