/* ==========================================================================
   RESPONSIVE-RENDER.CSS - GALLERIA STUDIO DI MARCO (Mobile-First)
   ========================================================================== */

/* --- STILI BASE COMUNI (Fino a 379px) --- */
.container,
.footer-container {
    width: 92%;
    margin-right: auto;
    margin-left: auto;
}

.main-header {
    padding: 15px 20px;
}

.main-header .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.nav-menu ul {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu a {
    font-size: 13px;
}

.cta-area {
    width: 100%;
}

.cta-area .btn-call {
    justify-content: center;
    width: 100%;
}

/* Sezione Galleria Principale */
.gallery-section {
    padding: 70px 4%;
}

.gallery-heading {
    margin-bottom: 45px;
}

.gallery-heading h2 {
    font-size: 32px;
}

.gallery-heading p {
    font-size: 14px;
    line-height: 1.6;
}

/* Griglia Render (Mobile: 1 Colonna Forzata) */
.gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.gallery-card {
    aspect-ratio: 4 / 3;
    /* Previene distorsioni su schermi piccoli */
    width: 100%;
}

.gallery-image {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
}

/* Lightbox Script (Ottimizzazione Mobile) */
.lightbox img {
    max-width: 92vw;
    max-height: 80vh;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 28px;
}

/* Sezione Video */
.gallery-video {
    padding: 60px 4% 0;
    margin-bottom: 40px;
}

.gallery-video h2 {
    font-size: 30px;
    margin-bottom: 25px;
}

.gallery-video video {
    width: 100%;
    height: auto;
}

.render-action-wrapper {
    margin-bottom: 50px;
    padding: 0 20px;
}

.btn-turn-back {
    width: 100%;
    text-align: center;
    display: block;
}

/* --- FOCUS: FOOTER CENTRATO DA TABLET IN GIÙ --- */
.footer-main-row {
    flex-direction: column;
    gap: 40px;
    text-align: center;
    align-items: center;
}

.footer-brand-col,
.footer-contacts-col {
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.footer-contacts-col {
    text-align: center !important;
}

.footer-social{
    justify-content: center;
}

.footer-bottom-row {
    flex-direction: column-reverse;
    gap: 20px;
    text-align: center;
    align-items: center;
}

.footer-legal {
    justify-content: center;
}


/* --------------------------------------------------------------------------
   1. SMALL PHONES (min-width: 380px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 380px) {
    .gallery-heading h2 {
        font-size: 36px;
    }

    .gallery-card {
        aspect-ratio: 1 / 1;
    }

    /* Torna quadrata quando c'è spazio */
}


/* --------------------------------------------------------------------------
   2. SMARTPHONES ORIZZONTALI / MEDI (min-width: 576px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 576px) {

    .container,
    .footer-container {
        width: 88%;
    }

    /* Griglia Render a 2 Colonne */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .gallery-video video {
        width: 90%;
    }

    .btn-turn-back {
        width: auto;
        display: inline-block;
    }
}


/* --------------------------------------------------------------------------
   3. TABLET (min-width: 870px) -> Copre stabilmente fino a 991px (incluso 870px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 870px) {
    .main-header .container {
        flex-direction: row;
        text-align: left;
    }

    .nav-menu ul {
        gap: 10px;
    }

    .cta-area {
        width: auto;
    }

    .gallery-section {
        padding: 90px 5%;
    }

    .gallery-heading h2 {
        font-size: 42px;
    }

    /* Griglia Render a 3 Colonne fluida per tablet intermedi */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }

    .gallery-video video {
        width: 85%;
    }
}


/* --------------------------------------------------------------------------
   4. LAPTOP & PC STANDARD (min-width: 992px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 992px) {
    .gallery-section {
        padding: 120px 6%;
    }

    /* Griglia Render Desktop Nativa a 4 Colonne */
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .gallery-video {
        padding: 120px 0 0;
    }

    .gallery-video video {
        width: min(1000px, 100%);
    }

    /* --- RIPRISTINO ALLINEAMENTO DESKTOP PER IL FOOTER --- */
    .footer-main-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }

    .footer-brand-col {
        text-align: left;
        align-items: flex-start;
    }

    .footer-contacts-col {
        text-align: right !important;
        align-items: flex-end;
    }

    .footer-social {
        justify-content: flex-end;
    }

    .footer-bottom-row {
        flex-direction: row;
        text-align: left;
        align-items: center;
        justify-content: space-between;
    }

    .footer-legal {
        justify-content: flex-end;
    }
}


/* --------------------------------------------------------------------------
   5. NOTEBOOK AVANZATI (min-width: 1200px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .footer-container {
        max-width: 1200px;
    }

    .gallery-heading h2 {
        font-size: 46px;
    }

    .gallery-heading p {
        font-size: 16px;
    }
}