/*==========================================================
    TRACKING SYSTEM
    tracking.css
    PARTE 1
==========================================================*/


/*==========================================================
    VARIABLES
==========================================================*/

:root{

    --primary:#d71920;
    --secondary:#ffc107;

    --green:#22c55e;

    --blue:#2563eb;

    --gray50:#f8fafc;
    --gray100:#f1f5f9;
    --gray200:#e2e8f0;
    --gray300:#cbd5e1;
    --gray500:#64748b;
    --gray700:#334155;
    --gray900:#0f172a;

    --white:#ffffff;

    --shadow-sm:
        0 4px 10px rgba(0,0,0,.06);

    --shadow:
        0 15px 35px rgba(0,0,0,.08);

    --shadow-lg:
        0 25px 60px rgba(0,0,0,.15);

    --radius:18px;

    --transition:.30s ease;

}



/*==========================================================
    CONTENEDOR RESULTADO
==========================================================*/

.tracking-result{

    width:100%;

    max-width:1100px;

    margin:60px auto;

    animation:fadeUp .6s ease;

}



/*==========================================================
    TARJETA PRINCIPAL
==========================================================*/

.tracking-card{

    background:white;

    border-radius:24px;

    box-shadow:var(--shadow);

    overflow:hidden;

    border:1px solid rgba(0,0,0,.05);

}



/*==========================================================
    CABECERA
==========================================================*/

.tracking-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:40px;

    background:

    linear-gradient(

        135deg,

        var(--primary),

        #ff4444

    );

    color:white;

}



.tracking-header h2{

    font-size:34px;

    font-weight:700;

    margin-top:10px;

    letter-spacing:1px;

}



.tracking-label{

    opacity:.8;

    text-transform:uppercase;

    font-size:13px;

    letter-spacing:2px;

}



/*==========================================================
    BADGE
==========================================================*/

.status-badge{

    display:flex;

    align-items:center;

    gap:10px;

    background:rgba(255,255,255,.15);

    backdrop-filter:blur(10px);

    padding:12px 22px;

    border-radius:50px;

    font-weight:600;

}



.status-dot{

    width:12px;

    height:12px;

    background:#00ff88;

    border-radius:50%;

    animation:pulse 2s infinite;

}



/*==========================================================
    GRID INFORMACIÓN
==========================================================*/

.tracking-grid{

    display:grid;

    grid-template-columns:

        repeat(

            auto-fit,

            minmax(220px,1fr)

        );

    gap:22px;

    padding:35px;

    background:var(--gray50);

}



/*==========================================================
    TARJETAS DE INFORMACIÓN
==========================================================*/

.info-card{

    background:white;

    border-radius:18px;

    padding:22px;

    box-shadow:var(--shadow-sm);

    transition:var(--transition);

    border:1px solid var(--gray200);

}



.info-card:hover{

    transform:translateY(-5px);

    box-shadow:var(--shadow);

}



.info-card span{

    display:block;

    color:var(--gray500);

    font-size:13px;

    text-transform:uppercase;

    letter-spacing:1px;

    margin-bottom:10px;

}



.info-card strong{

    color:var(--gray900);

    font-size:18px;

    font-weight:600;

    line-height:1.5;

}



/*==========================================================
    TÍTULO HISTORIAL
==========================================================*/

.timeline-title{

    font-size:28px;

    font-weight:700;

    color:var(--gray900);

    margin-bottom:40px;

}



/*==========================================================
    ANIMACIÓN ENTRADA
==========================================================*/

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(40px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}



/*==========================================================
    PULSO
==========================================================*/

@keyframes pulse{

    0%{

        transform:scale(1);

        box-shadow:0 0 0 0 rgba(34,197,94,.6);

    }

    70%{

        transform:scale(1.25);

        box-shadow:0 0 0 12px rgba(34,197,94,0);

    }

    100%{

        transform:scale(1);

        box-shadow:0 0 0 0 rgba(34,197,94,0);

    }

}

/*==========================================================
    TIMELINE
==========================================================*/

.timeline{

    position:relative;

    padding:50px;

    background:white;

}



/*==========================================================
    ITEM
==========================================================*/

.timeline-item{

    position:relative;

    display:flex;

    gap:30px;

    align-items:flex-start;

}



/*==========================================================
    LADO IZQUIERDO
==========================================================*/

.timeline-left{

    display:flex;

    flex-direction:column;

    align-items:center;

    flex-shrink:0;

}



/*==========================================================
    CÍRCULO
==========================================================*/

.timeline-circle{

    width:46px;

    height:46px;

    border-radius:50%;

    background:linear-gradient(
        135deg,
        #22c55e,
        #16a34a
    );

    color:white;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:20px;

    font-weight:700;

    box-shadow:
        0 8px 20px rgba(34,197,94,.35);

    z-index:2;

}



/*==========================================================
    LÍNEA VERTICAL
==========================================================*/

.timeline-line{

    width:4px;

    min-height:90px;

    background:linear-gradient(
        to bottom,
        #22c55e,
        #bbf7d0
    );

    border-radius:20px;

    margin-top:8px;

}



/*==========================================================
    TARJETA DEL EVENTO
==========================================================*/

.timeline-right{

    flex:1;

    background:white;

    border-radius:20px;

    padding:24px;

    margin-bottom:35px;

    border:1px solid var(--gray200);

    box-shadow:var(--shadow-sm);

    transition:.35s ease;

    position:relative;

}



/*==========================================================
    EFECTO HOVER
==========================================================*/

.timeline-right:hover{

    transform:translateY(-4px);

    box-shadow:var(--shadow-lg);

}



/*==========================================================
    FLECHA HACIA EL CÍRCULO
==========================================================*/

.timeline-right::before{

    content:"";

    position:absolute;

    left:-10px;

    top:28px;

    width:20px;

    height:20px;

    background:white;

    transform:rotate(45deg);

    border-left:1px solid var(--gray200);

    border-bottom:1px solid var(--gray200);

}



/*==========================================================
    FECHA
==========================================================*/

.timeline-date{

    color:var(--gray500);

    font-size:13px;

    font-weight:500;

    letter-spacing:.5px;

    margin-bottom:10px;

}



/*==========================================================
    ESTADO
==========================================================*/

.timeline-status{

    font-size:22px;

    font-weight:700;

    color:var(--gray900);

    margin-bottom:15px;

}



/*==========================================================
    DESCRIPCIÓN
==========================================================*/

.timeline-description{

    color:var(--gray700);

    line-height:1.8;

    font-size:15px;

}



/*==========================================================
    DESTINO
==========================================================*/

.timeline-destination{

    margin-top:18px;

    display:inline-flex;

    align-items:center;

    gap:8px;

    background:#f8fafc;

    border:1px solid var(--gray200);

    border-radius:30px;

    padding:8px 14px;

    font-size:14px;

    color:var(--gray700);

}



/*==========================================================
    ÚLTIMO MOVIMIENTO
==========================================================*/

.timeline-item:last-child .timeline-right{

    border:2px solid var(--green);

    background:#f0fdf4;

}



/*==========================================================
    ANIMACIÓN
==========================================================*/

.timeline-item{

    animation:slideUp .6s ease both;

}

.timeline-item:nth-child(2){

    animation-delay:.08s;

}

.timeline-item:nth-child(3){

    animation-delay:.16s;

}

.timeline-item:nth-child(4){

    animation-delay:.24s;

}

.timeline-item:nth-child(5){

    animation-delay:.32s;

}

.timeline-item:nth-child(6){

    animation-delay:.40s;

}



/*==========================================================
    KEYFRAMES
==========================================================*/

@keyframes slideUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/*==========================================================
    TIMELINE DETAILS
==========================================================*/

.timeline-status{

    display:flex;

    align-items:center;

    gap:12px;

}

.timeline-status::before{

    content:"✓";

    display:flex;

    justify-content:center;

    align-items:center;

    width:30px;

    height:30px;

    border-radius:50%;

    background:var(--green);

    color:white;

    font-size:14px;

    font-weight:700;

    flex-shrink:0;

}



/*==========================================================
    TARJETA ACTUAL
==========================================================*/

.timeline-item:last-child .timeline-circle{

    width:58px;

    height:58px;

    font-size:24px;

    animation:currentPulse 2s infinite;

}

.timeline-item:last-child .timeline-right{

    box-shadow:

        0 20px 45px rgba(34,197,94,.22);

}

.timeline-item:last-child .timeline-status{

    color:var(--green);

}



/*==========================================================
    CABECERA DEL EVENTO
==========================================================*/

.timeline-right::after{

    content:"";

    position:absolute;

    top:0;

    left:0;

    width:6px;

    height:100%;

    border-radius:20px 0 0 20px;

    background:linear-gradient(

        to bottom,

        var(--green),

        #7ddf8f

    );

}



/*==========================================================
    LOADING
==========================================================*/

.loading-box{

    height:90px;

    border-radius:18px;

    margin-bottom:18px;

    background:

    linear-gradient(

        90deg,

        #f1f5f9 0%,

        #ffffff 50%,

        #f1f5f9 100%

    );

    background-size:300% 100%;

    animation:loading 1.3s infinite;

}



/*==========================================================
    EMPTY
==========================================================*/

.empty-state{

    text-align:center;

    padding:90px 40px;

}

.empty-icon{

    font-size:70px;

    margin-bottom:20px;

}

.empty-state h2{

    font-size:32px;

    margin-bottom:15px;

    color:var(--gray900);

}

.empty-state p{

    color:var(--gray500);

    max-width:550px;

    margin:auto;

    line-height:1.7;

}



/*==========================================================
    ERROR
==========================================================*/

.error-state{

    text-align:center;

    padding:90px 40px;

}

.error-icon{

    font-size:72px;

    margin-bottom:20px;

}

.error-state h2{

    color:#dc2626;

    margin-bottom:15px;

}

.error-state p{

    color:var(--gray500);

    max-width:520px;

    margin:auto;

}



/*==========================================================
    SUCCESS
==========================================================*/

.success-state{

    text-align:center;

    padding:30px;

}

.success-icon{

    font-size:55px;

    margin-bottom:12px;

}



/*==========================================================
    SCROLLBAR
==========================================================*/

.timeline::-webkit-scrollbar{

    width:8px;

}

.timeline::-webkit-scrollbar-thumb{

    background:var(--gray300);

    border-radius:30px;

}

.timeline::-webkit-scrollbar-track{

    background:transparent;

}



/*==========================================================
    ANIMACIONES
==========================================================*/

@keyframes loading{

    from{

        background-position:100% 0;

    }

    to{

        background-position:-100% 0;

    }

}

@keyframes currentPulse{

    0%{

        transform:scale(1);

        box-shadow:0 0 0 0 rgba(34,197,94,.45);

    }

    70%{

        transform:scale(1.08);

        box-shadow:0 0 0 18px rgba(34,197,94,0);

    }

    100%{

        transform:scale(1);

        box-shadow:0 0 0 0 rgba(34,197,94,0);

    }

}



/*==========================================================
    EFECTO DE APARICIÓN
==========================================================*/

.fade-in{

    animation:fadeUp .8s ease;

}

.timeline-item{

    opacity:0;

    animation:showItem .6s forwards;

}

.timeline-item:nth-child(2){animation-delay:.1s;}
.timeline-item:nth-child(3){animation-delay:.2s;}
.timeline-item:nth-child(4){animation-delay:.3s;}
.timeline-item:nth-child(5){animation-delay:.4s;}
.timeline-item:nth-child(6){animation-delay:.5s;}
.timeline-item:nth-child(7){animation-delay:.6s;}
.timeline-item:nth-child(8){animation-delay:.7s;}
.timeline-item:nth-child(9){animation-delay:.8s;}
.timeline-item:nth-child(10){animation-delay:.9s;}

@keyframes showItem{

    from{

        opacity:0;

        transform:translateY(35px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/*==========================================================
    PREMIUM UI
==========================================================*/

/*------------------------------------
    Fondo del timeline
------------------------------------*/

.timeline{

    position:relative;

    overflow:hidden;

}

.timeline::before{

    content:"";

    position:absolute;

    inset:0;

    background:

        radial-gradient(circle at top right,

        rgba(255,193,7,.08),

        transparent 40%),

        radial-gradient(circle at bottom left,

        rgba(215,25,32,.05),

        transparent 45%);

    pointer-events:none;

}



/*------------------------------------
    Glass Effect
------------------------------------*/

.timeline-right{

    backdrop-filter:blur(10px);

    -webkit-backdrop-filter:blur(10px);

}


/*------------------------------------
    Hover elegante
------------------------------------*/

.timeline-right{

    transition:

        transform .35s,

        box-shadow .35s,

        border-color .35s;

}

.timeline-right:hover{

    border-color:rgba(34,197,94,.4);

}



/*------------------------------------
    Badge Destino
------------------------------------*/

.timeline-destination{

    transition:.30s;

}

.timeline-destination:hover{

    background:#22c55e;

    color:white;

    border-color:#22c55e;

}



/*------------------------------------
    Fecha
------------------------------------*/

.timeline-date{

    display:inline-block;

    background:#f8fafc;

    padding:6px 12px;

    border-radius:30px;

    border:1px solid #e2e8f0;

}



/*------------------------------------
    Título
------------------------------------*/

.timeline-status{

    letter-spacing:.3px;

}



/*------------------------------------
    Descripción
------------------------------------*/

.timeline-description{

    margin-top:10px;

}



/*------------------------------------
    Línea más elegante
------------------------------------*/

.timeline-line{

    opacity:.9;

}



/*------------------------------------
    Scroll suave
------------------------------------*/

html{

    scroll-behavior:smooth;

}



/*------------------------------------
    Selección
------------------------------------*/

::selection{

    background:#d71920;

    color:white;

}



/*------------------------------------
    Focus
------------------------------------*/

button:focus,

input:focus{

    outline:none;

}



/*------------------------------------
    Sombras suaves
------------------------------------*/

.info-card,

.timeline-right{

    will-change:transform;

}



/*------------------------------------
    Fade del Header
------------------------------------*/

.tracking-header{

    position:relative;

    overflow:hidden;

}

.tracking-header::before{

    content:"";

    position:absolute;

    width:450px;

    height:450px;

    background:

        radial-gradient(

            rgba(255,255,255,.18),

            transparent 70%

        );

    top:-250px;

    right:-120px;

}



/*------------------------------------
    Línea decorativa
------------------------------------*/

.timeline-title{

    position:relative;

    display:inline-block;

}

.timeline-title::after{

    content:"";

    position:absolute;

    left:0;

    bottom:-12px;

    width:80px;

    height:5px;

    border-radius:20px;

    background:linear-gradient(

        90deg,

        var(--primary),

        var(--secondary)

    );

}



/*------------------------------------
    Animación Hover círculo
------------------------------------*/

.timeline-circle{

    transition:.30s;

}

.timeline-item:hover .timeline-circle{

    transform:scale(1.15);

}



/*------------------------------------
    Tarjetas
------------------------------------*/

.info-card{

    position:relative;

    overflow:hidden;

}

.info-card::before{

    content:"";

    position:absolute;

    top:0;

    left:0;

    width:5px;

    height:100%;

    background:linear-gradient(

        var(--primary),

        var(--secondary)

    );

}



/*------------------------------------
    Footer Timeline
------------------------------------*/

.timeline::after{

    content:"Fin del historial";

    display:block;

    text-align:center;

    margin-top:50px;

    color:#94a3b8;

    font-size:13px;

    letter-spacing:2px;

    text-transform:uppercase;

}

/*==========================================================
    TRACKING.CSS
    PARTE 5
    Responsive + Final Polish
==========================================================*/


/*==========================================================
    TRANSICIONES GLOBALES
==========================================================*/

*{

    transition:

        background-color .30s ease,

        color .30s ease,

        border-color .30s ease,

        box-shadow .30s ease,

        transform .30s ease;

}



/*==========================================================
    IMÁGENES
==========================================================*/

img{

    max-width:100%;

    display:block;

}



/*==========================================================
    LINKS
==========================================================*/

a{

    text-decoration:none;

    color:inherit;

}



/*==========================================================
    BOTONES
==========================================================*/

button{

    cursor:pointer;

    border:none;

    font-family:inherit;

}



/*==========================================================
    INPUTS
==========================================================*/

input{

    font-family:inherit;

}



/*==========================================================
    SELECCIÓN
==========================================================*/

::selection{

    background:var(--primary);

    color:#fff;

}



/*==========================================================
    TABLETS
==========================================================*/

@media (max-width:992px){

    .tracking-card{

        border-radius:18px;

    }

    .tracking-header{

        padding:30px;

    }

    .tracking-header h2{

        font-size:28px;

    }

    .tracking-grid{

        grid-template-columns:

            repeat(2,1fr);

    }

    .timeline{

        padding:35px;

    }

}



/*==========================================================
    CELULARES
==========================================================*/

@media (max-width:768px){

    .tracking-header{

        flex-direction:column;

        align-items:flex-start;

        gap:20px;

    }

    .tracking-grid{

        grid-template-columns:1fr;

    }

    .timeline{

        padding:25px;

    }

    .timeline-item{

        gap:18px;

    }

    .timeline-circle{

        width:40px;

        height:40px;

        font-size:16px;

    }

    .timeline-line{

        min-height:70px;

    }

    .timeline-status{

        font-size:18px;

    }

    .timeline-right{

        padding:18px;

    }

}



/*==========================================================
    CELULARES PEQUEÑOS
==========================================================*/

@media (max-width:480px){

    .tracking-header{

        padding:22px;

    }

    .tracking-header h2{

        font-size:22px;

    }

    .tracking-label{

        font-size:11px;

    }

    .status-badge{

        width:100%;

        justify-content:center;

    }

    .tracking-grid{

        padding:20px;

    }

    .info-card{

        padding:18px;

    }

    .timeline{

        padding:18px;

    }

    .timeline-title{

        font-size:22px;

    }

    .timeline-right{

        padding:16px;

    }

    .timeline-date{

        font-size:12px;

    }

    .timeline-status{

        font-size:16px;

    }

    .timeline-description{

        font-size:14px;

    }

}



/*==========================================================
    SCROLL SUAVE
==========================================================*/

html{

    scroll-behavior:smooth;

}



/*==========================================================
    PERFORMANCE
==========================================================*/

.timeline-item,

.info-card,

.tracking-card{

    will-change:transform;

}



/*==========================================================
    PRINT
==========================================================*/

@media print{

    body{

        background:white;

    }

    .background,

    header,

    footer,

    .search,

    button{

        display:none !important;

    }

    .tracking-card{

        box-shadow:none;

        border:1px solid #ddd;

    }

}

/*==========================================================
    BADGE ESTADO ACTUAL
==========================================================*/

.timeline-item:last-child .timeline-right{

    position:relative;

    padding-top:60px;

}



/*==========================================================
    FIN DEL ARCHIVO
==========================================================*/