@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

/* Reset básico */
* {
    box-sizing: border-box;
}

/* CSS variables */
:root {
    --verde-claro: #99BB43;
    --blanco: #FFFFFF;
    --dorado: #D7AE47;
    --verde-obscuro: #013F14;
}

.bckDorado {
    background-color: var(--dorado) !important;
}

.bckVerdeObscuro {
    background-color: var(--verde-obscuro) !important;
}

.bckVerdeClaro {
    background-color: var(--verde-claro) !important;
}

.colorBlanco {
    color: var(--blanco) !important;
}

.colorDorado {
    color: var(--dorado) !important;
}

.colorVerdeObscuro {
    color: var(--verde-obscuro) !important;
}

.colorVerdeClaro {
    color: var(--verde-claro) !important;
}

html,
body {
    height: 100%;
    margin: 0;
}

.site-header {
    padding: 24px;
    background: #0d47a1;
    color: #fff;
}

.site-header p {
    margin: 6px 0 0 0;
    opacity: 0.9
}

.timeline-viewport {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
    /* ocultar overflow horizontal */
    display: flex;
    align-items: center;
}

.timeline-viewport .linea {
    position: fixed;
    top: 202px;
    left: 0;
    right: 0;
    height: 2px;
    background: #999696;
    pointer-events: none;
    z-index: -1;
}

.timeline {
    display: flex;
    align-items: stretch;
    /* transforms are driven by GSAP/ScrollTrigger; avoid CSS transition to prevent
       conflicting animations on load */
    will-change: transform;
    /* reduce horizontal padding so the first item sits flush with the viewport */
    padding: 40px 0;
    height: 350px;
    /* Use Montserrat for general text, but large stroked dates use a system font to avoid rendering artifacts */
    font-family: 'Montserrat', Roboto, Arial, sans-serif;
    font-weight: 400;
}

.timeline-item {
    margin-right: 24px;
    border-radius: 8px;
    padding: 18px;
    opacity: 0;
    transform: translateY(20px) scale(0.995);
    /* transitions for entrance animations are handled by GSAP; disable CSS transitions to avoid conflicts */
    position: relative;
    display: flex;
    flex-direction: row;
}

/* ensure the very first item is not offset by any implicit margin */
.timeline .timeline-item:first-child {
    margin-left: 0;
}

.timeline-item .page-fitodev {
    padding: 12px 16px;
    position: relative;
}

.timeline-item .page-fitodev.pagerow-fitodev {
    display: flex;
    flex-direction: row;
}

.timeline-item .pin-fitodev {
    position: relative;
    /* anchor for the pin pseudo-element */
    border-left: var(--verde-claro) 2px solid;
    margin-left: 20px;
    align-self: self-start;
    height: 50%;
}

.timeline-item .page-fitodev .title-fitodev {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 5px;
    background-color: var(--verde-claro);
    text-transform: uppercase;
    letter-spacing: 7px;
    color: var(--blanco);
    display: inline-block;
    /* don't stretch to parent width */
    width: auto;
    flex: 0 0 auto;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.5);
}

.timeline-item .page-fitodev .descripcion-fitodev {
    font-size: 12px;
    min-width: 250px;
}

.timeline-item .page-fitodev ul {
    font-size: 12px;
    margin: 0;
    /* remove default ul margin which can show a hanging marker */
    padding-left: 0;
    /* remove default left padding that shows bullets in some browsers */
    list-style: none;
    /* ensure no list-style marker */
}

.timeline-item .page-fitodev li {
    font-size: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline-item .page-fitodev .descripcion li::marker {
    /* modern browsers: explicitly hide the marker pseudo-element */
    content: none;
}

.timeline-item .pin-fitodev::before {
    content: "";
    position: absolute;
    top: 0;
    left: -1px;
    /* move the center of the circle to the left edge (border) and top edge */
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--verde-claro);
    z-index: 12;
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), box-shadow 180ms, background-color 180ms;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Enlarged / highlighted state when linea intersects a pin */
.pin-fitodev.hit::before,
.timeline-item .pin-fitodev.hit::before {
    transform: translate(-50%, -50%) scale(1.8);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    background: linear-gradient(90deg, #ffd66b, #7dd3c9);
}

.contIMG {
    position: relative;
    /* ensure a fixed-sized frame for images so object-fit can work reliably */
    width: 260px;
    height: 160px;
    border-radius: 25px;
}

.contFecha {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* prevent children (title/time) from stretching to container width */
    width: auto;
}

.contIMG img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fill the container while preserving aspect ratio; crops when needed */
    object-position: center center;
    /* center the focal point */
    border-radius: 25px;
    /* subtle drop shadow to lift the image above the background/fondo */
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.684), 0 4px 10px rgba(17, 24, 39, 0.06);
    will-change: box-shadow, transform;
}

.contIMGbotes {
    position: absolute;
    top: 100px;
    left: -90px;
    /* ensure a fixed-sized frame for images so object-fit can work reliably */
    width: 200px;
    height: 150px;
    border-radius: 25px;
}

.contIMGbotes img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* fill the container while preserving aspect ratio; crops when needed */
    object-position: center center;
    /* center the focal point */
    will-change: box-shadow, transform;
}

.contIMGmapa {
    position: absolute;
    bottom: 0px;
    right: -90px;
    /* ensure a fixed-sized frame for images so object-fit can work reliably */
    width: 240px;
    height: 180px;
    border-radius: 25px;
}

.contIMGmapa img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* fill the container while preserving aspect ratio; crops when needed */
    object-position: center center;
    /* center the focal point */
    will-change: box-shadow, transform;
}

.contEMP {
    position: relative;
    /* ensure a fixed-sized frame for images so object-fit can work reliably */
    width: 400px;
    height: 180px;
    margin-left: -70px;
}

.contEMP img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* fill the container while preserving aspect ratio; crops when needed */
    object-position: center center;
    /* center the focal point */
    will-change: box-shadow, transform;
}

.contISO {
    position: absolute;
    bottom: 0px;
    left: 0px;
    display: flex;
    flex-direction: row;
    height: 100px;
    gap: 0px;
    justify-content: flex-end;
}

.capsula {
    position: absolute;
    bottom: -30px;
    right: 0px;
    padding: 10px 15px;
    font-size: 14px;
    color: var(--blanco);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.684), 0 4px 10px rgba(17, 24, 39, 0.06);
    border-radius: 50px;
}

.contIMG .fondo {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    width: 100%;
    height: 100%;
    border-radius: 25px;
    z-index: -1;
    top: 10px;
    left: 15px;
    width: 260px;
    height: 160px;
}

.timeline-item--title {
    width: 320px;
    /* ancho base por item; JS puede recalcular si cambias el markup */
    flex: 0 0 320px;
    padding: 8px;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.timeline-item--title img {
    max-width: 280px;
    max-height: 150px;
    height: auto;
    display: block;
    border-radius: 6px
}

/* Progress line */
.timeline-progress {
    position: absolute;
    height: 2px;
    background: #999696;
    left: 0;
    /* positioned by JS */
    top: 20px;
    /* fallback */
    width: 0%;
    transform-origin: left center;
    /* progress is updated via JS (GSAP); avoid CSS transition */
    pointer-events: none;
}

.timeline-item .time-fitodev {
    display: block;
    color: #D8D8D8;
    /* fallback color */
    font-size: 72px;
    /* Use a robust system sans for stroked outline to avoid glyph artefacts */
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    /* Make fill transparent and rely on stroke for the visible effect */
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-color: #D8D8D8;
    /* Slightly smaller stroke to reduce sharp vertices */
    -webkit-text-stroke-width: 2px;
    /* Rendering hints to improve stroke appearance */
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    transform: translateZ(0);
    line-height: 70px;
    padding: 0px;
}

.timeline-item .time2-fitodev {
    display: block;
    color: var(--verde-claro);
    margin-bottom: 8px;
    font-size: 24px;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
}

.timeline-item p {
    margin: 0;
    color: #444
}

/* Clase que activa la animación cuando entra en viewport */
.timeline-item.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.page-filler {
    padding: 28px
}

/* fitodev utility classes migrated from inline styles in index.html */
.fitodev-contFecha-top-15 {
    top: 15px;
}

.fitodev-contFecha-top-20 {
    top: 20px;
}

.fitodev-contFecha-top-30 {
    top: 30px;
}

.fitodev-contFecha-top-40 {
    top: 40px;
}

.fitodev-contFecha-top-80 {
    top: 80px;
}

.fitodev-contFecha-top-150 {
    top: 150px;
}

.fitodev-contFecha-right-15 {
    right: -15px;
}

.fitodev-contFecha-right-50 {
    right: -50px;
}

.fitodev-contFecha-right-0 {
    right: 0px;
}

.fitodev-contFecha-left-50 {
    left: -50px;
}

.fitodev-align-self-end {
    align-self: flex-end !important;
}

.fitodev-align-self-start {
    align-self: flex-start !important;
}

.fitodev-pr-100 {
    padding-right: 100px !important;
}

.fitodev-mr-30 {
    margin-right: 30px !important;
}

.fitodev-contIMG-width-220 {
    width: 220px !important;
    text-align: right !important;
}

.fitodev-contIMG-width-280 {
    width: 280px !important;
}

.fitodev-contIMG-width-160 {
    width: 160px !important;
    margin-right: 10px !important;
}

.fitodev-contIMG-width-250 {
    width: 250px !important;
}

.fitodev-fondo-width-150 {
    width: 150px !important;
    margin: auto !important;
    left: auto !important;
    right: 0px !important;
}

.fitodev-fondo-width-280 {
    width: 280px !important;
}

.fitodev-img-object-contain {
    object-fit: contain !important;
    width: auto !important;
    margin: auto !important;
}

.fitodev-time-margin-top-25 {
    margin-top: 25px !important;
}

/* additional utilities added during namespacing cleanup */
.fitodev-border-bottom-right-radius-80 {
    border-bottom-right-radius: 80px !important;
}

.fitodev-w-400 {
    width: 400px !important;
}

.fitodev-abs-center {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* text alignment utilities */
.fitodev-text-align-right {
    text-align: right !important;
}

/* left/right offset for contFecha negative values */
.fitodev-contFecha-right-50 {
    right: 50px;
}

.site-footer {
    padding: 18px;
    text-align: center;
    color: #666
}

@media (max-width:720px) {
    .timeline-item {
        width: 100vw;
        flex: 0 0 100vw;
        flex-direction: column;
        align-items: center;
    }

    .timeline-item .page-fitodev {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 12px;
        width: 100%;
    }

    .timeline-item .pin-fitodev {
        position: absolute;
        top: 0px;
        left: 0px;
        border-left: var(--verde-claro) 2px solid;
        margin-left: 0px;
        align-self: self-start;
        height: 50%;
    }

    .timeline-viewport .linea {
        top: 0px;
    }

    .fitodev-pr-100 {
        padding-right: 0px !important;
    }

    .contIMG .fondo {
        width: 100%;
    }

    .contIMGbotes {
        top: -30px;
        left: auto;
        right: -50px;
    }

    .fitodev-time-margin-top-25 {
        margin-top: 0px !important;
    }

    .contIMGmapa {
        bottom: -30px;
        right: -65px;
    }

    .fitodev-w-400 {
        width: 300px !important;
        margin-top: 20px !important;
    }
}

/*@media (max-width:480px) {
    .timeline-viewport {
        height: 50vh
    }

    .timeline-item {
        width: 100vw;
        flex: 0 0 100vw;
        flex-direction: column;
        align-items: center;
    }

    .timeline-item .page-fitodev {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 10px;
        width: 100%;
    }
}*/

/* Small fixed progress UI (percentage + tiny bar) */
.progress {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10001;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
    font-weight: 700;
    color: #1F2937;
    font-size: 13px;
    pointer-events: none;
}

.progress__bar {
    width: 88px;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    overflow: hidden;
}

.progress__fill {
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, #ffd66b, #7dd3c9);
}

.progress__label {
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}