/* Estilos Vista Miniaturas */

.view-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding-top: 80px;
}

.view-content h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-out;
    text-align: left;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    color: var(--text-primary);
}

/* Categories */
.category {
    margin-bottom: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.category h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    animation: fadeIn 0.6s ease-out;
    font-weight: 600;
}

/* Back Button - Sticky */
.back-button {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-button:hover {
    background: #1a2332;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.back-button:active {
    transform: scale(0.98);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
    justify-items: center;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Gallery Items */
.gallery-item {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: #1a2332;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.6s ease-out;
}

.gallery-item.placeholder {
    background: #243447;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsive Design - Thumbnails */

/* Desktop Grande (1440px+) */
@media (min-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
        gap: 30px;
        max-width: 1400px;
        padding: 0 20px;
    }
}

/* Desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(270px, 1fr));
        gap: 25px;
        max-width: 1200px;
        padding: 0 20px;
    }
}

/* Tablet Grande (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 600px;
        padding: 0 20px;
    }
}

/* Tablet y Móvil Grande (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 450px;
        padding: 0 20px;
    }
}

/* Móvil Pequeño (hasta 479px) */
@media (max-width: 479px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 200px;
        padding: 0 20px;
    }
}

/* Modal de Imagen Ampliada */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90vh;
    padding: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
