/* ============================================
   ALTRE CURIOSITA' – INDEPENDENT CSS
   Stile Blockbuster autoconclusivo
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&family=IBM+Plex+Sans:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    /* --- Palette Blockbuster (Copiata da billm.css) --- */
    --bb-blue: #0A1D3D;
    /* Blu Blockbuster scuro */
    --bb-blue-mid: #132E5B;
    /* Blu medio */
    --bb-blue-light: #1B3F7A;
    /* Blu più vivace */
    --bb-blue-shelf: #0E2649;
    /* Scaffale */
    --bb-yellow: #F5CB42;
    /* Giallo ticket Blockbuster */
    --bb-yellow-dim: #D4AD30;
    /* Giallo più scuro */
    --bb-yellow-glow: rgba(245, 203, 66, 0.12);
    --bb-white: #EEF0F2;
    /* Bianco leggermente blu */
    --bb-text: #C8CDD4;
    /* Testo chiaro */
    --bb-text-mid: #8A92A0;
    /* Testo medio */
    --bb-text-dim: #5A6170;
    /* Testo scuro */
    --bb-dark: #060E1E;
    /* Quasi nero */
    --bb-border: #1E3460;
    /* Bordi */
    --bb-shadow: rgba(0, 0, 0, 0.5);
    --bb-red: #CC3333;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IBM Plex Sans', Arial, sans-serif;
    background-color: var(--bb-dark);
    color: var(--bb-text);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    /* Margine rimosso per controllo completo */
    overflow-x: hidden;
    padding-bottom: 40px;
}

/* --- Link di navigazione in alto --- */
.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--bb-blue-mid);
    border-bottom: 2px solid var(--bb-yellow);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.nav-link a {
    color: var(--bb-yellow);
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.nav-link a:hover {
    color: var(--bb-white);
    text-shadow: 0 0 10px var(--bb-yellow-glow);
}

.nav-link img {
    vertical-align: middle;
}

/* --- Container Principale --- */
.main-container {
    max-width: 98%;
    /* Meno spazio ai lati come richiesto */
    margin: 0 auto;
    padding: 0 10px;
}

/* --- Griglia Immagini --- */
.gallery-grid {
    display: grid;
    /* 4 colonne esatte */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.gallery-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bb-blue-shelf);
    padding: 10px;
    border: 1px solid var(--bb-border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--bb-yellow);
    box-shadow: 0 8px 20px var(--bb-shadow), 0 0 15px var(--bb-yellow-glow);
}

/* .gallery-item a */
.gallery-item a {
    display: inline-block;
    /* Al posto di block, così si accentra nel flex */
    width: auto;
    /* Altezza fissa richiesta */
    height: 160px;
    text-decoration: none;
}

.gallery-item img {
    display: block;
    width: auto;
    /* Larghezza automatica in base all'altezza */
    height: 100%;
    max-width: 100%;
    /* Non sbordare */
    /* Mantiene le proporzioni senza tagliare */
    object-fit: contain;
    border-radius: 2px;
    filter: saturate(0.8) contrast(1.05) brightness(0.9);
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    filter: saturate(1) contrast(1.1) brightness(1);
}

/* --- Stili Responsive --- */
@media screen and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 colonne su tablet landscape */
    }
}

@media screen and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 colonne su tablet portrait */
        gap: 15px;
    }

    .nav-link {
        flex-direction: column;
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        /* 1 colonna su mobile */
    }

    .gallery-item a {
        height: auto;
        min-height: 160px;
    }
}