/* Correções específicas para responsividade mobile */

/* Forçar esconder menu desktop no mobile */
@media (max-width: 768px) {
    /* Header mobile */
    .header {
        height: 60px !important;
        padding: 0.25rem 0 !important;
    }
    
    /* Layout do header mobile: logo esquerda, botão centro, menu direita */
    .header-content {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0 !important;
        padding: 0 1rem !important;
        margin: 0 !important;
    }
    
    /* Garantir que os elementos não quebrem o grid */
    .header-content > * {
        margin: 0 !important;
    }
    
    /* Ajustar espaçamento do grid */
    .header-content .logo {
        padding-left: 0 !important;
    }
    
    .header-content .mobile-menu-toggle {
        padding-right: 0 !important;
    }
    
    /* Bootstrap overrides para mobile */
    .row.align-items-center {
        margin: 0 !important;
    }
    
    .col-4, .col-8, .col-md-3, .col-md-6 {
        padding: 0 0.5rem !important;
    }
    
    .col-4 {
        padding-left: 0 !important;
    }
    
    .col-8 {
        padding-right: 0 !important;
    }
    
    /* Logo mobile - à esquerda */
    .logo {
        justify-self: start !important;
        grid-column: 1 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .logo-img {
        height: 32px !important;
        width: auto !important;
    }
    
    .logo-text {
        display: none !important;
    }
    
    /* Botão ouvir ao vivo - no centro */
    .header-actions {
        justify-self: center !important;
        grid-column: 2 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn-listen {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
    }
    
    /* Centralizar botão no mobile */
    .d-md-none.text-center {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .flex-grow-1 {
        flex-grow: 1 !important;
    }
    
    /* Menu mobile - à direita */
    .mobile-menu-toggle {
        justify-self: end !important;
        grid-column: 3 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1001 !important;
        margin-left: auto !important;
        cursor: pointer !important;
        background: none !important;
        border: none !important;
        padding: 0.5rem !important;
        flex-direction: column !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-menu-toggle span {
        width: 20px !important;
        height: 2px !important;
        background: #279999 !important;
        transition: all 0.3s ease !important;
    }
    
    /* Estado ativo do botão mobile */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px) !important;
    }
    
    /* Menu desktop - esconder completamente */
    .nav-main {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Menu mobile - mostrar quando ativo */
    .nav-main.nav-open {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 999 !important;
        background: white !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
        transform: translateY(0) !important;
    }
    
    /* Lista de navegação mobile */
    .nav-list {
        flex-direction: column !important;
        padding: 1.5rem !important;
        gap: 0.75rem !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .nav-link {
        display: block !important;
        padding: 0.75rem 1rem !important;
        border-radius: 8px !important;
        font-size: 1rem !important;
        text-decoration: none !important;
        color: #333 !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-link:hover {
        background: rgba(39, 153, 153, 0.1) !important;
    }
    
    /* Conteúdo principal */
    .main-content {
        margin-top: 0 !important;
    }
    
    body:not(.home-page) .main-content {
        margin-top: 60px !important;
        padding-top: 0.5rem !important;
    }
}

/* Breakpoint menor para dispositivos muito pequenos */
@media (max-width: 480px) {
    .header {
        height: 60px !important;
    }
    
    .logo-img {
        height: 28px !important;
    }
    
    .nav-main.nav-open {
        top: 60px !important;
    }
    
    body:not(.home-page) .main-content {
        margin-top: 60px !important;
    }
    
    .btn-listen {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
    }
    
    .header-content {
        padding: 0 0.75rem !important;
    }
}
