/* --- Reset Básico e Estilos Gerais --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  background-color: #fff;
  font-size: 0.9rem; /* Tamanho base para mobile (referência para REMs menores) */
  line-height: 1.3rem;
}

p {
  text-align: left;
  line-height: 1.6;
  margin-bottom: 0.7rem;
  font-size: 1rem; /* Parágrafos no mobile começam com 1rem */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  padding-right: 1rem;
}

a {
  color: #005e8d;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #002b41;
  text-decoration: underline;
}

ul {
  padding-left: 1rem;
}

li {
  list-style-type: disc;
  margin-bottom: 0.5rem;
  font-size: 1rem; /* Itens de lista no mobile (mesmo que parágrafos) */
}

hr {
  border: none;
  border-top: solid #ccc;
  margin-bottom: 1rem;
}

/* Estilo para a lista de notícias */
.feed-description {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.feed-description img {
  max-width: 200px;
  height: auto;
  flex-shrink: 0;
}

.introtext-wrapper {
  flex: 1;
}

.introtext-wrapper p {
  margin: 0 0 10px 0;
}


/* --- Cabeçalhos (Mobile-First) --- */
h1 {
  border-bottom: solid #ccc;
  margin-bottom: 1.2rem;
  color: #483f8a;
  font-size: 1.2rem; /* H1 no mobile começa com 1.2rem */
  line-height: 1.5rem;
}

h2 {
  font-size: 1.15rem;
  margin-top: 1.1rem;
  line-height: 1.4rem;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1rem;
  line-height: 1.35rem;
}

h4 {
  font-size: 1.05rem;
  margin-top: 0.8rem;
  line-height: 1.3rem;
}

h5 {
  font-size: 1rem; /* H5 no mobile (mesmo que parágrafos) */
  margin-top: 1rem;
  line-height: 1.25rem;
}

.dj-hideitem {
  display: none !important;
}

.wrapper {
  margin: 0;
  width: 100%;
}

/* --- Paginação --- */
.pagination {
  text-align: center;
  margin-top: 20px;
}

.step-links a {
  margin: 0 5px;
  text-decoration: none;
}

.step-links .current {
  font-weight: bold;
}

/* --- Estrutura e Layout Geral (Mobile-First) --- */
.grid-container {
  display: flex; /* Mobile-first: column layout */
  flex-direction: column;
  padding: 0.5rem;
  gap: 0.5rem;
}

.grid-container > div {
  color: #333;
  background-color: #fff;
  overflow-wrap: break-word;
  padding: 0.5rem; /* Ajustado para telas pequenas */
  border-width: 0.125rem; /* 2px */
  border-style: solid;
  border-color: #94b1ca #ddd #ddd #ddd;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Sombra mais suave para mobile */
  box-sizing: border-box;
}

.header {
  grid-area: header;
}

.nav {
  grid-area: nav;
}

.main-content {
  grid-area: main-content;
  overflow: visible;
}

.trad {
  grid-area: trad;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: auto;
  padding: 5px 5px;
}

#google_translate_element {
  padding: 0;
  margin: 0;
  line-height: 1;
}

#google_translate_element .goog-te-gadget {
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

#google_translate_element .goog-te-gadget-simple {
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  padding: 2px 4px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

#google_translate_element .goog-te-gadget-simple img {
  vertical-align: middle;
  margin-right: 5px;
}

.user {
  grid-area: user;
  padding: 0.5rem; /* Ajustado para telas pequenas */
}

.user button[type="submit"] {
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  font-weight: bold;
  border-radius: 0.3125rem;
  border: none;
  box-shadow: 0.125rem 0.125rem 0.3125rem #ddd; /* 2px 2px 5px */
  font-size: 0.8rem; /* Ajustado para telas pequenas */
  padding: 0.35rem; /* Ajustado para telas pequenas */
}

.menu {
  grid-area: menu;
  padding: 0.5rem; /* Ajustado para telas pequenas */
}

.menu ul {
  list-style-type: none;
}

.menu li {
  font-size: 0.75rem; /* Ajustado para telas pequenas */
  padding: 0.4rem;
}

.menu li:hover {
  background-color: #3f96a9;
}

.footer {
  grid-area: footer;
  background: #fafafa;
  overflow: visible;
  box-sizing: border-box;
}

/* --- Modal --- */
.modal-footer {
  text-align: right;
  background-color: #cde2e7;
  color: #4a52f0;
}

/* --- Footer --- */
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding: 0 0.5rem;
}

.footer-social-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  overflow-x: auto;
}

.footer-link-item {
  text-align: center;
}

.footer-link-item.small-icon {
  flex-basis: 12%;
  max-width: 12%;
}

.footer-link-item img {
  height: 30px; /* Tamanho base para mobile */
  width: auto;
  object-fit: contain;
}

.footer-info {
  text-align: center;
}

.footer-info h5 {
  font-size: 0.8rem; /* Tamanho base para mobile */
  line-height: 1rem;
}

.separator-image {
  width: 100%;
  height: auto;
}

/* --- Estilos de Formulários --- */
.radio-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-top: 5px;
}

.radio-option {
  display: flex;
  margin-bottom: 6px;
  font-weight: normal;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  margin-right: 5px;
}

input,
textarea,
select {
  font-size: 1rem;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  width: 100%;
}

.fr-view {
  font-size: 1.2rem !important;
  font-weight: normal !important;
  line-height: 1.6 !important;
}

div.fr-element {
  font-size: 1.2rem !important;
  font-weight: normal !important;
}

/* Formulários Gerais */
form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-width: 100%;
}

form input[type="text"],
form select {
  font-size: 1rem;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  width: 100%;
}

form button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background-color: #1d72b8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

form button:hover {
  background-color: #155d8b;
}

/* Formulários de Cadastro/Login */
.post-form {
  gap: 0.5rem;
  border: 5px solid #94b1ca;
  border-radius: 10px;
  background: #fafafa;
  padding: 0.8rem; /* Ajustado para telas pequenas */
  box-shadow: 2px 2px 5px #aaa;
  margin: 0.5rem auto; /* Centraliza e adiciona margem */
  width: 95%; /* Ajustado para telas pequenas */
}

.signin-form {
  gap: 0;
}

.post-form h1 {
  font-size: 1.1rem; /* Ajustado para telas pequenas */
}

.post-form > div {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.label-div {
  display: flex;
  flex-direction: column;
  padding: 0.8rem; /* Ajustado para telas pequenas */
  border: 1px solid #94b1ca;
  font-weight: bold;
}

.label-div .note-editable {
  font-weight: normal !important;
}

.label-div label {
  font-size: 0.9rem; /* Ajustado para telas pequenas */
  display: block;
}

.label-div input {
  height: 1.8rem; /* Ajustado para telas pequenas */
  border: 1px solid #adadad;
  padding: 0 0.4rem;
  width: 98%; /* Ajustado para telas pequenas */
}

.label-div textarea {
  width: 98%;
  min-height: 4rem;
  padding: 0.4rem;
  resize: vertical;
}

.field-div {
  flex-wrap: wrap;
  overflow-x: auto;
  width: 100%;
}

.field {
  font-size: 1rem;
}

.field-error,
.form-error {
  color: #e92134;
  font-size: 0.75rem; /* Ajustado para telas pequenas */
}

.form-error {
  font-size: 1rem;
}

.required {
  display: inline;
  color: #e92134;
  font-size: 0.75rem; /* Ajustado para telas pequenas */
  vertical-align: top;
}

.help-text {
  font-size: 0.9rem;
  color: #4286c0;
}

.help-form {
  color: red;
  font-size: 1rem;
}

.password-div {
  position: relative;
  display: inline;
}

.password-div button {
  background: transparent;
  position: absolute;
  right: 0.2rem; /* Ajustado para telas pequenas */
  border: none;
}

.password-div button img {
  width: 0.9rem; /* Ajustado para telas pequenas */
}

#forgot-password {
  font-size: 0.8rem; /* Ajustado para telas pequenas */
  color: #444;
  width: fit-content;
}

#forgot-password:hover {
  opacity: 0.8;
}

.post-form button[type="submit"] {
  font-weight: bold;
  border-radius: 5px;
  font-size: 0.85rem; /* Ajustado para telas pequenas */
  color: #fff;
  padding: 0.3rem 1rem; /* Ajustado para telas pequenas */
  border: none;
  box-shadow: 2px 2px 5px #ddd;
  width: 100%;
  margin-top: 0.8rem; /* Ajustado para telas pequenas */
}

#post-submit {
  background: linear-gradient(to bottom, #1e3c87 0%, #4d8fcd 100%);
}

#post-submit:hover {
  background: linear-gradient(to bottom, #1e3c87 0%, #4d8fcd 100%);
}

/* Elementos de formulário ocultos */
.hidden-icon,
input[type="checkbox"][name$="-clear"],
label[for$="-clear_id"],
input[name*="DELETE"] {
  display: none;
}

.conditional-field {
  display: none;
  width: 100%;
}

/* --- Autenticação --- */
/* --- Autenticação --- */
.auth-container {
    display: flex;
    align-items: center; /* Alinha verticalmente */
    gap: 1rem; /* Espaço entre nome e botão */
}

.auth-user-info {
    white-space: nowrap; /* Impede que o texto quebre linha */
}

.auth-user-info a {
}

.auth-logout-button {
    width: auto; /* Remove largura fixa */
    max-width: none;
}

.auth-logout-button button {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.auth-links {
}

.auth-links a {
}

/* Botão de limpar filtro */
.btn-secondary {
  padding: 0.5rem 1rem;
  background-color: #6c757d;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* Filtros e exportação */
.filtros-e-exportacao {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.busca-form {
  width: 100%;
}

.busca-cabecalho {
  display: flex;
  flex-direction: column; /* Mobile-first: coluna */
  align-items: stretch; /* Estica os itens */
  gap: 1rem;
}

.busca-info {
  flex: 2;
  min-width: 200px;
}

.busca-form input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.busca-botoes {
  display: flex;
  flex-direction: column; /* Mobile-first: coluna */
  justify-content: center;
  height: 100%;
  gap: 1rem;
}

.clear-button {
  padding: 6px 12px;
  background-color: #ddd;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  margin-left: 0; /* Remove margin-left for mobile */
  margin-top: 0.5rem; /* Add some top margin */
}

.clear-button:hover {
  background-color: #bbb;
}

/* Exportação */
.export-buttons {
  display: flex;
  flex-direction: column; /* Mobile-first: coluna */
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #eee;
  background-color: #f9f9f9;
  border-radius: 6px;
  max-width: 600px;
}

.export-buttons form {
  flex-direction: column; /* Mobile-first: coluna */
  align-items: stretch; /* Estica os itens */
  gap: 1rem;
}


/* --- Media Queries para Responsividade --- */

/* Esconde o menu desktop por padrão (para telas menores que 1458px) */
#dj-megamenu264 {
  display: none !important;
}

/* Exibe o contêiner do hambúrguer por padrão (para telas menores que 1458px) */
#dj-megamenu264mobile {
  display: block;
}

/* Esconde o conteúdo dos itens do menu hambúrguer por padrão */
#dj-megamenu264mobile .dj-accordion-in {
    display: none;
}


/* Telas Intermediárias (Tablets e alguns Desktops pequenos: de 768px até 1457px) */
@media (min-width: 768px) {
  body {
    font-size: 0.95rem; /* Ajustado um pouco menor para tablets */
    line-height: 1.45rem;
  }

  p,
  li {
    font-size: 0.95rem; /* Ajustado para tablets */
  }

  /* Cabeçalhos para Tablets */
  h1 {
    font-size: 1.6rem;
    line-height: 1.9rem;
  }

  h2 {
    font-size: 1.4rem;
    line-height: 1.7rem;
  }

  h3 {
    font-size: 1.25rem;
    line-height: 1.5rem;
  }

  h4 {
    font-size: 1.1rem;
    line-height: 1.4rem;
  }

  h5 {
    font-size: 0.95rem; /* Mesma fonte do parágrafo */
    line-height: 1.2rem;
  }

  /* Layout em Grid para Tablets */
  .grid-container {
    display: grid;
    grid-template-areas:
      "header"
      "nav"
      "trad"
      "user"
      "menu"
      "main-content"
      "footer";
    grid-template-columns: 100%;
    gap: 0.75rem;
    padding: 0.5rem;
  }

  .grid-container > div {
    padding: 0.5rem;
    border-width: 0.1875rem; /* 3px */
  }

  .menu li {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .user button[type="submit"] {
    font-size: 0.85rem;
    padding: 0.4rem;
  }

  /* Estilos de Formulário para Tablets */
  .post-form {
    max-width: 100%;
    padding: 1.2rem;
  }

  .post-form h1 {
    font-size: 1.3rem;
  }

  .label-div {
    padding: 1.2rem;
  }

  .label-div label {
    font-size: 1rem;
  }

  .label-div input {
    height: 2rem;
  }

  .password-div button {
    right: 0.4rem;
  }

  .password-div button img {
    width: 1.1rem;
  }

  .post-form button[type="submit"] {
    font-size: 0.95rem;
    padding: 0.4rem 1.3rem;
  }

  /* Estilos de Rodapé para Tablets */
  .footer-link-item img {
    height: 40px;
  }

  .footer-info h5 {
    font-size: 0.8rem;
    line-height: 1rem;
  }

  /* Div 'user' e seus elementos internos para Tablets */
  .user {
    padding: 0.8rem;
  }

  .auth-container {
    gap: 0.7rem;
  }

  .auth-logout-button {
    max-width: 12rem;
  }

  .auth-logout-button button {
    font-size: 1rem;
    padding: 0.35rem 1rem;
  }

  .auth-links {
    flex-direction: column;
    gap: 0.6rem;
  }

  /* Filtros e Exportação para Tablets */
  .busca-cabecalho {
    flex-direction: row;
    align-items: flex-end;
  }

  .busca-botoes {
    flex-direction: row;
  }

  .clear-button {
    margin-left: 10px;
    margin-top: 0;
  }

  .export-buttons {
    flex-direction: row;
  }

  .export-buttons form {
    flex-direction: row;
    align-items: center;
  }
}

/* Desktop Grande (a partir de 1458px) */
@media (min-width: 1458px) {
  /* Controle de visibilidade do menu */
  #dj-megamenu264 {
    display: block !important; /* Exibe o menu desktop */
  }
  #dj-megamenu264mobile {
    display: none; /* Oculta o hambúrguer */
  }

  body {
    font-size: 1rem; /* Tamanho base para desktop (1rem = 16px) */
  }

  p,
  li {
    font-size: 1rem; /* Parágrafos e itens de lista para desktop */
  }

  /* Cabeçalhos para Desktop */
  h1 {
    font-size: 1.8rem;
    line-height: 2.1rem;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 1.8rem;
  }

  h3 {
    font-size: 1.3rem;
    line-height: 1.6rem;
  }

  h4 {
    font-size: 1.15rem;
    line-height: 1.4rem;
  }

  h5 {
    font-size: 1rem; /* Mesma fonte do parágrafo */
    line-height: 1.3rem;
  }

  /* Layout em Grid para Desktop */
  .grid-container {
  display: grid;
  grid-template-areas:
    "header header"
    "nav nav"
    "user trad"
    "main-content menu"
    "footer footer";
  row-gap: 0.5rem;
  column-gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  grid-template-columns: 75% 25%;
}

.grid-container.no-menu {
  grid-template-areas:
    "header header"
    "nav nav"
    "user trad"
    "main-content main-content"
    "footer footer";
}

  .grid-container > div {
    font-size: 1.05rem; /* Ajustado um pouco menor */
    font-weight: 400;
    padding: 1rem;
    border-width: 0.8px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  }

  .header,
  .nav,
  .menu,
  .menu li {
    font-size: 1.05rem; /* Ajustado um pouco menor */
    padding: 0.75rem 1rem;
  }

  .main-content {
  },
  .footer,
  .trad {
  justify-content: center;},
  .user {
    font-size: 1.05rem; /* Ajustado um pouco menor */
    font-weight: 500;
  }

  .footer-content {
    gap: 2rem;
  }

  .post-form {
    padding: 2rem;
    border-width: 2px;
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .label-div {
    padding: 1rem;
    margin-bottom: 1rem;
    border-width: 1px;
    border-radius: 0.5rem;
  }

  .auth-logout-button button {
    font-size: 1rem;
    font-weight: bold;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    background: linear-gradient(to bottom, #4355bf 0%, #5e6ed2 100%);
    box-shadow: 0.125rem 0.125rem 0.3125rem #b3b3b3;
  }

  .footer-link-item img {
    height: 60px;
  }

  .footer-info h5 {
    font-size: 1rem;
    line-height: 1rem;
  }
}


