/* =========================================
   RESET E BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #f4f4f4;
    overflow-x: hidden;
}

/* =========================================
   BOTÃO HAMBURGUER E OVERLAY
   ========================================= */
.hamburger {
    position: fixed;
    top: 15px;
    left: 0;
    z-index: 1000;
    width: 60px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    background: none;
    border: none;
}

.hamburger:hover {
    width: 65px;
}

.hamburger.active {
    color: #3b82f6;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   MENU LATERAL (ESTRUTURA)
   ========================================= */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 300px;
    background: #ffffff;
    z-index: 950;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    transform: translateX(0);
}

@media (max-width: 480px) {
    .side-menu { width: 85%; }
}

.menu-header {
    padding: 80px 25px 20px;
    border-bottom: 1px solid #eee;
    color: #0066ff;
}

.menu-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
}

.menu-footer { 
    margin-top: auto; 
    border-top: 2px solid #eee; 
}

/* =========================================
   ITENS DO MENU E ALINHAMENTO GERAL
   ========================================= */
/* Base unificada para links simples e botões de submenu */
.menu-item a,
.menu-footer a,
.submenu-toggle {
    width: 100%;
    min-height: 54px;
    padding: 15px 25px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-family: inherit;
    border: none;
    background: none;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
    transition: 0.3s;
    box-sizing: border-box;
}

/* Botão de submenu usa flex para manter a seta na extremidade direita */
.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* O SEGREDO DO ALINHAMENTO: CSS Grid trava o espaço do ícone em 24px exatos */
.menu-item a,
.menu-footer a,
.submenu-toggle span {
    display: grid;
    grid-template-columns: 24px 1fr; /* Coluna 1 do ícone (24px), Coluna 2 do texto */
    align-items: center;
    gap: 15px; /* Distância travada de 15px entre a coluna do ícone e o texto */
    text-align: left;
}

/* =========================================
   ESTILO E TRAVAMENTO DOS ÍCONES
   ========================================= */
/* Alvo dinâmico: Pega sempre o 1º elemento (o ícone) e o centraliza nos seus 24px */
.menu-item a > :first-child,
.menu-footer a > :first-child,
.submenu-toggle span > :first-child {
    color: #555;
    font-size: 18px;
    text-align: center;
    display: block; 
    width: 100%;
    transition: all 0.3s ease;
}

/* EXCEÇÃO: Botão "Ao Vivo" */
.menu-item .live-link { 
    color: #ff0000 !important; 
    font-weight: bold; 
}

.menu-item .live-link > :first-child {
    color: #ff0000 !important;
}

/* =========================================
   SUBMENU (ANIMAÇÃO E RECUO)
   ========================================= */
.submenu {
    list-style: none;
    background: #fcfcfc;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

/* Desativa o Grid nos sub-itens (que não têm ícones) para evitar quebras */
.submenu li a {
    display: block; /* Desliga o Grid herdado */
    padding-left: 64px; /* Mantém o recuo perfeitamente alinhado com o texto de cima */
    font-size: 14px;
    color: #666;
    border-bottom: none;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: auto;
}

/* Seta do submenu */
.fa-caret-right {
    color: #888;
    font-size: 14px;
    transition: transform 0.3s;
}

/* Seta girando quando aberto */
.has-submenu.open .fa-caret-right {
    transform: rotate(90deg);
}

/* Altura do submenu quando aberto */
.has-submenu.open .submenu {
    max-height: 300px;
}

/* =========================================
   EFEITOS DE HOVER (ANIMAÇÃO E CORES)
   ========================================= */
.menu-item a:hover, 
.submenu-toggle:hover,
.menu-footer a:hover {
    background: #f0f7ff;     
    color: #007bff;          
    border-radius: 8px;      
}

/* Efeito exclusivo no ícone (o 1º filho) */
.menu-item a:hover > :first-child, 
.submenu-toggle:hover span > :first-child,
.menu-footer a:hover > :first-child {
    color: #007bff;          
    transform: scale(1.15);  
}

/* Hover específico para o Ao Vivo */
.menu-item .live-link:hover {
    background: #fff0f0;     
    color: #ff0000;          
}

.menu-item .live-link:hover > :first-child {
    color: #ff0000 !important; 
    transform: scale(1.15);
}