/* ===================================
   PORTAL ITABUNA - CSS CONSOLIDADO
   =================================== */

/* ===================================
   1. ESTILOS GLOBAIS
   =================================== */
body { 
    font-family: 'Poppins', sans-serif; 
    background: #0a0a0a; 
    color: #eee; 
    margin: 0; 
}

/* ===================================
   2. NAVEGAÇÃO
   =================================== */
.navbar { 
    background: linear-gradient(135deg, #0066cc, #00a86b) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); 
}

/* ===================================
   3. CARDS DE NOTÍCIAS (index.php)
   =================================== */
.news-card { 
    background: #1a1a2e; 
    border-left: 5px solid; 
    transition: all .3s; 
    border-radius: 10px; 
}

.news-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 35px rgba(0,102,204,0.4); 
}

/* ===================================
   4. CARD DE CLIMA (index.php)
   =================================== */
.weather-card { 
    background: linear-gradient(135deg, #1e3c72, #2a5298); 
    border-radius: 15px; 
}

/* ===================================
   5. RÁDIOS (ouvir-radio.php)
   =================================== */
.radio-logo { 
    width: 60px; 
    height: 60px; 
    object-fit: contain; 
    border-radius: 8px; 
}

audio { 
    height: 38px; 
    width: 100%; 
}

/* Player Flutuante */
.player-container {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.player-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse-bg 4s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.player-content {
    position: relative;
    z-index: 1;
}

.radio-logo-player {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: rotate-logo 20s linear infinite;
}

.playing .radio-logo-player {
    animation: rotate-logo 10s linear infinite;
}

@keyframes rotate-logo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radio-name-player {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-parado {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}

.status-tocando {
    background: #00ff88;
    color: #000;
    animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% { box-shadow: 0 0 20px rgba(0,255,136,0.5); }
    50% { box-shadow: 0 0 40px rgba(0,255,136,0.8); }
}

.player-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.btn-play {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #00ff88;
    color: #000;
    border: none;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,255,136,0.4);
    flex-shrink: 0;
}

.btn-play:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0,255,136,0.6);
}

.btn-play:active {
    transform: scale(0.95);
}

.btn-play i {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
}

.volume-slider {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff88;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,255,136,0.5);
}

/* Cards de Rádio */
.radio-card {
    background: #1a1a2e;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.radio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,102,204,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.radio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,102,204,0.4);
    border-color: rgba(0,102,204,0.5);
}

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

.radio-card.active {
    border-color: #00ff88;
    background: linear-gradient(135deg, rgba(0,255,136,0.1), #1a1a2e);
    box-shadow: 0 15px 35px rgba(0,255,136,0.4);
}

.radio-card.recent {
    border-color: #ffc107;
    background: linear-gradient(135deg, rgba(255,193,7,0.1), #1a1a2e);
}

.radio-logo-card {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    margin-bottom: 1rem;
}

.badge-recent {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.badge-playing {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00ff88;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulse-badge 1.5s ease-in-out infinite;
    z-index: 2;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.no-radio-selected {
    text-align: center;
    padding: 3rem;
    opacity: 0.5;
}

.no-radio-selected i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ===================================
   6. ÔNIBUS (onibus-municipal.php)
   =================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Search Box */
.search-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    color: white;
    transition: all 0.3s;
}

.search-box:focus {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    outline: none;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.search-box::placeholder {
    color: rgba(255,255,255,0.7);
}

/* Cards de Linha */
.linha-card {
    background: #1a1a2e;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid #0066cc;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.linha-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,102,204,0.4);
}

.linha-card.favorita {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255,193,7,0.1), #1a1a2e);
}

.linha-numero {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.btn-favorito {
    background: rgba(255,193,7,0.2);
    border: 2px solid rgba(255,193,7,0.5);
    color: #ffc107;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-favorito:hover {
    background: rgba(255,193,7,0.4);
    transform: scale(1.1);
}

.btn-favorito.active {
    background: #ffc107;
    color: #0a0a0a;
    border-color: #ffc107;
}

.horario-pill {
    background: rgba(0,102,204,0.2);
    border: 1px solid rgba(0,102,204,0.5);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    display: inline-block;
    margin: 0.25rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.horario-pill:hover {
    background: rgba(0,102,204,0.4);
    transform: scale(1.05);
}

.tipo-dia-badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tipo-dia-badge.active {
    background: linear-gradient(135deg, #0066cc, #00a86b);
    color: white;
}

.tipo-dia-badge:not(.active) {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

.tipo-dia-badge:hover {
    transform: translateY(-2px);
}

.horarios-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.horarios-container.show {
    max-height: 1000px;
}

.sentido-section {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sentido-title {
    color: #00a86b;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.no-horarios {
    color: rgba(255,255,255,0.5);
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* ===================================
   7. WIDGETS DE ÔNIBUS (index.php)
   =================================== */

/* Widget Desktop */
.onibus-widget {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,102,204,0.3);
}

.onibus-widget-empty {
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.onibus-widget-empty:hover {
    border-color: rgba(0,102,204,0.5);
    background: rgba(0,102,204,0.1);
}

.linha-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.horario-mini {
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    margin: 0.2rem;
    font-size: 0.85rem;
}

.proximo-horario {
    background: #ffc107;
    color: #000;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

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

/* ===================================
   8. CARDS MOBILE COMPACTOS
   =================================== */
.mobile-info-cards {
    display: none;
}

.mobile-compact-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mobile-weather {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.mobile-weather-info {
    flex: 1;
}

.mobile-onibus-mini {
    background: linear-gradient(135deg, #0066cc, #0052a3);
}

.mobile-onibus-empty {
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.2);
    text-align: center;
}

.mobile-proximo {
    background: #ffc107;
    color: #000;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    display: inline-block;
    font-size: 1rem;
}

/* ===================================
   9. RESPONSIVIDADE
   =================================== */

/* Mobile */
@media (max-width: 576px) {
    .btn-play {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    .radio-logo-player {
        width: 100px;
        height: 100px;
    }
}

/* Tablets e Mobile */
@media (max-width: 991px) {
    .mobile-info-cards {
        display: block;
        margin-bottom: 2rem;
    }
    
    .desktop-sidebar {
        display: none !important;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .mobile-info-cards {
        display: none !important;
    }
}

/* Estilos da Página de Trânsito */
.map-container {
    background: #1a1a2e;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    margin-bottom: 2rem;
}

.map-tabs {
    background: linear-gradient(135deg, #0066cc, #00a86b);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.map-tab {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.map-tab:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.map-tab.active {
    background: white;
    color: #0066cc;
    font-weight: 700;
}

.map-frame {
    width: 100%;
    height: 600px;
    border: none;
    display: none;
}

.map-frame.active {
    display: block;
}

.info-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.info-card.success { border-left-color: #28a745; }
.info-card.warning { border-left-color: #ffc107; }
.info-card.danger { border-left-color: #dc3545; }
.info-card.info { border-left-color: #17a2b8; }

.info-card h5 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card ul {
    color: #ccc;
    margin-bottom: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 4px;
}

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

.status-card {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.status-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-overlay.hide {
    display: none;
}

@media (max-width: 768px) {
    .map-frame {
        height: 400px;
    }
    
    .map-tabs {
        justify-content: center;
    }
}