/* ==========================================================================
   RESPONSIVE.CSS - STUDIO DI MARCO (Architettura Mobile-First Corretta)
   ========================================================================== */

/* --- STILI BASE COMUNI (Fino a 379px) --- */
.container,
.promise-container,
.about-container,
.services-container,
.render-container,
.energy-container,
.expertise-wrapper,
.ba-container,
.contacts-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%;
}

/* Hero */
.hero {
    padding: 120px 0 100px 0;
    text-align: center;
}

.hero-content::before {
    justify-content: center;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 38px;
}

.hero-description {
    margin: 0 auto 35px auto;
    font-size: 14px;
}

.hero-btns {
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.btn-primary,
.btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
}

/* Struttura Sezioni */
.promise-section,
.about-section,
.services-section,
.render-section,
.energy-section,
.expertise-zone,
.before-after-section,
.contacts-section {
    padding: 70px 0;
}

.promise-title,
.about-title,
.services-heading,
.render-title,
.energy-title,
.expertise-title,
.ba-main-title,
.contacts-title {
    font-size: 30px;
}

/* Sezione Render Certificata (No Distorsioni) */
.render-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

.render-card {
    grid-column: span 1 !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
}

.render-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vr-banner-block {
    grid-column: span 1 !important;
    flex-direction: column-reverse;
}

.vr-text-side {
    padding: 35px 20px;
}

.vr-title {
    font-size: 24px;
}

.vr-image-side {
    height: 200px;
    width: 100%;
}

.render-action-wrapper {
    grid-column: span 1 !important;
    width: 100%;
    text-align: center;
}

/* Blocchi e Griglie standard */
.promise-grid,
.features-block-grid {
    grid-template-columns: 1fr;
    border: none;
}

.promise-card,
.feature-block-card {
    padding: 30px 15px;
    border-right: none;
    border-left: none;
}

.promise-card {
    border-bottom: 1px solid rgba(230, 221, 202, 0.15);
}

.about-container,
.energy-container,
.contacts-main-row {
    flex-direction: column;
    gap: 40px;
}

.about-image-side,
.energy-image-side,
.contacts-map-side {
    flex: none;
    width: 100%;
    max-width: 100%;
}

.quote-box {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    margin-top: -20px;
    text-align: center;
}

.about-meta-grid {
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.services-steps-timeline {
    grid-template-columns: 1fr;
    border-top: none;
    border-left: 3px solid #C5A059;
    padding-top: 0;
    padding-left: 20px;
    gap: 35px;
}

.features-dark-grid {
    grid-template-columns: 1fr;
    gap: 25px;
}

.services-features-dark {
    padding: 35px 20px;
}

.ba-images-split {
    flex-direction: column;
    height: auto;
}

.ba-side {
    height: 220px;
}

.ba-details-bar {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.map-wrapper {
    height: 300px;
}

.contacts-action-row {
    flex-direction: column;
    gap: 15px;
}

.contacts-action-row .btn-action {
    width: 100%;
    justify-content: center;
}

/* Footer Centrato dal Tablet in giù */
.footer-main-row {
    flex-direction: column;
    gap: 40px;
    text-align: center;
    align-items: center;
}

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

.footer-nav-col ul {
    padding: 0;
    justify-content: center;
}

.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) {
    .hero-title {
        font-size: 42px;
    }

    .promise-title,
    .about-title,
    .services-heading,
    .render-title,
    .energy-title,
    .expertise-title,
    .ba-main-title,
    .contacts-title {
        font-size: 34px;
    }

    .quote-box {
        position: absolute;
        bottom: -15px;
        left: 15px;
        width: calc(100% - 30px);
    }

    .ba-side {
        height: 260px;
    }

    .map-wrapper {
        height: 350px;
    }
}


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

    .container,
    .promise-container,
    .about-container,
    .services-container,
    .render-container,
    .energy-container,
    .expertise-wrapper,
    .ba-container,
    .contacts-container {
        width: 88%;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-btns {
        flex-direction: row;
        width: auto;
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary {
        display: inline-block;
        width: auto;
    }

    /* Griglia Render bilanciata a 2 colonne */
    .render-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vr-banner-block,
    .render-action-wrapper {
        grid-column: span 2 !important;
    }

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

    .about-image-side,
    .energy-image-side {
        max-width: 450px;
        margin: 0 auto;
    }

    .quote-box {
        width: 220px;
        left: -15px;
        bottom: -15px;
        text-align: left;
    }

    .about-meta-grid {
        flex-direction: row;
        text-align: left;
    }

    .features-dark-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacts-action-row {
        flex-direction: row;
    }

    .contacts-action-row .btn-action {
        width: auto;
    }
}


/* --------------------------------------------------------------------------
   3. TABLET (min-width: 870px) -> Ottimizzato anche per il tuo breakpoint a 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;
    }

    .hero {
        text-align: left;
    }

    .hero-content::before {
        justify-content: flex-start;
    }

    .hero-description {
        margin-left: 0;
        margin-right: 0;
        max-width: 600px;
    }

    .hero-btns {
        justify-content: flex-start;
    }

    /* Layout a 3 colonne fluide: regge perfettamente fino a 991px senza stringersi */
    .render-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .vr-banner-block,
    .render-action-wrapper {
        grid-column: span 3 !important;
    }

    .render-card {
        aspect-ratio: 4 / 5;
    }

    .promise-grid {
        grid-template-columns: repeat(2, 1fr);
        border: 1px solid rgba(230, 221, 202, 0.15);
    }

    .promise-card {
        border-right: 1px solid rgba(230, 221, 202, 0.15);
        border-bottom: 1px solid rgba(230, 221, 202, 0.15);
    }

    .promise-card:nth-child(2n) {
        border-right: none;
    }

    .services-steps-timeline {
        grid-template-columns: repeat(2, 1fr);
        border-left: none;
        border-top: 3px solid #C5A059;
        padding-left: 0;
        padding-top: 30px;
    }

    .features-block-grid {
        grid-template-columns: repeat(2, 1fr);
        border-top: 1px solid #E6DDCA;
        border-left: 1px solid #E6DDCA;
    }

    .feature-block-card {
        border-right: 1px solid #E6DDCA;
        border-bottom: 1px solid #E6DDCA;
    }

    .ba-images-split {
        flex-direction: row;
        height: 380px;
    }

    .ba-side {
        height: 100%;
    }

    .ba-details-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-main-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}


/* --------------------------------------------------------------------------
   4. LAPTOP & PC STANDARD (min-width: 992px) -> Solo da qui scatta il mosaico desktop
   -------------------------------------------------------------------------- */
@media screen and (min-width: 992px) {

    .promise-section,
    .about-section,
    .services-section,
    .render-section,
    .energy-section,
    .expertise-zone,
    .before-after-section,
    .contacts-section {
        padding: 100px 0;
    }

    /* Mosaico asimmetrico nativo a 12 colonne attivo solo quando c'è spazio reale */
    .render-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 24px;
    }

    .render-card {
        aspect-ratio: auto !important;
    }

    .size-16-9 {
        grid-column: span 6 !important;
        height: 420px !important;
    }

    .size-4-3 {
        grid-column: span 3 !important;
        height: 420px !important;
    }

    .size-3-4 {
        grid-column: span 3 !important;
        height: 500px !important;
    }

    .size-16-9-wide {
        grid-column: span 9 !important;
        height: 500px !important;
    }

    .vr-banner-block {
        grid-column: span 12 !important;
        flex-direction: row;
        min-height: 400px;
    }

    .vr-text-side {
        padding: 50px;
    }

    .vr-image-side {
        height: auto;
        flex: 1;
    }

    .render-action-wrapper {
        grid-column: span 12 !important;
    }

    /* Struttura Desktop */
    .promise-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .promise-card {
        border-bottom: none;
    }

    .promise-card:nth-child(2n) {
        border-right: 1px solid rgba(230, 221, 202, 0.15);
    }

    .promise-card:last-child {
        border-right: none;
    }

    .about-container,
    .energy-container,
    .contacts-main-row {
        flex-direction: row;
        gap: 60px;
    }

    .about-image-side {
        flex: 0 0 400px;
        max-width: 100%;
    }

    .energy-image-side {
        flex: 0 0 380px;
        max-width: 100%;
    }

    .contacts-info-side {
        flex: 1;
    }

    .contacts-map-side {
        flex: 1;
    }

    .services-steps-timeline {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-dark-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-block-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Ripristino Allineamento Footer su Desktop */
    .footer-main-row {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

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

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

    .footer-nav-col ul {
        justify-content: 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: 1140px;
    }

    .hero-title {
        font-size: 56px;
    }

    .promise-title,
    .about-title,
    .services-heading,
    .render-title,
    .energy-title,
    .expertise-title,
    .ba-main-title,
    .contacts-title {
        font-size: 42px;
    }

    .size-16-9 {
        height: 460px !important;
    }

    .size-4-3 {
        height: 460px !important;
    }

    .size-3-4 {
        height: 560px !important;
    }

    .size-16-9-wide {
        height: 560px !important;
    }

    .about-container,
    .energy-container,
    .contacts-main-row {
        gap: 80px;
    }

    .about-image-side {
        flex: 0 0 450px;
    }

    .energy-image-side {
        flex: 0 0 460px;
    }

    .services-steps-timeline {
        grid-template-columns: repeat(5, 1fr);
    }

    .features-block-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .ba-images-split {
        height: 450px;
    }

    .map-wrapper {
        height: 480px;
    }
}


/* --------------------------------------------------------------------------
   6. SCHERMI RETINA / LAPTOP XL (min-width: 1400px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 64px;
    }

    .promise-title,
    .about-title,
    .services-heading,
    .render-title,
    .energy-title,
    .expertise-title,
    .ba-main-title,
    .contacts-title {
        font-size: 46px;
    }

    .promise-section,
    .about-section,
    .services-section,
    .render-section,
    .energy-section,
    .expertise-zone,
    .before-after-section,
    .contacts-section {
        padding: 120px 0;
    }

    .size-16-9 {
        height: 500px !important;
    }

    .size-4-3 {
        height: 500px !important;
    }

    .size-3-4 {
        height: 600px !important;
    }

    .size-16-9-wide {
        height: 600px !important;
    }

    .about-image-side {
        flex: 0 0 480px;
    }

    .energy-image-side {
        flex: 0 0 500px;
    }

    .ba-images-split {
        height: 480px;
    }

    .map-wrapper {
        height: 520px;
    }
}


/* --------------------------------------------------------------------------
   7. ULTRA-WIDE DESKTOP (min-width: 1600px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1600px) {
    .container {
        max-width: 1520px;
    }

    .hero {
        min-height: 80vh;
        padding: 180px 0;
    }

    .hero-title {
        font-size: 72px;
    }

    .hero-description {
        font-size: 18px;
        max-width: 650px;
    }

    .promise-title {
        font-size: 52px;
        max-width: 1050px;
    }

    .about-title,
    .services-heading,
    .render-title,
    .energy-title,
    .expertise-title,
    .ba-main-title,
    .contacts-title {
        font-size: 52px;
    }

    .size-16-9 {
        height: 560px !important;
    }

    .size-4-3 {
        height: 560px !important;
    }

    .size-3-4 {
        height: 680px !important;
    }

    .size-16-9-wide {
        height: 680px !important;
    }

    .about-description p,
    .services-description,
    .render-description,
    .energy-description,
    .expertise-description {
        font-size: 17px;
    }

    .ba-images-split {
        height: 540px;
    }

    .vr-banner-block {
        min-height: 520px;
    }
}