:root {
  --cor-principal: #09629e;
  --cor-principal-clara: #ccf2f7;
  --cor-principal-escura: #0d5f96;
  --cor-texto: #333;
  --cor-fundo: #fff;
  --cor-rodape: var(--cor-principal-escura);
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--cor-fundo);
  color: var(--cor-texto);
}

/* Cabeçalho e menu */
.cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--cor-fundo);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
}

.logo img {
  height: 40px;
}

.acoes-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icone {
  height: 34px;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cor-principal-clara); /* azul padrão */
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.btn-icone img {
  height: 20px;
  width: 20px;
}

.btn-whatsapp:hover {
  background-color: #25d366; /* verde WhatsApp */
}

.btn-instagram:hover {
  background-color: #e4405f; /* vermelho/rosa Instagram */
}

.btn-login {
  background: var(--cor-principal);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-login:hover {
  background: var(--cor-principal-escura);
}

/* Modal Login */
.modal-login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  .modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  }
  
  .close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
  }
  
  .radio-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
  }
  
  .form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
  }
  
  input[type="text"],
  input[type="password"] {
    padding: 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
  }
  
  .btn-entrar {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  .erro-campo {
    color: red;
    font-size: 0.85rem;
    margin-top: 4px;
  }

  .erro-mensagem {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
  }


.cabecalho {
  background-color: var(--cor-fundo);
  color: white;
}

.cabecalho .logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.logo img {
  height: 50px;
  margin-right: 1rem;
}

.menu {
  position: relative;
  background: var(--cor-principal-escura);
}

/* Botão mobile (hamburger) */
.menu-toggle {
  display: none;
  background: none;
  font-size: 1.5rem;
  color: white;
  border: none;
  cursor: pointer;
  padding: 1rem;
}

.menu-lista {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  gap: 2rem;
}

.menu-lista li {
  position: relative;
}

.menu-lista li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  display: block;
  transition: background 0.3s;
}

.menu-lista li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Submenu - 2º nível */
.menu-lista li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--cor-principal);
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1000;
  min-width: 200px;
}

.menu-lista li:hover > ul {
  display: block;
}

.menu-lista li ul li a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Submenu - 3º nível */
.menu-lista li ul li ul {
  display: none;
  position: absolute;
  top: 0;
  left: 100%; /* abre ao lado direito */
  background: var(--cor-principal);
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1100;
  min-width: 200px;
}

.menu-lista li ul li:hover > ul {
  display: block;
}

/* Responsividade */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu-lista {
    flex-direction: column;
    display: none;
    gap: 0;
  }

  .menu-lista li {
    width: 100%;
  }

  .menu-lista li ul,
  .menu-lista li ul li ul {
    position: static;
    min-width: 100%;
  }

  .menu-lista li:hover > ul,
  .menu-lista li ul li:hover > ul {
    display: block;
  }

  .menu.ativo .menu-lista {
    display: flex;
  }
}

/* Carrossel */
.carrossel {
  position: relative;
  overflow: hidden;
  background: var(--cor-principal-clara);
  height: 400px;
}

.carrossel .slide {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
}

.carrossel .slide.ativo {
  display: block;
}

.carrossel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carrossel .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.carrossel .overlay h2 {
  margin: 0;
  font-size: 1.5rem;
}

.carrossel .overlay p {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  opacity: 0.9;
}

/* Botões de navegação */
.carrossel .prev, .carrossel .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  z-index: 10;
  transition: background 0.3s;
}

.carrossel .prev:hover, .carrossel .next:hover {
  background: rgba(0,0,0,0.7);
}

.carrossel .prev {
  left: 10px;
}

.carrossel .next {
  right: 10px;
}

/* Conteúdo principal */
.conteudo-principal {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
}

/* Área de notícias */
.ultimas-noticias {
  flex: 2;
}

/* Cabeçalho das últimas notícias */
.ultimas-noticias-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.ultimas-noticias-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.ultimas-noticias-header .ver-todos {
  font-size: 0.9rem;
  color: var(--cor-principal);
  text-decoration: none;
}

.ultimas-noticias-header .ver-todos:hover {
  text-decoration: underline;
}

/* Lista de notícias */
.lista-noticias {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lista-noticias .noticia {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1rem;
}

.lista-noticias .noticia img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.noticia-conteudo {
  flex: 1;
}

.noticia-conteudo .data {
  font-size: 0.85rem;
  color: #888;
  display: block;
  margin-bottom: 0.3rem;
}

.noticia-conteudo h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.noticia-conteudo p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

.noticia-conteudo .saber-mais {
  font-size: 0.85rem;
  color: var(--cor-principal);
  text-decoration: none;
  font-weight: bold;
}

.noticia-conteudo .saber-mais:hover {
  text-decoration: underline;
}

/* Grid responsivo */
.grid-noticias {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .grid-noticias {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-noticias {
    grid-template-columns: 1fr;
  }
}

/* Card da notícia */
.noticia-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.noticia-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.noticia-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.noticia-data {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Conteúdo da notícia */
.noticia-conteudo {
  padding: 1rem;
}

.noticia-conteudo h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.noticia-conteudo p {
  font-size: 0.95rem;
  color: #444;
}

/* Página da notícia */
.pagina-noticia {
  max-width: 900px;
  margin: auto;
  padding: 1rem;
}

.noticia-topo {
  text-align: center;
  margin-bottom: 2rem;
}

.noticia-data {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.noticia-topo h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.noticia-imagem-principal {
  max-height: 400px;
  overflow: hidden;
  border-radius: 8px;
}

.noticia-imagem-principal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Galeria de imagens */
.galeria-container {
  position: relative;
  margin: 2rem 0;
}

.galeria {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1rem;
}

.foto-item {
  min-width: 200px;
  height: 150px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 6px;
}

.foto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botões laterais */
.galeria-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.galeria-btn:hover {
  background: rgba(0,0,0,0.8);
}

.galeria-btn.esquerda {
  left: 5px;
}

.galeria-btn.direita {
  right: 5px;
}

/* Corpo da notícia */
.noticia-conteudo {
  font-size: 1rem;
  line-height: 1.6;
}

.noticia-conteudo img {
  max-width: 100%;
  height: auto;
}

/* Área de atribuições */
.atribuicoes {
  flex: 1;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.atribuicoes h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.lista-atribuicoes article {
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 0;
}

.lista-atribuicoes article:last-child {
  border-bottom: none;
}

.lista-atribuicoes .data {
  font-size: 0.8rem;
  color: #666;
}

.lista-atribuicoes h4 {
  margin: 0.3rem 0;
  font-size: 1rem;
}

.lista-atribuicoes p {
  font-size: 0.9rem;
  color: #444;
}

/* Responsividade */
@media (max-width: 768px) {
  .conteudo-principal {
    flex-direction: column;
  }
}

.atribuicoes {
  background: var(--cor-principal-clara);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
}

.atribuicoes h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--cor-principal-escura);
  border-bottom: 2px solid var(--cor-principal);
  padding-bottom: 0.3rem;
}

.lista-atribuicoes {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.atribuicao-card {
  background: white;
  border-left: 5px solid var(--cor-principal);
  padding: 0.75rem;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.atribuicao-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.atribuicao-modalidade {
  font-weight: bold;
  color: var(--cor-principal-escura);
}

.atribuicao-data {
  font-style: italic;
}

.atribuicao-local {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.atribuicao-texto {
  font-size: 0.85rem;
  color: #444;
  margin: 0.3rem 0;
}

.atribuicao-footer {
  font-size: 0.75rem;
  color: #777;
  margin-top: 0.5rem;
  border-top: 1px dashed #ccc;
  padding-top: 0.3rem;
}

.mural-servicos {
  padding: 20px;
  background: #f5f5f5;
}

.mural-servicos h2 {
  margin-bottom: 15px;
  font-size: 1.5em;
}

.servicos-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.servico {
  flex: 0 0 auto;
  width: 150px;
  background: white;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: black;
  scroll-snap-align: start;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.servico:hover {
  transform: scale(1.05);
}

.servico img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.servico span {
  display: block;
  padding: 10px;
  font-size: 0.9em;
  font-weight: bold;
}

/* Estilo para esconder barra de rolagem no Chrome/Safari */
.servicos-scroll::-webkit-scrollbar {
  display: none;
}
.servicos-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Página institucional */
.pagina-institucional {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.pagina-institucional .banner {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.pagina-institucional h1 {
  font-size: 2rem;
  color: var(--cor-principal-escura);
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--cor-principal);
  padding-bottom: 0.5rem;
}

.pagina-institucional .conteudo-html {
  line-height: 1.6;
}

.pagina-institucional .conteudo-html img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Rodapé */
.rodape {
  background: var(--cor-rodape);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* Responsivo */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu-lista {
    display: none;
    flex-direction: column;
    background: var(--cor-principal);
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 1rem;
  }

  .menu-lista.ativo {
    display: flex;
  }

  .conteudo-principal {
    flex-direction: column;
  }

  .ultimas-noticias article {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ultimas-noticias img {
    width: 100%;
    height: auto;
  }

  .menu-lista li ul {
    position: relative;
  }

  .pagina-institucional .banner {
    height: 200px;
  }
}

/* pagina_institucional.css
   Estilos para página institucional: banner, título e conteúdo HTML.
   Responsivo, acessível e com variáveis de tema.
*/

/* ------------------------
   Variáveis de tema
   ------------------------ */
:root{
  --max-width: 1100px;
  --gutter: 1.25rem;

  /* cor principal (alterar conforme campanhas) */
  --cor-principal: #007B8A;
  --cor-principal-claro: #E6F6F7;
  --cor-principal-escuro: #005f66;

  --texto: #222;
  --muted: #666;
  --fundo: #ffffff;
  --card-bg: #fbfbfb;

  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
}

/* Reset simples (não agressivo) */
* { box-sizing: border-box; }
html,body { height:100%; }
body {
  margin:0;
  font-family: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
  color:var(--texto);
  background:var(--fundo);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  -webkit-text-size-adjust:100%;
}

/* ------------------------
   Layout geral
   ------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

/* ------------------------
   Banner (imagem paisagem)
   ------------------------ */
.page-banner {
  width: 100%;
  height: clamp(180px, 26vw, 360px); /* responsivo */
  display: block;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08));
}

.page-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -o-object-fit: cover;
}

/* overlay para melhorar legibilidade do título */
.page-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.0) 100%);
  pointer-events: none;
}

/* título sobre o banner */
.page-banner__title {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--gutter) + 0.5rem);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  z-index: 2;
}

/* breadcrumb / meta (opcional) */
.page-banner__meta {
  position: absolute;
  left: var(--gutter);
  top: var(--gutter);
  z-index:2;
  color: rgba(255,255,255,0.92);
  font-size: 0.9rem;
  background: rgba(0,0,0,0.18);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

/* ------------------------
   Conteúdo principal
   ------------------------ */
.page-content {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.75rem;
}

/* Content area (HTML vindo do banco) */
.page-body {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Sidebar (opcional) */
.page-aside {
  background: transparent;
  padding-top: 0.25rem;
}

/* ------------------------
   Tipografia e elementos HTML dentro do conteúdo
   ------------------------ */
.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4 {
  color: var(--texto);
  margin: 1rem 0 0.5rem 0;
  line-height: 1.15;
  font-weight: 700;
}

.page-body p {
  margin: 0 0 0.9rem 0;
  color: var(--texto);
  font-size: 1rem;
}

.page-body a {
  color: var(--cor-principal);
  text-decoration: underline;
}
.page-body a:hover { text-decoration: none; }

/* imagens responsivas */
.page-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem 0;
  border-radius: 6px;
  object-fit: cover;
}

/* figuras com legenda */
.page-body figure { margin: 0 0 1rem 0; }
.page-body figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* listas */
.page-body ul, .page-body ol {
  margin: 0 0 1rem 1.25rem;
}

/* tabela */
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
  overflow: auto;
}
.page-body th, .page-body td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #e6e6e6;
  text-align: left;
}
.page-body thead th {
  background: linear-gradient(90deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01));
  font-weight: 600;
}

/* código / pré-formatado */
.page-body pre {
  background: #0f1724;
  color: #e6eef8;
  padding: 0.9rem;
  border-radius: 6px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.9rem;
}

/* blockquote */
.page-body blockquote {
  border-left: 4px solid var(--cor-principal);
  padding: 0.5rem 1rem;
  margin: 0 0 1rem 0;
  background: rgba(0,0,0,0.02);
  color: var(--muted);
}

/* destaque (callout) */
.callout {
  border-left: 4px solid var(--cor-principal-escuro);
  background: rgba(0,0,0,0.03);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin: 0.75rem 0;
}

/* links de ação (botões simples no conteúdo) */
.page-body .btn {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  background: var(--cor-principal);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

/* ------------------------
   Mobile / responsividade
   ------------------------ */
@media (max-width: 980px) {
  :root { --max-width: 920px; }
  .page-content { grid-template-columns: 1fr; }
  .page-banner__title { left: 1rem; right: 1rem; bottom: 1rem; font-size: 1.25rem; }
  .container { padding: 1rem; }
}

@media (max-width: 520px) {
  .page-banner { height: clamp(140px, 34vw, 220px); }
  .page-banner__title { font-size: 1.05rem; }
  .page-body { padding: 1rem; }
}

/* ------------------------
   Acessibilidade
   ------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #fff;
  color: var(--texto);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

/* ------------------------
   Impressão
   ------------------------ */
@media print {
  .page-banner__overlay, .page-banner__meta, .page-banner__title { color: #000; text-shadow: none; }
  .page-banner { height: auto; box-shadow: none; border-radius: 0; }
  .page-content { grid-template-columns: 1fr; }
  .page-body { box-shadow: none; background: transparent; padding: 0; }
}

/* ------------------------
   Utilitários rápidos
   ------------------------ */
.kv-center { text-align: center; }
.mute { color: var(--muted); }
.small { font-size: 0.875rem; }
