/* Spinner principal */
.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(249, 247, 243, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s, visibility 0.3s;
}

.spinner-container.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Contenedor principal del spinner (todo dentro de la caja blanca) */
.spinner-hebreo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 30px 50px;
    border-radius: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 4px solid var(--terracota);
    gap: 15px;
}

/* Contenedor de las letras hebreas */
.hebrew-letters {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

/* Letras hebreas */
.hebrew-letters span {
    font-family: 'Merriweather', serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--azul-profundo);
    animation: hebrewWave 1.5s ease infinite;
    display: inline-block;
    width: 50px;
    text-align: center;
}

.hebrew-letters span:nth-child(1) { animation-delay: 0s; }
.hebrew-letters span:nth-child(2) { animation-delay: 0.2s; }
.hebrew-letters span:nth-child(3) { animation-delay: 0.4s; }
.hebrew-letters span:nth-child(4) { animation-delay: 0.6s; }
.hebrew-letters span:nth-child(5) { animation-delay: 0.8s; }

@keyframes hebrewWave {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
        color: var(--azul-profundo);
    }
    25% { 
        transform: translateY(-12px) rotate(8deg); 
        color: var(--terracota);
    }
    50% { 
        transform: translateY(0) rotate(0deg); 
        color: var(--azul-profundo);
    }
    75% { 
        transform: translateY(12px) rotate(-8deg); 
        color: var(--terracota);
    }
}

/* Texto de carga - AHORA DENTRO DE LA CAJA BLANCA */
.spinner-text {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--azul-profundo);
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 5px;
    border-top: 1px solid var(--arena-antigua);
    padding-top: 12px;
    width: 100%;
    text-align: center;
}

/* Opcional: Puntitos animados después de "Cargando" */
.spinner-text::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
    display: inline-block;
    width: 24px;
    text-align: left;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}