* {
    scroll-behavior: smooth;
}

#solutions {
    scroll-margin-top: 100px;
}

/* =====================================================
   HERO
   ===================================================== */
.colored {
    all: unset;
    padding-top: 100px;
    width: 100%;
    height: max-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.background {
    background-color: #ebe7e7;
    position: absolute;
    top: 0;
    height: calc(100% - 200px);
    width: 100%;
    z-index: -1;
}

.headcontent {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    flex-direction: column;
}

.colored .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;
    margin-bottom: 14px;
    max-width: 90%;
    text-align: center;
    word-break: break-word;
}

.headcontent .claim {
    font-size: 52px;
    width: 60%;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.headcontent .claim p {
    margin: 0;
}

.headcontent .desc {
    font-size: 18px;
    width: 50%;
    margin: 0;
    color: #3c3c3c;
}

.headcontent>img {
    width: 50%;
    border-radius: 25px;
    margin: 60px 0 0 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.preTitle {
    font-size: 18px;
    color: #E41925;
    text-transform: uppercase;
}

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

/* =====================================================
   BUTTONS
   ===================================================== */
.primary {
    all: unset;
    border-radius: 40px;
    width: max-content;
    padding: 5px 5px 5px 10px;
    background-color: #E41925;
    margin-top: auto;
    color: white;
    cursor: pointer;
}

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

.secondary {
    all: unset;
    border-radius: 40px;
    width: max-content;
    padding: 5px 5px 5px 10px;
    background-color: #28282a;
    margin-top: auto;
    color: white;
    cursor: pointer;
}

.secondary i {
    height: 40px;
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #454549;
    border-radius: 50%;
}


/* =====================================================
   CONTAINER GENERICI
   ===================================================== */
.container {
    width: 80%;
    margin: 50px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container .title {
    margin: 0 0 10px 0;
}

.container .title p,
.title-general {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin: 0 auto;
    word-break: break-word;
}

.container .desc {
    font-size: 18px;
    width: 50%;
    text-align: center;
}

.container .description p {
    font-size: 18px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* =====================================================
   SOLUZIONI CORE (blocco nero + 3 cards grandi)
   ===================================================== */
.colored-container {
    width: 80%;
    background-color: #28282a;
    padding: 0 50px 0 0;
    margin-top: 100px;
    border-radius: 0 25px 25px 0;
    color: white;
}

.cards {
    margin-left: 50px;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    transform: translateY(-50px);
}

.card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    transition: all .3s ease-in-out;
}

.cardBig {
    justify-content: space-between;
}

.card-header {
    margin-bottom: 40px;
}

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

.card p {
    width: 100%;
    margin: 0;
    font-weight: 300;
}

/* =====================================================
   ECOSISTEMA GMDE (cards-solutions)
   ===================================================== */
.solutions-container {
    width: 90%;
    margin: 0 auto;
    padding-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.solutions-container span:not(.decoration) {
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 800;
    margin: 40px;
}

.cards-solutions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
}

.cards-solutions .card {
    border: 1px solid #F5D0D2;
    border-radius: 25px;
    margin: 5px;
    flex: 0 0 calc((100% / 3) - 10px);
    transition: all .3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cards-solutions .card:hover {
    background-color: #E41925;
    color: white;
    transform: scale(1.02);
    cursor: pointer;
}

.cards-solutions .card p {
    margin-bottom: 20px;
}

/* =====================================================
   STORIE DI SUCCESSO — NUOVE CARD SCURE
   ===================================================== */
.stories-section {
    background-color: var(--clr-bg);
    padding: 80px 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

.stories-section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    max-width: 700px;
}

.story-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.story-card {
    background-color: var(--clr-white);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--clr-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}

.story-card__market {
    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: 6px 14px;
    border-radius: 999px;
}

.story-card__title {
    color: var(--clr-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.story-card__desc {
    color: rgba(40, 40, 42, 0.6);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.story-card__kpis {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.story-card__kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.story-card__kpi-value {
    color: var(--clr-red);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.story-card__kpi-label {
    color: rgba(40, 40, 42, 0.5);
    font-size: 0.8rem;
}

.story-card__divider {
    border: none;
    border-top: 1px solid var(--clr-border);
    margin: 4px 0;
}

.story-card__quote {
    color: rgba(40, 40, 42, 0.7);
    font-size: 0.88rem;
    font-style: italic;
    line-height: 1.65;
    margin: 0;
}

.story-cta {
    background: transparent;
    border: 1.5px solid var(--clr-dark);
    color: var(--clr-dark);
    padding: 18px 40px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.story-cta:hover {
    background: var(--clr-dark);
    color: var(--clr-white);
}

/* =====================================================
   STORIE DI SUCCESSO — VECCHIO (lasciato per compatibilità)
   ===================================================== */
.detailsVertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.detailsVertical + .secondary {
    margin-top: 16px;
}

.case-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 860px;
    aspect-ratio: 21 / 9;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.case-card__image {
    position: relative;
    overflow: hidden;
    width: 50%;
    flex-shrink: 0;
}

.case-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.case-card:hover .case-card__image img {
    transform: scale(1.05);
}

.case-card__content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 12px;
}

.case-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0;
}

.case-card__services {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.case-card__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
}

.case-card__services ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.case-card__services li {
    background: #f4f4f4;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #333;
}

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


/* =================================================================
   MOBILE (< 800px) — ricostruito usando il vocabolario desktop
   ================================================================= */
@media screen and (max-width: 800px) {

    /* ----- HERO ----- */
    .colored {
        padding-top: 80px;
    }

    .background{
        height: calc(100% - 50px)
    }

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

    .headcontent .claim {
        width: 90%;
        font-size: clamp(28px, 9vw, 44px);
        line-height: 1.15;
    }

    .headcontent .desc {
        width: 85%;
        font-size: 16px;
        margin-top: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .headcontent img {
        width: 90%;
        margin: 40px 0 0 0;
    }

    /* Carosello loghi: più stretto */
    .clientiImage img {
        margin: 0 20px;
        height: 80px;
        width: 80px;
    }

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

    /* ----- CONTAINER GENERICI ----- */
    .container {
        width: 90%;
    }

    .container .title p,
    .title-general {
        font-size: clamp(28px, 7vw, 36px);
        width: 100%;
    }

    .container .desc {
        width: 100%;
        font-size: 16px;
    }

    .container .description p {
        font-size: 16px;
    }

    /* ----- SOLUZIONI CORE (blocco nero) ----- */
    /* Stesso blocco nero della desktop, card impilate */
    .colored-container {
        width: 100%;
        padding: 0 0 80px 0;
        border-radius: 25px 25px 0 0;
        margin-top: 60px;
    }

    .cards {
        flex-direction: column;
        margin-left: 0;
        gap: 30px;
        transform: translateY(-50px);
    }

    .cards .cardBig {
        width: 88%;
        margin: 0 auto;
        padding: 16px;
    }

    .card-header {
        margin-bottom: 24px;
    }

    .cardBig h3 {
        font-size: 1.3rem;
        margin: 16px 0 8px 0;
    }

    /* ----- ECOSISTEMA ----- */
    .solutions-container {
        width: 92%;
    }

    .solutions-container span:not(.decoration) {
        font-size: 1.2rem;
        margin: 30px 0;
        text-align: center;
    }

    .cards-solutions {
        flex-direction: column;
    }

    .cards-solutions .card {
        flex: 0 0 auto;
        width: 100%;
        margin: 5px 0;
        transition: all .3s ease-in-out;
    }

    /* ----- NUOVE STORY CARD ----- */
    .stories-section {
        padding: 60px 5%;
    }

    .story-cards-grid {
        grid-template-columns: 1fr;
    }

    /* ----- STORIE DI SUCCESSO (vecchio) ----- */
    .detailsVertical {
        width: 100%;
        padding: 0 20px;
    }

    .case-card {
        flex-direction: column;
        aspect-ratio: auto;
    }

    .case-card__image {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    .case-card__image {
        aspect-ratio: 16 / 10;
    }

    .case-card__content {
        padding: 1.2rem;
    }

    .case-card__title {
        font-size: 1rem;
    }

    /* ----- CIRCLE: già nascosto via hide-mobile dal Twig ----- */
}