/* === P1-3: Swiper override + slider home (nel monolite globale; enqueue swiper-bundle già condizionale) === */

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    /* Swiper controls slide spacing via its own inline styles. */
}

.swiper-slide img {
    display: block;
    object-fit: cover;
    width: 100%;
}

.slider-home .swiper-slide {
    position: relative;
}

.slider-home .swiper-slide img {
    height: 600px;
}

.swiper-button-next, .swiper-button-prev {
    background: rgba(51,51,51,0.3);
    color: rgb(255, 255, 255);
    height: 60px;
    text-align: center;
    transition: all .2s ease;
    white-space: nowrap;
    width: 60px;
}

.swiper-news .swiper-button-next, .swiper-news .swiper-button-prev {
    margin-top: -125px;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: var(--secondcolor);
}

.swiper-button-next:after, .swiper-rtl .swiper-button-prev:after {
    font-size: 20px;
}

.swiper-button-prev:after, .swiper-rtl .swiper-button-next:after {
    font-size: 20px;
}

.slider-home .swiper-pagination-bullet-active {
    background: var(--firstcolor);
}

.slider-home h1, .slider-home h2 {
    color: #fff;
    margin: 0;
}

.slider-home .carousel-caption {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    bottom: 0;
    text-align: center;
    height: 100%;
    width: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 0 40px;
    background: rgb(0 0 0 / 40%);
}

/* === P1-3: homepage Missione / line-full / padding sezioni / sedi === */

.home section.line-full {
    background-color: var(--secondcolor);
    background-image: url('../img/onde_grigie.webp');
    background-position: 25% 25%;
    background-attachment: scroll;
    background-size: cover;
    background-repeat: no-repeat;
    color: #FFF;
}

.home section.line-full .first-line-full-title {
    padding-bottom: 25px;
}

.home section.line-full .first-line-full-text {
    color: #D3D3D3;
    font-size: 14px;
    line-height: 22px;
    margin: 0 auto;
}

.home section.section-padding {
    margin: 0;
    padding: 75px 0 50px;
}

.home section.line-full.section-padding {
    margin: 0;
    padding: 75px 0;
}

.home section.line-full.first-line-full.section-padding {
    padding: 75px 4% 75px 4%;
}

.home section h3, .home section h4 {
    color: var(--secondcolor);
    font-family: 'Montserrat-Bold', 'Open Sans', sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 24px;
    margin: 0 0 15px;
    padding: 0;
    vertical-align: baseline;
    border: 0;
    outline: 0;
    background: transparent;
}

.home section .section-title {
    margin: 0 auto;
    padding-bottom: 45px;
    text-align: center;
}

.home section.sedi .sede-item {
    margin-bottom: 35px;
}

.home section.sedi .sede-item-text,
.home section.sedi .sede-item-text a {
    color: var(--secondcolor);
    font-size: 14px;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
    border: 0;
    outline: 0;
    background: transparent;
    line-height: 24px;
}

.home section.sedi .sede-item-text a {
    text-decoration: underline;
}

.home section.sedi .sede-item-text a:hover {
    color: var(--firstcolor);
}

.home section.sedi .sede-item-text,
.home section.sedi .sede-item-info {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.home section.line-full .second-line-full {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.home section.line-full .second-line-full-background {
    background-color: rgba(20, 20, 20, 0.5);
    padding: 150px 75px;
}

/* === P1-3: homepage servizi al lavoro (bande + swiper) === */

.home section.servizi h3 a, .home section.servizi h4 a {
    color: #FFF;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: calc(1.3rem + .6vw);
    text-align: center;
}

.home section.servizi h3 a:hover, .home section.servizi h4 a:hover {
    text-decoration: underline;
    -webkit-transition: color .2s,opacity .2s;
    transition: color .2s,opacity .2s;
}

.home section.servizi {
    overflow: hidden;
}

.home section.servizi .row {
    margin-left: 0;
    margin-right: 0;
}

.home section.servizi .servizi-item-title {
    color: #FFF;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    text-align: center;
}

.home section.servizi .servizi-item-title div.clearfix {
    background-color: var(--firstcolor);
    background-position: center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    margin-bottom: 0;
    padding: 0;
}

.home section.servizi .servizi-item-title-inner {
    width: 100%;
    padding: 0 24px;
    text-align: center;
}

.home section.servizi .servizi-item-title p {
    margin: 0 0 12px;
}

.home section.servizi .servizi-item-slider {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.home section.servizi .swiper {
    height: auto;
    overflow: hidden;
}

.home section.servizi .swiper-slide {
    margin-right: 0;
    overflow: hidden;
    position: relative;
}

.home section.servizi .swiper-slide::after {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 85%);
    height: 50%;
    position: absolute;
    width: 100%;
    display: block;
    content: '';
    bottom: 0;
    pointer-events: none;
}

.home section.servizi .swiper-slide img {
    height: 400px;
    object-fit: cover;
    width: 100%;
}

.home section.servizi .caption {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 48px;
    right: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 8px;
    text-align: center;
    color: #fff;
    font-size: 18px;
    line-height: 1.3;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* === P1-3: homepage news === */

.home section.news {
    box-sizing: border-box;
    margin-top: 0;
    position: relative;
    width: 100%;
}

.home section.news .news-background {
    background-color: rgba(60, 60, 59, 0.75);
    background-image: url('../img/onde_grigie.webp');
    background-position: 50% 50%;
    background-attachment: scroll;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 40px 133px 50px;
}

.home section.news .news-title {
    padding-bottom: 15px;
}

.home section.news .swiper-slide {
    padding: 0 25px;
}

.home section.news .swiper-slide img {
    height: 150px;
}

.home section.news h4, .home section.news h4 a {
    color: #FFF;
    font-size: 16px;
    margin: 25px 0;
}

.home section.news h4 a:hover {
    color: #D03D36;
    -webkit-transition: color .2s,opacity .2s;
    transition: color .2s,opacity .2s;
    text-decoration: none;
}

.home section.news .swiper-news-text {
    color: #D3D3D3;
    font-family: 'Poppins', 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 22px;
    margin-top: 15px;
    min-height: 88px;
}

.home section.news .swiper {
    padding-bottom: 35px;
}

@media only screen and (max-width: 768px)
{
    /* P1-3 phone: home (sedi, servizi, news, corsi) */
    .slider-home .swiper-slide img {
        height: 280px;
    }

    .slider-home .carousel-caption {
        padding: 0 20px;
    }

    .slider-home h1,
    .slider.slider-home h2 {
        font-size: 1.4rem;
        line-height: 1.3;
        padding: 0;
        margin: 0;
    }

    .subtitle-red:after {
        margin: 15px auto;
    }

    .home section.section-padding {
        padding: 45px 15px 35px!important;
    }

    .home section.first-line-full.section-padding {
        padding: 45px 25px 35px!important;
    }

    .home section.line-full .first-line-full-text.first-line-full-text-left, .home section.line-full .first-line-full-text.first-line-full-text-right {
        padding: 0 15px;
    }

    .home section.line-full .first-line-full-title {
        padding-bottom: 15px;
    }

    .home section.line-full .second-line-full-background {
        background-color: rgba(20, 20, 20, 0.5);
        padding: 150px 35px;
    }

    .line-full .second-line-full {
        min-height: 200px;
        padding: 45px 15px;
    }

    .home section h4 {
        text-align: center;
    }

    .home section.sedi .sede-item {
        margin-bottom: 10px;
        padding-bottom: 25px;
        text-align: center;
    }

    .home.page h3.sede-item-title:after,
    .home.page h4.sede-item-title:after,
    .home.page footer h2:after,
    .home.page footer h3:after,
    .home.page footer h4:after,
    .home.page footer h5:after,
    .home.page footer h6:after {
        margin: 17px auto !important;
    }

    .home section.corsi .corsi-title {
        text-align: center;
    }

    .home.page h4.sede-item-title:after {
        margin: 17px auto!important;
    }

    .home .section-isotope-nav {
        padding-bottom: 35px!important;
    }

    .home section.corsi .section-isotope-nav-buttons {
        padding-top: 25px;
        text-align: start!important;
    }

    .home .section-isotope .btn {
        font-size: 13px;
        padding: 5px 6px!important;
    }

    .home section.corsi h4 {
        text-align: left;
    }

    .home section.corsi .grid-corsi-item, .home section.offerte-lavoro .grid-corsi-item {
        margin-bottom: 20px;
        padding: 0;
    }
}

@media (min-width: 768px) and (max-width: 1279px)
{
    .home section.servizi .servizi-item-title div.clearfix,
    .home section.servizi .swiper-slide img {
        height: 320px;
    }

    .home section.servizi h3 a,
    .home section.servizi h4 a {
        font-size: 1.45rem;
        padding: 0 16px;
        display: inline-block;
    }
}

@media (min-width: 1024px) and (max-width: 1279px)
{
    .home section.sedi.section-padding {
        padding: 75px 35px;
    }
}
