/* ==================== 1. RESET & ESTILOS BASE ==================== */
body,
h1,
h2,
p {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: #ffffff; /* fundo branco para o resto da página */
}

body.no-scroll {
  overflow: hidden;
  touch-action: none; /* para impedir scroll em dispositivos móveis */
}

/* ==================== 2. HEADER ==================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background-color: darkgreen;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.menu-btn {
  position: absolute;
  left: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  user-select: none;
}

.site-title {
  font-family: "Nosifer", cursive;
  font-size: 26px;
  color: red;
  text-shadow: 2px 2px 0 black, -2px -2px 0 black, 2px -2px 0 black,
    -2px 2px 0 black;
}

/* ==================== NOTICIAS ==================== */

.news-btn {
  position: absolute;
  margin-top: 3px;
  left: 53px;           /* fica entre menu (20px) e dark-mode (65px) */
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  user-select: none;
}

@media (hover: hover) {
  .news-btn:hover {
    transform: scale(1.08);
  }
}

.news-icon {
  width: 26px;
  height: 26px;
  color: white;
  display: block;
}

body.dark-mode .news-icon {
  color: white;
}

.news-popup {
  background: #ffffff;
  border-radius: 16px;
  width: 92%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px 22px 26px 22px;
  position: relative;
  border: 2px solid #333;
}

body.dark-mode .news-popup {
  background: #1e1e1e;
  color: #f0f0f0;
  border-color: #444;
}

.news-header {
  text-align: center;
  margin-bottom: 18px;
}

.news-title {
  margin: 0;
  color: darkgreen;
  font-size: 28px;
}

body.dark-mode .news-title {
  color: white;
}

.news-subtitle {
  margin-top: 6px;
  color: #555;
}

body.dark-mode .news-subtitle {
  color: #ccc;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 100%;
  margin: 0 auto;
}

.news-item {
  border: 2px solid darkgreen;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  text-align: left;
  word-wrap: break-word;
  overflow: hidden;
}

body.dark-mode .news-item {
  background: #1e1e1e;
  border-color: #555;
}

.news-item h3 {
  margin: 0;
  color: darkgreen;
  font-size: 22px;
}

body.dark-mode .news-item h3 {
  color: white;
}

.news-item h4 {
  margin: 8px 0 12px 0;
  font-weight: 400;
  color: #444;
  font-size: 16px;
}

body.dark-mode .news-item h4 {
  color: #ccc;
}

.news-item img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin: 8px 0 12px 0;
}

.news-item p {
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
  color: #222;
  white-space: pre-wrap; /* mantém quebras de linha do texto */
}

body.dark-mode .news-item p {
  color: #eee;
}

/* Centraliza mensagem de nenhuma notícia */
.news-item.news-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
}

.news-item.news-empty p {
  color: #666;
  font-size: 18px;
}

body.dark-mode .news-item.news-empty p {
  color: #999;
}

.news-item .news-btn-link {
  background-color: darkgreen;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  text-decoration: none;
  font-weight: bold;
}

@media (hover: hover) {
  .news-item .news-btn-link {
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  .news-item .news-btn-link:hover {
    background-color: #006400;
    transform: scale(1.05);
  }
}

@media (hover: none) {
  .news-item .news-btn-link:active {
    background-color: #006400;
  }
}

/* ==================== NOTÍCIAS: LOAD MORE (DISCRETO) ==================== */
.news-load-more {
  width: 100%;
  background: none;
  border: none;
  padding: 8px 0;
  margin-top: 6px;

  font-size: 14px;
  font-weight: normal;
  color: darkgreen;

  cursor: pointer;
  text-align: center;
  text-decoration: underline;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.news-load-more-icon {
  font-size: 14px;
  line-height: 1;
}

@media (hover: hover) {
  .news-load-more:hover {
    opacity: 0.75;
  }
}

body.dark-mode .news-load-more {
  color: #e6e6e6;
}

@media (hover: hover) {
  body.dark-mode .news-load-more:hover {
    opacity: 0.7;
  }
}

/* ==================== 3. BOTÕES DE AUTENTICAÇÃO DO HEADER ==================== */
.auth-buttons {
  position: absolute;
  top: 17px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.auth-buttons button {
  font-family: "Arial", sans-serif;
  font-size: 16px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-register {
  background-color: darkgreen;
  color: white;
  border: 2px solid white;
}

.btn-register:hover {
  background-color: #006400; /* verde mais escuro */
}

.btn-login {
  background-color: white;
  color: darkgreen;
  border: none;
}

.btn-login:hover {
  background-color: #f0f0f0;
}

.btn-logout {
  background-color: darkgreen;
  color: white;
  border: 2px solid white;
}

.btn-logout:hover {
  background-color: #006400;
}

.btn-admin {
  background-color: white;
  color: darkgreen;
  border: none;
}

.btn-admin:hover {
  background-color: #f0f0f0;
}

.welcome-message {
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  align-self: center;
}

/* ==================== 4. POPUP DE AUTENTICAÇÃO (LOGIN/CADASTRO) ==================== */
.auth-popup {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 30px;
  width: 90%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 4.5); /* sombra atrás */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-title {
  color: darkgreen;
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  width: 100%;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 2px solid darkgreen;
  border-radius: 10px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-input:focus,
.auth-input:hover {
  border-color: #006400;
  box-shadow: 0 0 8px rgba(0, 100, 0, 0.4);
}

.auth-checkbox {
  width: 100%;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  line-height: 1.4;
}

.auth-checkbox input {
  margin-right: 8px;
  margin-top: 3px;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background-color: darkgreen;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: background-color 0.3s ease;
}

@media (hover: hover) {
  .auth-btn:hover {
    background-color: #006400;
    transform: scale(1.05);
  }
}

@media (hover: none) {
  .auth-btn:active {
    background-color: #006400;
  }
}

.auth-switch {
  font-size: 14px;
  text-align: center;
}

.auth-switch span {
  color: darkgreen;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

.auth-switch span:hover {
  color: #004d00;
  text-decoration: underline;
}

/* ==================== 5. TOOLTIPS DE VALIDAÇÃO ==================== */
.input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* alinha o input e tooltip à esquerda */
}

.username-tooltip {
  display: none;
  position: absolute;
  bottom: 100%; /* coloca o tooltip acima do input */
  left: 0;
  width: 100%;
  margin-bottom: 8px; /* espaço entre input e tooltip */
  background: darkgreen;
  color: white;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
  transform: translateY(-8px); /* pequeno ajuste */
}

.username-tooltip p {
  margin: 4px 0;
  color: #ff5555; /* vermelho por padrão */
}

.username-tooltip .valid {
  color: #9fff9c;
}

.username-tooltip.show {
  display: block;
}

.email-tooltip {
  display: none;
  position: absolute;
  bottom: 100%; /* acima do input */
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: max-content;
  max-width: 90%;
  background: darkgreen;
  color: white;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.email-tooltip p {
  margin: 4px 0;
  color: #ff5555;
}

.email-tooltip .valid {
  color: #9fff9c;
}

.email-tooltip.show {
  display: block;
}

.password-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: max-content;
  max-width: 90%;
  background: darkgreen;
  color: white;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.password-tooltip p {
  margin: 4px 0;
  color: #ff5555;
}

.password-tooltip .valid {
  color: #9fff9c;
}

.password-tooltip.show {
  display: block;
}

/* ==================== PASSWORD TOGGLE ICON ==================== */
.password-wrapper {
  position: relative;
  width: 100%;
  display: block;
  margin-bottom: 18px;
}

.password-field {
  margin-left: -17px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: darkgreen;
  transition: color 0.3s ease;
  width: 24px;
  height: 24px;
}

@media (hover: hover) {
  .password-toggle {
    transition: color 0.3s ease, transform 0.3s ease;
  }
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-open,
.password-toggle .eye-closed {
  display: none;
  width: 20px;
  height: 20px;
  margin-bottom: 16px;
}

.password-toggle .eye-open {
  display: block;
}

#username-tooltip p,
#email-tooltip p,
#password-tooltip p {
  margin: 2px 0;
  font-size: 0.9em;
  color: #ff5555; /* vermelho padrão (inválido) */
  transition: color 0.3s ease;
}

#username-tooltip p.valid,
#email-tooltip p.valid,
#password-tooltip p.valid {
  color: greenyellow; /* verde quando válida */
}

#rule-email-format.invalid {
  color: #ff5555; /* vermelho */
}

#rule-email-format.valid {
  color: #9fff9c; /* verde */
}

/* ==================== 6. HERO SECTION ==================== */
.hero {
  position: relative;
  width: 100%;
  height: 65vh; /* ocupa a tela inteira */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.background-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  filter: blur(8px);
  transform: scale(1.05);
}

.main-logo {
  padding-top: 10vh;
  display: block;
  max-width: 250px;
  z-index: 1;
}

/* ==================== 7. CONTEÚDO PRINCIPAL ==================== */
.content {
  background: white; /* garante fundo branco depois da Hero */
  padding: 50px 20px;
  text-align: center;
}

/* ==================== 8. BARRA DE ORDENAÇÃO DE CARDS ==================== */
.cards-sort-bar {
  width: 100%;
  max-width: 1200px;
  margin: 5px auto;
  margin-right: 15px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.cards-sort-bar label {
  color: darkgreen;
  font-weight: bold;
}

.cards-sort-bar select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 2px solid darkgreen;
  background: white;
  color: darkgreen;
  cursor: pointer;
}

.cards-sort-bar select:focus {
  outline: none;
  box-shadow: 0 0 6px rgba(0, 100, 0, 0.4);
}

/* ==================== 9. CARDS ==================== */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  justify-items: center;
  padding: 30px 0;
}

.card {
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 270px;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
}

@media (hover: hover) {
  .card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
}

.new-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 60px;
  height: 60px;
  background: darkred; /* cor da medalha */
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 1000;
  font-size: 12px;
  clip-path: polygon(
    50% 0%,
    70% 15%,
    100% 0,
    85% 39%,
    100% 50%,
    85% 60%,
    100% 100%,
    70% 85%,
    50% 100%,
    30% 85%,
    0 100%,
    15% 60%,
    0% 50%,
    15% 35%,
    0 0,
    30% 15%
  );
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transform: rotate(-10deg);
}

.new-badge span {
  transform: rotate(15deg); /* compensa a rotação do selo */
}

/* ==================== 10. POPUP DE CARDS (OVERLAY) ==================== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.show {
  display: flex;
  opacity: 1;
}

/* ==================== 11. POPUP CARD - CONTEÚDO ==================== */
.popup {
  background: #ffffff;
  border: 3px solid #333;
  border-radius: 12px;
  padding: 20px;
  max-width: 900px;
  width: 90%;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
  display: flex;
  gap: 20px;
  animation: fadeIn 0.3s ease forwards;
  overflow: visible;
}

.popup img {
  width: 50%;
  border-radius: 8px;
  object-fit: cover;
}

.popup-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* centraliza título + descrição verticalmente */
  align-items: center; /* centraliza horizontalmente */
  height: 100%;
  padding: 0 10px; /* espaço lateral */
}

.popup-title {
  text-align: center;
  margin: 0; /* remove margens fixas */
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-title img {
  width: 300px;
  height: 200px; /* altura uniforme */
  object-fit: contain;
}

.popup-description {
  font-family: "Arial";
  font-size: 20px;
  line-height: 1.6;
  text-align: justify; /* centraliza horizontalmente */
  margin: 20px 0; /* separação do título e do popup */
}

.popup-description,
#comments-container {
  margin-bottom: 20px;
}

.popup-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: auto; /* empurra os botões para o final do popup */
  padding: 15px 0;
  padding-bottom: 10px; /* mantém distância mínima da borda inferior */
}

.popup-buttons button {
  background-color: darkgreen;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

@media (hover: hover) {
  .popup-buttons button {
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  .popup-buttons button:hover {
    background-color: #006400;
    transform: scale(1.05);
  }
}

@media (hover: none) {
  .popup-buttons button:active {
    background-color: #006400;
  }
}

.popup-buttons button.disabled {
  opacity: 0.5; /* deixa meio apagado */
  cursor: not-allowed; /* mostra cursor de não clicável */
  pointer-events: none; /* desativa clique */
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.popup-close:hover {
  color: red;
}

/* ==================== 12. SISTEMA DE LIKES ==================== */
.like-btn {
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.like-btn .like-icon svg {
  width: 22px;
  height: 22px;
  stroke: darkgreen; /* borda */
  fill: none; /* preenchido branco */
  transition: fill 0.2s ease, transform 0.2s ease;
}

.like-btn.liked .like-icon svg {
  fill: darkgreen; /* preenchido verde */
  stroke: darkgreen; /* borda continua */
}

@media (hover: hover) {
  .like-btn:hover {
    transform: scale(1.1);
  }
}

#like-count {
  font-size: 22px;
  color: darkgreen;
  font-weight: bold;
  display: inline-block; /* garante que o span apareça */
  min-width: 20px; /* evita que suma com zero */
  text-align: center;
}

/* ==================== 13. COMENTÁRIOS ==================== */
#popup-comments {
  background: white;
  border: 2px solid darkgreen;
  border-radius: 12px;
  padding: 12px 15px;
  margin: 12px 0;
  width: 100%; /* ocupa toda largura disponível */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#popup-comments h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: darkgreen;
  font-weight: 2000;
}

#comments-container {
  max-height: 80px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding-right: 10px;
  overflow-x: hidden;
}

.comment {
  background: white;
  padding: 5px;
  font-size: 15px;
  text-align: left;
  word-wrap: break-word;
  width: 100%;
  font-weight: 400;
  border-bottom: 1px solid #ccc;
}

.comment strong {
  color: darkgreen;
  font-weight: 400;
}

.comment-input-area {
  display: flex;
  align-items: center;
  margin-top: 8px;
  width: 100%;
}

#comment-input {
  flex: 1;
  border: 2px solid darkgreen; /* 🔹 agora garantido */
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  outline: none;
}

#comment-input:focus {
  border-color: #006400;
  box-shadow: 0 0 6px rgba(0, 100, 0, 0.5);
}

#comment-submit {
  background: none;
  border: none;
  color: darkgreen;
  font-size: 28px; /* seta maior */
  cursor: pointer;
  margin-left: 8px;
  line-height: 1;
  padding: 0;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  #comment-submit {
    transition: transform 0.2s ease, color 0.3s ease;
  }

  #comment-submit:hover {
    color: #006400;
    transform: scale(1.1);
  }
}

@media (hover: none) {
  #comment-submit:active {
    color: #006400;
  }
}

.login-warning {
  font-size: 14px;
  color: #666;
  background: #f2f2f2;
  padding: 6px;
  border-radius: 6px;
  text-align: center;
  margin: 0 auto; /* centraliza horizontalmente */
}

#login-link {
  color: darkgreen;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

#login-link:hover {
  color: #006400;
}

/* ==================== 14. SIDEBAR ==================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999; /* atrás da sidebar */
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -250px; /* largura inicial fora da tela */
  width: 250px;
  height: 100%;
  background-color: darkgreen;
  color: white;
  z-index: 1000; /* na frente do cabeçalho */
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  padding-top: 20px;
  overflow-y: auto;
}

.sidebar.open {
  left: 0;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  right: -20px; /* 20px visíveis */
  width: 20px;
  height: 100%;
  background-color: darkgreen;
}

.sidebar-header {
  display: flex;
  justify-content: flex-start; /* X à esquerda */
  align-items: center;
  padding: 0 15px;
  margin-bottom: 20px;
}

.sidebar-close {
  font-size: 48px;
  cursor: pointer;
  color: white;
}

.sidebar-content {
  padding: 0 15px;
}

.sidebar-content h2 {
  margin: 20px 0 10px 0;
  padding: 10px 0;
  border-top: 1px solid white;
  border-bottom: 1px solid white;
}

.sidebar-content p {
  margin: 5px 0 15px 0;
}

.menu-btn.open {
  font-size: 2rem;
  color: white;
}

.sidebar-guide {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 24px; /* tamanho grande do nome da guia */
  color: white;
  background: none;
  border: none;
  padding: 20px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .sidebar-guide:hover {
    color: #bfff00; /* efeito visual ao passar o mouse */
  }
}

@media (hover: none) {
  .sidebar-guide:active {
    color: #bfff00;
  }
}

.sidebar-guide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: white;
}

.sidebar-guide::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: white;
}

/* ==================== 15. POPUP "QUEM SOMOS" ==================== */
.who-us-popup {
  background-color: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
}

.who-us-popup .popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
}

.who-us-logo {
  max-width: 200px;
  margin-bottom: 20px;
}

.who-us-text h2 {
  margin-bottom: 15px;
  font-size: 24px;
}

.who-us-text p {
  font-size: 16px;
  line-height: 1.5;
  text-align: justify;
}

/* ==================== 16. POPUP "SUA CONTA" ==================== */
.account-popup {
  width: 600px;
  max-width: 90%;
  padding: 30px 25px; /* laterais menores */
  background: #fff;
  border-radius: 16px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centraliza o conteúdo */
  min-height: 400px;
}

.account-guide {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 16px;
  font-weight: bold;
  color: darkgreen;
}

.account-content {
  flex: 1; /* ocupa espaço disponível */
  display: flex;
  flex-direction: column;
  justify-content: center; /* centraliza verticalmente */
}

.account-content label {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 6px;
}

.account-input {
  width: 95%;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 2px solid darkgreen;
  border-radius: 10px;
  font-size: 16px;
  background-color: #f9f9f9;
  outline: none;
}

.account-input:focus {
  border-color: #006400;
  box-shadow: 0 0 8px rgba(0, 100, 0, 0.4);
}

.account-buttons {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.account-buttons button {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
}

.btn-green {
  background-color: darkgreen;
  color: #fff;
}
.btn-green:hover {
  background-color: #3e8e41;
}

.btn-red {
  background-color: #ff0000;
  color: #fff;
}
.btn-red:hover {
  background-color: #d32f2f;
}

.btn-gray {
  background-color: #9e9e9e;
  color: #fff;
}
.btn-gray:hover {
  background-color: #757575;
}

#btn-save-account,
#btn-cancel-edit {
  display: none;
}

.account-input-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.account-input-wrapper .tooltip {
  display: none;
  position: absolute;
  bottom: 150%; /* aparece acima do input */
  left: 0;
  background: darkgreen;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 99999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.account-input-wrapper .tooltip.show {
  display: block;
}

.account-input-wrapper .tooltip p {
  margin: 4px 0;
  color: #ff0000;
}

.account-input-wrapper .tooltip p.valid {
  color: greenyellow; /* verde para válido */
}

/* ==================== 17. POPUP DELETE ACCOUNT ==================== */
#delete-account-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#delete-account-popup-overlay.show {
  display: flex;
}

.delete-popup {
  background: #fff;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.delete-popup-text {
  margin-top: 14px;
  margin-bottom: 20px;
  font-size: 16px;
  color: black;
}

.delete-popup-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.delete-popup-buttons button {
  padding: 10px 25px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
}

.delete-popup-buttons .btn-red {
  background: #ff5555;
  color: white;
}

.delete-popup-buttons .btn-gray {
  background: #ccc;
  color: #333;
}

/* ==================== 18. POPUP ESQUECI MINHA SENHA ==================== */
#forgot-password-overlay {
  display: none; /* escondido por padrão */
  align-items: center;
  justify-content: center;
}

#forgot-password-overlay.show {
  display: flex;
}

#forgot-password-popup {
  width: 90%;
  max-width: 400px;
}

#forgot-password-link {
  color: darkgreen;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
}

#forgot-password-link:hover {
  color: #004d00;
  text-decoration: underline;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  z-index: 1000;
  flex-direction: column;
}
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================== 19. SEÇÃO PARCEIROS ==================== */
.parceiros {
  margin: 50px auto;
  text-align: center;
}

.parceiros h2 {
  font-family: 'Arial';
  color: darkgreen;
  font-size: 28px;
  margin-top: 60px;
  margin-bottom: 60px;
}

.parceiros-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  justify-content: center;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.parceiro {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.parceiros-line {
  color: darkgreen;
  font-family: 'Arial';
  font-size: 30px;
  margin-top: 60px;
  margin-bottom: 60px;
}  

@media (hover: hover) {
  .parceiro:hover {
    transform: scale(1.05);
  }
}

.parceiro-bg {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.parceiro-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit; /* puxa a mesma imagem inline */
  background-size: cover;
  background-position: center;
  filter: blur(3px); /* só o fundo fica borrado */
  z-index: 1;
  border-radius: 12px;
}

.parceiro-logo {
  position: relative;
  z-index: 2; /* acima do pseudo-elemento */
  max-height: 100px;
  max-width: 80%;
  object-fit: contain;
  filter: none; /* garante nitidez */
}

/* ==================== 20. POPUP PARCEIROS ==================== */
#partner-popup-overlay {
    display: none; /* escondido por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.partner-popup {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    padding: 20px;
    position: relative;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;

    /* Força para aparecer acima de tudo */
    z-index: 1000000;

    /* Opcional: animação suave */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#partner-popup-overlay.show .partner-popup {
    opacity: 1;
    transform: scale(1);
}

.partner-logo {
    max-width: 180px;
    margin-bottom: 15px;
}

.partner-content h2 {
    margin-bottom: 10px;
}

#partner-descricao {
  font-size: 20px;
  text-align: justify;
}

#partner-social {
  margin-top: 14px;
  margin-bottom: 14px;
}

.partner-links {
    display: flex;
    justify-content: center;
    gap: 20px; /* espaço entre os ícones */
    margin-top: 15px;
}

.partner-links a.partner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: darkgreen; /* cor dos ícones */
    font-size: 0; /* remove texto se houver */
    transition: color 0.3s;
}

@media (hover: hover) {
  .partner-links a.partner-link:hover {
    color: green; /* hover dos ícones */
  }
}

@media (hover: none) {
  .partner-links a.partner-link:active {
    color: green;
  }
}

.partner-links a.partner-link .icon {
    width: 32px;  /* tamanho do ícone */
    height: 32px;
    fill: currentColor; /* usa a cor definida no a.partner-link */
}

/* ==================== 21. FOOTER ==================== */
.footer {
  background-color: #f2f2f2; /* cinzento próximo do branco */
  padding: 15px 0;
  text-align: center;
  position: relative;
  bottom: 0;
  width: 100%;
}

.footer a {
  display: inline-block;
  margin: 0 15px;
  color: darkgreen;
  transition: transform 0.3s ease, color 0.3s ease;
}

@media (hover: hover) {
  .footer a:hover {
    transform: scale(1.2);
    color: #006400;
  }
}

@media (hover: none) {
  .footer a:active {
    color: #006400;
  }
}

.footer svg {
  width: 35px;
  height: 35px;
  fill: black;
  transition: fill 0.3s ease;
}

@media (hover: hover) {
  .footer a:hover svg {
    fill: #333;
  }
}

.footer-links {
  margin-top: 15px;
}

.footer-text {
  display: inline-block;
  margin: 0 10px;
  color: darkgreen;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  cursor: pointer;
}

.footer-text:hover {
  color: green; /* destaque ao passar o mouse */
}

/* ==================== 22. POPUP FAQ ==================== */
.faq-popup {
  display: none; /* oculto inicialmente */
  position: fixed;
  z-index: 99999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
}

.faq-content {
  background: #fff;
  width: 60%;
  max-width: 600px;
  margin: 5% auto; /* diminuí um pouco para ganhar espaço */
  padding: 20px;
  border-radius: 10px;
  text-align: left;
  position: relative;

  /* Limite de altura e rolagem */
  max-height: 80vh;   /* ocupa no máximo 80% da altura da tela */
  overflow-y: auto;   /* ativa scroll vertical quando necessário */
}

.faq-content h2 {
  margin-top: 0;
}

.faq-content p {
  font-weight: normal;
  text-align: justify;
}

.close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
.close:hover {
  color: #ff0000;
}

/* ==================== 23. BOTÃO DARK MODE ==================== */
.dark-mode-btn {
  position: absolute;
  margin-top: 3px;
  left: 85px; /* ao lado do menu hamburguer */
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-btn svg {
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .dark-mode-btn:hover svg {
    transform: rotate(20deg);
  }
}

/* ==================== 24. ANIMAÇÕES ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 25. MODO ESCURO ==================== */
body.dark-mode {
  background: #1e1e1e; /* fundo geral escuro */
  color: #f0f0f0; /* texto mais claro */
}

footer.dark-mode {
  background: #121212; /* fundo geral escuro */
  color: #f0f0f0; /* texto mais claro */
}

body.dark-mode .content {
  background: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode .auth-popup,
body.dark-mode .popup,
body.dark-mode .account-popup,
body.dark-mode .faq-content {
  background: #1e1e1e;
  color: #f0f0f0;
  border-color: #444;
}

body.dark-mode .auth-input,
body.dark-mode .account-input {
  background: #2a2a2a;
  color: #f0f0f0;
  border: 2px solid #555;
}

body.dark-mode .auth-input:focus,
body.dark-mode .account-input:focus {
  border-color: #888;
  box-shadow: 0 0 8px rgba(200, 200, 200, 0.4);
}

body.dark-mode .popup-description {
  color: #ddd;
}

body.dark-mode #comments-container {
  color: #f0f0f0;
}

body.dark-mode footer {
  background: #121212;
  color: #f0f0f0;
}

body.dark-mode .footer a {
  color: white;
}

body.dark-mode .footer a:hover {
  color: #bfff00;
}

body.dark-mode .footer svg {
  fill: white;
}

body.dark-mode .footer a:hover svg {
  fill: #bfff00;
}

body.dark-mode .parceiros {
  background: #1e1e1e;
}

body.dark-mode footer img {
  filter: invert(1);
}

body.dark-mode footer img:hover {
  filter: invert(0.6); /* mantém destaque no hover */
}

body.dark-mode .auth-title,
body.dark-mode .auth-input,
body.dark-mode .auth-btn,
body.dark-mode .auth-switch span,
body.dark-mode .username-tooltip,
body.dark-mode .email-tooltip,
body.dark-mode .password-tooltip,
body.dark-mode .account-guide,
body.dark-mode .account-input,
body.dark-mode .like-btn .like-icon svg,
body.dark-mode #like-count,
body.dark-mode .forgot-password,
body.dark-mode #login-link,
body.dark-mode #popup-comments h3,
body.dark-mode #forgot-password-link,
body.dark-mode .delete-popup-text,
body.dark-mode .parceiros-line,
body.dark-mode .footer-text {
  color: white !important; /* antes eram darkgreen */
  border-color: white !important;
  stroke: white !important; /* ícones de like */
}

body.dark-mode .cards-sort-bar label {
  color: white;
}

body.dark-mode .cards-sort-bar select {
  border: 2px solid white;
  background: #1e1e1e;
  color: white;
}

body.dark-mode .like-btn.liked .like-icon svg {
  fill: white; /* preenchido verde */
  stroke: white; /* borda continua */
}

body.dark-mode .partner-popup {
    background: #1e1e1e;
    border-color: #555;
}

body.dark-mode .parceiros h2 {
  color: white;
}

body.dark-mode .partner-links a.partner-link {
  color: white;
}

body.dark-mode #comment-input {
  border-color: #555;
  background-color: #1e1e1e;
  color: white;
}

body.dark-mode .comment {
  color: white;
  font-weight: 400;
  background-color: #1e1e1e;
}

body.dark-mode .comment strong {
  color: #808080;
  font-weight: 400;
}

body.dark-mode .popup-close {
  color: white;
}

body.dark-mode .popup-close:hover {
  color: red;
}

body.dark-mode .password-toggle {
  color: white;
}

@media (hover: hover) {
  body.dark-mode .password-toggle:hover {
    color: #bfff00;
  }
}

body.dark-mode .auth-btn {
  border-color: #1e1e1e;
}

body.dark-mode .popup-buttons button {
  background-color: white;
  color: black;
  border: none;
}

body.dark-mode .popup-buttons button:hover {
  background-color: #f0f0f0;
  color: black;
}

body.dark-mode #popup-comments {
  background-color: #1e1e1e;
}

body.dark-mode .login-warning {
  background-color: #181818;
}

body.dark-mode #popup-comments {
  border-color: #555;
}

body.dark-mode .auth-input,
body.dark-mode .account-input {
  background-color: #1e1e1e;
  border: 2px solid #555;
  border-color: #555;
  color: white;
}

body.dark-mode #comment-submit {
  color: white;
}

body.dark-mode #login-link {
  color: white;
  text-decoration: underline;
}

body.dark-mode #login-link:hover {
  color: #bfff00;
}

/* ==================== 26. RESPONSIVIDADE - 1024px ==================== */
@media (max-width: 1024px) {
  header {
    height: 80px;
  }

  .auth-popup {
    width: 85%; /* aumenta ocupação da tela */
    max-width: 400px;
    padding: 60px 40px;
    align-items: center;
    justify-content: center;
  }

  #register-popup {
    height: 60%;
    min-height: 480px; /* maior altura */
    max-height: 100vh; /* para não estourar na tela */
  }

  .auth-content {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .auth-title {
    font-size: 25px;
    width: 100%;
  }

  .auth-input {
    font-size: 20px;
  }

  .auth-btn {
    font-size: 24px;
  }

  .auth-buttons {
    top: 9px;
    right: 15px;
    flex-direction: column;
    gap: 5px;
  }

  .auth-buttons button {
    height: 30px;
    font-size: 12px; /* maior que o original */
    padding: 2px 0px; /* aumenta área clicável */
    width: 70px; /* largura uniforme */
  }

  .auth-checkbox {
    font-size: 18px;
  }

  .auth-checkbox input {
    min-width: 20px;
    min-height: 20px;
  }

  .username-tooltip {
    font-size: 18px;
  }

  .email-tooltip {
    font-size: 18px;
  }

  .password-tooltip {
    font-size: 18px;
  }

  .auth-switch {
    font-size: 18px;
    text-align: center;
  }

  .site-title {
    font-size: 22px;
    padding-right: 30px;
  }

  .menu-btn {
    font-size: 24px; /* maior */
    left: 28px;
  }
  
  .dark-mode-btn {
    left: 85px; /* ao lado do menu hamburguer */
  }

  .main-logo {
    max-width: 200px; /* maior */
    padding-top: 6vh; /* menos espaço no topo */
  }

  .content {
    padding: 40px 20px; /* aumenta área visível */
    font-size: 42px; /* fonte maior */
  }

  .footer {
    padding: 20px 0;
    width: 100%;
    padding-bottom: 54px;
  }

  .footer img {
    width: 48px;
    height: 48px;
    transition: transform 0.3s ease;
  }

  .footer img:hover {
    transform: scale(1.2);
  }

  h3 {
    font-size: 26px;
  }

  .cards-container {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .card {
    max-width: 200px;
  }

  .popup {
    flex-direction: row; /* mantém empilhamento */
    align-items: center;
  }

  .popup img {
    width: 40%; /* menor que 90%, mantém espaço para conteúdo */
  }

  .popup img.card-image {
    display: none;
  }

  .popup-content {
    width: 90%; /* ocupa quase toda a largura */
    text-align: center; /* centraliza título e botões */
  }

  .popup-title {
    font-size: 18px; /* reduz um pouco o título */
  }

  .popup-description {
    font-size: 16px;
    line-height: 1.5;
    text-justify: auto;
  }

  .popup-buttons button {
    font-size: 16px;
    padding: 10px 18px;
  }

  .btn-logout {
    margin-top: 14px;
    margin-left: 100px;
  }

  .btn-admin {
    margin-left: 100px;
  }

  .welcome-message {
    display: none;
  }

  .account-popup {
    flex-direction: column;
    justify-content: center; /* centraliza o conteúdo */
    min-height: 50vh;
  }

  #popup-comments {
    width: 100%; /* ocupa toda a largura visível */
    max-width: 100%; /* evita overflow */
    box-sizing: border-box; /* padding incluso na largura */
  }

  #comments-container {
    max-height: 50px; /* aumenta área visível sem estourar */
    padding-right: 8px; /* evita scrollbar cortar conteúdo */
    word-wrap: break-word;
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: break-word; /* força quebra se necessário */
    hyphens: auto; /* adiciona hífens se cabível */
  }

  .comment {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: pre-wrap; /* mantém quebras de linha do usuário */
  }

  .comment-input-area {
    flex-direction: row; /* empilha input e botão */
    gap: 6px; /* separação entre input e botão */
  }

  #comment-input {
    width: 80%; /* ocupa toda largura */
  }

  #comment-submit {
    font-size: 24px; /* menor para caber */
    align-self: flex-end; /* botão alinhado à direita */
    padding-bottom: 8px;
  }

  .parceiros h2 {
    font-size: 16px;
  }

  .parceiros-line {
    font-size: 14px;
    color: darkgreen;
    font-family: 'Arial';
  }  

  .parceiros-container {
    max-width: 370px;
  }
  /* Logo nítida acima */
  .parceiro-logo {
    max-width: 90%;
  }

  /* Conteúdo do popup */
  .partner-popup {
      width: 80%;
  }
}

/* ==================== 27. RESPONSIVIDADE - 320px ==================== */
@media (max-width: 320px){
  .auth-popup {
    width: 70%; /* aumenta ocupação da tela */
    max-width: 400px;
    padding: 50px 30px;
    align-items: center;
    justify-content: center;
  }

  #register-popup {
    height: 50%;
    min-height: 480px; /* maior altura */
    max-height: 100vh; /* para não estourar na tela */
  }

  .auth-content {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .auth-title {
    font-size: 20px;
    width: 100%;
  }

  .auth-input {
    font-size: 12px;
  }

  .auth-btn {
    font-size: 20px;
  }

  .auth-buttons button {
    height: 26px;
    font-size: 10px; /* maior que o original */
    padding: 2px 0px; /* aumenta área clicável */
    width: 70px; /* largura uniforme */
  }

  .auth-checkbox {
    font-size: 12px;
  }

  .auth-checkbox input {
    min-width: 16px;
    min-height: 16px;
  }

  .username-tooltip {
    font-size: 12px;
  }

  .email-tooltip {
    font-size: 12px;
  }

  .password-tooltip {
    font-size: 12px;
  }

  .auth-switch {
    font-size: 12px;
    text-align: center;
  }

  .site-title {
    font-size: 15px;
    padding-right: 30px;
  }

  .menu-btn {
    margin-bottom: 35px;
    font-size: 24px; /* maior */
    left: 20px;
  }
  
  .dark-mode-btn {
    left: 13px; /* ao lado do menu hamburguer */
    margin-top: 35px;
  }

  .main-logo {
    max-width: 180px; /* maior */
    padding-top: 6vh; /* menos espaço no topo */
  }

  .footer img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
  }

  .footer img:hover {
    transform: scale(1.2);
  }

  h3 {
    font-size: 24px;
  }

  .cards-container {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .popup img {
    width: 50%; /* menor que 90%, mantém espaço para conteúdo */
  }

  .btn-logout {
    margin-top: 16px;
  }

  #popup-comments {
    width: 100%; /* ocupa toda a largura visível */
    max-width: 100%; /* evita overflow */
    box-sizing: border-box; /* padding incluso na largura */
  }

  #comments-container {
    max-height: 40px; /* aumenta área visível sem estourar */
    padding-right: 8px; /* evita scrollbar cortar conteúdo */
    word-wrap: break-word;
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: break-word; /* força quebra se necessário */
    hyphens: auto; /* adiciona hífens se cabível */
  }

  .comment {
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: pre-wrap; /* mantém quebras de linha do usuário */
  }

  .comment-input-area {
    flex-direction: row; /* empilha input e botão */
  }

  #comment-input {
    width: 80%; /* ocupa toda largura */
  }

  #comment-submit {
    font-size: 24px; /* menor para caber */
    align-self: flex-end; /* botão alinhado à direita */
    padding-bottom: 8px;
  }

  .news-btn {
    display: none;
  }
}

/* ==================== 28. RESPONSIVIDADE - 375px ==================== */
@media (max-width: 375px){
  .site-title {
    font-size: 18px;
  }

  .cards-container {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .news-btn {
    display: none;
  }
}

/* ==================== 28.1 RESPONSIVIDADE - 425px ==================== */
@media (max-width: 425px){
  .news-btn {
    display: none;
  }
}

/* ==================== 28.2 RESPONSIVIDADE - 425px ==================== */
@media (max-width: 425px){
  .news-btn {
    display: none;
  }

  .menu-btn {
    margin-bottom: 35px;
    font-size: 24px; /* maior */
    left: 28px;
  }
  
  .dark-mode-btn {
    left: 21px; /* ao lado do menu hamburguer */
    margin-top: 35px;
  }
}

/* ==================== 29. RESPONSIVIDADE - 1492px ==================== */
@media (max-width: 1492px) {
  .card {
    max-width: 240px;
  }

  .popup .popup-title {
    width: 50%;
    border-radius: 8px;
    object-fit: cover;
  }

  .popup img.card-image {
    max-width: 38%;
  }

  .popup-buttons {
    padding: 5px;
  }

  #comments-container {
    max-height: 70px;
  }
}

/* ==================== 30. SISTEMA DE NOTIFICAÇÕES TOAST ==================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2147483647; /* maior z-index seguro possível */
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  animation: slideIn 0.3s ease-out;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 100%;
  word-wrap: break-word;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* Tipos de toast */
.toast-success {
  background-color: #4CAF50;
  color: white;
  border-left: 4px solid #2e7d32;
}

.toast-error {
  background-color: #ff0000;
  color: white;
  border-left: 4px solid #c62828;
}

.toast-warning {
  background-color: #ff9800;
  color: white;
  border-left: 4px solid #e65100;
}

.toast-info {
  background-color: #2196F3;
  color: white;
  border-left: 4px solid #1565c0;
}

/* Ícone do toast */
.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  flex-shrink: 0;
}

/* Mensagem do toast */
.toast-message {
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
}

/* Botão de fechar */
.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  margin-left: 8px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.toast-close:hover {
  opacity: 1;
}

/* Animações */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Toast saindo (via CSS quando classe .show é removida) */
.toast:not(.show) {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: 100%;
  }

  .toast {
    max-width: 100%;
    font-size: 13px;
    padding: 12px 14px;
    min-height: 40px;
  }

  .toast-message {
    flex: 1;
  }
}

/* Dark mode */
body.dark-mode .toast-success {
  background-color: #388e3c;
  border-left-color: #1b5e20;
}

body.dark-mode .toast-error {
  background-color: #d32f2f;
  border-left-color: #b71c1c;
}

body.dark-mode .toast-warning {
  background-color: #f57c00;
  border-left-color: #e65100;
}

body.dark-mode .toast-info {
  background-color: #1976d2;
  border-left-color: #0d47a1;
}

/* ==================== 31. SCROLLBAR CUSTOMIZADO ==================== */

/* Scrollbar do webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px; /* largura do scrollbar */
}

::-webkit-scrollbar-track {
  background: transparent; /* fundo transparente */
}

::-webkit-scrollbar-thumb {
  background-color: #d3d3d3; /* cinza claro */
  border-radius: 10px; /* bordas arredondadas (cápsula) */
  border: 3px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #999999; /* cinza mais escuro no hover */
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* Firefox */
* {
  scrollbar-color: #d3d3d3 transparent;
  scrollbar-width: thin;
}

/* Scrollbar do Firefox no hover (simulado) */
*:hover {
  scrollbar-color: #999999 transparent;
}

/* Dark mode - scrollbar cinzento mais suave */
body.dark-mode ::-webkit-scrollbar-thumb {
  background-color: #555555; /* cinza escuro para dark mode */
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background-color: #888888; /* cinza mais claro no hover em dark mode */
}

body.dark-mode {
  scrollbar-color: #555555 transparent;
}

body.dark-mode:hover {
  scrollbar-color: #888888 transparent;
}

/* ==================== FORMATAÇÃO DE TEXTO ==================== */

.text-censored {
  background-color: #000;
  color: #000;
  padding: 2px 4px;
  border-radius: 2px;
  user-select: none;
  cursor: default;
  font-weight: inherit;
}
