/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f9fd;
  color: #222;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

main, .login-container, .login-box, header, footer {
  position: relative;
  z-index: 1; /* garante que fiquem acima da cidade */
}

/* Cabeçalho */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

header .logo {
  display: flex;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  color: #58a1ff;
}

header .logo img {
  width: 50px;
  margin-right: 10px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 55px;
  font-size: 1.5rem;
  margin-right: 2.5rem;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

nav ul li a:hover,
nav ul li a.active {
  color: #58a1ff;
}

/* --- Login --- */
.login-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 60px 40px;
  max-width: 1200px;
  margin: auto;
  gap: 50px;
}

.login-box {
  background: #fff;
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 450px;
  text-align: center;
}

.login-box h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #111;
}

.login-box p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 30px;
}

.login-box input {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1.2rem;
  transition: 0.3s;
}

.login-box input:focus {
  border-color: #58a1ff;
  box-shadow: 0 0 6px rgba(88,161,255,0.3);
  outline: none;
}

.login-box button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #58a1ff;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  transition: 0.3s;
}

.login-box button:hover {
  background: #3b8cf5;
  transform: scale(1.02);
}

.login-box .register {
  display: block;
  margin-top: 20px;
  color: #58a1ff;
  text-decoration: none;
  font-weight: bold;
}

.login-box .register:hover {
  text-decoration: underline;
}

.login-img img {
  width: 500px;
  max-width: 100%;
}

/* Rodapé */
footer {
  position: relative;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

footer p {
  position: relative;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

.cidade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s ease, transform 1.4s ease;
  pointer-events: none;
}

body.loaded .cidade {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Animação suave global ===== */
body {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

body.loaded {
  opacity: 1;
  transform: translateY(0);
}

header, footer, .login-box, .login-img {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

body.loaded header,
body.loaded footer,
body.loaded .login-box,
body.loaded .login-img {
  opacity: 1;
  transform: translateY(0);
}

/* --- Correção de camadas --- */
body {
  position: relative;
  overflow-x: hidden;
}

footer {
  position: relative;
  z-index: 0; /* cria o contexto certo */
}

.cidade {
  position: fixed; /* muda de absolute pra fixed */
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  z-index: -1; /* agora fica realmente atrás de tudo */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s ease, transform 1.4s ease;
  pointer-events: none;
}

body.loaded .cidade {
  opacity: 1;
  transform: translateY(0);
}
