#hero {
    background-image: url("/assets/images/allenamento-funzionale-corda2.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

@media (max-width: 700px) {
    #hero {
        min-height: 90vh;   
        max-height: 100vh;
    }
}
@media only screen and (min-width: 0rem) {
    #hero-bjj {
        padding: clamp(6rem, 10vw, 10rem) 1rem 0;
        overflow: hidden;
        position: relative;
    }

    #hero-bjj:before {
        content: '';
        width: 300vw;
        /*height: 500%;*/
        height: 100%;
        background: #000;
        opacity: 0.3;
        position: absolute;
        display: block;
        bottom: 3.375rem;
        left: 50%;
        z-index: -1;
        transform: translateX(-50%);
    }

    #hero-bjj .cs-container {
        width: 100%;
        max-width: 90rem;
        margin: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 3rem;
    }

    #hero-bjj .cs-content {
        text-align: center;
        max-width: 46.875rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        position: relative;
        z-index: 2;
    }

    #hero-bjj .cs-title {
        font-size: clamp(2.4375rem, 6.3vw, 5.25rem);
    }

    #hero-bjj .cs-text {
        font-size: clamp(1rem, 1.5vw, 1.25rem);
        max-width: 33.1875rem;
        margin: 0 0 2rem 0;
    }
    

    #hero-bjj .cs-box {
        width: 100%;
        height: auto;
        margin: 0;
        padding: clamp(1.5rem, 4vw, 2rem);
        background-color: var(--primary);
        display: flex;
        align-items: flex-start;
        gap: clamp(1rem, 2vw, 1.5rem);
    }
    
}

@media only screen and (min-width: 48rem) {
    #hero-bjj {
        padding: 0;
        /*padding-top: 200px;*/
        top: clamp(5rem, 8vw, 8rem);
        overflow: hidden;
        position: relative;
    }
    #hero-bjj:before {
        content: '';
        width: 300vw;
        height: 500%;
        background: #000;
        opacity: 0.3;
        position: absolute;
        display: block;
        bottom: 6.25rem;
        left: 50%;
        z-index: -1;
        transform: translateX(-50%);
    }

    #hero-bjj .cs-container {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
    }

    #hero-bjj .cs-content {
        text-align: left;
        width: 47%;
        margin-bottom: clamp(10.5rem, 30vw, 18.75rem);
        flex: none;
        align-items: flex-start;
        align-self: flex-start;
    }

    #hero-bjj .cs-content-graphic {
        height: 200%;
        right: 0;
        top: auto;
        bottom: -12.5rem;
        transform: none;
    }

    #hero-bjj .cs-slider-group {
        width: 50%;
        max-width: 39.375rem;
        height: auto;
        min-height: clamp(33.125rem, 67vw, 55rem);
    }

    #hero-bjj .cs-slider-group:before {
        display: none;
    }

    #hero-bjj .cs-video-wrapper {
        height: 90%;
    }

    #hero-bjj .cs-box {
        width: 80%;
        max-width: 19.1875rem;
        flex-direction: column;
        position: absolute;
        bottom: 0;
        left: calc(clamp(7.25rem, 17vw, 12.5rem) * -1);
    }
}

@media only screen and (min-width: 64rem) {
    #hero-bjj .cs-video-wrapper {
        height: 100%;
    }

    #hero-bjj .cs-box {
        bottom: 3rem;
    }
}

@media only screen and (min-width: 0rem) {
    #classes {
        padding: var(--sectionPadding);
        position: relative;
        z-index: 1;
    }

    #classes .cs-container {
        width: 100%;
        max-width: 90rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(3rem, 6vw, 4rem);
    }

    #classes .cs-content {
        text-align: center;
        width: 100%;
        max-width: 80rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #classes .cs-title {
        max-width: 25ch;
        color: var(--bodyTextColorWhite);
    }

    #classes .cs-text {
        color: var(--bodyTextColorWhite);
        opacity: 0.8;
        margin-bottom: 2rem;
    }

    #classes .cs-card-group {
        width: 100%;
        margin: 0;
        padding: 0;
        display: grid;
        align-items: stretch;
        grid-template-columns: repeat(12, 1fr);
        gap: clamp(1rem, 2vw, 1.25rem);
    }

    #classes .cs-item {
        text-align: left;
        list-style: none;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 0;
        background-color: #000;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        grid-column: span 12;
        grid-row: span 1;
        position: relative;
        z-index: 1;
        overflow: hidden;
    }

    #classes .cs-item:hover .cs-background:before {
        opacity: 0.8;
        background-color: var(--primary);
    }

    #classes .cs-item:hover .cs-number {
        transform: translateY(-2rem);
    }

    #classes .cs-item:hover .cs-background img {
        transform: scale(1.2);
    }

    #classes .cs-item-text {
        text-align: inherit;
        font-size: 1rem;
        line-height: 1.5em;
        margin: 0 0 2rem;
        color: var(--bodyTextColorWhite);
    }

    #classes .cs-link {
        text-decoration: none;
        width: 100%;
        height: 100%;
        padding: 2rem clamp(1rem, 2vw, 2rem);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
    }

    #classes .cs-faux-link {
        font-family: var(--headerFont);
        text-transform: uppercase;
        font-size: 1rem;
        line-height: 2.75rem;
        font-weight: bold;
        margin: 0;
        padding: 0 1.5rem;
        color: var(--primary);
        background-color: #fff;
        display: block;
        position: relative;
        z-index: 1;
        transition: color 0.3s;
    }

    #classes .cs-faux-link:before {
        content: '';
        width: 100%;
        height: 0;
        background-color: var(--primary);
        opacity: 1;
        position: absolute;
        display: block;
        top: 0;
        left: 0;
        z-index: -1;
        transition: height 0.3s;
    }

    #classes .cs-faux-link:hover {
        color: var(--bodyTextColorWhite);
    }

    #classes .cs-faux-link:hover:before {
        height: 100%;
    }


    #classes .cs-h3 {
        font-size: clamp(1.5625rem, 2.5vw, 1.9375rem);
        font-weight: 700;
        line-height: 1.2em;
        text-align: inherit;
        margin: 0 0 1rem;
        color: var(--bodyTextColorWhite);
    }

    #classes .cs-background {
        width: 100%;
        height: 100%;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
    }

    #classes .cs-background:before {
        content: "";
        width: 100%;
        height: 100%;
        background-color: #000;
        opacity: 0.6;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        transition: background-color 0.3s, opacity 0.3s;
    }

    #classes .cs-background:after {
        content: "";
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #000000 20%, rgba(0, 0, 0, 0) 100%);
        opacity: 0.85;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        transition: background-color 0.3s, opacity 0.3s;
    }

    #classes .cs-background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 0.6s;
    }

    #classes .cs-background-graphic {
        width: 100%;
        height: 30%;
        display: block;
        position: absolute;
        top: -6.25rem;
        left: 0;
        z-index: -1;
    }

    #classes .cs-background-graphic:before {
        content: '';
        width: 100%;
        height: 20%;
        background: linear-gradient(to bottom, rgba(34, 34, 34, 0) 0%, #222222 93%, #222222 100%);
        position: absolute;
        display: block;
        bottom: 0;
        left: 0;
        z-index: 10;
    }

    #classes .cs-background-graphic img {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        filter: brightness(1000%);
        opacity: 0.07;
        object-fit: cover;
    }
}

@media only screen and (min-width: 48rem) {
    #classes {
        padding-top: clamp(2rem, 4vw, 3rem);
    }

    #classes .cs-content {
        text-align: left;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }

    #classes .cs-text {
        margin: 0;
    }

    #classes .cs-item {
        grid-column: span 4;
    }

    #classes .cs-background-graphic {
        height: 60%;    
    }
}


.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(.55,0,.1,1), transform 0.9s cubic-bezier(.55,0,.1,1);
    will-change: opacity, transform;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.cs-slider {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 100px auto 0 auto;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 180px;      /* mobile */
    max-height: 60vw;       /* desktop: regola l'altezza */
    background: rgba(10,10,10,0.12);
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.17);
    transition: height 0.4s cubic-bezier(.77,0,.18,1);
}

.cs-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(.77,0,.18,1);
}

.cs-slides img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* Mostra tutta l'immagine, nessun crop */
    border-radius: 2rem;
    flex-shrink: 0;
    background: #1a1a1a;
    display: block;
    box-shadow: none;
}

/* Dots navigation */
.cs-slide-dots {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}
.cs-slide-dots button {
    background: #fff;
    opacity: 0.5;
    border: none;
    border-radius: 50%;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    padding: 0;
}
.cs-slide-dots button.active,
.cs-slide-dots button:hover {
    background: #ed1c24;
    opacity: 1;
}

/* Responsive */
@media (max-width: 1100px) {
    .cs-slider {
        max-width: 98vw;
        min-height: 140px;
        max-height: 50vw;
        border-radius: 1.3rem;
    }
    .cs-slides img {
        border-radius: 1.3rem;
    }
}
@media (max-width: 700px) {
    .cs-slider {
        max-width: 99vw;
        margin-top: 30px;
        min-height: 110px;
        max-height: 35vh;  /* più alto di 42vw! */
        border-radius: 1rem;
    }
    .cs-slides img {
        border-radius: 1rem;
    }
    .cs-slide-dots button {
        width: 0.78rem;
        height: 0.78rem;
        gap: 0.29rem;
    }
}
