body {
    overflow-x: hidden;
    font-family: "montserrat", sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: #000;
    color: #fff;
}

#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
    z-index: 999;
}

#main-header.scrolled {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

#main-header .row {
    flex-wrap: nowrap;
}

#main-logo {
    width: 210px;
    height: auto;
    transition: width 0.3s ease, transform 0.3s ease;
    transform-origin: left center;
    display: block;
}

#main-header.scrolled #main-logo {
    width: 160px;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-nav__link {
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.main-nav__link:hover {
    color: #fff;
    font-weight: 800;
    opacity: 0.72;
}

.main-nav__link--active {
    font-weight: 800;
}

.main-nav__link--reserved {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 10px;
}

.main-nav__link--reserved i {
    font-size: 0.78em;
}

#main-header.scrolled .main-nav__link {
    color: #000;
}

#main-header.scrolled .main-nav__link:hover {
    color: #000;
}



.sec_video {
    position: relative;
    overflow: hidden;
    height: 700px;
    isolation: isolate;
}

.sec_video--hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    z-index: 0;
    pointer-events: none;
}

.video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    transform: translate(-50%, -50%);

}

.mosaic-wrap {
    padding: 22px 20px 77px;
}

.mosaic {
    --mosaic-column-offset: 22px;

    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "a b"
        "c d";
    aspect-ratio: 1 / 1;
    align-items: stretch;
}

.mosaic__item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    min-height: 0;
    transition: transform 0.3s ease;
}

.mosaic__item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.7s ease;
}

.mosaic__item img.is-fading {
    opacity: 0;
}

.mosaic__a {
    grid-area: a;
    transform: translateY(calc(var(--mosaic-column-offset) * -1));
}

.mosaic__b {
    grid-area: b;
    transform: translateY(var(--mosaic-column-offset));
}

.mosaic__c {
    grid-area: c;
    transform: translateY(calc(var(--mosaic-column-offset) * -1));
}

.mosaic__d {
    grid-area: d;
    transform: translateY(var(--mosaic-column-offset));
}


.intro h2 {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.claim {
    background: linear-gradient(90deg, rgba(227, 6, 19, 1) 0%, rgba(243, 146, 0, 1) 100%);
    padding: 1.5rem 0;
    text-align: center;
}

.claim h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.team-fullscreen {
    height: 500px;
    overflow: hidden;
}

.team-fullscreen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.service-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 320px 320px;
}

.card-diagnostics {
    grid-column: 1 / span 2;
    grid-row: 1;
}

.card-repairs {
    grid-column: 3 / span 1;
    grid-row: 1;
}

.gradient-box {
    grid-column: 1 / span 1;
    grid-row: 2;
}

.card-models {
    grid-column: 2 / span 2;
    grid-row: 2;
}

.card-box {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
}

.card-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.25) 0%,
            rgba(0, 0, 0, 0.6) 100%);
}

.content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    color: #fff;
    z-index: 2;
}

.content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.content p {
    max-width: 85%;
    line-height: 1.3;
}

.gradient-box .content p {
    font-size: 2rem;
    font-weight: 600;
}

.content.little p {
    max-width: 100%;
    line-height: 1.3;
}

.gradient-box {
    background: linear-gradient(90deg, rgba(227, 6, 19, 1) 0%, rgba(243, 146, 0, 1) 100%);
}

.marchi {
    background: linear-gradient(90deg, rgba(227, 6, 19, 1) 0%, rgba(243, 146, 0, 1) 100%);
}

.marchi .swiper {
    width: 100%;
}

.marchi .swiper-slide {
    width: auto;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05rem;
}

.logistica {
    position: relative;
}

.logistica-card {
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
}

.logistica-card__image {
    height: 230px;
    overflow: hidden;
}

.logistica-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logistica-card__body {
    padding: 24px;
}

.logistica-card h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.logistica-card p {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.logistica .btn-bipa {
    text-decoration: none;
    background: linear-gradient(90deg, rgba(227, 6, 19, 1) 0%, rgba(243, 146, 0, 1) 100%);
    border: none;
    padding: 0.5rem 2rem;
}

.logistica .btn-bipa :hover {
    background-color: transparent;
    border: solid 1px #fff;
}

.contatti {
    position: relative;
    background-image: url('/images/contatti.jpg');
    height: 500px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.contatti::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

.contatti > .container {
    position: relative;
    z-index: 1;
}

.contatti h2 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.85);
}

.contatti .btn-bipa {
    background-color: #fff;
    color: #000;
}

.contatti .btn-bipa:hover {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-bipa {
    background-color: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    border: solid 1px #fff;
    border-radius: 20px;
    padding: 0.5rem;
    width: 200px;
    color: #fff;
}

.btn-bipa:hover {
    background-color: #fff;
    color: #000;
}


footer {
    background: linear-gradient(90deg, rgba(227, 6, 19, 1) 0%, rgba(243, 146, 0, 1) 100%);
}

footer img {
    width: 180px;
}


footer p {
    color: #fff;
}

footer .footer-legal {
    font-size: 0.82rem;
    margin-top: 4px;
}

footer i {
    color: #fff;
}

footer a {
    color: #fff;
    text-decoration: none;
}

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

footer .personalBorder {
    border-left: 1px #fff solid;
}


@media (max-width: 1199.98px) {
    .claim h1 {
        font-size: 2.75rem;
    }

    .gradient-box .content p {
        font-size: 1.6rem;
        font-weight: 600;
    }

    .content h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

}

@media (max-width: 991.98px) {
    #main-header .container {
        --bs-gutter-x: 2rem;
    }

    #main-logo {
        width: 150px;
    }

    #main-header.scrolled #main-logo {
        width: 135px;
    }

    .main-nav {
        gap: 12px;
        font-size: 0.84rem;
    }

    .main-nav__link--reserved {
        margin-left: 8px;
    }

    .mosaic-wrap {
        padding: 51px 20px 122px;
    }

    .mosaic {
        --mosaic-column-offset: 22px;
    }

    .service-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .card-diagnostics {
        grid-column: 1 / span 2;
        grid-row: 1;
    }

    .card-repairs {
        grid-column: 3 / span 4;
        grid-row: 1;
    }

    .gradient-box {
        grid-column: 1 / span 2;
        grid-row: 2;
    }

    .card-models {
        grid-column: 3 / span 4;
        grid-row: 2;
    }

    .content {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .content h3 {
        font-size: 1.2rem;
        line-height: 1.1;
    }

    .content p {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .logistica-card__image {
        height: 210px;
    }

    .claim h1 {
        font-size: 2.5rem;
    }
}


@media (max-width: 767.98px) {
    #main-header {
        padding: 16px 0;
    }

    #main-header .container {
        --bs-gutter-x: 1.5rem;
    }

    .mosaic-wrap {
        padding: 54px 20px 54px;
    }

    .mosaic {
        --mosaic-column-offset: 16px;
    }

    .sec_video {
        height: 500px;
    }

    .main-nav {
        gap: 10px;
        font-size: 0.84rem;
    }

    .main-nav__link--reserved {
        gap: 5px;
        margin-left: 6px;
    }

    .main-nav__link {
        min-height: 44px;
    }

    .video {
        height: 500px;
    }


    .service-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-diagnostics,
    .card-repairs,
    .gradient-box,
    .card-models {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .gradient-box {
        height: 250px;
    }

    .card-models {
        height: 300px;
    }

    footer .personalBorder {
        border: none;
    }

    .claim {
        padding: 22px 0;
    }

    .claim h1 {
        font-size: 1.7rem;
    }

    .logistica-card__body {
        padding: 20px;
    }

    .logistica-card__image {
        height: 200px;
    }

    .contatti {
        background-image: url('/images/contatti_thumb.jpg');
    }

    .contatti::before {
        background: rgba(0, 0, 0, 0.45);
    }

}

@media (max-width: 575.98px) {
    .claim h1 {
        font-size: 1.4rem;
    }
}
