/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Web by GCON Digital & Web Studio
*/

/* Add your custom styles here */

/* SLIDER HERO: Ocultar el contenido incorrecto según el tipo de slide ACF */
.slide--image .slide-video-content { display: none !important; }
.slide--video .slide-image-content { display: none !important; }

/* 1. Forzar ajustes de la imagen de fondo dinámico */
.slide--image {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* 2. Forzar que todos los slides midan exactamente 90svh */
.hero-slide {
    height: 100svh !important;
    min-height: 100svh !important;
    display: flex;
}

/* 3. Evitar que el carrusel aplaste los contenedores */
.swiper-slide {
    height: auto !important;
}

/* 4. Asegurar que los contenedores hijos ocupen el 100% de esos 90svh */
.slide-image-content, 
.slide-video-content {
    min-height: 100% !important;
    height: 100% !important;
}

/* ==========================================
   ESTILOS DE LOS DOTS DEL HERO
========================================== */

/* Posición inferior derecha */
.hero-carousel .swiper-pagination {
    bottom: 40px !important;
    text-align: right !important;
    padding-right: 40px !important;
}

/* Dots inactivos: Círculo transparente con borde blanco */
.hero-carousel .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: transparent !important;
    border: 1px solid #ffffff !important;
    opacity: 1 !important;
    margin: 0 6px !important;
    transition: all 0.3s ease;
}

/* Dot activo: Blanco sólido */
.hero-carousel .swiper-pagination-bullet-active {
    background: #ffffff !important;
}

/* ============================================================
   FORZAR VÍDEO A ALTO COMPLETO (OBJECT-FIT: COVER)
============================================================ */

/* 1. Rompemos la proporción fija de Elementor y la obligamos a medir el 100% del contenedor */
.slide-video-content .elementor-widget-video,
.slide-video-content .elementor-wrapper,
.slide-video-content video {
    height: 100% !important;
    width: 100% !important;
    padding-bottom: 0 !important; /* Elimina el ratio 16:9 forzado por Elementor */
}

/* 2. Hacemos que tanto la imagen de portada (póster) como el propio vídeo actúen como un fondo 'cover' */
.slide-video-content video {
    object-fit: cover !important;
    object-position: center center !important;
}
/* ============================================================
   1. CORRECCIÓN DEL SCROLL HORIZONTAL
============================================================ */
/* Forzamos a que ni el carrusel ni sus contenedores puedan desbordar la pantalla */
.hero-carousel, 
.hero-slide,
.slide-video-content {
    overflow: hidden !important;
    max-width: 100vw !important;
}

/* ============================================================
   2. TRUCO DE "ZONAS DE DESLIZAMIENTO" PARA EL VÍDEO EN MÓVIL
============================================================ */
@media (max-width: 767px) {
    .slide-video-content {
        position: relative;
    }
    
    /* Creamos una zona invisible en el lateral izquierdo (25% de la pantalla) */
    .slide-video-content::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 25%;
        height: 100%;
        z-index: 10;
        pointer-events: auto;
        background: transparent;
    }
    
    /* Creamos una zona invisible en el lateral derecho (25% de la pantalla) */
    .slide-video-content::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 25%;
        height: 100%;
        z-index: 10;
        pointer-events: auto;
        background: transparent;
    }
}

/* ============================================================
   LOGO TICKER
   ============================================================ */

/* 1. Wrapper externo — fila rígida sin wrap */
.gsap-ticker-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow: hidden !important;
  width: 100% !important;
}

/* 2. Cada bloque (original + clon) */
.gsap-ticker-content {
  flex: 0 0 auto !important;
  width: max-content !important;
  min-width: max-content !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  will-change: transform;
}

/* 3. Widget container de Elementor */
.gsap-ticker-content > .elementor-widget-container {
  display: flex !important;
  width: max-content !important;
  min-width: max-content !important;
}

/* 4. El loop container — aquí matamos la grid de Elementor */
.gsap-ticker-content .elementor-loop-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content !important;
  min-width: max-content !important;
  /* Matar grid de Elementor */
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  /* Espaciado entre logos */
  gap: 4rem !important;
  /* Padding-right = gap para que el empalme sea perfecto */
  padding-right: 4rem !important;
  padding-left: 0 !important;
}

/* 5. Cada item del loop */
.gsap-ticker-content .e-loop-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: unset !important;
  max-width: unset !important;
  margin: 0 !important;
}

/* 6. Container interno del loop item */
.gsap-ticker-content .e-loop-item > .e-con {
  width: auto !important;
  max-width: unset !important;
  min-width: unset !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  --container-widget-width: auto !important;
}

/* 7. Imagen */
.gsap-ticker-content .e-loop-item img {
  width: auto !important;
  max-width: 9rem !important;
  height: 3.5rem !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* Tablet */
@media (max-width: 1024px) {
  .gsap-ticker-content .elementor-loop-container {
    gap: 3rem !important;
    padding-right: 3rem !important;
  }
  .gsap-ticker-content .e-loop-item img {
    max-width: 7rem !important;
    height: 3rem !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .gsap-ticker-content .elementor-loop-container {
    gap: 2rem !important;
    padding-right: 2rem !important;
  }
  .gsap-ticker-content .e-loop-item img {
    max-width: 5.5rem !important;
    height: 2.5rem !important;
  }
}

/* ==========================================================
   TARJETAS DE VÍDEO OPTIMIZADAS
========================================================== */
/* ==========================================================
   1. ANTI-COLAPSO: Estabilidad estructural en el Frontend
========================================================== */
.elementor-widget-html,
.elementor-widget-html .elementor-widget-container {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    position: relative !important;
}

/* ==========================================================
   2. TARJETA MAESTRA
========================================================== */
.tarjeta-video-custom {
    position: relative;
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background-color: #2a2a2a;
}

/* ==========================================================
   3. VÍDEO VISIBLE
========================================================== */
.tarjeta-video-custom video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease;
    z-index: 1;

    /* IMPORTANTE: esto corrige el problema */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Si queda alguna imagen poster de la prueba anterior, la ocultamos */
.tarjeta-video-custom .video-poster {
    display: none !important;
}

/* ==========================================================
   4. CAPA OSCURA
========================================================== */
.tarjeta-video-custom .overlay-oscuro {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================
   5. TÍTULO
========================================================== */
.tarjeta-video-custom .titulo-flotante {
    position: absolute;
    bottom: 25px;
    left: 25px;
    margin: 0;
    color: #ffffff;
    font-family: 'Poppins', sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    line-height: 1.2;
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

/* ==========================================================
   HOVER
========================================================== */
.tarjeta-video-custom:hover .overlay-oscuro {
    opacity: 1;
}

.tarjeta-video-custom:hover .titulo-flotante {
    opacity: 1;
    transform: translateY(0);
}

.tarjeta-video-custom:hover video {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .tarjeta-video-custom .titulo-flotante {
        font-size: 20px !important;
        bottom: 18px;
        left: 18px;
    }
}

/* ==========================================================
   POP-UP EQUIPO
========================================================== */

/* Estilos aplicados solo dentro del contenido del popup */
#popup-dynamic-body{
  font-family: "Poppins", Sans-serif !important;
  color: var(--azul);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografía base */
#popup-dynamic-body p{
  font-size: 18px;
  margin: 0 0 0.75rem 0;
}

/* Secciones y títulos */
#popup-dynamic-body .cv-section{
  margin: 0 0 1.25rem 0;
  padding: 0;
}

#popup-dynamic-body .section-title{
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem 0;
  padding: 0.25rem 0;
  border-bottom: 1px solid currentColor;
  font-weight: 400;
}

/* Entradas (líneas) */
#popup-dynamic-body .entry{
  padding: 0.6rem 0;
  border-bottom: 1px dashed color-mix(in srgb, currentColor 30%, transparent);
}
#popup-dynamic-body .entry:last-child{
  border-bottom: none;
}

/* Cabecera de cada entrada: título a la izquierda, fecha a la derecha */
#popup-dynamic-body .entry-head{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
}

#popup-dynamic-body .entry-title{
  margin: 0;
  font-size: 0.975rem; /* ajusta si quieres algo mayor */
  font-weight: 400;
  line-height: 1.35;
}

#popup-dynamic-body .entry-title .entry-sub{
  display: block;
  opacity: 0.85;
  font-size: 0.92em;
  margin-top: 0.15rem;
}

#popup-dynamic-body .entry-date{
  white-space: nowrap;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Pequeños ajustes responsive para anchos estrechos del popup */
@media (max-width: 480px){
  #popup-dynamic-body .entry-head{
    grid-template-columns: 1fr;
  }
  #popup-dynamic-body .entry-date{
    margin-top: 0.25rem;
  }
}

/* Título del popup (solo dentro del popup) */
#popup-dynamic-body,
#popup-title {
  font-family: "Poppins", Sans-serif !important;
  color: var(--azul);
}
#popup-title {
    margin: 0 0 20px 0;
    border-bottom: 1px solid
 color-mix(in srgb, var(--azul) 40%, transparent);
}
#popup-title .popup-member-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 36px;
    text-align: left;
    font-family: "Poppins", Sans-serif !important;
}
.col-img-person img {
    cursor: pointer !important;
}
#popup-title {
    padding-right: 50px;
}
.loop-direccion, .loop-enfermeria {
    cursor: default !important;
    pointer-events: none !important;
}

/* ---------------------------------------- RESPONSIVE ----------------------------------------- */
@media (max-width: 1280px) {
    .copyright div {
        text-align: left;
    }
    .menu-web li a {
        justify-content: center !important;
        text-align: center !important;
    }
    #comp-k9d2oixn svg {
        height: 200px;
    }    
}
@media (max-width: 767px) {
    .contenedor-popup .elementor-location-popup > div {
        padding-top: 17.5px !important;
    }
    .br-mvl br {
        display: block !important;
    }
    #comp-k9d2oixn svg {
        height: auto;
    }
	
	/* ==========================================================
   TITULO SIGUIENTE
========================================================== */