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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #121623;
    min-height: 100vh;
}

.global-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 90px;
    overflow: hidden;
}

.hero.has-results {
    min-height: auto;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://pagebolt.cl/seguimiento-ad/mapa.jpg') center center / cover no-repeat;
    opacity: 1;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(248, 249, 250, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Signal Points */
.signal-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.signal-point {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #532df5;
    border-radius: 50%;
}

.signal-point::before,
.signal-point::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid #532df5;
    animation: signal 3.5s ease-out infinite;
}

.signal-point::after {
    animation-delay: 1.75s;
}

@keyframes signal {
    0% {
        width: 5px;
        height: 5px;
        opacity: 1;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
}

.signal-point:nth-child(1) { top: 25%; left: 15%; animation-delay: 0s; }
.signal-point:nth-child(2) { top: 20%; left: 85%; animation-delay: 1s; }
.signal-point:nth-child(3) { top: 75%; left: 20%; animation-delay: 0.5s; }
.signal-point:nth-child(4) { top: 80%; left: 80%; animation-delay: 1.5s; }
.signal-point:nth-child(5) { top: 70%; left: 50%; animation-delay: 0.8s; }

/* Navegacion ruta */
.route-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.route-line svg {
    width: 100%;
    height: 100%;
}

.route-path {
    stroke: #532df5;
    stroke-width: 0.2;
    fill: none;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

.route-path:nth-child(1) {
    animation: drawAndFade 60s ease-in-out infinite;
    animation-delay: 0s;
}

.route-path:nth-child(2) {
    animation: drawAndFade 60s ease-in-out infinite;
    animation-delay: 5s;
}

.route-path:nth-child(3) {
    animation: drawAndFade 60s ease-in-out infinite;
    animation-delay: 10s;
}

.route-path:nth-child(4) {
    animation: drawAndFade 60s ease-in-out infinite;
    animation-delay: 15s;
}

.route-path:nth-child(5) {
    animation: drawAndFade 60s ease-in-out infinite;
    animation-delay: 20s;
}

@keyframes drawAndFade {
    0% {
        stroke-dashoffset: 500;
        opacity: 0;
    }
    2% {
        stroke-dashoffset: 500;
        opacity: 0.1;
    }
    16% {
        stroke-dashoffset: 0;
        opacity: 0.1;
    }
    18% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
    width: 100%;
    padding: 0 40px;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 230px;
    height: 52px;
    transition: opacity 0.2s ease;
}

.logo:hover img {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: #121623;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #532df5;
}

.nav-links .contact-btn {
    background: #121623;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-weight: 500;
}

.nav-links .contact-btn:hover {
    background: #532df5;
    color: #ffffff;
}

/* Search Section */
.search-section {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 100px 20px 60px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

.search-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.95),
        0 0 40px rgba(255, 255, 255, 0.9),
        0 0 60px rgba(255, 255, 255, 0.8),
        0 0 80px rgba(255, 255, 255, 0.6);
}

.search-subtitle {
    font-size: 14px;
    color: rgba(18, 22, 35, 0.7);
    margin-bottom: 32px;
    font-weight: 400;
    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.95),
        0 0 30px rgba(255, 255, 255, 0.9),
        0 0 50px rgba(255, 255, 255, 0.7);
}

.search-box {
    display: flex;
    gap: 0;
    background: #ffffff;
    border: 2px solid #121623;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: #121623;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(18, 22, 35, 0.35);
}

.search-box button {
    padding: 16px 32px;
    background: #121623;
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box button:hover {
    background: #532df5;
}

/* Tracking Tip */
.tracking-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(83, 45, 245, 0.18);
    border-left: 3px solid #532df5;
    border-radius: 4px;
}

.tracking-tip svg {
    width: 16px;
    height: 16px;
    stroke: #532df5;
    flex-shrink: 0;
}

.tracking-tip p {
    margin: 0;
    font-size: 12px;
    color: rgba(18, 22, 35, 0.7);
    line-height: 1.5;
    text-align: left;
}

.tracking-tip strong {
    color: #121623;
    font-weight: 600;
}

/* Info tarjetas */
.info-cards-wrapper {
    width: 100%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #121623;
}

.info-cards-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
}

.info-cards-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.info-cards-header p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin: 0;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    width: 100%;
}

.info-card {
    background: #121623;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.info-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-card h3 svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    flex-shrink: 0;
}

.info-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* Results Section */
.results-section {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 60px 40px 40px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* Tracking detalle */
.tracking-column {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    padding: 32px;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tracking-number {
    font-size: 12px;
    color: rgba(18, 22, 35, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.tracking-value {
    font-size: 22px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.tracking-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(18, 22, 35, 0.05);
    border: 1px solid rgba(18, 22, 35, 0.15);
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    color: #121623;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #532df5;
    border-radius: 50%;
}

.tracking-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.detail-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 3px;
}

.detail-label {
    font-size: 10px;
    color: rgba(18, 22, 35, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
}

/* Tipo de operacion */
.operation-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: #121623;
    border-radius: 3px;
}

.op-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.op-value {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
}

/* Timeline */
.timeline-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(18, 22, 35, 0.5);
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

/* Timeline y mapa */
.timeline-map-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* Map y contenido */
.map-info-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.timeline {
    position: relative;
    flex: 1;
}

/* Ruta mapa2 */
.route-map-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    min-height: 300px;
}

#routeMap {
    width: 100%;
    height: 100%;
    min-height: 300px;
    filter: grayscale(100%);
}

/* Ruta info2 */
.route-info {
    margin-top: 0;
    padding: 24px;
    background: #ffffff;
    border-radius: 4px;
}

.route-endpoints {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.route-point {
    text-align: center;
}

.route-point-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(18, 22, 35, 0.5);
    margin-bottom: 6px;
}

.route-point-name {
    font-size: 15px;
    font-weight: 600;
    color: #121623;
}

.route-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(18, 22, 35, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #121623 0%, #532df5 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.progress-indicator {
    position: absolute;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background: #532df5;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(83, 45, 245, 0.2);
    animation: indicatorPulse 2s ease-in-out infinite;
    transition: right 0.6s ease;
}

@keyframes indicatorPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(83, 45, 245, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(83, 45, 245, 0.1);
    }
}

.progress-text {
    font-size: 11px;
    color: rgba(18, 22, 35, 0.6);
    font-weight: 500;
}

/* Timeline Vertical */
.timeline-item {
    display: flex;
    gap: 14px;
    padding-bottom: 18px;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: rgba(18, 22, 35, 0.1);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item.completed::before {
    background: #121623;
}

.timeline-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(18, 22, 35, 0.2);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.timeline-item.completed .timeline-dot {
    background: #121623;
    border-color: #121623;
}

.timeline-content {
    flex: 1;
    padding-top: 0;
}

.timeline-step {
    font-size: 14px;
    font-weight: 500;
    color: #121623;
    margin-bottom: 3px;
    font-family: 'Inter', sans-serif;
}

.timeline-item.pending .timeline-step {
    color: rgba(18, 22, 35, 0.4);
}

.timeline-date {
    font-size: 12px;
    color: rgba(18, 22, 35, 0.5);
    font-family: 'Inter', sans-serif;
}

.timeline-item.pending .timeline-date {
    font-style: italic;
    color: rgba(18, 22, 35, 0.35);
}

/* Footer */
.footer {
    background: #0a0d14;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 40px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: #532df5;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: #532df5;
}

.social-links a svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 20px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .search-section {
        padding: 100px 15px 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    /* Results Section responsive */
    .results-section {
        padding: 40px 20px;
    }

    .tracking-column {
        padding: 24px;
    }

    .tracking-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-map-container {
        grid-template-columns: 1fr;
    }

    .route-map-wrapper {
        min-height: 250px;
    }

    #routeMap {
        min-height: 250px;
    }
}

@media (max-width: 500px) {
    .tracking-details {
        grid-template-columns: 1fr;
    }

    .search-title {
        font-size: 24px;
    }
}
