/* Gallery Scroll Horizontal CSS - Scroll horizontal con múltiples cards visibles */

/* ===== CONTENEDOR PRINCIPAL DEL SCROLL ===== */
.gallery__scroll-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery__scroll-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1rem 0 2rem 0;
    cursor: grab;
    
    /* Scroll suave en móviles */
    -webkit-overflow-scrolling: touch;
    
    /* Ocultar scrollbar en todos los navegadores */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.gallery__scroll-track:active {
    cursor: grabbing;
}

/* Ocultar scrollbar en navegadores Webkit (Chrome, Safari, Edge) */
.gallery__scroll-track::-webkit-scrollbar {
    display: none;
}

/* ===== ITEMS DEL SCROLL ===== */
.gallery__scroll-item {
    flex: 0 0 300px; /* Ancho fijo para desktop */
    height: 350px;
    scroll-snap-align: start;
}

/* ===== CARDS DE LA GALERÍA ===== */
.gallery__card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary), var(--color-info));
    box-shadow: 0 8px 25px rgba(217, 83, 79, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery__card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(217, 83, 79, 0.4);
}

.gallery__card-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Fallback cuando la imagen no carga */
.gallery__img:not([src]), 
.gallery__img[src=""] {
    display: none;
}

.gallery__card-image:has(.gallery__img:not([src])),
.gallery__card-image:has(.gallery__img[src=""]) {
    background: linear-gradient(135deg, var(--color-primary), var(--color-info));
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery__card-image:has(.gallery__img:not([src]))::before,
.gallery__card-image:has(.gallery__img[src=""])::before {
    content: "🎿";
    font-size: 4rem;
    opacity: 0.7;
    color: white;
}

.gallery__card:hover .gallery__img {
    transform: scale(1.1);
}

/* ===== OVERLAY DE INFORMACIÓN ===== */
.gallery__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery__card:hover .gallery__overlay {
    opacity: 1;
}

.gallery__overlay-content {
    width: 100%;
}

.gallery__category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(217, 83, 79, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery__card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    color: var(--color-text-light);
}

.gallery__card-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
    color: #dfdfdf;
}

/* ===== CARDS ESPECIALES (VIDEO Y SOCIAL) ===== */
.gallery__card--video,
.gallery__card--social {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
}

.gallery__video-placeholder,
.gallery__social-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-text-light);
    padding: 2rem;
}

.gallery__play-icon,
.gallery__social-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.gallery__card:hover .gallery__play-icon,
.gallery__card:hover .gallery__social-icon {
    opacity: 1;
    transform: scale(1.1);
}

.gallery__video-info,
.gallery__social-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery__social-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery__social-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ===== INDICADOR DE SCROLL ===== */
.gallery__scroll-hint {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.7;
    transition: all 0.3s ease;
    pointer-events: none;
}

.gallery__scroll-container:hover .gallery__scroll-hint {
    opacity: 1;
}

.gallery__scroll-arrow {
    animation: scrollHint 2s ease-in-out infinite;
}

@keyframes scrollHint {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Estados del scroll para feedback visual */
.gallery__scroll-track.scrolling {
    scroll-behavior: auto; /* Desactivar smooth scroll durante interacción */
}

.gallery__scroll-track.scrolling .gallery__card {
    transition: none; /* Desactivar transiciones durante scroll */
}

/* Mejoras específicas para móvil */
@media (max-width: 768px) {
    .gallery__scroll-container {
        padding: 1rem 0.5rem;
    }
    
    .gallery__scroll-track {
        gap: 1rem;
        padding: 0.5rem 0 1.5rem 0;
        scroll-snap-type: x mandatory;
        cursor: default;
    }
    
    .gallery__scroll-item {
        flex: 0 0 280px; /* Ancho optimizado para móvil */
        height: 320px;
    }
    
    .gallery__card:hover {
        transform: none; /* Desactivar hover en móvil */
    }
    
    /* Ocultar hint en móvil */
    .gallery__scroll-hint {
        display: none !important;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .gallery__scroll-container {
        padding: 1.5rem 0.5rem;
    }
    
    .gallery__scroll-item {
        flex: 0 0 280px;
        height: 320px;
    }
    
    .gallery__scroll-track {
        gap: 1rem;
        padding: 0.5rem 0 1.5rem 0;
    }
    
    .gallery__card-title {
        font-size: 1.1rem;
    }
    
    .gallery__card-description {
        font-size: 0.85rem;
    }
    
    .gallery__scroll-hint {
        right: 1rem;
        font-size: 0.8rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .gallery__scroll-container {
        padding: 1rem 0.25rem;
        padding-top: 0;
    }
    
    .gallery__scroll-item {
        flex: 0 0 250px;
        height: 280px;
    }
    
    .gallery__scroll-track {
        gap: 0.75rem;
        padding: 0.5rem 0 1rem 0;
        scroll-snap-type: x mandatory;
    }
    
    .gallery__overlay {
        padding: 1rem;
    }
    
    .gallery__card-title {
        font-size: 1rem;
    }
    
    .gallery__card-description {
        font-size: 0.8rem;
    }
    
    .gallery__video-placeholder,
    .gallery__social-placeholder {
        padding: 1.5rem;
    }
    
    .gallery__play-icon,
    .gallery__social-icon {
        font-size: 2.5rem;
    }
    
    .gallery__scroll-hint {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 1rem;
        opacity: 0.6;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .gallery__scroll-item {
        flex: 0 0 220px;
        height: 240px;
    }
    
    .gallery__scroll-track {
        gap: 0.5rem;
    }
    
    .gallery__overlay {
        padding: 0.75rem;
    }
    
    .gallery__category {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .gallery__card-title {
        font-size: 0.9rem;
    }
    
    .gallery__card-description {
        font-size: 0.75rem;
    }
    
    .gallery__video-placeholder,
    .gallery__social-placeholder {
        padding: 1rem;
    }
    
    .gallery__play-icon,
    .gallery__social-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .gallery__scroll-hint {
        font-size: 0.75rem;
    }
}

/* ===== ANIMACIONES ESPECIALES ===== */
@keyframes slideInScroll {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery__scroll-item {
    animation: slideInScroll 0.6s ease-out forwards;
}

.gallery__scroll-item:nth-child(1) { animation-delay: 0.1s; }
.gallery__scroll-item:nth-child(2) { animation-delay: 0.2s; }
.gallery__scroll-item:nth-child(3) { animation-delay: 0.3s; }
.gallery__scroll-item:nth-child(4) { animation-delay: 0.4s; }
.gallery__scroll-item:nth-child(5) { animation-delay: 0.5s; }

/* Smooth scrolling para navegadores que lo soportan */
@supports (scroll-behavior: smooth) {
    .gallery__scroll-track {
        scroll-behavior: smooth;
    }
}

/* Efecto de focus para accesibilidad */
.gallery__card:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Suavizar transiciones en dispositivos que soportan hover */
@media (hover: hover) {
    .gallery__card {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
} 