/**
 * YGB Slider - Estilos principales
 * @version 3.2.6
 */

/* ========== CONTENEDOR PRINCIPAL ========== */
.ygb-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    background: transparent;
    min-height: 0;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

/* ========== SLIDER ========== */
.ygb-slider {
    position: relative;
    width: 100%;
    padding-bottom: 37.5%;
    background: transparent;
    overflow: hidden;
}

/* ========== SLIDES ========== */
.ygb-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    background: transparent;
    will-change: opacity;
    pointer-events: none;
}

.ygb-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.ygb-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

/* ========== ENLACE EN IMAGEN ========== */
.ygb-slide-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: pointer;
    text-decoration: none;
}

.ygb-slide-image-link:hover {
    opacity: 1;
}

.ygb-slide-image-link:focus {
    outline: 2px solid #4299e1;
    outline-offset: -2px;
}

/* Asegurar que el contenido esté por encima del enlace */
.ygb-slide-content {
    z-index: 3;
    pointer-events: none;
}

/* El contenido clickeable debe estar por encima */
.ygb-slide-content a,
.ygb-slide-content button {
    position: relative;
    z-index: 4;
    pointer-events: auto;
}

/* ========== CONTENIDO DEL SLIDE ========== */
.ygb-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px;
    background: transparent;
    color: white;
    z-index: 3;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.ygb-slide-content h2,
.ygb-slide-content p,
.ygb-slide-content a {
    pointer-events: auto;
}

.ygb-slide-title {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
    line-height: 1.2;
    max-width: 800px;
    color: inherit;
}

.ygb-slide-description {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
    max-width: 800px;
    line-height: 1.6;
    color: inherit;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ========== BOTÓN ========== */
.ygb-slide-button {
    display: inline-block;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    line-height: 1.5;
    max-width: 100%;
    box-sizing: border-box;
    margin: 5px 0 0 0;
    font-size: 1rem;
}

.ygb-slide-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.ygb-slide-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.ygb-slide-button:active {
    transform: translateY(0);
}

/* ========== ALINEACIONES ========== */
.ygb-slide-content.left {
    align-items: flex-start;
    text-align: left;
}

.ygb-slide-content.left .ygb-slide-button {
    margin-right: auto;
    margin-left: 0;
}

.ygb-slide-content.center {
    align-items: center;
    text-align: center;
}

.ygb-slide-content.center .ygb-slide-button {
    margin-left: auto;
    margin-right: auto;
}

.ygb-slide-content.right {
    align-items: flex-end;
    text-align: right;
}

.ygb-slide-content.right .ygb-slide-button {
    margin-left: auto;
    margin-right: 0;
}

/* ========== FLECHAS OCULTAS ========== */
.ygb-slider-prev,
.ygb-slider-next {
    display: none !important;
}

/* ========== DOTS ========== */
.ygb-slider-dots-container {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    padding: 0;
    margin: 0;
    z-index: 10;
    pointer-events: none;
}

.ygb-slider-dots {
    display: flex;
    gap: 12px;
    background: transparent;
    padding: 0;
    margin: 0;
    pointer-events: auto;
}

.ygb-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    outline: none;
}

.ygb-slider-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.ygb-slider-dot:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.ygb-slider-dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

/* ========== ACCESIBILIDAD ========== */
.ygb-slider-container:focus {
    outline: none;
}

.ygb-slide-button:focus-visible,
.ygb-slider-dot:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .ygb-slider-container {
        max-width: 100%;
        margin: 20px 0;
    }
}

@media (max-width: 768px) {
    .ygb-slide-content {
        padding: 40px 20px 30px 20px;
        background: transparent;
    }
    
    .ygb-slide-title {
        font-size: 2rem;
        margin: 0 0 10px 0;
    }
    
    .ygb-slide-description {
        font-size: 1rem;
        margin: 0 0 15px 0;
    }
    
    .ygb-slide-button {
        white-space: normal;
        font-size: 0.9rem;
        word-break: break-word;
    }
    
    .ygb-slider-dots-container {
        bottom: 15px;
    }
    
    .ygb-slider-dots {
        gap: 10px;
    }
    
    .ygb-slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .ygb-slide-content {
        padding: 35px 15px 20px 15px;
        background: transparent;
    }
    
    .ygb-slide-title {
        font-size: 1.5rem;
        margin: 0 0 8px 0;
    }
    
    .ygb-slide-description {
        display: none;
    }
    
    .ygb-slide-button {
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .ygb-slider-dots-container {
        bottom: 12px;
    }
    
    .ygb-slider-dots {
        gap: 8px;
    }
    
    .ygb-slider-dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 360px) {
    .ygb-slide-content {
        padding: 30px 10px 15px 10px;
        background: transparent;
    }
    
    .ygb-slide-title {
        font-size: 1.3rem;
    }
}

@media (prefers-color-scheme: dark) {
    .ygb-slide-content {
        background: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ygb-slide,
    .ygb-slide-button,
    .ygb-slider-dot {
        transition: none !important;
    }
}

@media print {
    .ygb-slider-container {
        display: none;
    }
}