/* Consulta pública — Transporte MTK */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--gray-50);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.consulta-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.consulta-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 700;
}

.consulta-topbar-brand img {
    height: 36px;
}

.consulta-page {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.search-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e40af, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.1rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #1e40af;
    font-size: 1.2rem;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: #1e40af;
}

.buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af, #0ea5e9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.results-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.results-count {
    background: linear-gradient(135deg, #1e40af, #0ea5e9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
}

.route-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid #f1f5f9;
    transition: all 0.3s;
}

.route-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(30, 64, 175, 0.2);
    border-color: #1e40af;
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.route-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
}

.route-code {
    background: linear-gradient(135deg, #1e40af, #0ea5e9);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.route-details {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.route-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.95rem;
}

.route-detail i {
    color: #1e40af;
}

.route-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-view {
    background: #1e40af;
    color: white;
}

.btn-view:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #64748b;
}

.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #1e40af;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none;
}

/* Modal Mapa */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #1e40af, #0ea5e9);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
}

#mapaPicker {
    width: 100%;
    height: 500px;
}

#mapaVista {
    width: 100%;
    height: 500px;
}

.modal-footer {
    padding: 1.5rem;
    background: #f8fafc;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.coords-display {
    color: #475569;
    font-size: 0.95rem;
}

.btn-map {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-map:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
}

.btn-back {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    color: #1e40af;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 2px solid #1e40af;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    text-decoration: none;
}

.btn-back:hover {
    background: #1e40af;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.btn-back i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .filters {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        min-width: 100%;
    }

    .btn-back {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}