/* ======= Base ======= */
body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: #f4f4f4;
  color: #333;
  transition: background-color 0.4s ease, color 0.4s ease;
}

header,
footer {
  background-color: #222;
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
}

.cabecalho-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  max-height: 60px;
}

/* ======= Navegação ======= */
nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a,
footer a,
.redes-sociais a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

nav a:hover,
footer a:hover,
.redes-sociais a:hover {
  text-decoration: underline;
  color: #90caf9;
}

/* ======= Conteúdo ======= */
main {
  padding: 2rem;
}

section {
  margin-bottom: 2rem;
}

/* ======= Botões ======= */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  margin: 0.3rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-email {
  background-color: #0077cc;
  color: #fff;
}

.btn-whatsapp {
  background-color: #25d366;
  color: #fff;
}

.btn-github {
  background-color: #333;
  color: #fff;
}

.btn-secondary {
  background-color: #555;
  color: #fff;
}

/* ======= Botão de Tema ======= */
.btn-tema {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background-color: #333;
  color: #fff;
  border: none;
  padding: 0.6rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.btn-tema i {
  transition: transform 0.3s ease;
}

.btn-tema:hover i {
  transform: rotate(180deg);
}

/* ======= Botão Voltar ao Topo ======= */
#voltar-topo {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 999;
  display: none;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  background-color: #555;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#voltar-topo:hover {
  background-color: #777;
  transform: scale(1.05);
}

/* ======= Formulário ======= */
input,
textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #0077cc;
}

/* ======= Rodapé ======= */
footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

footer nav ul li {
  flex: 1 1 auto;
  text-align: center;
}

footer a,
footer button {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
}

footer a:hover,
footer button:hover {
  color: #90caf9;
}

.aviso-site {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 0.5rem;
}

/* ======= Redes Sociais ======= */
.redes-sociais {
  margin-top: 1rem;
}

.redes-sociais ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.redes-sociais a {
  background-color: #333;
  color: #fff;
  font-size: 1.2rem;
  padding: 0.6rem;
  border-radius: 50%;
  text-decoration: none;
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

.redes-sociais li:nth-child(1) a { animation-delay: 0.1s; }
.redes-sociais li:nth-child(2) a { animation-delay: 0.2s; }
.redes-sociais li:nth-child(3) a { animation-delay: 0.3s; }
.redes-sociais li:nth-child(4) a { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======= Tema Escuro ======= */
.dark-mode {
  background-color: #0f1117;
  color: #e0e0e0;
}

.dark-mode header,
.dark-mode footer {
  background-color: #1a1c23;
  color: #e0e0e0;
}

.dark-mode a {
  color: #58a6ff;
}

.dark-mode .btn {
  background-color: #2c2f36;
  color: #e0e0e0;
  border: 1px solid #444;
}

.dark-mode .btn:hover {
  background-color: #3b3f48;
  color: #fff;
}

.dark-mode input,
.dark-mode textarea {
  background-color: #1e2027;
  color: #e0e0e0;
  border: 1px solid #444;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
  color: #aaa;
}

.dark-mode .redes-sociais a {
  background-color: #2c2f36;
  color: #e0e0e0;
}

.dark-mode .redes-sociais a:hover {
  background-color: #3b3f48;
}

/* ======= Responsividade ======= */
@media (max-width: 600px) {
  .cabecalho-inline {
    flex-direction: column;
    text-align: center;
  }

  nav ul,
  footer nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .redes-sociais ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}