/* Glassmorphism background per slider */
.swiper-slide-caption .container {
    position: relative;
}

/* Stili per i blocchi blog cliccabili */
.post-link-wrapper {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.post-link-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
    color: inherit !important;
}

.post-link-wrapper:hover .post-classic-title {
    transition: color 0.3s ease;
}

.post-link-wrapper:hover .post-classic-figure img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Wrapper per il contenuto con background */
.swiper-slide-caption .container > * {
    position: relative;
    z-index: 2;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

/* Ombra del testo per migliorare leggibilità */
.swiper-slide-caption h2,
.swiper-slide-caption h1,
.swiper-slide-caption h6,
.swiper-slide-caption .title,
.swiper-slide-caption .sub-title {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4),
    0 0 4px rgba(0, 0, 0, 0.3);
}


/* Animazione del background quando il testo entra */
.swiper-slide.swiper-slide-active .swiper-slide-caption .container > * {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.6s;
}

/* Layout flexbox per il primo slide */
.first-slide-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 998px!important;
    margin: 0 auto;
    padding: 0 0 0 2.5rem!important;

}

.first-slide-content .slide-text {
    flex: 1;
    text-align: left;
}

.first-slide-content .slide-image {
    flex: 0 0 auto;
}

.first-slide-content .slide-image .app-image {
    max-width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .first-slide-content .swiper-slide-caption .container > * {
        padding: 20px 25px;
    }

    .first-slide-content  {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 0!important;
        padding-top: 1.25rem!important;
        padding-left: 1.25rem!important;
        padding-right: 1.25rem!important;
    }

    .first-slide-content .slide-text {
        text-align: center;
    }

    .first-slide-content .slide-image {
        order: 2;
    }
}


/* Testo responsive per gli heading del swiper */
.swiper-slide-caption h1,
.swiper-slide-caption h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    line-height: 1.2 !important;
    letter-spacing: 0.05em !important;
    word-wrap: break-word;
    hyphens: auto;
}

.swiper-slide-caption h6 {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem) !important;
    line-height: 1.4 !important;
}

/* Versione specifica per heading-2 se necessario */
.heading-2 {
    font-size: clamp(1.8rem, 5vw, 3rem) !important;
    line-height: 1.1 !important;
    letter-spacing: 0.05em !important;
}

/* Versione avanzata con container query (per browser moderni) */
@supports (container-type: inline-size) {
    .swiper-slide-caption {
        container-type: inline-size;
    }

    @container (max-width: 400px) {
        .swiper-slide-caption h1,
        .swiper-slide-caption h2 {
            font-size: clamp(1.2rem, 8cqw, 1.8rem) !important;
        }
    }

    @container (min-width: 401px) and (max-width: 768px) {
        .swiper-slide-caption h1,
        .swiper-slide-caption h2 {
            font-size: clamp(1.5rem, 6cqw, 2.2rem) !important;
        }
    }
}

/* Fallback per browser che non supportano container queries */
@media (max-width: 400px) {
    .swiper-slide-caption h1,
    .swiper-slide-caption h2 {
        font-size: clamp(1.2rem, 6vw, 1.8rem) !important;
    }
}
