/* ========================================
   PANTALLA DE CARGA
   ======================================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e8eef5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
}

.loading-screen.fade-out {
    animation: fadeOutScreen 0.8s ease-in-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeOutScreen {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* ========================================
   CONTENEDOR DEL LOGO
   ======================================== */

.logo-container {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Logo principal */
.main-logo-wrapper {
    position: relative;
    height: 260px;
    width: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1px;
    opacity: 0;
    animation: logoFadeIn 0.6s ease-in-out forwards;
}

.main-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(255, 107, 71, 0.3));
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   ANIMACIÓN DE IMÁGENES
   ======================================== */

.images-animation-wrapper {
    position: relative;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.images-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 900px;
    position: relative;
    align-items: flex-start;
}

/* Estilos para cada imagen de letra */
.letter-image {
    width: auto;
    height: 69px;
    opacity: 0;
    position: relative;
    will-change: transform, opacity;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.letter-image:hover {
    transform: translateY(-5px);
}

/* Animación de entrada de imágenes */
@keyframes imageAppear {
    0% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.2) rotate(var(--rotation));
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

.letter-image.animate {
    animation: imageAppear var(--duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--delay);
}
@media (max-width: 768px) {

    .images-container {
        display: inline-flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 0;
        white-space: nowrap;
    }

    .letter-image {
        width: calc(100vw / 11); /* 10 letras + un pequeño margen */
        width: auto;
        height: 40px;
    }
}