/** ==========================================
/** ESTILOS PARA LA BIOGRAFÍA Y LA CRONOLOGÍA
/** ==========================================

    /* Timeline vertical simple */
.timeline {
    border-left: 3px solid rgba(0, 0, 0, 0.08);
    margin-left: 1rem;
    padding-left: 1.25rem;
}

.timeline-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.timeline-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #8e0225;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(253, 13, 85, 0.12);
    font-size: 0.9rem;
}

.timeline-content h6 {
    margin-bottom: .25rem;
}

.timeline-content p {
    margin-bottom: 0;
}

/** END - ESTILOS PARA LA BIOGRAFÍA Y LA CRONOLOGÍA */

/** =======================
/** ESTILOS PARA LAS CITAS
/** =======================*/

.quote-item {
    transition: transform 0.3s ease;
}

.quote-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/** END - ESTILOS PARA LAS CITAS */


/** ================================
/** ESTILOS PARA LOS DATOS INCIALES
/** ================================*/

.btn-square {
    width: 40px;
    /* ajusta al tamaño que quieras */
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* evita pad horizontal que achata */
    border-radius: 50%;
    /* círculo perfecto */
    flex: 0 0 auto;
    /* no permitir que el flex lo encoja */
    box-sizing: border-box;
}

/** END - ESTILOS PARA LOS DATOS INICIALES */

/** ===================================
/** ESTILOS PARA LA GALERIA - DISEÑO 2
/** ===================================*/
:root {
    --primary-color: #8e0225;
    --secondary-color: #f8f9fa;
    --accent-color: #c8385c;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

.gallery-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../../public/img/parque_principal.webp');
    background-size: cover;
    background-position: center;
    padding: 5rem 0;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
}

.badge-gallery {
    background-color: var(--accent-color);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.gallery-filters {
    margin-bottom: 2rem;
}

.gallery-filter-btn {
    margin: 0 5px 10px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    padding: 5px 20px;
    transition: all 0.3s;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: var(--primary-color);
    color: white;
}


/* Hint al navegador para optimizar transform/scale */
.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Fade-in al cargar la imagen */
.fade-in {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

.gallery-item {
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.25s;
    transform: translateZ(0);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}


.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(165, 58, 72, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
    text-align: center;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: white;
}

.gallery-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    margin-top: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.gallery-btn:hover {
    background: var(--accent-color);
    color: white;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.lightbox-modal .modal-content {
    background: transparent;
    border: none;
}

.lightbox-modal .modal-body {
    padding: 0;
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
}

.lightbox-caption {
    color: white;
    padding: 10px;
    margin-top: 10px;
    font-size: 1.1rem;
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* Optimización para lazy loading */
.gallery-img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-img.loaded {
    opacity: 1;
}

/** END - ESTILOS PARA GALERIA 2 */

/** ===================================
/** ESTILOS PARA LA GALERIA DE VIDEO
/** ===================================*/

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 24px;
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    margin: 0;
    font-size: 16px;
}

/* Título de sección para videos */
.section-title {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
}

.modal-video {
    width: 100%;
    height: auto;
    max-height: 80vh;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*? ================================================*/


/*? ===================
/*? ESTILOS PARA MOVIL
/*? ===================*/

@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 5px;
    }

    .timeline-item .timeline-date {
        left: -30px;
        font-size: 12px;
    }

    .accordion-header {
        border-bottom: #8e0225 2px solid;
    }
}

/* Ajustes para acordeón y lead en pantallas pequeñas */
@media (max-width: 576px) {
    .lead {
        font-size: 0.95rem;
    }

    .timeline {
        margin-left: .2rem;
        padding-left: .7rem;
    }

    .timeline-badge {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: .85rem;
    }
}

@media (max-width: 576px) {
    .btn-square {
        width: 40px;
        height: 40px;
        padding: 0;
        flex: 0 0 auto;
    }

    .d-flex h6.mb-0 {
        /* opcional: ajustar texto para que no empuje */
        font-size: 0.9rem;
    }
}