/* css/carousel-guide.css - SURFACE MASK SIMPLE SOBRE SLIDE 1 - VERSIÓN CORREGIDA */

/* ===== MÁSCARA SUPERPUESTA SOBRE EL SLIDE ===== */
.slide-surface-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    pointer-events: auto;
    border-radius: inherit;
    /* Hereda el border-radius del slide padre */
    overflow: hidden;
}

.slide-surface-mask.visible {
    opacity: 1;
    visibility: visible;
}

.slide-surface-mask.hiding {
    opacity: 0;
    transition: all 0.5s ease;
}

/* ===== OVERLAY QUE OSCURECE EL SLIDE ===== */
.mask-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: inherit;
}

/* ===== CONTENIDO CENTRADO ===== */
.mask-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 101;
    max-width: 280px;
    width: 90%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ===== ICONO ===== */
.mask-icon {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.4rem;
    animation: float 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(0, 123, 140, 0.4);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ===== TÍTULO ===== */
.mask-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: inherit;
}

/* ===== DESCRIPCIÓN ===== */
.mask-content p {
    font-size: 0.9rem;
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    font-family: inherit;
}

/* ===== HINT DE DESLIZAR ===== */
.swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.swipe-hint:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.swipe-hint i {
    color: var(--accent-color);
    font-size: 1.2rem;
    animation: swipe 1.5s ease-in-out infinite;
}

@keyframes swipe {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

.swipe-hint span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: inherit;
}

/* ===== ESTADO HOVER DE LA MÁSCARA ===== */
.slide-surface-mask:hover .mask-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.slide-surface-mask:hover .mask-icon {
    animation-duration: 1s;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 123, 140, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .mask-content {
        max-width: 250px;
        padding: 0 12px;
    }

    .mask-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .mask-content h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .mask-content p {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .swipe-hint {
        padding: 8px 12px;
        gap: 6px;
    }

    .swipe-hint i {
        font-size: 1.1rem;
    }

    .swipe-hint span {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .mask-content {
        max-width: 220px;
        padding: 0 8px;
    }

    .mask-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .mask-content h4 {
        font-size: 0.95rem;
    }

    .mask-content p {
        font-size: 0.8rem;
        margin-bottom: 14px;
    }

    .swipe-hint {
        padding: 6px 10px;
        gap: 4px;
    }

    .swipe-hint i {
        font-size: 1rem;
    }

    .swipe-hint span {
        font-size: 0.7rem;
    }
}

/* ===== LANDSCAPE MÓVIL ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .mask-content {
        max-width: 200px;
    }

    .mask-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .mask-content h4 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .mask-content p {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .swipe-hint {
        padding: 4px 8px;
        gap: 3px;
    }

    .swipe-hint i {
        font-size: 0.9rem;
    }

    .swipe-hint span {
        font-size: 0.65rem;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {

    .mask-icon,
    .swipe-hint i {
        animation: none !important;
    }

    .slide-surface-mask {
        transition: opacity 0.2s ease;
    }

    .slide-surface-mask.hiding {
        transition: opacity 0.3s ease;
    }

    .swipe-hint:hover {
        transform: none !important;
    }
}

/* ===== ALTO CONTRASTE ===== */
@media (prefers-contrast: high) {
    .mask-overlay {
        background: rgba(0, 0, 0, 0.9);
    }

    .mask-icon {
        border: 2px solid white;
        background: var(--primary-color);
    }

    .swipe-hint {
        border: 2px solid white;
        background: rgba(255, 255, 255, 0.2);
    }

    .mask-content h4,
    .mask-content p,
    .swipe-hint span {
        color: white;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    }
}

/* ===== FALLBACK SIN BLUR ===== */
@supports not (backdrop-filter: blur(3px)) {
    .mask-overlay {
        background: rgba(0, 0, 0, 0.85);
    }

    .swipe-hint {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ===== INTEGRACIÓN CON CARRUSEL ===== */
.carousel-slide {
    position: relative;
    /* Asegurar que los slides tengan position relative */
}

/* Evitar que la máscara interfiera con la navegación del carrusel */
.slide-surface-mask~.carousel-navigation,
.slide-surface-mask~.carousel-dots {
    z-index: 102;
}

/* ===== ESTADOS DE CARGA ===== */
.slide-surface-mask[data-loading="true"] {
    pointer-events: none;
}

.slide-surface-mask[data-loading="true"] .mask-content {
    opacity: 0.5;
}

/* ===== TEMA OSCURO ===== */
@media (prefers-color-scheme: dark) {
    .mask-overlay {
        background: rgba(20, 20, 20, 0.8);
    }

    .mask-icon {
        background: var(--primary-color);
        box-shadow: 0 4px 12px rgba(0, 123, 140, 0.6);
    }

    .swipe-hint {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }
}