:root{
    --red: #960101;
    --yellow: #efda18;
}
@font-face{
    src: url('../fonts/InterTight.ttf');
    font-family: 'InterTight';
    font-weight: 100 900;
    font-style: normal;
}
*{
    margin: 0;
    padding: 0;
}
body{
    font-family: 'InterTight';
    font-weight: 400;
    font-size: 18px;
    overflow-x: hidden;
}
.w_def{
    width: 94%;
    margin: auto;
}
.flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-flow: row wrap;
    align-content: center;
    justify-content: center;
}
h1{
    font-size: 60px;
    letter-spacing: 1px;
}
h2{
    font-weight: 400;
    color: var(--red);
    font-size: 45px;
}
h3{
    color: var(--red);
    font-size: 27px;
}
a{
    color: inherit;
    text-decoration: none;
}
p{
    line-height: 27px;
}
.space{
    clear: both;
    height: 100px;
}
.space_mid{
    clear: both;
    height: 50px;
}
.space_small{
    clear: both;
    height: 25px;
}
.btn{
    padding: 20px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    transition: 200ms ease;
}
.btn.yellow{
    background-color: var(--yellow);
    color: var(--red);
    box-shadow: 20px 20px 0 rgba(239, 218, 24, .3);
}
.btn.yellow:hover{
    box-shadow: 0 0 0 rgba(239, 218, 24, .3);
}
.btn.red{
    background-color: var(--red);
    color: var(--yellow);
    box-shadow: 20px 20px 0 rgba(150, 1, 1, .3);
}
.btn.red:hover{
    box-shadow: 0 0 0 rgba(150, 1, 1, .3);
}
.cols2{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}
/****** HEADER *********/
header .logo, header .logo_replacement{
    width: 150px;
}
header .logo{
    position: absolute;
    top: 20px;
    left: 0;
    background-color: white;
    border-radius: 30px;
    padding: 20px;
    
}
header ul{
    display: flex;
    gap: 50px;
}
header ul li{
    list-style-type: none;
    position: relative;
    transition: 400ms ease;
}
header ul li:hover{
    color: var(--red);
}
header .submenu{
    position: absolute;
    top: 100%;
    left: -20px;
    background-color: white;
    flex-direction: column;
    width: max-content;
    gap: 20px;
    padding: 20px;
    transition: 400ms transform ease;
    transform: scaleY(0);
    transform-origin: top;
}
header .submenu::before{
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--red);
}
header .submenu li{
    color: black;
}
header ul li:hover .submenu{
    transform: scaleY(1);
    
}
/****** END HEADER *********/

/************* SUB HEADER  *************/
.sub_header{
    height: calc(100svh - 101px);
    position: relative;
    color: white;
    text-align: center;
}
.sub_header.reduced{
    max-height: 60svh;
}
.sub_header .bck{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}
.sub_header .bck .filter{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;  
    background-color: rgba(18,25,51,.5);
}
.sub_header .info{
    position: relative;
    z-index: 5;
    height: 100%;
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.sub_header .info .typed_properties * {
    font-size: 30px;
    /*font-family: "Poppins-Regular";*/
    text-transform: uppercase;
}
.sub_header .info > div{
    width: 100%;
    margin-top: auto;
    /*text-align: left;*/
    padding-bottom: 40px;
}
#typed-strings{
    display: none;
}
/************* END SUB HEADER  *************/

.line{
    background-color: var(--red);
    height: 2px;
    margin: 10px 0;
}

/************** SERVIZI *****************/
.servizi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    perspective: 1200px;
}

.servizio-card {
    height: 200px;
    position: relative;
    perspective: 1200px;
}

.servizio-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .7s cubic-bezier(.2, .65, .3, 1);
}

.servizio-card:hover .servizio-card-inner {
    transform: rotateY(-180deg);
}

.servizio-card-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* LATO FRONTALE */

.servizio-card-front {
    background: #000;
}

.servizio-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .65;
    transition: transform .6s ease, opacity .4s ease;
}

.servizio-card-front::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

.servizio-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 20px;
}

.servizio-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.servizio-content h3 {
    margin: 0;
    color: white;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* LATO POSTERIORE */

.servizio-card-back {
    background: var(--red);
    color: #fff;
    transform: rotateY(180deg);
}
.servizio-card-back h3{
    color: white !important;
}

.servizio-back-content {
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.servizio-back-content h3 {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.25;
    text-transform: uppercase;
}

.servizio-back-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

/* Piccolo effetto profondità */

.servizio-card:hover {
    z-index: 2;
}

.servizio-card:hover .servizio-card-inner {
    box-shadow: 0 24px 45px rgba(0, 0, 0, .28);
}
.servizio-svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #fff;
    stroke: currentColor;
    fill: none;
}

.servizio-card-back a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.servizio-links {
    margin-top: 12px;
    font-size: 13px;
}
/************** END SERVIZI *****************/

/************** PUNTI DI FORZA *************/
.points_bck {
    background-color: #fafafa;
    background-image: url("../images/eng-punti-forza-bg.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.points {
    --point-width: min(520px, 100%);
    --step-1: calc((100% - var(--point-width)) / 3);
}
.point {
    width: var(--point-width);
    margin-bottom: 40px;
}
.point h3{
    font-size: 30px;
}
.points .point:nth-child(1) {
    margin-left: 0;
}
.points .point:nth-child(2) {
    margin-left: var(--step-1);
}
.points .point:nth-child(3) {
    margin-left: calc(var(--step-1) * 2);
}

.points .point:nth-child(4) {
    margin-left: calc(var(--step-1) * 3);
}

/************** PARTNERS *************/
.grid.partners{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    
}
.grid.partners > a{
    color: inherit;
    text-decoration: none;
    position: relative;
    text-align: center;
}
.grid.partners > a:not(:last-of-type)::after{
    content: '';
    position: absolute;
    top: 0; 
    right: -15.5px;
    width: 1px;
    height: 100%;
    background-color: rgba(21,21,21,.2);
}
.grid.partners figure{
    height: 120px;
}
.grid.partners img{
    width: 250px;
}
.grid.partners img.resize{
    width: 130px;
}
/************** END PARTNERS *************/

/************** FOOTER ***************/
footer{
    background-color: #171717;
    color: white;
}
footer .grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
footer .logo{
    width: 120px;
}
footer h3{
    color: white;
    margin-bottom: 15px;
    font-size: 22px;
}
footer a, footer .link{
    color: var(--yellow) !important;
}
footer p{
    line-height: 28px;
}
footer a, footer .link{
    text-decoration: underline;
    cursor: pointer;
    color: inherit;
}
/************** END FOOTER ***************/

/************** SERVICE GALLERY ************/
.service_gallery{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.service_gallery figure{
    aspect-ratio: 16 / 9;
}
.service_gallery figure img{
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}
/************** END SERVICE GALLERY ***********/
/************ SERVICE GALLERY - ELEGANT REVEAL ************/
.service_gallery figure {
    position: relative;
    overflow: hidden;
    margin: 0;
    background-color: #111;
    isolation: isolate;
}

/* Effetto comparsa */
.service_gallery figure[data-effect="gallery-elegant"] {
    transform: translateY(35px) scale(0.96);
    filter: blur(8px) brightness(0.75);
    clip-path: inset(12% 8% 12% 8%);
    transition:
        opacity 850ms ease,
        transform 850ms cubic-bezier(.2, .8, .2, 1),
        filter 850ms ease,
        clip-path 950ms cubic-bezier(.2, .8, .2, 1);
    will-change: opacity, transform, filter, clip-path;
}

.service_gallery figure[data-effect="gallery-elegant"] img {
    transform: scale(1.12);
    transition:
        transform 1200ms cubic-bezier(.2, .8, .2, 1),
        filter 500ms ease;
}

.service_gallery figure[data-effect="gallery-elegant"].active {
    transform: translateY(0) scale(1);
    filter: blur(0) brightness(1);
    clip-path: inset(0 0 0 0);
}

.service_gallery figure[data-effect="gallery-elegant"].active img {
    transform: scale(1);
}

/* Ritardo progressivo automatico sulle colonne */
.service_gallery figure[data-effect="gallery-elegant"]:nth-child(3n+1) {
    transition-delay: 0ms;
}

.service_gallery figure[data-effect="gallery-elegant"]:nth-child(3n+2) {
    transition-delay: 90ms;
}

.service_gallery figure[data-effect="gallery-elegant"]:nth-child(3n+3) {
    transition-delay: 180ms;
}
/************ END SERVICE GALLERY - ELEGANT REVEAL ************/
/************ SERVICE GALLERY - HOVER ************/

.service_gallery figure[data-effect="gallery-elegant"] {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.service_gallery figure[data-effect="gallery-elegant"]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 38%,
        rgba(255,255,255,0.35) 50%,
        transparent 62%,
        transparent 100%
    );
    transform: translateX(-120%);
    opacity: 0;
}

.service_gallery figure[data-effect="gallery-elegant"]::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--red);
    z-index: 3;
    transition: width 450ms ease;
}

.service_gallery figure[data-effect="gallery-elegant"].active:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.service_gallery figure[data-effect="gallery-elegant"].active:hover img {
    transform: scale(1.07);
    filter: brightness(1.08) contrast(1.04);
}

.service_gallery figure[data-effect="gallery-elegant"].active:hover::before {
    opacity: 1;
    animation: gallery_light_pass 850ms ease forwards;
}

.service_gallery figure[data-effect="gallery-elegant"].active:hover::after {
    width: 100%;
}

@keyframes gallery_light_pass {
    from {
        transform: translateX(-120%);
    }
    to {
        transform: translateX(120%);
    }
}

/************ END SERVICE GALLERY - HOVER ************/

