@font-face {
    font-family: 'Caviar';
    src: url('../assets/CaviarDreams.ttf') format('truetype');
}
@font-face {
    font-family: 'Caviar2';
    src: url('../assets/CaviarDreams_Bold.ttf') format('truetype');
}


#sfondoprimapagina {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

#sfondoprimapagina::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../assets/FotoPrimaPagina.jpg);
    background-size: cover;
    filter: brightness(45%);
    z-index: 0;
}

#sfondoprimapagina > * {
    position: relative;
    z-index: 1;
}

#text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
}

#testoanimato {
    font-family: 'Caviar2', sans-serif;
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: bold;
    color: #FFFFFFCC;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    margin: 0;
    text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.7);
    animation: pulse 2s infinite;
}

#testoanimato2 {
    font-family: 'Caviar2', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: bold;
    color: #FFFFFFCC;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    margin: 0;
    text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.7);
}

#testoanimato3 {
    font-family: 'Caviar', sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.4rem);
    font-weight: 400;
    color: rgba(255,255,255,0.82);
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    margin: 0.6rem 0 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.02em;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 6px 6px 20px rgba(0, 0, 0, 0.8);
    }
    100% {
        transform: scale(1);
        text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 768px) {
    #sfondoprimapagina::before {
        background-position: 65% center; 
        background-image: url(../assets/fotoprimapaginatelefono.jpg);
        background-size: cover;
        filter: brightness(40%);
    }
    #testoanimato,
    #testoanimato2,
    #testoanimato3 {
        white-space: normal;
    }
    #testoanimato3 {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }
}