/* Fonte */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --roxo: #4B0082;
  --amarelo: #FFD700;
  --fundo: #f7f7fb;
  --texto: #2b2b2b;
  --sidebar-width: 240px;
}

/* Reset básico */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--fundo);
  color: var(--texto);
  display: flex;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--roxo);
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.sidebar .logo {
  text-align: center;
  margin-top: auto;
}

.sidebar img {
  max-width: 50%;
  height: auto;
}

.sidebar nav a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
  opacity: 0.95;
  transition: background 0.2s, opacity 0.2s, color 0.2s, transform 0.2s;
}

.sidebar nav a:hover {
  background: rgba(255,255,255,.12);
  transform: translateX(2px);
}

.sidebar nav a.active {
  background: var(--amarelo);
  color: var(--roxo);
}

/* ===== Conteúdo Principal ===== */
.content {
  flex-grow: 1;
  padding: 2px;
  margin-left: var(--sidebar-width);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

p { line-height: 1.6; margin: 0 0 12px; }

/* ===== Grid de Recursos (cards com imagem + título) ===== */
.grid-recursos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
  transition: transform .2s, box-shadow .2s;
  min-height: 100px;
  display: flex;
  text-decoration: none;
  align-items: center;      /* verticalmente */
  justify-content: center;   /* horizontalmente*/
  text-align: center; 
  padding: 20px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.card .title {
  margin-top: 0;
  font-weight: 600;
  font-size: .95rem;
  color: #2b2b2b;
}

/* ===== Lista de membros ===== */
.list {
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}

.list li {
  background: #fff;
  padding: 12px;
  margin: 8px 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.other-content{
  margin-left: var(--sidebar-width);
  padding: 36px;
  flex-grow: 1;
  min-height: 100vh;
  padding-bottom: 80px; /* espaço extra no final da página */
}

/* ===== Grid de voluntários em duas colunas ===== */
.voluntarios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.voluntarios-grid div {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* ===== Chat container ===== */
.chat-container {
    width: 600px;
    height: 80vh;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
}

.chat-header {
    background-color: var(--roxo);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.2em;
}

.chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8; /*o background branco vem do chat-iniciado adicionado js */
    gap: 10px;
}

.chat-body.chat-iniciado {
    background-color: #ffffff; 
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
}

#question {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

#send-btn {
    padding: 10px 15px;
    margin-left: 10px;
    border: none;
    background-color: var(--roxo);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#send-btn:hover {
    background-color: var(--amarelo);
    color: var(--roxo);
}

/* Mensagens de Chat */
.message {
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    line-height: 1.5;
    font-size: 0.9em;
    word-wrap: break-word; /* Garante que mensagens longas quebrem a linha */
}

.message.user {
    background: #e6e6fa; /* Lavanda claro */
    border-left: 4px solid #800080; /* Roxo */
    align-self: flex-end;
    margin-left: 20%;
}

.message.professor {
    background: #f0f8ff; /* AliceBlue */
    border-left: 4px solid #4682b4; /* SteelBlue */
    align-self: flex-start;
    margin-right: 20%;
}

.message.question {
    background: #fffacd; /* LemonChiffon */
    border-left: 4px solid #ffd700; /* Gold */
    align-self: flex-start;
    margin-right: 20%;
    font-weight: bold;
}

.message.feedback {
    background: #f8f8f8;
    border-left: 4px solid #6c757d;
    align-self: flex-start;
    margin-right: 20%;
    border: 1px solid #dee2e6;
}

.message.case {
    background: #f0fff0; /* Honeydew */
    border-left: 4px solid #2e8b57; /* SeaGreen */
    align-self: flex-start;
    margin-right: 15%;
    font-style: italic;
}

.message.thinking {
    background: #f0f0f0;
    border-left: 4px solid #9e9e9e;
    align-self: flex-start;
    margin-right: 20%;
    font-style: italic;
    text-align: center;
}

.message.congratulations {
    background: #e0ffe0;
    border-left: 4px solid #32cd32;
    align-self: center;
    text-align: center;
    font-weight: bold;
}

/* Botoes de Tema */
.temas-section {
    padding: 20px;
    background-color: #f8f8f8;
    text-align: center;
}

.temas-section h4 {
    margin: 0 0 10px 0;
    color: #4B0082;
}

#botoes-temas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tema-btn {
    padding: 10px 15px;
    border: 1px solid var(--roxo);
    border-radius: 5px;
    background-color: #fff;
    color: var(--roxo);
    cursor: pointer;
    transition: all 0.2s;
}

.tema-btn:hover {
    background-color: var(--amarelo);
    border-color: var(--amarelo);
    color: var(--roxo);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tema-btn.active {
    background-color: var(--roxo);
    color: white;
    font-weight: 600;
}

.novo-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: #32cd32; /* Verde */
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
}

.novo-btn:hover {
    background-color: #2e8b57;
}



/* Aba suporte */
.suporte-input {
  border-radius: 7px;
}



/* Responsividade e Menu Mobile */
.menu-toggle-checkbox {
  position: absolute;
  opacity: 0;
  z-index: -1;
}

.menu-toggle-button {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: var(--roxo);
  color: var(--amarelo);
  border: none;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}

.menu-toggle-button::before {
  content: "\2261";
  font-size: 1.8rem;
  font-weight: bold;
}

.menu-toggle-button:hover {
  background: #3a0066;
}

@media (max-width: 768px) {

.menu-toggle-button {
  display: block;
}
.sidebar {
  position: fixed;
  left: calc(0px - var(--sidebar-width)); 
  transition: left 0.3s ease;
  box-shadow: none;
  top: 0;
  bottom: 0;
  z-index: 1000;
}

#menu-toggle:checked ~ .sidebar {
  left: 0;
  box-shadow: 4px 0 10px rgba(0,0,0,0.3);
}
    
#menu-toggle:checked ~ .menu-toggle-button::before {
  content: "\00d7"; 
  font-size: 2.5rem;
  line-height: 44px;
}
#menu-toggle:checked ~ .menu-toggle-button {
  background-color: var(--amarelo);
  color: var(--roxo);
}
.content, .other-content {
  margin-left: 0;
  padding-top: 60px; 
}
.chat-container {
  width: 100%;
  height: calc(100vh - 90px);
  border-radius: 7px;
  box-shadow: none;
}
    
.other-content {
  padding: 25px 15px;
}
    
.voluntarios-grid {
  grid-template-columns: 1fr;
}

#menu-toggle:checked ~ main.content::before,
#menu-toggle:checked ~ main.other-content::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
}