/* =====================================================
   KEYFRAMES
   ===================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =====================================================
   SCROLL REVEAL
   ===================================================== */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.from-left {
    transform: translateX(-36px);
}

.reveal.from-right {
    transform: translateX(36px);
}

.reveal.visible {
    opacity: 1;
    transform: translate(0);
}

/* =====================================================
   HERO
   ===================================================== */
html, body {
    background-color: #ebe8e7;
}

.colored-background {
    background-color: #ebe8e7;
    height: 80dvh;
    width: 100%;
    position: absolute;
    top:0;
    margin-top: calc(-1 * env(safe-area-inset-top));
    left: 0;
    z-index: -1;
}

.content-header {
    width: 60%;
    margin: 100px auto 120px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    position: relative;
}

/* Hero entrance */
.content-header .upper {
    animation: fadeInUp 0.6s ease both;
    animation-delay: 0.1s;
}

.content-header .claim {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.3s;
}

.content-header .headline {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.5s;
}

.content-header .upper {
    padding: 10px;
    border-radius: 20px;
    border: none;
    background-color: #E41925;
    color: white;
    box-shadow: 1px 1px 8px #E41925;
    font-weight: 200;
    font-size: 14px;
}

.content-header .claim {
    font-size: 52px;
    padding: 20px 0 0 0;
    font-weight: 700;
    margin: 0;
}

.content-header .claim p {
    margin: 0;
}

.headline {
    width: 50%;
    font-size: 20px;
}

b {
    font-weight: 700;
}

.decoration {
    color: #E41925;
    position: relative;
}

/* circle position override — base in gmde_shared.css */
.circle-container {
    top: 200px;
}

/* =====================================================
   SOLUTIONS
   ===================================================== */
.solutions {
    background-color: #28282a;
    border-radius: 0 25px 25px 0;
    height: 567px;
    width: 85%;
    margin-top: 91px;
}

.solutions-content {
    height: 100%;
    width: 100%;
}

.card-container {
    width: 90%;
    margin: 0 auto;
    transform: translateY(-15%);
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: stretch;
    font-weight: 200;
    font-size: clamp(10px, 1.5dvw, 20px);
    flex: 1 1 0;
}

.card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 15px;
}

.card-container .card {
    color: #fff;
}

.card-header-flex {
    font-size: 1.5rem;
    font-weight: 800;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 20px 0 0 0;
}

.textContainer {
    font-size: 0.9rem;
}

.card ul {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
}

.card li::before {
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    content: '\f00c';
    color: #E41925;
    margin: 5px;
}

.card button,
.chi button {
    all: unset;
    border-radius: 40px;
    width: max-content;
    padding: 5px 5px 5px 10px;
    background-color: #E41925;
    margin-top: auto;
    margin-bottom: -20px;
    color: white;
    cursor: pointer;
}

.card button i,
.chi button i {
    height: 40px;
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e44444;
    border-radius: 50%;
}

/* =====================================================
   METODO
   ===================================================== */
.metodo {
    padding-top: clamp(100px, 10vw, 150px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 100px 0;
}

.content-metodo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 80%;
}

.content-metodo > div {
    flex: 0 0 50%;
}

.content-metodo p {
    text-align: left;
    font-size: 18px;
}

.content-metodo h2 {
    font-size: 38px;
    white-space: nowrap;
    margin: 0;
}

.metodo-solutions {
    height: max-content;
    position: sticky;
    top: 100px;
}

.metodo-solutions img {
    border-radius: 20px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    height: calc(100dvh - 270.406px - 120px);
}

.arrows {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metodo-card-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 80%;
}

.metodo-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 30px;
    padding: 30px;
    border: 1px #dcd7d7 solid;
    position: relative;
    border-radius: 15px;
}

.metodo-card::before {
    content: var(--image);
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    font-size: 25px;
    color: white;
    background-color: #E41925;
    height: 50px;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -25px;
    right: -25px;
    border-radius: 50%;
}

.metodo-card h3 {
    display: inline-block;
    position: relative;
    white-space: nowrap;
    font-size: 1.5vw;
    margin: 0;
}

.metodo-card p {
    font-size: 18px;
}

/* =====================================================
   NUMERI
   ===================================================== */
.numeri {
    display: flex;
    padding: 60px;
    margin-top: 150px;
    margin-bottom: 0;
    background-color: #28282A;
    flex-wrap: wrap;
    position: relative;
}

.numeri-card {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    flex-direction: column;
    flex: 0 0 calc(100% / 5);
}

.numeri-card .numeri-value {
    margin-bottom: 0;
    font-size: 2rem;
    font-weight: 700;
}

.numeri-card p {
    text-transform: uppercase;
}

/* =====================================================
   CHI È GMDE
   ===================================================== */
.chi {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 100px;
    margin-bottom: 100px;
}

.flex-down {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 70%;
}

.rounded-detailed {
    color: #E41925;
    width: max-content;
    position: relative;
}

.chi h2 {
    margin: 0;
}

.chi p {
    width: 50%;
}

.chi img {
    width: clamp(100px, 45vw, 840px);
    height: 100%;
    object-fit: cover;
    position: absolute;
    border-radius: 20px 0 0 20px;
    top: 0;
    right: 0;
    z-index: 1;

}

/* =====================================================
   VISIBILITY
   ===================================================== */
@media screen and (min-width: 800px) {
    .hide-desktop {
        display: none !important;
    }
}


/* =================================================================
   ====================== MOBILE (< 800px) =========================
   Ricostruito da zero usando il vocabolario visivo della desktop:
   - stessa palette (#E41925, #28282a, #dcd7d7)
   - stesse pillole rosse con bottone tondo #e44444
   - stesso blocco nero soluzioni con border-radius 0 25px 25px 0
   - stesse card metodo con badge tondo + icona FA
   ================================================================= */
@media screen and (max-width: 800px) {

    .reveal.from-left,
    .reveal.from-right {
        transform: translateY(36px);
    }

    .hide-mobile {
        display: none !important;
    }

    /* ----- HERO ----- */
    .content-header {
        width: 90%;
        margin: 100px auto 60px auto;
    }

    .content-header .upper {
        font-size: 12px;
        padding: 8px 14px;
    }

    .content-header .claim {
        font-size: clamp(28px, 9vw, 44px);
        padding: 16px 0 0 0;
        line-height: 1.15;
    }

    .headline {
        width: 100%;
        font-size: 16px;
        margin-top: 20px;
    }

    /* Circle "Hai un progetto in mente?" nascosto come richiesto */
    .circle-container {
        display: none;
    }

    /* ----- SOLUTIONS ----- */
    .solutions.reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    /* Stesso blocco nero della desktop, ma in colonna */
    .solutions {
        height: auto;
        width: 100%;
        margin-top: 100px;
        padding: 30px 0 50px 0;
        border-radius: 25px 25px 0 0;
    }

    .card-container {
        width: 88%;
        flex-direction: column;
        gap: 50px;
        transform: translateY(-100px);
    }

    .card {
        font-size: 1rem;
    }

    .card img {
        aspect-ratio: 16/9;
    }

    .card-header-flex {
        font-size: 1.4rem;
        margin: 16px 0 8px 0;
    }

    .textContainer {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    /* Bottone "Scopri di più" — uguale a desktop ma con margine compensato */
    .card button {
        margin-bottom: 0;
        margin-top: 10px;
        padding: 6px 6px 6px 14px;
        font-size: 0.9rem;
    }

    .card button i {
        height: 36px;
        width: 36px;
    }

    /* ----- METODO ----- */
    .metodo {
        padding-top: 60px;
        margin: 0 0 60px 0;
    }

    .content-metodo {
        flex-direction: column;
        width: 85%;
        gap: 40px;
    }

    .content-metodo > div {
        flex: 0 0 auto;
        width: 100%;
    }

    /* Sticky non ha senso quando il contenuto è in colonna */
    .metodo-solutions {
        position: static;
    }

    .metodo-solutions img {
        height: auto;
        aspect-ratio: 16/10;
    }

    .content-metodo h2 {
        font-size: clamp(24px, 7vw, 32px);
        white-space: normal;
    }

    .content-metodo p {
        font-size: 16px;
    }

    .metodo-eyebrow {
        font-size: 14px !important;
        letter-spacing: 1px;
        color: #878787;
    }

    .arrows {
        width: 100%;
    }

    .metodo-card-container {
        width: 100%;
        gap: 20px;
    }

    /* Le card metodo restano IDENTICHE alla desktop (bordo, badge tondo con icona FA) */
    .metodo-card {
        margin: 20px 0;
        padding: 24px 20px;
        width: 100%;
        align-items: flex-start;
    }

    .metodo-card h3 {
        font-size: 1.3rem;
        white-space: normal;
        margin: 0 0 10px 0;
    }

    .metodo-card p {
        font-size: 15px;
        margin: 0;
    }

    /* ----- NUMERI ----- */
    /* Stesso blocco nero, ma griglia 2 colonne */
    .numeri {
        padding: 40px 20px;
        margin: 80px 0;
        gap: 30px 0;
    }

    .numeri-card {
        flex: 0 0 50%;
    }

    .numeri-card .numeri-value {
        font-size: 1.8rem;
    }

    .numeri-card p {
        font-size: 0.85rem;
        text-align: center;
    }

    /* ----- CHI È GMDE ----- */
    /* Testo prima, immagine sotto in flusso normale */
    .chi {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }

    .flex-down {
        width: 100%;
    }

    .flex-down h2 {
        font-size: clamp(28px, 8vw, 36px);
    }

    .chi p {
        width: 100%;
        font-size: 16px;
    }

    .chi img {
        position: static;
        width: 100%;
        height: auto;
        aspect-ratio: 16/10;
        border-radius: 20px;
    }

    /* ----- DICONO DI NOI ----- */
    .clienti {
        width: 90%;
    }

    .clienti .claim {
        font-size: clamp(26px, 7vw, 36px);
        text-align: center;
    }

    .clienti .upper {
        text-align: center;
    }

    .clienti .review-cards {
        flex-direction: column;
        gap: 16px;
    }

    .clienti .review-card {
        flex: 0 0 auto;
        width: 100%;
    }
}


.clienti{
    display:flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin: 0 auto 50px auto;
    flex-direction: column;
}

.clienti .upper{
    text-transform: uppercase;
    font-size: 18px;
    color: #e51c28;
}

.clienti p{
    margin:0;
}

.clienti .claim{
    font-size: 48px;
    margin: 0;
}

.clienti .review-cards {
    margin: 20px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.clienti .review-card {
    flex: 0 0 calc(100% / 3);
    border: 2px solid #dcd7d7;
    background-color: #ebe8e7;
    padding: 24px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card__area {
    display: inline-block;
    align-self: flex-start;
    background-color: rgba(228, 25, 37, 0.08);
    color: var(--clr-red);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin: 0;
}

.clienti .stars {
    display: flex;
    gap: 4px;
    color: #e41925;
    font-size: 18px;
}

.clienti .comment {
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
    flex: 1;
}

.clienti .name {
    font-weight: 700;
}

.clienti .job {
    font-size: 13px;
    color: #666;
}

.clienti .avatar{
    background-color: #28282a;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    display:flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 60px;
    min-width: 60px;
    min-height: 60px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    color: white;
}

.clienti .user{
    display:flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.clienti .info{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

/* ====================== CAROSELLO CHI È GMDE ====================== */
.chi-carousel {
    width: 100%;
    margin-top: 30px;
    overflow: hidden;
    position: relative;
}

.chi-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.chi-slide {
    min-width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    border: 2px solid #dcd7d7;
    border-radius: 20px;
    background-color: #ebe8e7;
    box-sizing: border-box;
}

.chi-slide i {
    font-size: 36px;
    color: #e41925;
    flex-shrink: 0;
    margin-top: 4px;
}

.chi-slide-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 6px 0 !important;
    width: auto !important;
}

.chi-slide-desc {
    font-weight: 300;
    font-size: 14px;
    color: #555;
    margin: 0 !important;
    width: auto !important;
    line-height: 1.5;
}

.chi-carousel-dots {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    justify-content: flex-start;
}

.chi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dcd7d7;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.chi-dot.active {
    background-color: #e41925;
    transform: scale(1.3);
}

/* =====================================================
   CAROSELLO CERTIFICAZIONI
   ===================================================== */
.cert,
.cert-container,
.cert-track,
.certImage {
    background-color: #ebe7e7;
}
.cert{
    padding: 50px 0 50px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 50px 0;
}
.cert-container {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
    background-color: #ececec;
}

.cert-eyebrow {
    font-size: 14px !important;
    letter-spacing: 1px;
    color: #878787;
}

.cert-track {
    padding: 40px 0 0 0;
    display: flex;
    align-items: center;
    width: max-content;
    animation: scroll-logos 40s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.certImage {
    flex-shrink: 0;
    border-radius: 25px;
    border: 1px solid #28282a;
    transition: all .3s ease-in-out;
    padding:10px;
    margin: 0 20px;
}

.certImage:hover {
    background-color: white;
    border: 1px solid #e41925;
}

.certImage img {
    height: 100px;
    width: 100px;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
    filter: grayscale(1);
}

.certImage:hover img{
    filter: grayscale(0);
}

@keyframes scroll-logos {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .cert-container {
        overflow-x: scroll;
        overflow-y: hidden;
        scrollbar-width: none;
        mask-image: none;
    }
    .cert-container::-webkit-scrollbar {
        display: none;
    }
    .cert-track {
        animation: none;
    }
}

@media (max-width: 768px) {
    .clientiImage img {
        margin: 0 20px;
        height: 80px;
        width: 80px;
    }

    .clienti-track {
        padding: 30px 0 0 0;
    }
}
