/* RESET E CONFIGURAÇÕES GERAIS */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; } /* Rolagem suave do menu */

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
}

/* LAYOUT GRID (DESKTOP) */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-areas: 
        "header header"
        "content sidebar"
        "contato contato"
        "footer footer";
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

/* HEADER COMPLETO */
.main-header {
    grid-area: header;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.logo-img { max-width: 120px; height: auto; }

.nav-social-container { display: flex; align-items: center; gap: 30px; }

.main-nav ul { display: flex; list-style: none; gap: 20px; }
.main-nav a { text-decoration: none; color: #444; font-weight: 600; transition: 0.3s; }
.main-nav a:hover { color: #007bff; }

.social-area { 
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap; 
    justify-content: flex-start; 
}

.social-icon { 
    padding: 8px 16px; 
    background: #f0f2f5; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 20px; 
    text-decoration: none; 
    color: #333; 
    font-size: 0.85rem; 
    font-weight: 600; 
    transition: 0.3s;
    white-space: nowrap; 
    border: 1px solid #ddd;
}

.social-icon:hover { 
    background: #007bff; 
    color: #fff; 
    border-color: #007bff;
    transform: translateY(-2px); 
}

.header-banner { text-align: center; padding: 10px 0; }

/* CONTEÚDO */
.content-area { grid-area: content; background: #fff; padding: 30px; border-radius: 10px; scroll-margin-top: 30px; }
.lista-atividades li { 
    list-style: none; padding: 15px; background: #f9f9f9; 
    border-left: 5px solid #007bff; margin-bottom: 10px; border-radius: 4px; 
}

/* SIDEBAR VÍDEOS */
.video-sidebar { grid-area: sidebar; background: #2c3e50; color: #fff; padding: 20px; border-radius: 10px; scroll-margin-top: 30px; }
.video-player-container video { width: 100%; border-radius: 5px; background: #000; margin: 15px 0; }
.playlist-scroll { max-height: 400px; overflow-y: auto; padding-right: 5px; }
.video-item { 
    width: 100%; padding: 12px; background: #34495e; border: none; 
    color: #fff; text-align: left; cursor: pointer; border-radius: 5px; 
    margin-bottom: 8px; font-size: 0.8rem; display: flex; gap: 10px; transition: 0.3s;
}
.video-item:hover, .video-item.active { background: #007bff; }

/* SEÇÃO DE CONTATO */
.contato-full {
    grid-area: contato; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 10px;    
}

.contato-flex {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    gap: 20px;
}

.contato-texto {
    flex: 1; 
}

.contato-flex .social-area {
    border-left: 1px solid #ddd; 
    padding-left: 20px;
    flex-direction: row; 
}

/* FOOTER */
.main-footer { grid-area: footer; text-align: center; padding: 20px; font-size: 0.8rem; color: #888; }

/* BOTÃO HAMBÚRGUER (Escondido no Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 10px;
}

/* ==========================================
   RESPONSIVIDADE UNIFICADA (TABLETS E MOBILE)
   ========================================== */
@media (max-width: 850px) {
    body {
        padding: 10px;
    }

    /* Transforma o Grid em uma única coluna vertical estável */
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "content"
            "sidebar"
            "contato"
            "footer";
        gap: 15px;
    }

    /* Alinha elementos do topo verticalmente */
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-social-container {
        flex-direction: column;
        width: 100%;
    }

    /* Exibe o Botão Hambúrguer centralizado */
    .menu-toggle {
        display: flex; 
        margin: 0 auto 10px;
    }

    /* Transforma o Menu em lista vertical oculta por padrão */
    .main-nav ul {
        display: none; 
        flex-direction: column;
        width: 100%;
        background: #fff;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        gap: 12px;
        align-items: center;
    }

    /* Classe ativada via JavaScript para abrir o menu */
    .main-nav ul.show {
        display: flex;
    }

    .social-area {
        justify-content: center;
        margin-top: 10px;
    }

    /* Melhora a área de clique dos botões de vídeo em telas menores */
    .video-item {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* Alinha o rodapé/contato para centro */
    .contato-full, .contato-flex {
        flex-direction: column;
        text-align: center;
        padding: 15px 0;
    }

    .contato-flex .social-area {
        border-left: none;
        padding-left: 0;
    }
}

/* SMARTPHONES PEQUENOS */
@media (max-width: 480px) {
    .header-banner h1 {
        font-size: 1.4rem;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .video-sidebar {
        padding: 15px;
    }
}
