﻿.page-header {
    margin-top: 71px;
}

.tracking-container {
    background: var(--white-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Timeline Styles */
.tracking-timeline {
    flex: 0.5;
    padding-right: 2rem;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-header {
   /* display: flex;
    justify-content: space-between;
    align-items: center;*/
    margin-bottom: 2rem;
}

.timeline-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.estimated-delivery {
    background: rgba(0, 150, 64, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline {
    position: relative;
    padding-left: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        var(--primary-color) 0%,
        var(--primary-color) 60%,
        rgba(0, 0, 0, 0.1) 60%,
        rgba(0, 0, 0, 0.1) 100%
    );
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-bottom: 2rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background: var(--white-color);
    border: 2px solid var(--tertiary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--tertiary-color);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 5px var(--white-color);
}

.timeline-item.active .timeline-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.timeline-item.current .timeline-icon {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 5px var(--white-color),
                0 0 20px rgba(223, 25, 149, 0.3);
}

.timeline-content {
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    flex: 1;
    transition: all 0.3s ease;
}

    .timeline-content h6 {
        text-transform: lowercase !important;
    }

        .timeline-content h6::first-letter {
            text-transform: uppercase !important;
        }

.timeline-item.active .timeline-content {
    background: rgba(0, 150, 64, 0.05);
}

.timeline-item.current .timeline-content {
    background: rgba(223, 25, 149, 0.05);
}

.timeline-content h5 {
    margin: 0 0 0.5rem;
    color: #333;
    font-weight: 600;
}

.timeline-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Map Styles */
.tracking-map-container {
    flex: 0.25;
    padding: 0 2rem;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.tracking-map {
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tracking-map iframe {
    height: 100%;
    min-height: 400px;
    border-radius: 15px;
}

/* Images Styles */
.tracking-images-container {
    flex: 0.25;
    padding-left: 2rem;
}

.tracking-images {
    height: 100%;
}

.tracking-images h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.tracking-swiper {
    height: calc(100% - 3rem);
    border-radius: 15px;
    overflow: hidden;
}

.tracking-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tracking-image:hover {
    transform: scale(1.05);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1rem;
}

.swiper-pagination-bullet-active {
    background: var(--secondary-color);
}

/* Package Details */
.package-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.package-details h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-item {
    background: rgba(0, 0, 0, 0.02);
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(223, 25, 149, 0.05);
    transform: translateY(-2px);
}

.detail-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.detail-value {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-body {
    padding: 0;
}

.modal-body img {
    width: 100%;
    border-radius: 15px;
}

.btn-close {
    background-color: var(--white-color);
    padding: 0.5rem;
    border-radius: 50%;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.estimated-delivery span {
    text-transform: lowercase !important;
}

.estimated-delivery span::first-letter {
    text-transform: uppercase;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .tracking-container {
        flex-direction: column;
    }

    .tracking-timeline,
    .tracking-map-container,
    .tracking-images-container {
        flex: 1;
        width: 100%;
        padding: 2rem 0;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .tracking-images-container {
        border-bottom: none;
    }

    .tracking-map iframe {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .tracking-container {
        padding: 1rem 1rem;
        border-radius: 12px;
    }

    .tracking-timeline,
    .tracking-map-container,
    .tracking-images-container {
        padding: 1rem 0;
        border-right: 0;
        border-bottom: 1px solid rgba(0,0,0,.08);
    }

    .tracking-images-container {
        border-bottom: 0;
    }

    .timeline-header {
        gap: .5rem;
    }

        .timeline-header h4 {
            font-size: 1rem;
        }

    .estimated-delivery {
        font-size: 14px;
        padding: .35rem .75rem;
    }

    .timeline {
        padding-left: .5rem;
    }

        .timeline::before {
            left: 18px;
        }
    /* corre la línea hacia la izquierda */
    .timeline-item {
        padding-bottom: 1.25rem;
    }

    .timeline-icon {
        width: 36px;
        height: 36px;
        font-size: .95rem;
        box-shadow: 0 0 0 3px var(--white-color);
    }

    .timeline-content {
        margin-left: .75rem;
        padding: .5rem .75rem; /* menos padding */
        border-radius: 8px;
    }

        .timeline-content h6 {
            font-size: 16px;
        }

        .timeline-content h5 {
           /* font-size: 9px;*/
            margin-bottom: .25rem;
        }

      

        .timeline-content p {
           font-size: 12px;
            line-height: 1.35;
        }

    .tracking-map iframe {
        height: 260px;
        min-height: 240px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-item {
        padding: .75rem;
    }

    .detail-label {
        font-size: .75rem;
    }

    .detail-value {
        font-size: 1rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 28px;
        height: 28px;
    }

        .swiper-button-next:after,
        .swiper-button-prev:after {
            font-size: .9rem;
        }
}

/* Teléfonos pequeños (≤ 420px) */
@media (max-width: 420px) {
    .page-header {
        margin-top: 56px;
    }

    .tracking-container {
        padding: .75rem;
    }

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

    .timeline-icon {
        width: 32px;
        height: 32px;
        /*font-size: .14px;*/
    }

    .timeline-content {
        margin-left: .6rem;
        padding: .45rem .6rem;
    }

    .estimated-delivery {
        font-size: 14px;
        padding: .3rem .6rem;
    }
}