* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  color: #333;
 background: url('../N_img/bckgrn.png') no-repeat center top fixed;
  background-size: cover;
  line-height: 1.4;
}

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(64, 114, 175, 0.16);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.17);
  border-radius: 12px;
  width: 100%;
  min-width: 320px;
}

/* Header */
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.logo-topo {
  height: 80px;
  max-width: 200px;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: rgba(2, 33, 72, 0.78);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-width: 320px;
}

nav a {
  background-color: rgba(2, 33, 72, 0.84);
  color: #f9f9f9;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: bold;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: #fff;
  color: rgba(2, 33, 72, 0.84);
}

/* Conteúdo */
.content {
  background: rgba(243, 242, 242, 0.8);
  padding: 15px;
  margin: 20px auto;
  border-radius: 8px;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 800px;
}

/* Área rolável */
.scrollable-content {
  max-height: calc(59vh - 55px);
  overflow-y: auto;
  width: 100%;
  overflow-x: hidden;
}

/* Evitar que links estiquem o container */
ul.artigos-lista li a {
  display: block;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  color: #013066;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s;
}

ul.artigos-lista li a:hover {
  color: #024b9b;
  text-decoration: underline;
}

/* Header Controls */
.header-controls {
  position: sticky;
  top: 0;
  background: rgba(2, 27, 58, 0.85);
  padding: 5px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: nowrap;
  z-index: 10;
  box-shadow: 0 5px 6px rgba(16, 0, 40, 0.3);
  width: 100%;
}

.header-controls h2 {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
  text-align: left;
  min-width: 120px;
  white-space: nowrap;
}

.header-controls input#filtro {
  flex: 1 1 320px;
  max-width: 360px;
  padding: 8px 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 0 auto;
  min-width: 120px;
}

.font-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 120px;
}

.font-controls button {
  background-color: rgba(240, 242, 243, 0.8);
  color: rgb(1, 24, 51);
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 1rem;
  font-weight: bold;
}

.font-controls button:hover {
  background-color: rgb(1, 24, 51);
  color: rgba(240, 242, 243, 0.8);
}

p {
  text-indent: 1.5em;
}

ul.artigos-lista {
  list-style: none;
  padding-left: 20px;
  margin-top: 15px;
}

ul.artigos-lista li {
  margin-bottom: 8px;
}

.footer-gallery {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 2px 0;
  margin-top: 10px;
  width: 100%;
}

.gallery-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.footer-gallery img {
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 80px;
  flex-shrink: 0;
  object-fit: contain;
}

.social-links {
  text-align: center;
  margin-bottom: 2px;
  font-size: 1.2rem;
}

.social-links a {
  margin: 0 10px;
  color: inherit;
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 4px;
  background-color: rgba(1, 27, 58, 0.92);
  color: #fff;
  font-size: 0.75rem;
  border-radius: 0 0 12px 12px;
}

/* Responsivo */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }

  nav.show {
    display: flex;
  }

  .header-controls {
    flex-wrap: wrap;
    padding: 8px 10px;
  }

  .header-controls h2 {
    flex-basis: 100%;
    margin-bottom: 8px;
    text-align: left;
    white-space: normal;
  }

  .header-controls input#filtro {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 10px;
  }

  .font-controls {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 650px) {
  .header-controls input#filtro {
    margin: 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .header-controls h2 {
    font-size: 1rem;
  }

  .font-controls button {
    font-size: 0.9rem;
    padding: 4px 8px;
  }

  .filtro-wrapper input {
    font-size: 0.9rem;
  }

  .scrollable-content {
    max-height: none;
  }
}
