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

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

/* 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;
}

/* --- ALLINEAMENTO CENTRATO GENERALE PER SMARTPHONE & OTTIMIZZAZIONE TESTI --- */
.promise-section,
.about-section,
.services-section,
.render-section,
.energy-section,
.expertise-zone,
.before-after-section,
.contacts-section,
.faq-section {
    padding: 70px 0;
    text-align: center;
}

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

/* Regola generale per centrare e limitare i paragrafi descrittivi ed evitare allineamenti asimmetrici */
.promise-section p,
.about-section p,
.services-section p,
.render-section p,
.energy-section p,
.expertise-zone p,
.before-after-section p,
.contacts-section p,
.faq-section p {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.promise-card,
.feature-block-card,
.services-features-dark,
.faq-item,
.contacts-info-side,
.about-content,
.energy-content {
    text-align: center;
}

/* Sezione FAQ Mobile Specifics */
.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-label {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #AC8D5D;
    margin-bottom: 20px;
    font-weight: 600;
}

.faq-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #55524C;
    max-width: 600px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: #FFFFFF;
    border: 1px solid #E6DDCA;
    border-radius: 2px;
    transition: border-color 0.3s ease;
    text-align: left;
}

.faq-item:hover {
    border-color: #C5A059;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    font-weight: 500;
    color: #2D2D2D;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 15px;
}

.faq-icon {
    stroke: #AC8D5D;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 20px;
    text-align: left;
}

.faq-answer p {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #55524C;
    margin: 0 0 20px 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 350px;
}

/* Sezione Render Certificata */
.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;
    text-align: center;
}

.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;
}

.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;
    text-align: left;
}

.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: center;
    gap: 15px;
    text-align: center;
}

.map-wrapper {
    height: 300px;
}

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

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

.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;
    list-style: none;
}

.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,
    .faq-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,
    .faq-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;
    }

    .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: 1185px) -> Menu orizzontale e fine modalità hamburger
   -------------------------------------------------------------------------- */
@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;
    }

    .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;
    }

    .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);
        text-align: left;
    }

    .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;
        text-align: left;
    }

    .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;
        text-align: left;
    }

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


/* --------------------------------------------------------------------------
   4. LAPTOP & PC STANDARD (min-width: 992px)
   -------------------------------------------------------------------------- */
@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;
        text-align: left;
        /* Ripristina l'allineamento a sinistra desktop ma controllato */
    }

    /* Ripristina i margini a sinistra per i paragrafi su desktop */
    .promise-section p,
    .about-section p,
    .services-section p,
    .render-section p,
    .energy-section p,
    .expertise-zone p,
    .before-after-section p,
    .contacts-section p {
        margin-left: 0;
        margin-right: 0;
    }

    /* Allineamento corretto per etichette, titoli e testi da 992px in sù */
    .promise-section .promise-title,
    .about-section .about-title,
    .services-section .services-heading,
    .render-section .render-title,
    .energy-section .energy-title,
    .expertise-zone .expertise-title,
    .before-after-section .ba-main-title,
    .contacts-section .contacts-title {
        text-align: left;
    }

    .promise-card,
    .feature-block-card,
    .about-content,
    .energy-content,
    .contacts-info-side {
        text-align: left;
    }

    .faq-container {
        width: min(900px, 90%);
    }

    .faq-header {
        margin-bottom: 70px;
        text-align: center;
    }

    .faq-question {
        padding: 30px 35px;
        font-size: 22px;
    }

    .faq-answer {
        padding: 0 35px;
    }

    .faq-answer p {
        font-size: 15px;
        margin: 0 0 30px 0;
    }

    .faq-item.active .faq-answer {
        max-height: 250px;
    }

    .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;
        text-align: left;
    }

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

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

    .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);
    }

    .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,
    .faq-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,
    .faq-title {
        font-size: 46px;
    }

    .promise-section,
    .about-section,
    .services-section,
    .render-section,
    .energy-section,
    .expertise-zone,
    .before-after-section,
    .contacts-section,
    .faq-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,
    .about-title,
    .services-heading,
    .render-title,
    .energy-title,
    .expertise-title,
    .ba-main-title,
    .contacts-title,
    .faq-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;
    }

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

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

/* Pulsante Torna su */
#backToTopBtn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    background-color: #202020;
    color: #C5A059;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#backToTopBtn:hover {
    background-color: #C5A059;
    color: #202020;
    border-color: #C5A059;
    transform: translateY(-3px);
}

/* ==========================================================================
   MODULO DI CONTATTO (mobile-first)
   ========================================================================== */

/* Mobile: una colonna, testi allineati a sinistra dentro il modulo */
.contact-form {
    padding: 30px 20px 28px;
}

.contacts-section .contact-form p {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.form-title {
    font-size: 28px;
    text-align: left;
}

.form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.contacts-map-row {
    margin-bottom: 45px;
}

.contacts-map-row .map-wrapper {
    height: 300px;
}

/* Tablet: nome e telefono affiancati */
@media screen and (min-width: 576px) {
    .contact-form {
        padding: 38px 32px 34px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contacts-map-row .map-wrapper {
        height: 360px;
    }
}

/* Desktop: dati a sinistra, modulo a destra */
@media screen and (min-width: 992px) {
    .contacts-info-side {
        flex: 0.85;
    }

    .contacts-form-side {
        flex: 1.15;
    }

    .contact-form {
        padding: 45px 42px 42px;
    }

    .contacts-map-row {
        margin-bottom: 70px;
    }

    .contacts-map-row .map-wrapper {
        height: 420px;
    }
}
