@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
  height: 100%;
}

body {
  background-image: linear-gradient(to bottom, rgba(195, 197, 196, 0.1), #e8f7ec), url('../assets/credito-de-carbono.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  color: #205789;
  line-height: 1.6;
  font-size: medium;
  display: flex;
  flex-direction: column;
}

/* HEADER */
header {
  background-color: #61d56e;
  padding: 15px 40px;
  z-index: 10;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.logo {
  background-color: #fff;
  border-radius: 12px;
  padding: 5px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 100px;
  width: auto;
  display: block;
  pointer-events: none;
}

/* Menu padrão */
nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav ul li a {
  text-decoration: none;
  color: #000;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  background-color: #205789;
  color: #fff;
}

/* Botão Mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.menu-toggle span {
  width: 30px;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* CONTEÚDO PRINCIPAL */
main {
  flex: 1;
  padding: 40px 20px;
}

#calculadora {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(to bottom, #e8f7eccc 0%, #61d56ecc 100%);
  padding: 40px 30px;
  border-radius: 40px;
  box-shadow: 0 8px 20px rgb(97 213 110 / 0.5);
}

#calculadora h2 {
  font-size: 2.2rem;
  color: #205789;
  margin-bottom: 20px;
  text-align: center;
}

#calculadora p {
  color: #444;
  font-size: 1.1rem;
  margin-bottom: 30px;
  text-align: center;
}

#calculadora form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#calculadora label {
  font-weight: 600;
  color: #205789;
  font-size: 1.1rem;
}

#calculadora input[type="number"] {
  padding: 12px 15px;
  border-radius: 10px;
  border: 2px solid #61d56e;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

#calculadora input[type="number"]:focus {
  border-color: #2b9d38;
}

#calculadora button[type="submit"] {
  background-color: #61d56e;
  color: #000;
  font-weight: 700;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#calculadora button[type="submit"]:hover {
  background-color: #2b9d38;
  color: #fff;
}

#resultado {
  margin-top: 30px;
  background-color: #e8f7ecdd;
  border-radius: 20px;
  padding: 25px 30px;
  box-shadow: 0 5px 15px rgb(97 213 110 / 0.3);
  color: #205789;
  font-size: 1.2rem;
  line-height: 1.5;
}

#resultado h3 {
  margin-bottom: 15px;
  font-weight: 700;
}

#resultado p {
  margin-bottom: 10px;
}

/* FOOTER */
footer {
  background-color: #61d56e;
  color: #000;
  padding: 30px 20px;
  text-align: center;
  margin-top: 60px;
}

.logo-footer {
  height: 120px;
  margin-bottom: 7px;
  pointer-events: none;
}

footer a {
  color: #000;
  text-decoration: underline;
  font-weight: 500;
  margin: 0 8px;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #205789;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 20px;
  }

  .logo img {
    height: 80px;
  }

  .menu-toggle {
    display: flex;
    position: absolute;
    top: 25px;
    right: 20px;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  nav ul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #61d56e;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: none;
    gap: 20px;
    z-index: 1000;
  }

  nav ul.show {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  nav ul li a {
    font-size: 1.3rem;
    display: block;
    width: 100%;
    padding: 15px;
  }

  #calculadora {
    padding: 30px 20px;
    border-radius: 30px;
  }

  #calculadora h2 {
    font-size: 1.8rem;
  }

  #calculadora p {
    font-size: 1rem;
  }

  .logo-footer {
    height: 80px;
  }

  footer {
    padding: 20px 15px;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
