/**
 * ============================================================================
 * NANOVIEW GALLERY - FRONTEND STYLES
 * ============================================================================
 * Stili per la galleria visibile ai visitatori del sito
 * ============================================================================
 */

/* ========================================
   1. GALLERIA CONTAINER
   ======================================== */

.nanoview-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin: 40px auto;
    padding: 0;
}

/* ========================================
   2. GALLERIA ITEM
   ======================================== */

.nanoview-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16/9;
    background: #f1f5f9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nanoview-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ========================================
   3. IMMAGINI
   ======================================== */

.nanoview-picture {
    width: 100%;
    height: 100%;
    display: block;
}

.nanoview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nanoview-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    opacity: 0.5;
    z-index: 0;
}

/* ========================================
   4. LIGHTBOX OVERLAY
   ======================================== */

.nanoview-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 1;
}

.nanoview-gallery-item:hover .nanoview-lightbox-overlay {
    opacity: 1;
}

/* ========================================
   5. RESPONSIVE - COLONNE
   ======================================== */

/* Desktop: 3 colonne (default) */
.nanoview-gallery[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

/* 4 colonne */
.nanoview-gallery[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* 2 colonne */
.nanoview-gallery[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

/* 1 colonna */
.nanoview-gallery[data-columns="1"] {
    grid-template-columns: 1fr;
}

/* ========================================
   6. RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .nanoview-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .nanoview-gallery-item {
        aspect-ratio: 1/1;
    }
}

@media (max-width: 480px) {
    .nanoview-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ========================================
   7. IMMAGINE SINGOLA
   ======================================== */

.nanoview-single-image {
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.nanoview-single-image img {
    width: 100%;
    height: auto;
    display: block;
}