/* ====================================================================
   Página: Horários e Itinerários de Ônibus
   Padrão Dark Glow Moderno (Mobile First)
   ==================================================================== */

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --accent: #38bdf8;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.75);
    --border-color: rgba(56, 189, 248, 0.2);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glow: rgba(56, 189, 248, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 0;
}

/* Efeitos de Luz de Fundo (Glow Background) */
.bg-glow-1 {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 350px;
    height: 350px;
    background: rgba(2, 132, 199, 0.22);
    filter: blur(120px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.bg-glow-2 {
    position: fixed;
    top: 30%;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(56, 189, 248, 0.15);
    filter: blur(150px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

header, main, footer {
    position: relative;
    z-index: 10;
}

/* --- BOTÃO VOLTAR --- */
.btn-voltar-container {
    max-width: 1100px;
    margin: 20px auto 10px auto;
    padding: 0 16px;
}

.btn-voltar-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-voltar-premium:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.9);
    transform: translateX(-4px);
    box-shadow: 0 6px 20px var(--glow);
}

/* --- CONTAINER PRINCIPAL --- */
.container-modulo-premium {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px 40px 16px;
}

.container-modulo-premium h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container-modulo-premium > p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- FORMULÁRIO / FILTRO --- */
.campo-formulario-premium {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.campo-formulario-premium label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.campo-formulario-premium select {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.campo-formulario-premium select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--glow);
}

/* --- MAPA CONTAINER --- */
.mapa-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mapa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.mapa-header h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

.btn-alerta-desvio {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-alerta-desvio:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

#map {
    width: 100%;
    height: 450px !important;
    min-height: 450px;
    border-radius: 12px;
    display: block;
    z-index: 1;
}

/* --- CARDS DE ÔNIBUS --- */
.onibus-lista-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.onibus-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.4s ease forwards;
}

.onibus-card-header {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.linha-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    width: fit-content;
}

.onibus-card-header h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: 700;
}

.onibus-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media screen and (min-width: 768px) {
    .container-modulo-premium {
        padding: 20px 24px 60px 24px;
    }
}

/* --- GRUPO DE BOTÕES DE TRAJETO --- */
.botoes-trajetoria-grupo {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-trajeto {
    background-color: rgba(30, 41, 59, 0.9);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-trajeto:hover {
    color: var(--text-main);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Estilo aplicado quando o botão está selecionado/ativo */
.btn-trajeto.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--glow);
}