/* === Reset e configurações básicas === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #f5f5f5;
}

/* === Acessibilidade === */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: #000;
  color: #fff;
  z-index: 1000;
  text-decoration: none;
  border-radius: 4px;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid #222;
  outline-offset: 3px;
  border-radius: 4px;
}

/* === Cabeçalho === */
header {
  background-color: #666;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
}

header h1 {
  margin-bottom: 0.4rem;
  font-size: 2rem;
  line-height: 1.2;
}

header p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* === Navegação === */
nav {
  background-color: #bbb;
  text-align: center;
  padding: 0.85rem 1rem;
}

nav a {
  display: inline-block;
  margin: 0 1rem;
  padding: 0.2rem 0;
  text-decoration: none;
  color: #111;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: #000;
  border-bottom-color: #000;
}

/* === Área principal === */
main {
  flex: 1;
  padding: 1.25rem 1rem;
}

.conteudo {
  max-width: 960px;
  margin: 0 auto;
  background-color: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
}

.conteudo section {
  margin-bottom: 2.5rem;
}

.conteudo section:last-child {
  margin-bottom: 0;
}

/* === Tipografia de conteúdo === */
h2 {
  margin-bottom: 1.25rem;
  font-size: 1.7rem;
  line-height: 1.25;
  color: #222;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.18rem;
  line-height: 1.3;
  color: #333;
}

p {
  margin-bottom: 1rem;
}

.texto p:last-child,
footer p:last-child,
header p:last-child {
  margin-bottom: 0;
}

/* === Blocos com imagem e texto === */
.bloco {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.bloco:last-child {
  margin-bottom: 0;
}

.bloco .texto,
.formulario {
  flex: 2 1 320px;
  min-width: 320px;
  text-align: justify;
  line-height: 1.8;
  font-size: 1.05rem;
}

.bloco .imagem {
  flex: 1 1 312px;
  min-width: 312px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.imagem-lateral {
  flex: 1 1 312px;
  min-width: 312px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === Imagens === */
.bloco img,
.imagem-lateral img {
  display: block;
  width: 100%;
  max-width: 312px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* === Formulários === */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: bold;
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem;
  font-size: 0.95rem;
  font-family: Arial, sans-serif;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  background-color: #fff;
  color: #222;
}

textarea {
  min-height: 120px;
}

button {
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  background-color: #666;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #444;
}

#mensagem-salva {
  background-color: #eee;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 2rem;
  max-width: 480px;
  font-size: 0.9rem;
}

#mensagem-salva h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

/* === Rodapé === */
footer {
  background-color: #666;
  color: #fff;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 1rem;
}

/* === Responsividade === */
@media (max-width: 768px) {
  .conteudo {
    padding: 1.5rem;
  }

  .bloco {
    gap: 1.5rem;
  }

  .bloco .texto,
  .formulario {
    min-width: 280px;
  }

  nav a {
    margin: 0.35rem 0.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.08rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  header {
    padding: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .conteudo {
    padding: 1rem;
    box-shadow: none;
  }

  .bloco {
    flex-direction: column;
    gap: 1rem;
  }

  .formulario,
  .imagem,
  .imagem-lateral,
  .bloco .texto {
    min-width: 100%;
  }

  .bloco .texto,
  .formulario {
    font-size: 1rem;
    text-align: left;
  }

  .bloco img,
  .imagem-lateral img {
    max-width: 100%;
    max-height: 320px;
  }

  nav {
    padding: 0.5rem 0.75rem;
  }

  nav a {
    margin: 0.35rem 0.45rem;
    font-size: 0.95rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.02rem;
  }
}