/* ============================================
   PRELOADER / LOADING SCREEN
   ============================================ */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5e6d3 0%, #d4c4b0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-envelope {
    width: 120px;
    height: 80px;
    position: relative;
    margin: 0 auto 30px;
    animation: float 2s ease-in-out infinite;
}

.preloader-envelope svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.preloader-text {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(24px, 4vw, 36px);
    color: #8b1a1a;
    margin-bottom: 20px;
}

.preloader-progress {
    width: 200px;
    height: 4px;
    background: rgba(139, 26, 26, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.preloader-progress-bar {
    height: 100%;
    background: #8b1a1a;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.preloader-percentage {
    font-family: 'Crimson Text', serif;
    font-size: 14px;
    color: #8b1a1a;
    margin-top: 10px;
    opacity: 0.7;
}

/* Ocultar contenido hasta que cargue */
body.loading .carousel-container,
body.loading .nav-button,
body.loading .letter-counter {
    opacity: 0;
    pointer-events: none;
}
