/* ==========================================================================
   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: 20px 0;
}

/* Header flessibile su mobile: Logo a sinistra, Hamburger a destra */
.main-header .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 92%;
    margin-right: auto;
    margin-left: auto;
}

.main-header .logo-area,
.main-header .brand-title,
.main-header .brand-sub {
    text-align: left;
}

/* Mostra il bottone hamburger su mobile */
.hamburger-btn {
    display: flex;
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1003;
}

/* Menu nascosto di default su mobile (pannello a scomparsa) */
.main-header .nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #202020;
    padding: 80px 30px 40px 30px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    transition: right 0.4s ease-in-out;
    overflow-y: auto;
}

/* Quando si clicca l'hamburger, il menu si sposta ed entra in vista */
.main-header .nav-menu.active {
    right: 0;
}

.main-header .nav-menu ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    width: 100%;
    list-style: none;
    padding: 0;
}

.main-header .nav-menu a {
    font-size: 16px;
    color: #E6DDCA;
    text-decoration: none;
}

.main-header .nav-menu .cta-area {
    display: block;
    margin-top: 35px;
    width: 100%;
}

.main-header .nav-menu .cta-area .btn-call {
    display: flex;
    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 / BREAKPOINT MENU ORIZZONTALE (min-width: 1185px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1185px) {
    .main-header {
        padding: 30px 60px;
    }

    .main-header .container {
        flex-direction: row;
        text-align: left;
    }

    .hamburger-btn {
        display: none !important;
    }

    .main-header .nav-menu {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 30px;
        position: static;
        background: transparent;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        z-index: auto;
        overflow-y: visible;
        right: auto;
    }

    .main-header .nav-menu ul {
        flex-direction: row;
        align-items: center;
        gap: 30px;
        width: auto;
        padding: 0;
    }

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

    .main-header .nav-menu .cta-area {
        display: block;
        margin-top: 0;
        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;
    }
}