/* Fondo general */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%; /* Asegura que cubra toda la altura de la pantalla */
    font-family: Belleza, sans-serif;
    text-transform: uppercase;
}

/* Fondo estático que siempre cubre toda la pantalla */
body::before {
    content: ''; /* Pseudo-elemento para el fondo */
    position: fixed; /* Fija el fondo */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/fondo_pc.png'); /* Imagen de fondo para PC */
    background-size: cover; /* La imagen cubre toda la pantalla */
    background-position: center; /* Centra la imagen */
    background-repeat: no-repeat; /* Evita que se repita */
    z-index: -1; /* Envía el fondo detrás del contenido */
}

/* Fondo específico para móviles */
@media (max-width: 767px) {
    body {
        overflow: hidden; /* Elimina el scroll en móvil */
    }

    body::before {
        background-image: url('../images/fondo_movil.png'); /* Imagen de fondo para móvil */
    }
}

/* Título principal */
.titulo-principal {
    font-family: Belleza, sans-serif;
    text-align: center;
    font-size: 24px;
    color: #4e3524;
}

@media (max-width: 768px) {
    .titulo-principal {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .titulo-principal {
        font-size: 1.2em;
    }
}

/* Contenedor del calendario */
.calendar {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Cuatro columnas */
    gap: 15px; /* Espaciado entre las puertas */
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Puertas */
.door {
    width: 100%;
    padding-top: 100%; /* Mantiene proporción cuadrada */
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transform-origin: left center;
    transition: transform 0.6s ease-in-out;
    perspective: 1000px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); /* Sombra para destacar las puertas */
}

/* Efecto hover para puertas activas */
.door:hover:not(.past):not(.open) {
    transform: scale(1.02);
}

/* Puerta abierta */
.door.open {
    transform: rotateY(-80deg);
}

/* Días pasados: capa sutil */
.door.past::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Cursor consistente */
.door.past {
    cursor: pointer;
}

/* Puertas futuras (sin efecto visual) */
.door.future {
    opacity: 1;
    filter: none;
}

/* Loading oculto */
.ocultocargando {
    display: none!important; /* Cambiado de hidden */
}

/* Contenedor de loading */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: #fff;
    font-family: 'Belleza', sans-serif;
    font-size: 1.2em;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Animación del spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Fondo oscuro semitransparente */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Negro semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Asegúrate de que esté por encima del calendario */
    color: #ffffff;
    font-family: 'Belleza', sans-serif; /* Usa la tipografía que prefieras */
    font-size: 2em;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Asegurar que el calendario sea visible detrás */
.calendar {
    filter: blur(2px); /* Opcional: Difumina el calendario */
}
