/* Parallax Block */

.parallax-block {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

/* IMPORTANTE: Sfondo che copre tutto lo spazio + margine per il parallax */
.parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    right: 0;
    bottom: -50%;
    height: 200%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform;
    z-index: 0;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    z-index: 1;
    pointer-events: none;
}

.parallax-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding: 80px 40px;
    text-align: center;
}

.parallax-text {
    color: #ffffff;
}

.parallax-text h1,
.parallax-text h2,
.parallax-text h3,
.parallax-text h4,
.parallax-text h5,
.parallax-text h6 {
    color: #ffffff;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.parallax-text h1 {
    font-size: 3.5em;
    font-weight: 700;
    line-height: 1.2;
}

.parallax-text h2 {
    font-size: 2.8em;
    font-weight: 600;
    line-height: 1.3;
}

.parallax-text h3 {
    font-size: 2.2em;
    font-weight: 600;
}

.parallax-text p {
    color: #ffffff;
    margin-bottom: 1.2em;
    line-height: 1.8;
    font-size: 1.2em;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.parallax-text strong {
    font-weight: 700;
}

.parallax-text em {
    font-style: italic;
}

.parallax-text a {
    color: #ffffff;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.parallax-text a:hover {
    opacity: 0.8;
}

.parallax-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    padding: 40px;
    border-radius: 8px;
    color: #ffffff;
}

.parallax-placeholder p {
    margin: 0;
    font-style: italic;
    font-size: 1.1em;
}

/* Allineamenti */
.alignwide .parallax-content {
    max-width: 1200px;
}

.alignfull .parallax-content {
    max-width: 100%;
    padding-left: 8%;
    padding-right: 8%;
}

/* Responsive */
@media (max-width: 1024px) {
    .parallax-content {
        padding: 60px 30px;
    }
    
    .parallax-text h1 {
        font-size: 2.8em;
    }
    
    .parallax-text h2 {
        font-size: 2.2em;
    }
    
    .parallax-text p {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    /* Su mobile disabilita il parallax e mantieni lo sfondo fisso */
    .parallax-bg {
        position: absolute;
        top: 0;
        bottom: 0;
        transform: none !important;
        background-attachment: scroll;
    }
    
    .parallax-content {
        padding: 50px 25px;
    }
    
    .parallax-text h1 {
        font-size: 2.2em;
    }
    
    .parallax-text h2 {
        font-size: 1.8em;
    }
    
    .parallax-text p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .parallax-content {
        padding: 40px 20px;
    }
    
    .parallax-text h1 {
        font-size: 1.8em;
    }
    
    .parallax-text h2 {
        font-size: 1.5em;
    }
}
