@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}
:root {
  --container-width-1g: 80%;
  --container-width-md: 90%;
  --container-width-sm: 94%;
  --transition: all 400ms ease;
  /*
    Cores escolhidas:
    #aac84e: Verde 
    #f0c47d: Laranja claro 
    #d9d9d9: Cinza claro
    #f4f4f4: Outro tom de cinza 
    #fff: Branco 
    #000: Preto 
    #1a5455: Verde escuro
    #bddeda: Azul claro
    #cbd78d: Verde claro
    */
}
body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.7;
  color: #1a5455;
  background: #f4f4f4;
}
.container {
  width: var(--container-width-1g);
  margin: 0 auto;
}
section {
  padding: 6rem 0;
  margin-top: 3rem;
}
section h2 {
  text-align: center;
  margin-bottom: 4rem;
}
h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
}
h1 {
  font-size: 2.4rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.6rem;
}
h4 {
  font-size: 1.3rem;
}
a {
  color: #1a5455;
}
img {
  width: 90%;
  display: block;
  object-fit: cover;
}
.btn {
  display: inline-block;
  background: #aac84e;
  color: #000;
  padding: 1rem 2rem;
  border: 1px solid transparent;
  font-weight: 500;
  transition: var(--transition);
}
.btn:hover {
  background: transparent;
  color: #000;
  border-color: #000;
}
.btn-primary {
  background: #aac84e;
  color: #000;
}

/* ======================= NAVBAR ======================= */
nav {
  background: transparent;
  width: 100vw;
  height: 5rem;
  position: fixed;
  top: 0;
  z-index: 11;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4);
}
/* Change navbar styles on scroll using javascript */
.window-scroll {
  background: #f4f4f4;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}
.nav__container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav button {
  display: none;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.nav__menu a {
  font-size: 0.9rem;
  transition: var(--transition);
  color: #1a5455;
  font-weight: bold;
}
.nav__menu a:hover {
  color: #aac84e;
}
nav .nav__container .nav__logo {
  display: flex;
  align-items: baseline;
  justify-content: baseline;
}

/* ======================= MAIN ======================= */
.calculadora-grid {
  padding: 6rem 0 3rem 0;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.calculadora-left h1 {
  margin-bottom: 0.7rem;
}

.calculadora-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 15px 0px 30px 0px;
}

.calculadora-form label,
.calculadora-resultado label {
  display: block;
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.calculadora-form select,
.calculadora-form input[type="number"] {
  font: 400 0.9rem/1.2 "Montserrat", sans-serif;
  background-color: #f4f4f4;
  border: 1px solid #c3c3c3;
  padding: 12px;
  color: #1a5455;
  width: 100%;
  box-sizing: border-box;
}

.calculadora-form select {
  padding: 10.5px;
}

.calculadora-form select:focus,
.calculadora-form input[type="number"]:focus {
  outline: none;
  border-color: #aac84e;
  box-shadow: 0 0 0 2px #e0eca4;
}

.calculadora-form .btn {
  grid-column: 1 / 3;
  text-transform: uppercase;
  font-size: 1rem;
  text-align: center;
}

.calculadora-right {
  display: none;
  background-color: #bddeda;
  padding: 30px;
}

.calculadora-right.ativar {
  display: block;
  animation: show 0.5s forwards;
}

@keyframes show {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.calculadora-right h2 {
  font-size: 1.875rem;
  margin-bottom: 0.7rem;
  font-weight: bold;
}

.calculadora-resultado input[type="text"] {
  font: 400 0.9rem/1.2 "Montserrat", sans-serif;
  background-color: #f4f4f4;
  border: 1px solid #c3c3c3;
  padding: 12px;
  color: #1a5455;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.calculadora-resultado p {
  margin-bottom: 20px;
}

.calculadora-resultado h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

/* ======================= SECTION TABELA ======================= */
.tabela-bg {
  padding: 3rem 0;
  background-color: #cbd78d;
}

.tabela-infos h2 {
  text-align: left;
  margin-bottom: 0.7rem;
}

.tabela-infos p {
  max-width: 80ch;
  margin-bottom: 1.8rem;
}

.tabela-container {
  display: grid;
  grid-template-columns: auto;
  border: 1px solid #b0b0b0;
  text-align: left;
  overflow-x: auto;
}

table,
td,
tr,
th {
  padding: 10px 5px 10px 10px;
  border-collapse: collapse;
}

td,
th {
  border-right: 1px solid #b0b0b0;
}

td {
  color: #000;
  border-top: 1px solid #b0b0b0;
}

.tabela td:last-child,
.tabela th:last-child {
  border-right: none;
}

.tabela th,
.tabela tr:nth-child(even) {
  background-color: #f4f4f4;
}

.tabela tr:nth-child(odd) {
  background-color: #d9d9d9;
}

/* ======================= REFERENCIAS ======================= */
.referencias {
  padding: 3rem 0;
}
.referencias h2 {
  text-align: left;
  margin-bottom: 0.7rem;
}

.referencias li {
  margin-bottom: 12px;
  max-width: 100ch;
  word-wrap: break-word;
}

.referencias a {
  font-size: 0.9rem;
}

/* ======================= FOOTER ======================= */
footer {
  background: #cbd78d;
  padding-top: 5rem;
  font-size: 0.9rem;
}
.footer__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5rem;
}
.footer__container > div h4 {
  margin-bottom: 1.2rem;
}
.footer__1 p {
  margin: 0 0 2rem;
}
footer ul li {
  margin-bottom: 0.7rem;
}
footer ul li a:hover {
  text-decoration: underline;
}
.footer__socials {
  display: flex;
  gap: 1rem;
  font-size: 1.2rem;
  margin-top: 2rem;
}
.footer__copyright {
  text-align: center;
  margin-top: 4rem;
  padding: 1.2rem 0;
  border-top: 1px solid #1a5455;
}

/* ======================= MEDIA QUERIES (TABLETS) ======================= */

@media screen and (max-width: 1024px) {
  .container {
    width: var(--container-width-md);
  }
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.7rem;
  }
  h3 {
    font-size: 1.4rem;
  }
  h4 {
    font-size: 1.2rem;
  }

  /* ======================= NAVBAR ======================= */
  nav button {
    display: inline-block;
    background: transparent;
    font-size: 1.8rem;
    color: #1a5455;
    cursor: pointer;
  }
  nav button#close-menu-btn {
    display: none;
  }
  .nav__menu {
    position: fixed;
    top: 5rem;
    right: 5%;
    height: fit-content;
    width: 18rem;
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .nav__menu li {
    width: 100%;
    height: 5.8rem;
    animation: animateNavItems 400ms linear forwards;
    transform-origin: top right;
    opacity: 0;
  }
  .nav__menu li:nth-child(2) {
    animation-delay: 200ms;
  }
  .nav__menu li:nth-child(3) {
    animation-delay: 400ms;
  }
  .nav__menu li:nth-child(4) {
    animation-delay: 600ms;
  }
  .nav__menu li:nth-child(5) {
    animation-delay: 700ms;
  }
  .nav__menu li:nth-child(6) {
    animation-delay: 800ms;
  }
  @keyframes animateNavItems {
    0% {
      transform: rotateZ(-90deg) rotateX(90deg) scale(0.1);
    }
    100% {
      transform: rotateZ(0) rotateX(0) scale(1);
      opacity: 1;
    }
  }
  .nav__menu li a {
    background: #f4f4f4;
    box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
  }
  .nav__menu li a:hover {
    background: #bddeda;
    color: #1a5455;
  }

  /* ======================= HEADER ======================= */
  header {
    height: 52vh;
    margin-bottom: 4rem;
  }
  .header__container {
    gap: 0;
    padding-bottom: 3rem;
  }

  /* ======================= MAIN ======================= */

  .calculadora-grid {
    gap: 1.875rem;
  }
  .calculadora-form div {
    grid-column: 1 / 3;
  }
  .calculadora-right {
    padding: 20px;
  }
  .calculadora-resultado h2 {
    font-size: 1.7rem;
  }

  /* ======================= FOOTER ======================= */
  .footer__container {
    grid-template-columns: 1fr 1fr;
  }
}

/* ======================= MEDIA QUERIES 880px ======================= */
@media screen and (max-width: 880px) {
  .calculadora-grid {
    grid-template-columns: 1fr;
  }
  table,
  td,
  tr,
  th {
    padding: 5px;
  }
  td {
    font-size: 0.8rem;
  }
  .referencias li {
    max-width: 60ch;
  }
}

/* ======================= MEDIA QUERIES (PHONES) ======================= */
@media screen and (max-width: 600px) {
  .container {
    width: var(--container-width-sm);
  }

  /* ======================= NAVBAR ======================= */
  .nav__menu {
    right: 3%;
  }

  /* ======================= HEADER ======================= */
  header {
    height: 100vh;
  }
  .header__container {
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: 0;
  }
  .header__left p {
    margin-bottom: 1.3rem;
  }

  /* ======================= MAIN ======================= */
  .calculadora-grid {
    gap: 1rem;
    padding-bottom: 0;
  }

  .calculadora-form label,
  .calculadora-resultado label,
  .calculadora-resultado h3 {
    font-size: 1.1rem;
  }
  .calculadora-resultado input[type="text"] {
    width: 100%;
  }
  .calculadora-resultado p {
    font-size: 0.9rem;
  }

  th {
    font-size: 0.9rem;
  }

  /* ======================= REFERENCIAS ======================= */
  .referencias {
    display: none;
  }

  /* ======================= FOOTER ======================= */
  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .footer__1 p {
    margin: 1rem auto;
  }
  .footer__socials {
    justify-content: center;
  }
}
