/* Estilos para la página de visualización de colectivos */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
}

#header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #e74c3c;
}

#header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

#header h1 i {
    color: #e74c3c;
    margin-right: 0.5rem;
}

#header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Estadísticas - Solo dos cuadros principales */
#statistics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1000;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 5px solid #e74c3c;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-left-color: #c0392b;
}

.stat-card h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.stat-card .number {
    color: #e74c3c;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover .number {
    transform: scale(1.05);
    color: #c0392b;
}

.stat-card .unit {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: lowercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Panel de filtros */
#filters-panel {
    position: fixed;
    top: 200px;
    left: 20px;
    width: 320px;
    max-height: calc(100vh - 220px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
    border-left: 5px solid #e74c3c;
}

#filters-panel h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#filters-panel h2 i {
    color: #e74c3c;
}

.filters-section {
    margin-bottom: 1.5rem;
}

.filters-section h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecf0f1;
    font-weight: 600;
}

.filters-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-option:hover {
    background: rgba(231, 76, 60, 0.1);
}

.filter-option input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #e74c3c;
    transform: scale(1.2);
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
}

.filter-count {
    background: #e74c3c;
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Mapa */
#mapGranResistencia {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
}

/* Colores para diferentes tipos de surface */
.surface-unpaved { background: #e67e22; }
.surface-paved { background: #27ae60; }
.surface-asphalt { background: #2c3e50; }
.surface-concrete { background: #95a5a6; }
.surface-gravel { background: #f39c12; }
.surface-dirt { background: #8b4513; }
.surface-unknown { background: #7f8c8d; }

/* Responsivo */
@media (max-width: 768px) {
    #header {
        padding: 1rem;
    }
    
    #header h1 {
        font-size: 1.5rem;
    }
    
    #statistics-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
        gap: 0.5rem;
    }
    
    #filters-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 20px;
        max-height: 300px;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .number {
        font-size: 2rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.filter-option,
.route-info {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar personalizada */
#filters-panel::-webkit-scrollbar {
    width: 6px;
}

#filters-panel::-webkit-scrollbar-track {
    background: rgba(236, 240, 241, 0.5);
    border-radius: 3px;
}

#filters-panel::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 3px;
}

#filters-panel::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}
