/**
 * @package     Joomla.Site
 * @subpackage  mod_jabasliders
 *
 * @copyright   Copyright (C) 2026 Jabatec. All rights reserved.
 * @license     GNU General Public License v2 or later; see LICENSE.txt
 */

:root {
    --jaba-slider-primary: #00bcd4;
    --jaba-slider-primary-hover: #00acc1;
    --jaba-slider-text-color: #ffffff;
    --jaba-slider-font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Contenedor Principal */
.jaba-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #111;
    font-family: var(--jaba-slider-font-family);
    box-sizing: border-box;
}

.jaba-slider-container *,
.jaba-slider-container *::before,
.jaba-slider-container *::after {
    box-sizing: border-box;
}

/* Contenedor de las diapositivas */
.jaba-slider-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Diapositiva Individual */
.jaba-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.jaba-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Imagen Semántica Responsive (<picture>) */
.jaba-slide-picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
}

.jaba-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Modo Altura Adaptable / Modo Banner (100% ancho sin recorte) */
.jaba-slider-container.jaba-slider--auto {
    height: auto;
    background-color: transparent;
}

.jaba-slider-container.jaba-slider--auto .jaba-slider-slides {
    display: grid;
    grid-template-areas: "slide";
    height: auto;
}

.jaba-slider-container.jaba-slider--auto .jaba-slide {
    grid-area: slide;
    position: relative;
    height: auto;
}

.jaba-slider-container.jaba-slider--auto .jaba-slide:not(.active) {
    height: 0;
    overflow: hidden;
}

.jaba-slider-container.jaba-slider--auto .jaba-slide-picture {
    position: relative;
    height: auto;
}

.jaba-slider-container.jaba-slider--auto .jaba-slide-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Capa de Overlay */
.jaba-slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Enlace envolvente sobre todo el slide */
.jaba-slide-link-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: block;
    text-decoration: none;
}

/* Contenedor del contenido central */
.jaba-slide-content {
    position: relative;
    width: 100%;
    max-width: 850px;
    padding: 0 24px;
    z-index: 4;
    text-align: center;
    pointer-events: none;
}

.jaba-slide-content a {
    pointer-events: auto;
}

/* Caja de diseño central (Estilo decorativo removido a petición del usuario) */
.jaba-slide-inner {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease-in-out;
}

/* Animación de entrada de contenido en slide activo */
.jaba-slide.active .jaba-slide-inner {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.2s;
}

/* Flechas de Navegación */
.jaba-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--jaba-slider-text-color);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 10;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
}

.jaba-slider-arrow:hover {
    background: var(--jaba-slider-primary);
    border-color: var(--jaba-slider-primary);
    transform: translateY(-50%) scale(1.08);
}

.jaba-slider-arrow.prev {
    left: 24px;
}

.jaba-slider-arrow.next {
    right: 24px;
}

/* Indicadores de Puntos (Dots) */
.jaba-slider-indicators {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.jaba-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.jaba-slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.jaba-slider-dot.active {
    background: var(--jaba-slider-primary);
    transform: scale(1.25);
    box-shadow: 0 0 8px var(--jaba-slider-primary);
}

/* Adaptación Mobile / Responsive */
@media (max-width: 768px) {
    .jaba-slide-inner {
        padding: 32px 20px;
    }
    
    .jaba-slide-title {
        font-size: 1.8rem;
    }
    
    .jaba-slide-text {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .jaba-slider-arrow {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .jaba-slider-arrow.prev {
        left: 12px;
    }
    
    .jaba-slider-arrow.next {
        right: 12px;
    }
}
