/* css/style.css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
}

/* Header */
.navbar-brand img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}
.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover {
    color: #cceeff !important; /* Un tono más claro para el hover */
}

/* Main Content */
.section-padding {
    padding: 60px 0;
}
.card {
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Tracking Section */
#tracking-results {
    margin-top: 30px;
}
.tracking-status-card {
    border-left: 5px solid #007bff; /* Indicador visual del estado */
}
.tracking-status-card .card-header {
    background-color: #e9f7fe;
    font-weight: bold;
    color: #007bff;
}
.tracking-log-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.tracking-log-item:last-child {
    border-bottom: none;
}
.tracking-log-item small {
    color: #6c757d;
}

/* Brands Section */
.brand-logo-container {
    padding: 15px;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px; /* Altura mínima para uniformidad */
}
.brand-logo-container img {
    max-width: 90%;
    max-height: 100px;
    object-fit: contain;
}
.brand-item {
    transition: transform 0.2s ease;
}
.brand-item:hover {
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-color: #212529 !important; /* Oscurece el footer */
}
footer h5 {
    color: #fff;
    margin-bottom: 15px;
}
footer ul {
    padding-left: 0;
}
footer ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}
footer .map-container {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
footer .map-container iframe {
    width: 100%;
    height: 150px;
    border: 0;
}

/* Tracking Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0;
    list-style: none;
    margin: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Centra la línea principal */
    width: 2px;
    background-color: #e9ecef; /* Color de la línea */
    margin-left: -1px;
}

/* Para pantallas más pequeñas, mueve la línea a la izquierda */
@media (max-width: 767.98px) {
    .timeline::before {
        left: 20px;
    }
}

.timeline > li {
    position: relative;
    margin-bottom: 20px;
    clear: both;
}

.timeline > li::before,
.timeline > li::after {
    content: ' ';
    display: table;
}

.timeline > li::after {
    clear: both;
}

.timeline > li .timeline-panel {
    width: 45%; /* Ancho de los paneles a cada lado de la línea */
    float: left;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.3s ease;
}

.timeline > li .timeline-panel:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* Flecha del panel para conectar con la línea */
.timeline > li .timeline-panel::before {
    content: ' ';
    position: absolute;
    top: 26px;
    right: -14px; /* Posición de la flecha a la derecha */
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 14px solid #e9ecef; /* Color del borde de la flecha */
}

.timeline > li .timeline-panel::after {
    content: ' ';
    position: absolute;
    top: 27px;
    right: -13px; /* Posición de la flecha interior */
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 13px solid #fff; /* Color de la flecha interior */
}

.timeline > li.timeline-inverted > .timeline-panel {
    float: right; /* Paneles invertidos a la derecha */
}

/* Flecha del panel invertido */
.timeline > li.timeline-inverted > .timeline-panel::before {
    border-left-width: 0;
    border-right: 14px solid #e9ecef;
    left: -14px;
    right: auto;
}

.timeline > li.timeline-inverted > .timeline-panel::after {
    border-left-width: 0;
    border-right: 13px solid #fff;
    left: -13px;
    right: auto;
}

.timeline > li .timeline-badge {
    color: #fff;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.4em;
    text-align: center;
    position: absolute;
    top: 16px;
    left: 50%;
    margin-left: -25px;
    background-color: #007bff; /* Color predeterminado del círculo */
    border-radius: 50%;
    z-index: 100;
    transition: background-color 0.3s ease;
}

/* Media query para móviles: stacking vertical */
@media (max-width: 767.98px) {
    .timeline::before {
        left: 20px;
    }
    .timeline > li .timeline-panel {
        width: calc(100% - 75px); /* Reduce el ancho para dejar espacio al círculo */
        float: right; /* Mueve todos los paneles a la derecha */
    }
    .timeline > li .timeline-panel::before {
        border-left-width: 0;
        border-right: 14px solid #e9ecef;
        left: -14px;
        right: auto;
    }
    .timeline > li .timeline-panel::after {
        border-left-width: 0;
        border-right: 13px solid #fff;
        left: -13px;
        right: auto;
    }
    .timeline > li .timeline-badge {
        left: 20px; /* Alinea los círculos a la izquierda */
        margin-left: -25px; /* Ajusta la posición del círculo */
    }
}

/* Colores de los iconos (puedes añadir más si tienes más estados) */
.timeline-badge.primary { background-color: #007bff; }
.timeline-badge.info { background-color: #17a2b8; }
.timeline-badge.success { background-color: #28a745; }
.timeline-badge.warning { background-color: #ffc107; }
.timeline-badge.danger { background-color: #dc3545; }
.timeline-badge.secondary { background-color: #6c757d; }