@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* ==========================================================
   --- ESTILOS GERAIS ---
   ========================================================== */

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block; 
}

/* ==========================================================
   --- CABEÇALHO ---
   ========================================================== */

.header {
    background-color: #fa0101;
    color: #fff;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
}

.main-nav {
    flex-grow: 1;
    text-align: center;
    margin: 0 15px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    font-weight: 700;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 50px;
    border: 1px solid #ddd;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.search-form:focus-within {
    box-shadow: 0 0 0 2px #fa0101;
}

.search-form input[type="text"] {
    border: none;
    padding: 6px 12px;
    font-size: 13px;
    width: 180px;
    outline: none;
    background-color: transparent;
}

.search-form button {
    background-color: #fa0101;
    color: #fff;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 100%;
}

.search-form button:hover {
    background-color: #d10101;
}

.user-avatar-container {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.user-avatar-text {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    background-color: #777;
    text-align: center;
}

.icon-button {
    background-color: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    border-radius: 5px;
    transition: background-color 0.2s;
    text-decoration: none;
}

.icon-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================
   --- LAYOUT PRINCIPAL (MAIN CONTAINER & SIDEBAR) ---
   ========================================================== */

.main-container {
    display: flex;
    flex: 1;
    padding-top: 55px;
    min-height: calc(100vh - 55px);
}

.sidebar {
    width: 240px;
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out;
    position: fixed;
    height: 100vh;
    overflow-y: auto; /* Adiciona rolagem vertical automaticamente */
    left: 0;
    top: 55px;
    z-index: 900;
    transform: translateX(-100%); /* Esconde o menu por padrão em telas pequenas */
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 5px;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #f0f0f0;
    border-left-color: #fa0101;
}

.sidebar ul li a i {
    margin-right: 10px;
    color: #fa0101;
    width: 25px;
    text-align: center;
}

.sidebar ul li.category-title {
    color: #777;
    font-size: 14px;
    padding: 15px 20px 5px;
    text-transform: uppercase;
    font-weight: 700;
}

.sidebar hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

.content-area {
    flex: 1;
    padding: 20px;
    background-color: #f9f9f9;
    /* Adiciona transição para o margin-left */
    transition: margin-left 0.3s ease-in-out; 
}

/* Nova regra para empurrar o conteúdo quando a sidebar estiver ativa */
.content-area.pushed {
    margin-left: 240px;
}

/* ==========================================================
   --- PÁGINAS ESPECÍFICAS ---
   ========================================================== */

/* --- Estilo da Página de Notícias (Grid) --- */
.news-grid {
    margin-top: 20px;
}

.news-grid h2 {
    color: #1a1a1a;
    border-bottom: 2px solid #fa0101;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 24px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-info {
    padding: 15px;
}

.card-info h4 a {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.card-info h4 a:hover {
    text-decoration: underline;
}

.source-time {
    font-size: 14px;
    color: #777;
}

/* --- Modal de Autenticação (Login/Cadastro) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

#modal-form-container h2 {
    text-align: center;
    color: #fa0101;
    margin-bottom: 20px;
}

.modal-form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-form-container input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.modal-form-container button {
    padding: 12px;
    background-color: #fa0101;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.modal-form-container button:hover {
    background-color: #d10101;
}

#message-container {
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
}

/* --- Estilo da PÁGINA de Perfil --- */
.perfil-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.perfil-container h1 {
    color: #fa0101;
    margin-bottom: 20px;
}

.perfil-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid #fa0101;
    margin-bottom: 20px;
}

.perfil-avatar .user-avatar-text {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    background-color: #ff0000;
    border-radius: 50%;
}

.perfil-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.perfil-form label {
    text-align: left;
    font-weight: bold;
    color: #020202;
}

.perfil-form input[type="text"],
.perfil-form input[type="email"],
.perfil-form input[type="password"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.perfil-form button {
    padding: 12px;
    background-color: #fa0101;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.perfil-form button:hover {
    background-color: #d10101;
}

.mensagem-sucesso {
    color: green;
    font-weight: bold;
    margin-top: 15px;
}

.mensagem-erro {
    color: red;
    font-weight: bold;
    margin-top: 15px;
}

/* --- Estilo da PÁGINA de Comentários --- */
.comentarios-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.comentarios-section h2 {
    color: #1a1a1a;
    border-bottom: 2px solid #fa0101;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 24px;
}

.comentario-form-container {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.comentario-form-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.comentario-form-container textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: 'Roboto', Arial, sans-serif;
}

.comentario-form-container button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #fa0101;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comentario-form-container button:hover {
    background-color: #d10101;
}

.comentarios-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comentario-card {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.comentario-nome {
    font-weight: 700;
    color: #1a1a1a;
}

.comentario-data {
    font-style: italic;
}

.comentario-texto {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.comentario-aviso, .no-comments {
    text-align: center;
    color: #777;
    font-style: italic;
}

.comment-message {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.btn-responder, .btn-deletar {
    background: none;
    border: none;
    color: #fa0101;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-deletar {
    color: #d9534f;
}

.btn-responder:hover, .btn-deletar:hover {
    text-decoration: underline;
}

.respostas {
    border-left: 3px solid #f0f0f0;
    padding-left: 15px;
    margin-top: 15px;
}

.respostas .comentario-card {
    background-color: #f9f9f9;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
}

.comment-form textarea:focus {
    border-color: #fa0101;
    box-shadow: 0 0 5px rgba(250, 1, 1, 0.5);
    outline: none;
}

.comment-form textarea::placeholder {
    color: #999;
    font-style: italic;
}

.comment-form button {
    padding: 12px 20px;
    background-color: #fa0101;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.comment-form button:hover {
    background-color: #d10101;
}

/* --- Estilo da PÁGINA de Usuários --- */
.users-section {
    padding: 20px;
}

.users-section h2 {
    color: #1a1a1a;
    border-bottom: 2px solid #fa0101;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 24px;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.user-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.users-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-list-item {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-info-inline {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-container.small {
    width: 40px;
    height: 40px;
    min-width: 40px; 
    min-height: 40px;
    font-size: 16px;
    border-radius: 50%;
    display: flex; 
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #007bff;
    color: white;
}

.user-name {
    margin: 0;
    font-size: 1em;
    font-weight: bold;
    color: #333;
}
/* --- FIM DA CORREÇÃO --- */

.user-avatar-container.large {
    width: 80px;
    height: 80px;
    border: 3px solid #fa0101;
}

.user-avatar-text {
    font-size: 16px;
}

.user-name {
    font-size: 18px;
    font-weight: 500;
    margin: 15px 0;
}

.user-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.iniciar-conversa-btn, .add-grupo-btn {
    background-color: #fa0101;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.iniciar-conversa-btn:hover, .add-grupo-btn:hover {
    background-color: #d10101;
}

/* --- Estilo da PÁGINA de Conversa/Chat --- */
.conversa-container {
    max-width: 800px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.conversa-header {
    background-color: #fa0101;
    color: #fff;
    padding: 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.conversa-mensagens {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mensagem {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    position: relative;
    word-wrap: break-word;
}

.mensagem.propria {
    background-color: #f0f0f0;
    align-self: flex-end;
}

.mensagem.outra {
    background-color: #fcebeb;
    align-self: flex-start;
}

.mensagem-texto {
    font-size: 16px;
    line-height: 1.4;
    color: #1a1a1a;
}

.mensagem-data {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.conversa-form-container {
    border-top: 1px solid #eee;
    padding: 15px;
}

.conversa-form-container form {
    display: flex;
    gap: 10px;
}

.conversa-form-container textarea {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 15px;
    resize: none;
    height: 40px;
}

.conversa-form-container button {
    background-color: #fa0101;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.conversa-form-container button:hover {
    background-color: #d10101;
}

.mensagem-autor {
    font-size: 12px;
    font-weight: bold;
    color: #fa0101;
    margin-bottom: 5px;
}

.mensagem-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.btn-deletar-mensagem {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s;
    padding: 0;
}

.btn-deletar-mensagem:hover {
    color: #d10101;
}

.mensagem.propria .mensagem-footer {
    justify-content: flex-end;
}

/* --- Estilo da PÁGINA de Grupos --- */
.grupos-section {
    padding: 20px;
}

.grupos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #fa0101;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.grupos-header h2 {
    font-size: 24px;
    margin: 0;
}

.btn-criar-grupo {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-criar-grupo:hover {
    background-color: #218838;
}

.grupos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.grupo-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grupo-icone {
    font-size: 50px;
    color: #fa0101;
    margin-bottom: 15px;
}

.grupo-nome {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.btn-ver-grupo {
    background-color: #fa0101;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-ver-grupo:hover {
    background-color: #d10101;
}

/* --- Modal de Criação de Grupo --- */
#modal-criar-grupo .modal-content {
    max-width: 450px;
}

#form-criar-grupo {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#form-criar-grupo label {
    font-weight: bold;
    color: #555;
}

#form-criar-grupo input[type="text"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

/* --- Estilo de Adicionar Membros --- */
.btn-add-membros {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-add-membros:hover {
    background-color: #0056b3;
}

/* Modal de Adicionar Membros */
#modal-add-membros .modal-content {
    max-width: 450px;
}

.users-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}

.checkbox-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
}

.checkbox-user-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* ==========================================================
   --- ESTILOS DA PÁGINA DE POSTAGENS (adicionados/ajustados) ---
   ========================================================== */

.postagem-form-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.postagem-form-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    color: #fa0101;
    border-bottom: 2px solid #fa0101;
    padding-bottom: 10px;
}

.post-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-size: 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.post-form input[type="file"] {
    display: block;
    margin-bottom: 15px;
}

.post-form button {
    background-color: #fa0101;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.post-form button:hover {
    background-color: #d10101;
}

.aviso-login-post {
    text-align: center;
    padding: 20px;
    background-color: #f1f1f1;
    border-radius: 8px;
    margin-bottom: 20px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.post-autor {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 16px;
}

.post-data {
    color: #888;
    font-size: 14px;
}

.post-conteudo {
    margin: 10px 0;
    line-height: 1.6;
    color: #333;
}

.post-imagem {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
}

.post-acoes {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.post-acoes button {
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.post-acoes button:hover {
    color: #fa0101;
}

.btn-like.liked {
    color: #dc3545;
}

.btn-deletar-post {
    color: #d9534f;
}

.post-comentarios {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.post-comentarios .comentario-card {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: none;
    border: 1px solid #eee;
}

.post-comentarios .comentario-card .comentario-header {
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.post-comentarios .comentario-card .respostas {
    margin-left: 20px;
}

.post-comentarios .comentario-card.resposta {
    background-color: #f0f0f0;
}

/* ==========================================================
   --- RESPONSIVIDADE (MEDIA QUERIES) ---
   ========================================================== */

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .logo {
        display: block;
        font-size: 14px;
        margin-right: auto;
    }

    .header {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 5px;
        padding: 8px 10px;
    }

    .menu-toggle {
        display: block;
        font-size: 16px;
        margin-right: 5px;
    }

    .header-tools {
        gap: 5px;
    }

    .search-form {
        max-width: 100px;
    }
    
    .search-form input[type="text"] {
        padding: 5px 8px;
        width: 80px;
        font-size: 11px;
    }

    .search-form button {
        padding: 5px 8px;
    }

    .user-avatar-container {
        width: 28px;
        height: 28px;
        border: 1px solid #fff;
    }

    .user-avatar-text {
        font-size: 12px;
    }

    .icon-button {
        font-size: 16px;
        padding: 5px;
    }

    /* Modifica o CSS para a sidebar */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        top: 0;
        padding-top: 55px;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.2);
    }
    
    .content-area {
        padding-left: 20px;
        transition: padding-left 0.3s ease-in-out, margin-left 0.3s ease-in-out;
    }

    /* Nova regra para o conteúdo quando a sidebar estiver ativa em telas menores */
    .content-area.pushed {
        margin-left: 240px;
    }

    #show-cadastro {
        display: none;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    /* Estilos de responsividade para a página de postagens */
    .postagem-form-section {
        padding: 15px;
    }

    .post-card {
        padding: 15px;
    }

    .post-conteudo {
        font-size: 14px;
    }

    .post-acoes button {
        font-size: 12px;
    }

    .post-comentarios .comentario-card {
        padding: 8px;
    }

    .post-comentarios .comentario-card .respostas {
        margin-left: 10px;
    }
}


.selo-admin {
    display: inline-block;
    background-color: #007bff;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 5px;
    text-transform: uppercase;
}

/* Exemplo de CSS para o menu */
.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    position: fixed;
    z-index: 100;
}

.sidebar.active {
    transform: translateX(0);
}

.content-area {
    width: 100%;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
    .sidebar {
        transform: translateX(0);
        width: 250px;
        position: fixed;
        left: 0;
        top: 60px;
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
    .main-container {
        flex-direction: row;
    }
    .content-area {
        margin-left: 250px;
    }
}

/* --- Estilos para as páginas de Adicionar Anúncio e Programação --- */

.container {
    max-width: 800px;
    margin: 80px auto 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.container h1 {
    text-align: center;
    color: #fa0101;
    margin-bottom: 20px;
}

.container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.container input[type="text"],
.container textarea,
.container select,
.container input[type="file"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.container textarea {
    min-height: 200px;
}

.container button {
    padding: 12px;
    background-color: #fa0101;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.container button:hover {
    background-color: #d10101;
}

.message {
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* --- Estilos para a página de Anúncios (anuncio.php) --- */

.anuncio-container {
    max-width: 800px;
    margin: 80px auto 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.anuncio-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.anuncio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.anuncio-card h3 {
    margin-top: 0;
    color: #333;
}

.anuncio-card img {
    max-width: 150px;
    height: auto;
    margin: 10px auto;
    display: block;
}

.anuncio-card p {
    color: #666;
}

.anuncio-card a {
    text-decoration: none;
}

/* --- Estilos para a página de Programação (programacao.php) --- */

.programacao-container {
    max-width: 800px;
    margin: 80px auto 20px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.programacao-card {
    width: 150px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.programacao-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.programacao-card h4 {
    margin: 10px 0 0;
    color: #333;
}

.programacao-card img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.programacao-card a {
    text-decoration: none;
}

/* --- Estilo para garantir que todos os links de cards sejam pretos --- */
.news-card a {
    color: #000;
    text-decoration: none;
}

.news-card .card-info h4 a {
    color: #000;
}

/* --- Estilos para a seção de Redes Sociais --- */
.social-links-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.social-links-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #555;
    color: #fff;
    font-size: 36px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
}

.social-icon.youtube {
    background-color: #ff0000;
}

.social-icon.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-icon.x-twitter {
    background-color: #000000;
}

.social-icon.tiktok {
    background-color: #000;
}

.social-icon.email {
    background-color: #d44638;
}

/* --- Estilos para a página de Comunicados (Layout de Cartões) --- */
.comunicados-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    width: 100%;
    margin-top: 20px;
}

.comunicados-list h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
}

.comunicado-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comunicado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.comunicado-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007bff;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.comunicado-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.comunicado-content {
    line-height: 1.7;
    color: #555;
}

/* --- Estilos para o formulário de postagem --- */
.form-container-comunicado {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 40px auto;
}

.form-container-comunicado label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-container-comunicado input[type="text"],
.form-container-comunicado textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-container-comunicado input[type="text"]:focus,
.form-container-comunicado textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-container-comunicado button {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.form-container-comunicado button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
}
