* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    margin-top: 80px; /* Compensa a altura do header fixo */
}

header {
    background-color: #fff;
    padding: 10px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed; /* Fixa o header no topo da página */
    top: 0; /* Posiciona o header alinhado ao topo */
    width: 100%; /* Faz o header ocupar toda a largura da página */
    z-index: 1000; /* Garante que ele fique acima dos outros elementos */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite quebra de linha em telas menores */
}

.logo img {
    max-height: 70px;
    margin-right: 20px;
}

.search-bar input {
    width: 500px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    flex: 1; /* Permite que a barra de pesquisa cresça */
    min-width: 200px; /* Tamanho mínimo para telas pequenas */
}

nav ul {
    list-style-type: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 16px;
}

.cadastre-btn {
    background-color: #00bf63;
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
}

/* Estilização do Menu de Matérias */
.category-menu {
    padding: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px 0;
    position: relative; /* Adiciona um contexto de empilhamento */
    z-index: 1; /* Define um z-index para que fique acima de outros elementos */
}

.category-menu ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Permite que os itens quebrem a linha se necessário */
}

.category-menu ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-menu ul li img {
    width: 36px;
    height: 36px;
    margin-bottom: 5px;
}

.category-menu ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 14px;
}

.mostrar-mais-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.mostrar-mais-wrapper span {
    font-size: 14px;
    color: #000;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    cursor: pointer;
}

.extra-materias {
    display: none;
}

/* Estilização do conteúdo principal */
.main-content {
    padding: 20px 40px;
    background-color: #fff;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #4b0082;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 24px;
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
}

.pergunta-btn {
    text-decoration: none;
    background-color: #000;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

.question-list {
    margin-top: 20px;
}

.question-item {
    background-color: #f9f9f9;
    padding: 40px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite que o conteúdo quebre a linha */
}

.user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.question-text p {
    margin-left: 10px;
    color: #333;
    flex: 1; /* Permite que o texto cresça */
}

.responder-btn {
    background-color: #00bf63;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* Estilização do Footer */
.footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    background-color: #00bf63;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap; /* Permite quebra de linha em telas pequenas */
}

.footer-section {
    flex: 1;
    margin-right: 30px;
}

.footer-section h4,
.footer-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style-type: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.footer-section .social-icons {
    display: flex;
    gap: 10px;
}

.footer-section .social-icons img {
    width: 30px;
    height: 30px;
}

.download-section .app-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.download-section .app-icons img {
    width: 130px;
    height: auto;
}

.language-selector {
    background-color: #f1f3f5;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    color: #333;
    text-align: center;
    width: 200px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-selector span {
    font-size: 12px;
}

/* Estilização do balão de fala do personagem */
.character-with-speech {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

.speech-bubble {
    background-color: #fff;
    color: #333;
    border-radius: 20px;
    padding: 10px;
    position: relative;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
    width: 200px;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

/* Responsividade */
@media (max-width: 1200px) {
    .header-content {
        flex-direction: column;
    }

    .search-bar input {
        display: none; /* Remove a barra de pesquisa em telas menores */
    }

    nav ul {
        flex-direction: column;
        margin-top: -5px; /* Ajusta o espaço entre o menu e o menu de matérias */
    }

    .hero {
        padding: 10px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .question-item {
        flex-direction: column; /* Alinha itens verticalmente */
    }

    .question-text {
        margin-top: 10px; /* Margem entre usuário e texto da pergunta */
    }

    .footer {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        margin-bottom: 20px;
        margin-right: 0; /* Remove margem direita em telas menores */
    }

    .category-menu {
        padding: 10px 0; /* Ajusta o padding */
        margin-top: 60px; /* Adiciona espaço superior para evitar sobreposição */
    }

    .category-menu ul {
        gap: 20px; /* Reduz o espaço entre categorias */
    }

    .download-section .app-icons {
        flex-direction: column; /* Organiza ícones em coluna */
    }
}
