/**
 * NCode Smart Slider - Estilos
 */

/* ===========================================
   SLIDER PRINCIPAL
   =========================================== */
.ncode-smart-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.ncode-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ===========================================
   SLIDES
   =========================================== */
.ncode-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 1;
}

.ncode-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Efecto Slide */
.ncode-smart-slider[data-effect="slide"] .ncode-slide {
    transform: translateX(100%);
    opacity: 1;
    visibility: visible;
}

.ncode-smart-slider[data-effect="slide"] .ncode-slide.active {
    transform: translateX(0);
}

.ncode-smart-slider[data-effect="slide"] .ncode-slide.prev {
    transform: translateX(-100%);
}

/* ===========================================
   VIDEO DE FONDO
   =========================================== */
.ncode-slide-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.ncode-bg-video,
.ncode-bg-video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.ncode-bg-video-iframe {
    width: 177.78vh; /* 16:9 aspect ratio */
    height: 100vh;
    min-width: 100%;
    min-height: 56.25vw; /* 16:9 aspect ratio */
    pointer-events: none;
}

/* ===========================================
   OVERLAY
   =========================================== */
.ncode-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===========================================
   CONTENIDO DEL SLIDE - FLEXBOX
   =========================================== */
.ncode-slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-sizing: border-box;
}

.ncode-slide-inner-content {
    display: flex;
    flex-direction: inherit;
    align-items: inherit;
    gap: inherit;
    width: 100%;
}

/* ===========================================
   TÍTULO
   =========================================== */
.ncode-slide-title {
    margin: 0;
    padding: 0;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

@media (max-width: 768px) {
    .ncode-slide-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .ncode-slide-title {
        font-size: 1.5rem;
    }
}

/* ===========================================
   DESCRIPCIÓN
   =========================================== */
.ncode-slide-description {
    margin: 0;
    padding: 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #ffffff;
}

.ncode-slide-description p {
    margin: 0 0 1em 0;
}

.ncode-slide-description p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .ncode-slide-description {
        font-size: 1rem;
    }
}

/* ===========================================
   BOTÓN CTA
   =========================================== */
.ncode-slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    background-color: #0073e6;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ncode-slide-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    text-decoration: none;
}

.ncode-slide-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===========================================
   FLECHAS DE NAVEGACIÓN
   =========================================== */
.ncode-slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ncode-slide-arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.ncode-slide-arrow:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ncode-slide-arrow svg {
    width: 50%;
    height: 50%;
}

.ncode-slide-prev {
    left: 20px;
}

.ncode-slide-next {
    right: 20px;
}

@media (max-width: 768px) {
    .ncode-slide-arrow {
        width: 36px;
        height: 36px;
    }
    
    .ncode-slide-prev {
        left: 10px;
    }
    
    .ncode-slide-next {
        right: 10px;
    }
}

/* ===========================================
   DOTS DE NAVEGACIÓN
   =========================================== */
.ncode-slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 10px;
    align-items: center;
}

.ncode-slide-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ncode-slide-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.ncode-slide-dot.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.ncode-slide-dot:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .ncode-slide-dots {
        bottom: 15px;
    }
    
    .ncode-slide-dot {
        width: 10px;
        height: 10px;
    }
}

/* ===========================================
   ANIMACIONES DE CONTENIDO
   =========================================== */
.ncode-slide .ncode-slide-title,
.ncode-slide .ncode-slide-description,
.ncode-slide .ncode-slide-button {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ncode-slide.active .ncode-slide-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.ncode-slide.active .ncode-slide-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.ncode-slide.active .ncode-slide-button {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

/* ===========================================
   RESPONSIVE - MÓVIL
   =========================================== */
@media (max-width: 768px) {
    .ncode-slide-content {
        padding: 30px 20px !important;
    }
    
    /* En móvil, ocultar videos de fondo para mejor rendimiento */
    .ncode-slide-video-bg iframe {
        display: none;
    }
}

/* ===========================================
   ACCESIBILIDAD
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    .ncode-slide,
    .ncode-slide .ncode-slide-title,
    .ncode-slide .ncode-slide-description,
    .ncode-slide .ncode-slide-button,
    .ncode-slide-arrow,
    .ncode-slide-dot,
    .ncode-slide-button {
        transition: none;
    }
}

/* ===========================================
   ESTADO DE CARGA
   =========================================== */
.ncode-smart-slider.loading {
    opacity: 0.5;
}

.ncode-smart-slider.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}
