/* ==========================================================================
   NEWS LOADER - Loading Animation
   
   Animación de carga para la sección de noticias usando los colores
   primarios del sitio (azules PDP)
   ========================================================================== */

.news-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: var(--space-4xl) var(--space-lg);
    width: 100%;
}

.news-loader.hidden {
    display: none;
}

/* Spinner Container */
.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-xl);
}

/* Spinner Circles */
.loader-spinner span {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.6;
}

.loader-spinner span:nth-child(1) {
    border: 4px solid transparent;
    border-top-color: var(--pdp-3);
    animation: spin 1.5s linear infinite;
}

.loader-spinner span:nth-child(2) {
    border: 4px solid transparent;
    border-right-color: var(--pdp-4);
    animation: spin 2s linear infinite;
    animation-delay: -0.5s;
}

.loader-spinner span:nth-child(3) {
    border: 4px solid transparent;
    border-bottom-color: var(--pdp-5);
    animation: spin 2.5s linear infinite;
    animation-delay: -1s;
}

/* Loader Text */
.loader-text {
    display: none;
    /* Hidden per user request */
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.5;
        }
    }

    @keyframes bounce {

        0%,
        80%,
        100% {
            transform: scale(0);
            opacity: 0.5;
        }

        40% {
            transform: scale(1);
            opacity: 1;
        }
    }
}

/* Dots Animation */
.loader-dots {
    display: inline-flex;
    gap: 6px;
    margin-left: 4px;
}

.loader-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--pdp-3);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* Featured Loader (más grande para la noticia destacada) */
.news-loader.featured {
    min-height: 500px;
}

.news-loader.featured .loader-spinner {
    width: 100px;
    height: 100px;
}

.news-loader.featured .loader-spinner span {
    border-width: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .news-loader {
        min-height: 300px;
        padding: var(--space-3xl) var(--space-md);
    }

    .loader-spinner {
        width: 60px;
        height: 60px;
    }

    .loader-spinner span {
        border-width: 3px;
    }

    .news-loader.featured .loader-spinner {
        width: 80px;
        height: 80px;
    }

    .news-loader.featured .loader-spinner span {
        border-width: 4px;
    }

    .loader-text {
        font-size: var(--font-size-base);
    }
}

/* ==========================================================================
   ZOOM BUTTON & LIGHTBOX
   ========================================================================== */

/* Botón de Zoom */
.zoom-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0, 92, 158, 0.9);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--pdp-white);
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--pdp-7);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: var(--pdp-white);
    border: none;
    padding: 16px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

@media (max-width: 768px) {
    .lightbox-nav {
        padding: 10px;
        font-size: 18px;
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .zoom-btn {
        width: 36px;
        height: 36px;
        bottom: 15px;
        right: 15px;
    }
}