@import url("https://fonts.googleapis.com/css?family=Raleway:200,700|Source+Sans+Pro:300,600,300italic,600italic");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  font-size: 100%;
  --max-size: 850px;
  --primary-bg-color: #023e8a;
  --secondary-bg-color: #0077b6;
  --positive-deg: 3deg;
  --negative-deg: -3deg;
  --before-width: 100%;
  --before-height: 100%;
}

body {
  background-color: #fafafa;
  position: relative;
  z-index: -100;
}

.container {
  overflow: hidden;
  position: relative;
  z-index: -100;
}

hr {
  width: 100%;
  height: 2px;
  border: 0;
  background-color: #aaaaaa99;
}

h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 0.9rem;
}

h1,
h2,
h3 {
  color: #fff;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  font-family: "Raleway", sans-serif;
}

a {
  text-decoration: none;
  color: #ccc;
  border-bottom: 1px dashed #999;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 1rem;
  cursor: pointer;
}

p {
  font-weight: 300;
  color: #fbfbfb;
  line-height: 1.5rem;
  font-size: 1rem;
  font-family: "Source Sans Pro", sans-serif;
}

li {
  color: #aaa;
  list-style: none;
}

button {
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border: 2px solid #aaaaaa99;
  border-radius: 8px;
  background-color: transparent;
  font-family: "Raleway", sans-serif;
  cursor: pointer;
}

button:focus,
input:focus,
textarea:focus {
  outline: none;
}

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  width: 100%;
  background-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  transition: 0.2s linear;
}

nav.active {
  background: rgba(0, 0, 0, 0.88);
}

nav h1 {
  margin-left: 1rem;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s linear;
}

nav.active h1 {
  opacity: 1;
  visibility: visible;
}

nav ul li a {
  padding: 1rem;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

nav ul li a span:first-child {
  margin-right: 0.5rem;
  font-weight: 600;
}

/* HEADER */
header {
  background-image: url("../images/winter_forest_snow_sky.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 8rem 0;
  position: relative;
  z-index: 1;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: -2;
}

/* CONTEÚDO DO HEADER */
.header-content {
  width: min(90vw, var(--max-size));
  margin: 0 auto;
}

.header-content i {
  width: 3.5rem;
  height: 3.5rem;
  border: 2px solid #aaaaaa99;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  /* animação up */
  opacity: 0;
  transform: translateY(1rem);
  animation: animationUp ease-out 1s 0.5s forwards;
}

/* animações */
.header-content h1,
.header-content hr,
.header-content p {
  transform: translateX(1rem);
  opacity: 0;
  animation: animationLeft ease-out 1s forwards; /* precisa vir antes de setar o delay em cada elemento (essa propriedade zera o delay se vir depois sem especificar) */
}

.header-content h1 {
  margin: 1.5rem 0;
  color: #fff;
  font-size: 2rem;
  letter-spacing: 0.25rem;
  font-weight: 600;
  animation-delay: 1.5s; /* animation delay */
}

.header-content hr {
  animation-delay: 1.65s; /* animation delay */
}

.header-content p {
  margin-top: 1.5rem;
  letter-spacing: 1px;
  color: #fff;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  animation-delay: 1.8s; /* animation delay */
}

/* SEÇÃO PRIMÁRIA */
#primary-section {
  width: 100%;
}

#primary-section .background-box {
  padding: 2rem 0 5rem;
  position: relative;
  z-index: 1;
}

#primary-section .background-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1rem;
  width: var(--before-width);
  height: var(--before-height);
  transform-origin: top left;
  transform: rotate(var(--negative-deg));
  z-index: -1;
}

/* BACKGROUND DO ELEMENTO E DO PSEUDO ELEMENTO (IMPAR) */
#primary-section .background-box:nth-child(odd),
#primary-section .background-box:nth-child(odd)::before {
  background-color: var(--primary-bg-color);
}

/* BACKGROUND DO ELEMENTO E DO PSEUDO ELEMENTO (PAR) */
#primary-section .background-box:nth-child(even),
#primary-section .background-box:nth-child(even)::before {
  background-color: var(--secondary-bg-color);
}

/* VARIAÇÃO DA INCLINAÇÃO DO PSEUDO ELEMENTO */
#primary-section .background-box:nth-child(even)::before {
  transform: rotate(var(--positive-deg));
  transform-origin: top right;
  left: -1rem;
}

/* CARDS CONTAINER */
#primary-section .cards-container {
  width: min(90vw, var(--max-size));
  margin: 0 auto;
  display: flex;
}

/* UM LÁ OUTRO CÁ */
#primary-section .background-box:nth-child(odd) .cards-container {
  flex-direction: row-reverse;
}

#primary-section .background-box:nth-child(even) .cards-container {
  flex-direction: row;
}

#primary-section .cards-container img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
}

#primary-section .cards-content {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

#primary-section .background-box:nth-child(odd) .cards-content {
  margin-right: 1.75rem;
  text-align: right;
}

#primary-section .background-box:nth-child(even) .cards-content {
  margin-left: 1.75rem;
}

#primary-section .cards-content p {
  margin-top: 1rem;
  color: #fafafa;
}

#primary-section .cards-content a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  border: 0;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
  font-weight: 600;
  align-self: flex-end;
}

#primary-section .background-box.background-box:nth-child(odd) a {
  align-self: flex-end;
}

#primary-section .background-box:nth-child(even) a {
  align-self: flex-start;
}

#primary-section .cards-content a span:first-child {
  width: 30px;
  height: 30px;
  border: 2px solid #aaaaaa99;
  border-radius: 50%;
  margin-right: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#primary-section .cards-content a span:first-child i {
  transform: translateX(10%);
}

#secondary-section {
  background-color: #222;
  position: relative;
  padding: 2rem 0 3rem;
  z-index: 1;
}

#secondary-section::before,
#secondary-section::after {
  content: "";
  position: absolute;
  background-color: #222;
  top: 0;
  left: -1rem;
  width: var(--before-width);
  height: var(--before-height);
  transform-origin: top right;
  transform: rotate(var(--positive-deg));
  z-index: -1;
}

#secondary-section::after {
  bottom: 0;
  right: 1rem;
  transform-origin: bottom right;
  transform: rotate(var(--negative-deg));
}

#secondary-section .secondary-title {
  width: min(90vw, var(--max-size));
  margin: 0 auto;
}

.secondary-title p {
  margin: 1rem 0 2rem;
}

#secondary-section .places-container {
  width: min(90vw, var(--max-size));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.places-container .places {
  overflow: hidden;
  border-radius: 8px;
  background-color: #333;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.2);
}

.places-container .places img {
  width: 100%;
}

.places-container .places h3 {
  margin: 1.5rem 1rem 1rem;
}

.places-container .places hr {
  width: calc(100% - 2rem);
  margin: 0 auto;
}

.places-container .places p {
  margin: 1rem 1rem 1.5rem;
}

.places-container .places a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 1rem 1.5rem;
  border: 0;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
  font-weight: 600;
}

.places-container .places a span:first-child {
  width: 30px;
  height: 30px;
  border: 2px solid #aaaaaa99;
  border-radius: 50%;
  margin-right: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.places-container .places a span:first-child i {
  transform: translateX(10%);
}

.btn-container {
  width: min(90vw, var(--max-size));
  margin: 3rem auto 0;
}

/* footer */
footer {
  background-image: url("../images/winter_forest_snow_sky.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 6rem 0 4rem;
  position: relative;
  z-index: 1;
}

footer::before {
  background-color: rgba(0, 0, 0, 0.6);
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

.footer-container {
  width: min(90vw, var(--max-size));
  margin: 0 auto;
}

.footer-container .contact-title p {
  margin: 1rem 0;
}

.form-social {
  display: flex;
  justify-content: space-between;
}

.form-container,
.socials-container {
  width: 45%;
}

.form-container .input-field label {
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  font-size: 0.9rem;
  font-family: "Raleway", sans-serif;
  margin: 1.5rem 0 0.5rem;
  display: inline-block;
}

.form-container .input-field input,
.form-container .input-field textarea {
  display: inline-block;
  width: 100%;
  background-color: #99999922;
  border: 2px solid #aaaaaa99;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: #fff;
}

.input-field textarea {
  height: 16rem;
  resize: vertical;
}

.form-container button {
  margin: 1.5rem 0;
}

.socials {
  display: flex;
  flex-direction: column;
}

.socials a {
  display: inline-flex;
  align-items: center;
  border: 0;
  margin-top: 1rem;
}

.socials li:last-child a {
  margin-bottom: 2rem;
}

.socials li a span:first-child {
  width: 35px;
  height: 35px;
  border: 2px solid #aaaaaa99;
  border-radius: 50%;
  margin-right: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.socials li a span:last-child {
  border-bottom: 1px dashed #aaaaaa99;
  display: block;
}

.footer-container > p:last-child {
  text-align: center;
  margin: 3rem 0 0;
}

.footer-container > p:last-child,
.footer-container > p:last-child a {
  color: #aaaaaaaa;
  border-color: #aaaaaaaa;
}

.footer-container > p:last-child br {
  display: none;
}

/* modal */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: 0.1s linear;
}

.modal-overlay.toggle-modal {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: #333;
  width: min(80vw, 340px);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  position: relative;
}

.modal-container h2 {
  font-size: 1.2rem;
}

.modal-container ul li a {
  display: inline-block;
  width: 100%;
  padding: 0.8rem;
  color: #fff;
  font-weight: 300;
  font-size: 0.95rem;
  text-transform: uppercase;
  font-family: "Raleway", sans-serif;
  border: 0;
  border-radius: 8px;
}

.modal-container ul li a:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

.modal-container ul {
  margin-top: 1rem;
}

.modal-container .close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  color: #fff;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* animações */
@keyframes animationUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes animationLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Small devices (portrait tablets and large phones, 768px and down) */
@media only screen and (max-width: 768px) {
  :root {
    --positive-deg: 3deg;
    --negative-deg: -3deg;
  }

  .header-content h1 {
    font-size: 1.5rem;
    letter-spacing: 0.15rem;
  }

  /* tamanho das imagens */
  #primary-section .background-box img {
    width: 200px;
    height: 200px;
  }

  .form-social {
    flex-direction: column;
  }

  .form-container,
  .socials-container {
    width: 100%;
  }

  .input-field textarea {
    height: 8rem;
  }
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  :root {
    font-size: 93.75%;
  }

  nav ul a span:first-child {
    display: none;
  }

  header {
    padding: 6.5rem 0;
  }

  #primary-section .background-box {
    padding-bottom: 3.5rem;
  }

  /* ajustando cards container */
  #primary-section .background-box:nth-child(odd) .cards-container,
  #primary-section .background-box:nth-child(even) .cards-container {
    flex-direction: column;
  }

  #primary-section .background-box img {
    display: inline-block;
  }

  /* ajustando posição das imagens */
  #primary-section .background-box:nth-child(odd) img {
    margin: 0 0 1.5rem auto;
  }

  #primary-section .background-box:nth-child(even) img {
    margin: 0 auto 1.5rem 0;
  }

  #primary-section .background-box:nth-child(odd) .cards-content,
  #primary-section .background-box:nth-child(even) .cards-content {
    margin: 0;
  }

  /* ajustando o grid (estudar mais) */
  #secondary-section .places-container {
    grid-template-columns: 1fr;
  }

  /* tamanho do botão */
  button {
    width: 100%;
  }

  /* pegando o último "p" que esteja diretamente ligado a ".footer-container" */
  .footer-container > p:last-child {
    text-align: left;
  }

  .footer-container > p:last-child br {
    display: block;
  }

  .footer-container > p:last-child span {
    display: none;
  }
}
