﻿/* Primo slide CodeEvolution: foto + velo grigio e ombra (lettura, niente tinte colorate) */
.overlay-image.overlay-image--ce-tint {
    background-image:url("/images/slide1.jpg");
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    opacity: 0.5;
}

/* Testi primo slide CodeEvolution: tutti bianchi, dimensioni leggibili */
.ce-slide-kicker {
    letter-spacing: 0.02em;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.carousel-caption-codeevolution .ce-slide-kicker {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.ce-slide-title {
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}

.carousel-caption-codeevolution .ce-slide-title {
    font-size: clamp(1.45rem, 3.8vw, 2.65rem);
    line-height: 1.25;
}

.ce-slide-body {
    color: #ffffff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
}

.carousel-caption-codeevolution .ce-slide-body {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
}

.ce-slide-body--muted {
    color: #ffffff;
}

.carousel-caption-codeevolution .ce-slide-body--muted {
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.carousel-caption-codeevolution .ce-slide-body strong {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

/* CodeEvolution con foto: overlay + immagine (vedi Index.cshtml) */
.overlay-image.overlay-image-codeevolution-photo {
    background-size: cover;
    background-position: center;
    opacity: 0.95;
}

.carousel-caption-codeevolution-photo {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* --- Slide CodeEvolution precedente: solo gradiente in CSS (commentato in Index) --- */
.overlay-image-codeevolution {
    background-image: none;
    opacity: 1;
    background-color: #0f172a;
    background-image: linear-gradient(
        125deg,
        #020617 0%,
        #0f172a 22%,
        #1e3a5f 52%,
        #1d4ed8 82%,
        #38bdf8 100%
    );
}

.carousel-caption-codeevolution {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 1.25rem 1rem;
    pointer-events: none;
}

.carousel-caption-codeevolution .container {
    pointer-events: auto;
    max-width: 1140px;
}

.carousel-caption-codeevolution h2 {
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.45);
}

/* Altezza fissa per il carosello su desktop */
#homeCarousel .carousel-item {
    height: 700px;
    background-color: #000; 
}

/* Gestione immagine come background per mantenere il rapporto d'aspetto */
.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-position: center;
    background-size: cover;
    opacity:0.9; /* Opzionale: scurisce l'immagine per far risaltare il testo */
}

/* Posizionamento scritte */
.carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    width: 100%;
}

.carousel-caption-custom h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 700;
    text-transform: none;
}

.carousel-caption-custom p {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.45;
}

/* Prima sezione servizi sotto il carosello: due colonne, immagine con ombra leggera */
.home-service-spotlight-img {
    max-height: 420px;
    width: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
}

/* Responsive: riduciamo l'altezza sui cellulari */
@media (max-width: 1024px) {
    #homeCarousel .carousel-item {
        height: 400px; /* Riduce l'altezza per schermi piccoli */
    }

    .carousel-caption-custom h1 {
        font-size: clamp(1.65rem, 6vw, 2rem);
    }

    .carousel-caption-custom p {
        font-size: clamp(1rem, 3.5vw, 1.1rem);
    }
}
