/**
 * Neon Slider — Styles
 * Supports: fade | slide | zoom animations
 * Content position: left | center | right
 * Text color: light | dark
 */

/* ── Container ─────────────────────────────────────────────────────────────── */
.neon-slider {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background: #111;
    line-height: 1;
}

.neon-slider-track {
    position: relative;
    width: 100%;
    height: var(--slider-height, 500px);
}

@media (max-width: 767px) {
    .neon-slider-track {
        height: 100vh;   /* fallback */
        height: 100svh;  /* small viewport height: descuenta la barra del navegador móvil */
    }
}

/* ── Slide base ─────────────────────────────────────────────────────────────── */
.neon-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* ── Background image ─────────────────────────────────────────────────────── */
.neon-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.neon-slider .neon-slider-track .neon-slide-bg img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    max-width: none;    /* always fill full width regardless of Bootstrap img rules */
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 8s ease-out;
}

/* ── Background video (MP4 & YouTube) ────────────────────────────────────── */
.neon-slide-video {
    overflow: hidden;
}

.neon-slide-video video,
.neon-slide-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border: 0;
}

/* YouTube poster: shown before iframe loads on mobile/slow connections */
.neon-yt-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* ── Overlay ────────────────────────────────────────────────────────────────── */
.neon-slide-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    pointer-events: none;
    z-index: 1;
}

/* ── Content ────────────────────────────────────────────────────────────────── */
.neon-slide-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    width: 100%;
}

/* Position variants */
.neon-content-left  .neon-slide-content { align-items: flex-start; text-align: left;   margin-left: clamp(1.5rem, 8%, 6rem); }
.neon-content-center .neon-slide-content { align-items: center;    text-align: center;  margin: 0 auto; }
.neon-content-right .neon-slide-content { align-items: flex-end;   text-align: right;  margin-left: auto; margin-right: clamp(1.5rem, 8%, 6rem); }

/* Text color — light */
.neon-text-light .neon-slide-title { color: #ffffff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.neon-text-light .neon-slide-text  { color: rgba(255,255,255,.88); }
.neon-text-light .neon-slide-btn   { background: #fff; color: #111; }
.neon-text-light .neon-slide-btn:hover { background: #f0f0f0; }

/* Text color — dark */
.neon-text-dark .neon-slide-title { color: #111111; text-shadow: 0 1px 4px rgba(255,255,255,.3); }
.neon-text-dark .neon-slide-text  { color: rgba(0,0,0,.75); }
.neon-text-dark .neon-slide-btn   { background: #111; color: #fff; }
.neon-text-dark .neon-slide-btn:hover { background: #333; }

.neon-slide-title {
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.neon-slide-text {
    font-size: clamp(.95rem, 1.5vw, 1.15rem);
    line-height: 1.5;
    margin: 0;
}

.neon-slide-btn {
    display: inline-block;
    padding: .7em 1.8em;
    border-radius: 4px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: background .2s, transform .1s;
    letter-spacing: .02em;
    white-space: nowrap;
}
.neon-slide-btn:hover { transform: translateY(-1px); }

/* ── FADE animation ─────────────────────────────────────────────────────────── */
.neon-animation-fade .neon-slide {
    opacity: 0;
    transition: opacity .8s ease;
}
.neon-animation-fade .neon-slide.active {
    opacity: 1;
    z-index: 2;
}
.neon-animation-fade .neon-slide.neon-leaving {
    opacity: 0;
    z-index: 2;
    transition: opacity .8s ease;
}

/* ── SLIDE animation ────────────────────────────────────────────────────────── */
.neon-animation-slide .neon-slide {
    opacity: 0;
    z-index: 1;
}
.neon-animation-slide .neon-slide.active {
    opacity: 1;
    z-index: 2;
}
.neon-animation-slide .neon-slide.neon-anim-enter-next {
    animation: neonSlideInRight .65s cubic-bezier(.25,.46,.45,.94) forwards;
    z-index: 3;
    opacity: 1;
}
.neon-animation-slide .neon-slide.neon-anim-enter-prev {
    animation: neonSlideInLeft .65s cubic-bezier(.25,.46,.45,.94) forwards;
    z-index: 3;
    opacity: 1;
}
.neon-animation-slide .neon-slide.neon-anim-leave-next {
    animation: neonSlideOutLeft .65s cubic-bezier(.25,.46,.45,.94) forwards;
    z-index: 2;
    opacity: 1;
}
.neon-animation-slide .neon-slide.neon-anim-leave-prev {
    animation: neonSlideOutRight .65s cubic-bezier(.25,.46,.45,.94) forwards;
    z-index: 2;
    opacity: 1;
}

@keyframes neonSlideInRight  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes neonSlideOutLeft  { from { transform: translateX(0);    } to { transform: translateX(-100%); } }
@keyframes neonSlideInLeft   { from { transform: translateX(-100%);} to { transform: translateX(0); } }
@keyframes neonSlideOutRight { from { transform: translateX(0);    } to { transform: translateX(100%); } }

/* ── ZOOM animation ─────────────────────────────────────────────────────────── */
.neon-animation-zoom .neon-slide {
    opacity: 0;
    transition: opacity .9s ease;
}
.neon-animation-zoom .neon-slide.active {
    opacity: 1;
    z-index: 2;
}
.neon-animation-zoom .neon-slide.neon-leaving {
    opacity: 0;
    z-index: 2;
    transition: opacity .9s ease;
}
/* Ken Burns effect on active bg image */
.neon-animation-zoom .neon-slide.active .neon-slide-bg img {
    animation: neonKenBurns 9s ease-out forwards;
}
@keyframes neonKenBurns {
    from { transform: scale(1.12); }
    to   { transform: scale(1.0); }
}

/* ── Navigation arrows ──────────────────────────────────────────────────────── */
.neon-prev,
.neon-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border: 2px solid rgba(255,255,255,.3);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, opacity .2s;
    padding: 0;
    user-select: none;
}
.neon-prev { left: 1rem; }
.neon-next { right: 1rem; }
.neon-prev:hover,
.neon-next:hover { background: rgba(0,0,0,.7); border-color: rgba(255,255,255,.6); }

@media (max-width: 480px) {
    .neon-prev, .neon-next { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ── Dots ───────────────────────────────────────────────────────────────────── */
.neon-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: .45rem;
    align-items: center;
}

.neon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.neon-dot.active {
    background: #fff;
    transform: scale(1.35);
}

/* ── Responsive content ─────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .neon-slide-content { padding: 1.25rem; gap: .6rem; }
    .neon-slide-btn { padding: .55em 1.4em; font-size: .88rem; }
    .neon-content-left .neon-slide-content,
    .neon-content-right .neon-slide-content { margin-left: 1.25rem; margin-right: 1.25rem; }
}
