/* fixes.css - Correcciones para problemas específicos */

/* ============================================================================
   CORRECCIONES PARA SECCIÓN TIMELINE (MI HISTORIA)
   ============================================================================ */

/* Corregir imágenes desproporcionadas en timeline */
.timeline-image {
    position: relative;
    width: 100%;
    max-width: 1024px !important; /* Ancho máximo fijo de 1024px */
    height: 280px !important; /* Altura fija más pequeña */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    max-width: 1024px !important; /* Ancho máximo fijo de 1024px */
    max-height: 100% !important;
    object-fit: cover !important; /* Asegura que la imagen cubre todo el contenedor */
    object-position: center;
    transition: transform 0.5s ease;
    display: block; /* Elimina espacios en blanco */
}

.timeline-content:hover .timeline-image img {
    transform: scale(1.02); /* Reducir el zoom en hover */
}

/* Asegurar que el contenedor del timeline se ajuste al navegador */
#timeline {
    max-width: 100vw !important;
    overflow-x: hidden;
    padding: 2rem 1rem;
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.timeline-interactive {
    position: relative;
    max-width: 100%;
    overflow-x: hidden;
}

.timeline-item {
    max-width: 100%;
    margin-bottom: 3rem;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
}

/* Limitar el ancho del contenido de texto */
.timeline-text {
    max-width: 100%;
    padding: 1rem;
}

/* Asegurar que las fechas no se desborden */
.timeline-date {
    flex-shrink: 0;
    min-width: 120px;
    max-width: 150px;
}

/* Responsive: Ajustar para pantallas más pequeñas */
@media (max-width: 768px) {
    .timeline-image {
        height: 220px !important;
    }
}

@media (max-width: 480px) {
    .timeline-image {
        height: 180px !important;
    }
}

/* Para pantallas grandes, usar diseño en dos columnas */
@media (min-width: 768px) {
    .timeline-content {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .timeline-image {
        flex: 0 0 45%; /* La imagen ocupa el 45% del ancho */
        max-width: min(45%, 1024px); /* Nunca superar 1024px */
    }
    
    .timeline-text {
        flex: 1; /* El texto ocupa el resto del espacio */
    }
}

/* Para pantallas muy grandes */
@media (min-width: 1200px) {
    .timeline-image {
        flex: 0 0 40%; /* En pantallas grandes, la imagen ocupa el 40% */
        max-width: min(40%, 1024px); /* Nunca superar 1024px */
        height: 320px !important;
    }
    
    /* Asegurar que el contenedor del timeline no supere un ancho razonable */
    .timeline-container {
        max-width: min(1200px, calc(1024px + 400px)); /* Imagen + espacio para texto */
    }
}

/* ============================================================================
   CORRECCIONES PARA SECCIÓN CUENTA ATRÁS
   ============================================================================ */

.countdown-timer-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

/* Mejorar el estilo del contador */
.countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    position: relative;
    z-index: 2;
    max-width: 700px;
    width: 95%;
    margin: 0 auto;
}

.countdown-item {
    background: linear-gradient(135deg, #ffffffcc, #ffffffaa);
    padding: 1.5rem 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid var(--gold-color);
    backdrop-filter: blur(8px);
}

.countdown-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================================
   CORRECCIONES PARA JUEGO DE QUIZ
   ============================================================================ */

/* Estilos específicos que aseguran que el botón "siguiente" funcione */
#next-btn {
    background: linear-gradient(135deg, var(--gold-color), #b08d57);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer !important;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: inline-block;
}

#next-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #d4af37, #c09d6d);
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .quiz-options {
        grid-template-columns: 1fr 1fr;
    }
}

.quiz-btn {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quiz-btn:hover:not(:disabled) {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.quiz-btn:disabled {
    cursor: default;
}
