:root {
    --bg: #0b1020;
    --muted: #8a93a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

* {
    line-height: 1.3;
    font-weight: lighter;
}

p {
    line-height: 1.5;
}

html,
body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    position: static;
    background: #222;
    /* evita banda visibile su overscroll */
}

html {
    scroll-behavior: auto;
}

body {
    color: #fff;
    background: url('https://storage.googleapis.com/img_meltemi/SITI/societari/meltemiadv/piattaforma/background.jpeg') center top/cover no-repeat, var(--bg);
    background-size: cover;
    background-attachment: scroll;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ATTENZIONE */
.disclaimer {
    background-color: yellow;
    position: fixed;
    width: 100%;
    height: 50px;
    z-index: 1000;
    display: flex;
}

.disclaimer p {
    font-size: 60%;
    color: black;
    text-align: center;
    background-color: yellow;
    margin: auto;
}

.logo {
    margin-top: 50px !important;
}


.container {
    padding-left: 200px;
    padding-right: 200px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:  15px 200px;
    background: rgba(0, 0, 0, .8);
    position: relative;
    z-index: 999;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 50px !important;
    /* ATTENZIONE */
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
}

.nav-links .btn-contattaci {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-contattaci {
    padding: 6px 22px;
    background: linear-gradient(to right, #59A08E, #2C82C9);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    border: none;
}

/* ---------------- HERO (aggiornata) ---------------- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-areas:
        "text  video"
        "image video";
    gap: 40px;
    padding: 80px 200px;
    position: relative;
    min-height: 600px;
}

.performance-wrapper {
    position: relative;
    display: inline-block;
}

.performance-bg {
    position: absolute;
    left: -180px;
    top: 120px;
    transform: translate(-50%, -50%);
    z-index: 0;
    max-width: 400px;
    opacity: .1;
    pointer-events: none;
}

.hero-text {
    grid-area: text;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 100px;
    margin-left: 100px;
    text-align: left;
    z-index: 1;
}

.hero-text h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-text p {
    font-size: 16px;
    max-width: 700px
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.hero-buttons a {
    padding: 8px 20px;
    background: #fff;
    color: #005EA4;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.btn-scopri .btn-icon {
    width: 16px;
    margin-left: 8px;
}

.hero-image {
    grid-area: image;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    margin-left: 110px;
}

.hero-video {
    grid-area: video;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    z-index: 1;
}

.hero-video video {
    display: block;
    width: 100%;
    max-width: 110%;
    border-radius: 10px;
    margin-right: 50px;
    box-shadow: 0 0 25px rgba(0, 0, 0, .3);
    margin-top: 100px;
}

/* ---------------- ESIGENZE & CARD ---------------- */
.esigenze {
    padding: 150px 0;
    color: #fff;
    text-align: center;
    position: relative;
}

/* Titolo "Come rispondiamo alle tue esigenze" — elegante e autorevole */
.esigenze .section-header h1 {
    font-size: clamp(34px, 3.2vw, 48px);
    /* proporzione bilanciata */
    font-weight: 600;
    /* meno pesante ma deciso */
    line-height: 1.2;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.3px;
    /* respiro tipografico */
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    /* linea sobria sotto */
    display: inline-block;
    /* sottolineatura limitata al testo */
    padding-bottom: 10px;
}

.esigenze .section-header p {
    font-size: 16px;
    margin-bottom: 100px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    opacity: .9;
}

.esigenze-wrapper {
    position: relative;
    display: inline-block;
}

.esigenze-bg {
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    max-width: 600px;
    opacity: .2;
    pointer-events: none;
}

.cards-wrapper {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    gap: 30px;
}

.card {
    display: flex;
    align-items: flex-start;
    background: rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 20px 25px;
    max-width: 450px;
    border: 2px solid rgba(255, 255, 255, .3);
    text-align: left;
    opacity: 0;
    transform: translateX(50px);
    transition: transform .6s ease-out, opacity .6s ease-out;
    will-change: transform, opacity;
}

.card.slide-left {
    transform: translateX(-50px);
}

.card.show {
    opacity: 1;
    transform: translateX(0);
}

.card-icon {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.card-content p {
    font-size: 14px;
    line-height: 1.5;
    opacity: .85;
    color: #fff;
}

/* ---------------- COSA FACCIAMO ---------------- */
.cosa-facciamo {
    margin-top: 0px;
    padding: 60px 20px;
}

.cosa-facciamo__title {
    font-size: clamp(34px, 3.2vw, 48px);
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.3px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.cosa-facciamo__content {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 40px auto;
    position: relative;
    padding: 2rem;
}

.cosa-facciamo__subtitle {
    font-size: 28px;
    margin-bottom: 15px;
    color: #fff;
}

.cosa-facciamo__text {
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
    width: 70%;
}

/* desktop margins (kept as original) */
.cosa-facciamo__content.left {
    text-align: left;
    margin-left: 640px;
    margin-right: auto;
    margin-top: 150px;
    margin-bottom: 100px;
}

.cosa-facciamo__content.right {
    text-align: right;
    margin-right: 340px;
    margin-left: auto;
    margin-bottom: 100px;
}

.cosa-facciamo__content.right .cosa-facciamo__subtitle {
    text-align: right;
    padding-right: 265px;
}

.cosa-facciamo__bg {
    position: absolute;
    top: 0;
    left: -15%;
    width: 30%;
    height: auto;
    object-fit: contain;
    opacity: .1;
    pointer-events: none;
    z-index: 0;
}

.cosa-facciamo__bg_right {
    position: absolute;
    top: 0;
    left: 50%;
    width: 30%;
    height: auto;
    object-fit: contain;
    opacity: .1;
    pointer-events: none;
    z-index: 0;
}

.cosa-facciamo__content h2,
.cosa-facciamo__content p {
    position: relative;
    z-index: 1;
}

.cosa-facciamo__content h2 {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: 0.3px;
    margin-bottom: 25px;
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
}

/* PARLA */
.parla-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 100px;
    align-items: center;
    margin-bottom: 150px;
    position: relative;
}

.parla-text p {
    margin: 0.5rem auto 0;
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
    white-space: normal;
    hyphens: auto;
    word-break: normal;
    color: rgba(255, 255, 255, 0.95);
}

.parla-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.parla-buttons .btn-contattaci {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: linear-gradient(to right, #59A08E, #2C82C9);
    color: #ffffff;
    border-radius: 30px;
    text-decoration: none;
    border: none;
    font-weight: 500;
    min-width: 140px;
    box-shadow: none;
    margin-top: 50px;
}

.kiss-bg {
    position: absolute;
    left: 0;
    top: 20%;
    transform: translate(-50%, -50%);
    z-index: 0;
    max-width: 200px;
    opacity: .2;
    pointer-events: none;
}

/* FOOTER */
.site-footer {
    background: #11182e;
    color: rgba(255, 255, 255, 0.9);
    padding: 60px 0;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    margin: .25rem 0;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
}

.site-footer a:hover {
    text-decoration: underline;
}

.bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.hamburger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* ---------------- TABLET ---------------- */
@media (max-width:1024px) {
    nav {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* hero: 2 colonne testo | immagine + video full width below */
    .hero {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "text  image"
            "video video";
        gap: 32px;
    }

    .hero-text {
        margin: 40px 0 0 0;
    }

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

    .hero-image img {
        max-width: 100%;
        margin: 0;
        margin-top: 100px;
    }

    .hero-video {
        padding-top: 20px;
    }

    .hero-video video {
        margin-right: 0 !important;
    }

    .cosa-facciamo__bg {
        position: absolute;
        top: 0;
        left: 10% !important;
        width: 25% !important;
        height: auto;
        object-fit: contain;
        opacity: .1;
        pointer-events: none;
        z-index: 0;
    }

    .cosa-facciamo__content.left {
        text-align: left !important;
        margin-left: 40px;
        margin-right: auto;
    }

    .cosa-facciamo__content.right {
        text-align: right !important;
        margin-right: 40px;
        margin-left: auto;
    }

    .cosa-facciamo__content.right .cosa-facciamo__subtitle {
        text-align: right !important;
        padding-right: 0 !important;
    }

    .cosa-facciamo__text {
        width: 100%;
        text-align: inherit
    }
}

/* ---------------- SMARTPHONE ---------------- */
@media (max-width:768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    nav {
        position: relative;
        padding: 15px 20px;
    }

    .hamburger {
        display: block;
        margin-right: 20px;
        margin-top: 50px !important;
        /* ATTENZIONE-> xdisclaimer*/
    }

    .logo {
        margin-top: 50px !important;
        /* ATTENZIONE-> xdisclaimer*/
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        right: 0;
        background: rgba(0, 0, 0, .9);
        width: 100%;
        padding: 20px;
        gap: 20px;
        z-index: 1000;
    }

    .nav-links.show {
        display: flex;
    }

    /* HERO: 1 colonna testo -> video -> image */
    .hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "video"
            "image";
        gap: 24px;
    }

    .hero-text {
        margin: 20px 0 0 0;
        margin-left: 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .hero-video video {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .hero-image img {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .performance-bg {
        margin-left: 150px;
        margin-top: -10px;
    }

    /* ESIGENZE: spostare rettangolo più in alto e leggermente più piccolo */
    .esigenze {
        margin-top: -60px;
        /* mantiene separazione estetica su mobile */
    }

    .esigenze-bg {
        top: 10%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 115%;
        max-width: none;
        opacity: .18;
    }

    .esigenze .section-header h1 {
        font-size: clamp(26px, 6vw, 34px);
        line-height: 1.25;
        border-bottom-width: 1px;
        margin-bottom: 20px;
    }

    /* testo giustificato + sillabazione per evitare spazi enormi */
    .esigenze .section-header p {
        text-align: justify;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        overflow-wrap: break-word;
        word-break: normal;
    }

    /* riduci spazio tra esigenze e cosa-facciamo a 40px (come richiesto) */
    .esigenze {
        margin-bottom: 40px;
    }

    .cosa-facciamo {
        margin-top: 40px;
    }

    /* Cards come colonna */
    .cards-wrapper {
        grid-template-columns: 1fr;
    }

    .card {
        max-width: 100%;
        transition-duration: .45s;
    }

    .cosa-facciamo__title {
        font-size: clamp(26px, 6vw, 34px);
        line-height: 1.25;
        border-bottom-width: 1px;
        margin-bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    .cosa-facciamo__content h2 {
        font-size: 28px;
    }

    /* su smartphone: applica left/right alignment come richiesto,
       mantieni "margini" ma ridotti rispetto ai desktop */
    .cosa-facciamo__content.left {
        text-align: left;
        margin-left: 20px;
        /* margine left conservato, ridotto per mobile */
        margin-right: auto;
        margin-top: 30px;
        margin-bottom: 30px;
        width: calc(100% - 40px);
    }

    .cosa-facciamo__content.right {
        text-align: right;
        margin-right: 20px;
        /* margine right conservato, ridotto per mobile */
        margin-left: auto;
        margin-top: 30px;
        margin-bottom: 30px;
        width: calc(100% - 40px);
    }

    /* parity for subtitles */
    .cosa-facciamo__content.right .cosa-facciamo__subtitle {
        padding-right: 0;
        text-align: right
    }

    /* PARLA CON NOI */
    .parla-text {
        margin: 50px 0;
        align-items: center;
        margin-bottom: 120px;
    }

    .parla-text p {
        text-align: left;
        padding: 0 20px;
        margin-left: 8%;
        margin-bottom: 20px;
    }

    .parla-buttons {
        justify-content: center;
    }
}
