/* ==================== */
/* NPROJECTS - PORTADA THEME STYLING */
/* ==================== */

/* Sección Nprojects - Tema Portada */
#nprojects {
    background: linear-gradient(
        rgba(0, 0, 0, 0.4), 
        rgba(0, 0, 0, 0.4)
    ), url('../img/fondo4N.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

#nprojects .contenido-seccion {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

#nprojects h2 {
    font-size: 3.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
    animation: white-glow-title 3s ease-in-out infinite alternate;
}

#nprojects .section-subtitle {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 60px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Animación de brillo para títulos */
@keyframes white-glow-title {
    from {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.6);
    }
    to {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(255, 255, 255, 0.6);
    }
}

/* ==================== */
/* SLIDER CONTAINER - ESTILO MEJORADO */
/* ==================== */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 1400px; /* Increased from 1200px for larger slider */
    height: 1100px; /* Increased from 900px to maintain aspect ratio */
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 40px; /* Increased from 30px for better spacing */
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.slider-track {
    display: flex;
    gap: 50px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    height: 100%;
    background: #000; /* Fondo negro para bordes si la imagen no cubre todo */
}

/* Optimización para imágenes 1280x960 - Máxima calidad */
.slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;

    /* Configuración para máxima nitidez */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;

    /* Eliminar cualquier efecto de suavizado */
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;

    /* Desactivar filtros que puedan afectar la calidad */
    filter: none !important;
    -webkit-filter: none !important;

    /* Forzar renderizado nativo */
    transform: none !important;
    transition: none !important;
}

/* Ajustes responsive manteniendo relación 4:3 */
@media (max-width: 992px) {
    .slider-container {
        max-width: 85vw;
        height: calc(85vw * 0.785); /* Adjusted for larger base */
        padding: 25px;
    }
    
    #nprojects h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .slider-container {
        max-width: 90vw;
        height: calc(90vw * 0.785);
        padding: 20px;
    }

    #nprojects {
        padding: 60px 15px;
    }

    #nprojects h2 {
        font-size: 2.5rem;
    }

    #nprojects .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }

    .slide-caption {
        padding: 10px;
    }

    .slide-caption h3 {
        font-size: 1.2rem;
    }

    .slide-caption p {
        font-size: 0.9rem;
    }

    .slider-arrow {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .slider-container {
        max-width: 95vw;
        height: calc(95vw * 0.785);
        padding: 15px;
        border-radius: 15px;
    }
    
    #nprojects h2 {
        font-size: 2rem;
    }
    
    #nprojects .section-subtitle {
        font-size: 1rem;
    }
    
    .slide-caption {
        padding: 10px;
    }
    
    .slide-caption h3 {
        font-size: 1.2rem;
    }
    
    .slide-caption p {
        font-size: 0.9rem;
    }
    
    .slider-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* ==================== */
/* SLIDE CAPTION - ESTILO VISIBLE */
/* ==================== */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 25px;
    transition: all 0.4s ease;
    z-index: 2;
}

.slide-caption h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.slide-caption p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== */
/* SLIDER ARROWS - ESTILOS MEJORADOS */
/* ==================== */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 2rem;
    cursor: pointer;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
    /* Mejorar touch targets para móviles */
    min-width: 44px;
    min-height: 44px;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #000000;
    transform: translateY(-50%) scale(1.1);
    box-shadow:
        0 0 30px rgba(255, 255, 255, 0.6),
        0 0 50px rgba(255, 255, 255, 0.4);
}

.slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

/* ==================== */
/* SLIDER DOTS - NAVEGACIÓN MÓVIL */
/* ==================== */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    /* Mejorar touch targets para móviles */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.slider-dot:active {
    transform: scale(0.9);
}

/* Mejoras adicionales para móvil */
@media (max-width: 768px) {
    .slider-dots {
        bottom: 15px;
        gap: 8px;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
        min-width: 40px;
        min-height: 40px;
    }

    .slider-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        min-width: 44px;
        min-height: 44px;
    }

    .slider-arrow:hover {
        transform: translateY(-50%) scale(1.05);
    }

    .slider-arrow:active {
        transform: translateY(-50%) scale(0.9);
    }
}

/* ==================== */
/* EFECTOS HOVER MEJORADOS */
/* ==================== */
.slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}


/* Debug: bordes para identificar elementos */
.debug * {
    border: 1px solid red;
}
