/* Itinerary Timeline Pro - Version 5.2 - SCROLLING SUAVE Y CARRUSEL COMPACTO */

.itinerary-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, rgba(56, 83, 110, 0.02), rgba(143, 188, 143, 0.02));
    border-radius: 12px;
    padding: 20px;
}

.itinerary-title {
    font-size: 24px;
    font-weight: bold;
    color: #38536E;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ====
   MOBILE (DEFAULT) - LAYOUT VERTICAL CON LÍNEA
   ==== */

.itinerary-timeline {
    position: relative;
    padding-left: 30px;
}

.itinerary-timeline::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 25px;
    bottom: 25px;
    width: 4px;
    background: linear-gradient(to bottom, #38536E, #8FBC8F, #228B22);
    z-index: 1;
}

.itinerary-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.itinerary-item:last-child {
    margin-bottom: 0;
}

.itinerary-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    margin-left: -25px;
    font-weight: bold;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* COLORES DE MARCA */
.itinerary-item.start .itinerary-marker {
    background: white;
    border: 3px solid #38536E;
    background-image: url('../../../animalico.png');
    background-size: 65% 65%;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent;
}

.itinerary-item.location .itinerary-marker {
    background: #38536E;
}

.itinerary-item.nature .itinerary-marker {
    background: #8FBC8F;
    color: #2F4F2F;
}

.itinerary-item.activity .itinerary-marker {
    background: #FFB833;
    color: #38536E;
}

.itinerary-item.transport .itinerary-marker {
    background: #998775;
}

.itinerary-item.end .itinerary-marker {
    background: #228B22;
}

.itinerary-content {
    flex: 1;
    padding-top: 5px;
}

.itinerary-location {
    font-size: 18px;
    font-weight: bold;
    color: #38536E;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.itinerary-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.itinerary-duration {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* ====
   DESKTOP (768px+) - CARRUSEL HORIZONTAL COMPACTO CON SCROLL SUAVE
   ==== */

@media screen and (min-width: 768px) {

    /* CONTAINER PRINCIPAL - MÁS COMPACTO */
    .itinerary-timeline {
        position: relative !important;
        padding-left: 0 !important;
        display: flex !important;
        align-items: flex-start !important;
        overflow-x: auto !important;
        padding: 30px 15px !important;
        max-width: 1000px !important;
        margin: 0 auto !important;
        gap: 12px !important;
        
        /* 🎯 SCROLL SUAVE Y DELICADO */
        scroll-behavior: smooth !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(56, 83, 110, 0.3) transparent !important;
    }

    /* SCROLLBAR PERSONALIZADO PARA WEBKIT */
    .itinerary-timeline::-webkit-scrollbar {
        height: 6px !important;
    }

    .itinerary-timeline::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.05) !important;
        border-radius: 3px !important;
    }

    .itinerary-timeline::-webkit-scrollbar-thumb {
        background: rgba(56, 83, 110, 0.3) !important;
        border-radius: 3px !important;
        transition: background 0.3s ease !important;
    }

    .itinerary-timeline::-webkit-scrollbar-thumb:hover {
        background: rgba(56, 83, 110, 0.5) !important;
    }

    /* ELIMINAR LÍNEA VERTICAL */
    .itinerary-timeline::before {
        display: none !important;
    }

    /* ITEMS - MÁS COMPACTOS */
    .itinerary-item {
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 0 !important;
        min-width: 120px !important;
        max-width: 140px !important;
        position: relative !important;
        scroll-snap-align: start !important;
    }

    /* FLECHAS - MÁS PEQUEÑAS Y DELICADAS */
    .itinerary-item:not(:last-child)::after {
        content: '\f101';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 22px !important;
        right: -8px !important;
        font-size: 16px !important;
        color: #38536E;
        z-index: 2;
        line-height: 1;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        opacity: 0.7 !important;
        transition: all 0.4s ease !important;
    }

    /* MARKERS - MÁS COMPACTOS */
    .itinerary-marker {
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 15px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 16px !important;
        position: relative !important;
        z-index: 3 !important;
        transition: all 0.4s ease !important;
    }

    /* ICONO PERSONALIZADO - AJUSTADO AL NUEVO TAMAÑO */
    .itinerary-item.start .itinerary-marker {
        background: white !important;
        border: 3px solid #38536E !important;
        background-image: url('../../../animalico.png') !important;
        background-size: 65% 65% !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        color: transparent !important;
    }

    /* CONTENT - MÁS COMPACTO */
    .itinerary-content {
        flex: none !important;
        padding-top: 0 !important;
        text-align: center !important;
        max-width: 130px !important;
    }

    /* TIPOGRAFÍA - MÁS COMPACTA */
    .itinerary-location {
        font-size: 13px !important;
        margin-bottom: 5px !important;
        line-height: 1.2 !important;
    }

    .itinerary-description {
        font-size: 11px !important;
        margin-bottom: 3px !important;
        line-height: 1.3 !important;
    }

    .itinerary-duration {
        font-size: 10px !important;
    }
}

/* ====
   ANIMACIONES SUAVES
   ==== */

.itinerary-item {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.itinerary-item:nth-child(1) { animation-delay: 0.1s; }
.itinerary-item:nth-child(2) { animation-delay: 0.2s; }
.itinerary-item:nth-child(3) { animation-delay: 0.3s; }
.itinerary-item:nth-child(4) { animation-delay: 0.4s; }
.itinerary-item:nth-child(5) { animation-delay: 0.5s; }
.itinerary-item:nth-child(6) { animation-delay: 0.6s; }
.itinerary-item:nth-child(7) { animation-delay: 0.7s; }
.itinerary-item:nth-child(8) { animation-delay: 0.8s; }
.itinerary-item:nth-child(9) { animation-delay: 0.9s; }
.itinerary-item:nth-child(10) { animation-delay: 1.0s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HOVER EFFECTS - MÁS SUAVES */
.itinerary-item:hover .itinerary-marker {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.itinerary-item.start:hover .itinerary-marker {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(56, 83, 110, 0.3);
}

.itinerary-item.nature:hover .itinerary-marker {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(143, 188, 143, 0.5);
}

.itinerary-item.end:hover .itinerary-marker {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(34, 139, 34, 0.5);
}

/* ANIMACIÓN DE FLECHAS - MÁS SUAVE */
@media screen and (min-width: 768px) {
    .itinerary-item::after {
        opacity: 0;
        animation: fadeInArrow 1.0s ease forwards;
        transform-origin: center;
    }

    .itinerary-item:nth-child(1)::after { animation-delay: 0.4s; }
    .itinerary-item:nth-child(2)::after { animation-delay: 0.5s; }
    .itinerary-item:nth-child(3)::after { animation-delay: 0.6s; }
    .itinerary-item:nth-child(4)::after { animation-delay: 0.7s; }
    .itinerary-item:nth-child(5)::after { animation-delay: 0.8s; }
    .itinerary-item:nth-child(6)::after { animation-delay: 0.9s; }

    .itinerary-item:hover::after {
        transform: scale(1.15);
        color: #8FBC8F;
        opacity: 1 !important;
        transition: all 0.4s ease;
    }
}

@keyframes fadeInArrow {
    from {
        opacity: 0;
        transform: scale(0.7) rotate(-5deg);
    }
    to {
        opacity: 0.7;
        transform: scale(1) rotate(0deg);
    }
}

/* Efecto de pulsación más suave */
.itinerary-item.nature .itinerary-marker {
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* ====
   RESPONSIVE ADICIONAL
   ==== */

@media screen and (max-width: 480px) {
    .itinerary-marker {
        width: 45px !important;
        height: 45px !important;
        font-size: 14px !important;
    }

    .itinerary-item.start .itinerary-marker {
        background-size: 60% 60% !important;
        background-image: url('../../../animalico.png') !important;
    }

    .itinerary-location {
        font-size: 16px !important;
    }
}

@media screen and (min-width: 1200px) {
    .itinerary-timeline {
        max-width: 1100px !important;
    }

    .itinerary-item {
        min-width: 130px !important;
        max-width: 150px !important;
    }

    .itinerary-content {
        max-width: 140px !important;
    }

    .itinerary-item:not(:last-child)::after {
        font-size: 18px !important;
        right: -10px !important;
    }
}

/* ====
   FALLBACK PARA FONT AWESOME NO CARGADO
   ==== */

@supports not (font-family: 'Font Awesome 6 Free') {
    .itinerary-item:not(:last-child)::after {
        content: '→' !important;
        font-family: Arial, sans-serif !important;
        font-weight: bold !important;
        font-size: 18px !important;
        top: 22px !important;
        right: -8px !important;
    }
}