/* ============================================================
   1. ESTRUCTURA PRINCIPAL Y CONTENEDOR
   ============================================================ */
.linea-tiempo-hexa {
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background-color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* FONDOS DINÁMICOS */
.hexa-background-container {
    position: absolute !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
}

.hexa-bg-layer {
    position: absolute !important;
    inset: 0 !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    transition: opacity 1.2s ease-in-out !important;
    z-index: 2;
}

.hexa-bg-layer.active {
    opacity: 1 !important;
    z-index: 3;
}

.hexa-bg-overlay {
    pointer-events: none;
    z-index: 1;
}

/* CONTENEDOR INFERIOR CENTRADO QUE AGRUPA REGLA Y FLECHAS */
.hexa-rule-wrapper {
    position: relative !important;
    z-index: 30 !important;
    width: 100% !important;
    max-width: 600px !important; /* Limita el ancho horizontal de los círculos */
    margin: 0 auto 15px auto !important; /* Centra horizontalmente todo el bloque */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}

/* FLECHAS DE NAVEGACIÓN */
.hexa-nav-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    flex-shrink: 0 !important;
    z-index: 31 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 16px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.3s ease, transform 0.2s ease !important;
    backdrop-filter: blur(4px);
}

.hexa-nav-btn:hover {
    background: rgba(34, 113, 177, 0.9) !important;
    transform: scale(1.1) !important;
}

/* ============================================================
   2. EL WRAPPER (EL ÁREA DE ARRASTRE DE FICHAS)
   ============================================================ */
.hexa-events-wrapper {
    position: relative !important;
    z-index: 10 !important;
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 25% !important;
    overflow-x: auto !important;
    cursor: grab !important;
    user-select: none !important;
    gap: 40px;
    scrollbar-width: none;
}

.hexa-events-wrapper::-webkit-scrollbar {
    display: none;
}

.hexa-events-wrapper.dragging {
    cursor: grabbing !important;
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
}

.hexa-events-wrapper:not(.dragging) {
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
}

/* ============================================================
   3. LA FICHA (CARD)
   ============================================================ */
.linea-tiempo-hexa .hexa-card {
    position: relative !important;
    flex-shrink: 0 !important;
    display: flex !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.3) !important;
    overflow: hidden !important;
    opacity: 0.3;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
    align-items: stretch !important;
    scroll-snap-align: center !important;
}

.linea-tiempo-hexa .hexa-card.active {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.hexa-layout-img-top .hexa-card { flex-direction: column !important; }
.hexa-layout-img-left .hexa-card { flex-direction: row !important; }
.hexa-layout-img-right .hexa-card { flex-direction: row-reverse !important; }

.hexa-img-container {
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.hexa-card-img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* ============================================================
   4. TEXTOS Y CATEGORÍA
   ============================================================ */
.hexa-card-body {
    flex-grow: 1 !important;
    padding: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.hexa-card-category {
    display: table !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    margin-bottom: 12px !important;
}

/* ============================================================
   5. REGLA INFERIOR DE CÍRCULOS
   ============================================================ */
.hexa-timeline-rule {
    position: relative !important;
    z-index: 20 !important;
    height: 55px !important;
    flex-grow: 1 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    border-radius: 28px !important;
    backdrop-filter: blur(8px);
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0 10px !important;
    gap: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-behavior: smooth !important;
}

.hexa-timeline-rule::-webkit-scrollbar {
    display: none !important;
}

.hexa-step {
    cursor: pointer !important;
    opacity: 0.4;
    transition: all 0.3s ease !important;
    text-align: center !important;
    color: #fff !important;
    flex: 0 0 10% !important;
    min-width: 10% !important;
    max-width: 10% !important;
    box-sizing: border-box !important;
    padding: 0 2px !important;
}

.hexa-step.active {
    opacity: 1 !important;
}

.hexa-step .step-label {
    display: block !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hexa-step .dot {
    display: block !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    margin: 4px auto 0 !important;
    background: #333 !important;
}

.hexa-step.is-main .dot { width: 12px; height: 12px; }
.hexa-step.is-sub .dot { width: 8px; height: 8px; }

.hexa-step.active .dot {
    background: #2271b1 !important;
    transform: scale(1.3) !important;
}

/* ============================================================
   6. RESPONSIVE (MOBILE)
   ============================================================ */
@media screen and (max-width: 768px) {
    .hexa-rule-wrapper {
        max-width: 95% !important;
    }
    .linea-tiempo-hexa {
        min-height: 100vh !important;
        height: auto !important;
    }
    .linea-tiempo-hexa .hexa-events-wrapper { 
        padding-left: calc(50vw - 130px) !important;
        padding-right: calc(50vw - 130px) !important;
        gap: 15px !important;
    }
    .hexa-step {
        flex: 0 0 22% !important;
        min-width: 22% !important;
        max-width: 22% !important;
    }
    .hexa-step .step-label {
        font-size: 10px !important;
    }
    .linea-tiempo-hexa .hexa-card { 
        flex-direction: column !important;
        width: 260px !important;
        max-width: 260px !important;
        border-radius: 8px !important;
    }
    .linea-tiempo-hexa .hexa-img-container { 
        width: 100% !important;
        height: 100px !important; 
    }
    .linea-tiempo-hexa .hexa-card-body {
        padding: 10px 12px !important; 
    }
    .linea-tiempo-hexa .hexa-card-title {
        font-size: 14px !important;
        margin: 2px 0 4px 0 !important;
    }
    .linea-tiempo-hexa .hexa-card-desc {
        font-size: 12px !important;
        line-height: 1.25 !important;
    }
}

/* ============================================================
   7. LIGHTBOX / MODAL DE FOTO EN GRANDE
   ============================================================ */
.hexa-lightbox-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(5px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease !important;
}

.hexa-lightbox-modal.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.hexa-lightbox-content {
    position: relative !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hexa-lightbox-img {
    max-width: 90vw !important;
    max-height: 85vh !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
}

.hexa-lightbox-close {
    position: absolute !important;
    top: -40px !important;
    right: 0 !important;
    color: #fff !important;
    font-size: 35px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    line-height: 1 !important;
    user-select: none !important;
    transition: transform 0.2s ease !important;
}

.hexa-lightbox-close:hover {
    transform: scale(1.2) !important;
}

.hexa-card .hexa-img-container {
    cursor: pointer !important;
}