/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .position-sm-absolute {
        position: absolute !important;
    }
    .mb-sm-n5 {
        margin-bottom: -3rem !important;
    }
    .w-sm-75 {
        width: 75% !important;
    }
    .swiperTestata .swiper-pagination-bullets.swiper-pagination-horizontal {
        width: auto;
        left: 12px;
    }
    .border-box-light-green {
        border: 1px solid var(--light-green);
    }
    .form-group > div:last-child {
        margin-left: auto;
        margin-right: auto;
    }
    .form-contatti .form-group {
        justify-content: start;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .mt-custom {
        margin-top: 200px;
    }
    .swiperProgetti
        .swiper-slide:not(.swiper-slide-next):not(.swiper-slide-active) {
        opacity: 0.5;
    }
    .form-group > div:last-child {
        margin-right: 0;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container-bigger {
        max-width: 1040px;
    }
    .text-lg-nowrap {
        white-space: nowrap !important;
    }
    .end-lg-20 {
        right: -20px !important;
    }
    .position-lg-absolute {
        position: absolute !important;
    }
    .translate-middle-lg-y {
        transform: translateY(-50%);
    }
    .w-lg-75 {
        width: 75% !important;
    }
    .w-container {
        max-width: 960px;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* HEADER */
    .navbar-nav .nav-link {
        position: relative;
    }
    .navbar-nav .nav-link::before {
        content: "";
        width: 100%;
        height: 3px;
        background-color: var(--light-green);
        border-radius: 0;
        display: block;
        position: absolute;
        bottom: 0;
        transform-origin: left;
        transform: scaleX(0);
        transition: all 0.3s ease-in-out;
    }
    .navbar-nav .nav-link.active::before,
    .navbar-nav .nav-link:hover::before {
        transform: scaleX(1);
    }
    .dropdown-menu {
        display: block;
        opacity: 0;
        transform: translateY(10px);
        visibility: hidden;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
    }
    .dropdown:hover .dropdown-menu,
    .dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
    .dropdown-item::before {
        content: "";
        background-color: var(--light-green);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform-origin: bottom;
        transform: scaleY(0);
        transition: all 0.3s ease-in-out;
        z-index: -1;
    }
    .dropdown-item:hover::before,
    .dropdown-item:focus-visible::before,
    .dropdown-item:focus-within::before,
    .dropdown-item:focus::before {
        transform: scaleY(1);
    }
    .dropdown-item:hover,
    .dropdown-item:focus,
    .dropdown-item:focus-visible,
    .dropdown-item:focus-within {
        color: var(--white) !important;
        background-color: transparent;
    }
    /* END HEADER */

    /* TESTATA */
    .position-custom {
        top: auto;
        bottom: 0;
        transform: translateY(0);
    }
    .swiperTestata .swiper-pagination-bullets.swiper-pagination-horizontal {
        left: auto;
        right: 21%;
        transform: translateX(50%);
        bottom: 15%;
    }
    /* END TESTATA */
    .form-contatti .form-group {
        row-gap: 1.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-bigger {
        max-width: 1240px;
    }
    .w-container {
        max-width: 1140px;
    }
    .border-xl {
        border: var(--bs-border-width) var(--bs-border-style)
            var(--bs-border-color);
    }
    .bg-xl-transparent {
        --bs-bg-opacity: 1;
        background-color: transparent !important;
    }
}

@media (min-width: 1400px) {
    .container-bigger {
        max-width: 1440px;
    }
    .w-container {
        max-width: 1320px;
    }
    .swiperTestata .swiper-pagination-bullets.swiper-pagination-horizontal {
        right: 25%;
    }
}

@media (min-width: 1700px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl,
    .w-container {
        max-width: 1364px;
    }
    .container-bigger {
        max-width: 1640px;
    }
}

@media (min-width: 1920px) {
    .site-wrap {
        width: 1920px;
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 1399.98px) {
    .mh-600 {
        min-height: 600px;
    }
}

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link.active {
        color: var(--light-green) !important;
    }
    .position-custom {
        top: 50%;
        transform: translateY(-50%);
    }
    .img-aside {
        top: -3rem;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .alternating > div:nth-child(2n + 1) {
        margin-right: auto;
    }
    .alternating > div:nth-child(2n) {
        margin-left: auto;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .alternating > div {
        margin-left: auto;
        margin-right: auto;
    }
    .team > div:nth-child(2n) {
        text-align: end;
    }
    .team > div:nth-child(2n) .team-foto {
        margin-left: auto;
        margin-right: 1.5rem;
    }
    .team > div:nth-child(2n + 1) .team-foto {
        margin-left: 1.5rem;
    }
    .opacity-custom {
        opacity: 0.2;
    }
}