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

:root {
  --background-color: #303446;
  --text-color: #c6d0f5;
  --border: 1px solid #c6d0f5;
  --news-title: #51576d;
}

body {
  font-family: "Fira Code", monospace;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 1rem;
  overflow: hidden;
}

input {
  background-color: transparent;
  border: var(--border);
  border-radius: 1rem;
  padding: 0.5rem;
  text-align: center;
  color: var(--text-color);
}

a {
  color: var(--text-color);
  text-decoration: none;
}

i {
  color: var(--text-color);
}

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

main {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;

  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  gap: 1rem;
  margin-bottom: 5rem;
}

main>section {
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.info-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.8rem;
}

.info-weather img {
  display: none;
}

.search {
  display: flex;
  justify-content: center;
}

.hand {
  display: flex;
  justify-content: center;
  padding: 2rem;
  animation: handMove 1.5s infinite;
}

.news {
  align-items: center;
  border: var(--border);
  border-radius: 1rem;
  overflow-y: scroll;
  margin-top: 0.5rem;
  width: 100%;
  max-height: 500px;
}

.news .title {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: var(--border);
}

.title i,
.title span {
  color: var(--news-title);
  font-size: 1.5rem;
  font-weight: 500;
}

.news>div {
  display: flex;
  justify-content: center;
  width: 100%;
}

.scroll {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.row-news {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-bottom: var(--border);
  border-radius: 0.1rem;
  padding: 0.5rem;
  word-wrap: break-word;
}

.row-news:last-child {
  border-bottom: none;
}

.row-news p {
  font-size: 1rem;
}

footer a {
  display: flex;
  align-items: center;
  font-size: 1rem;
  text-align: center;
  justify-content: center;
  margin-top: 2rem;
  gap: 0.4rem;
}

.greeting-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
  font-family: "Poppins", sans-serif;
  color: #a5adce;
}

.greeting-box {
  display: flex;
  gap: 0.2rem;
  text-align: center;
}

@keyframes handMove {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(10px);
  }

  100% {
    transform: translateX(-10px);
  }
}

@media (min-width: 300px) {
  main {
    height: 50vh;
    margin: 2rem 0 4rem 0;
  }

  main::-webkit-scrollbar {
    display: none;
  }

  nav {
    justify-content: center;
  }

  input,
  .logo {
    display: none;
  }

  .greeting-container {
    font-size: 0.9rem;
    gap: 0.5rem;
    text-align: center;
    margin: 2rem 0;
  }

  .greeting-box span {
    font-size: 1rem;
  }

  .hand {
    padding: 0.5rem 0;
  }
}

@media (min-width: 920px) {
  main::-webkit-scrollbar {
    display: none;
  }

  input {
    width: 20rem;
  }

  nav {
    justify-content: space-between;
  }

  input,
  .logo {
    display: block;
  }

  #hour,
  #previsao-tempo {
    display: block;
  }

  .info-weather {
    font-size: 0.9rem;
  }

  .info-weather img {
    display: block;
  }
}

@media (min-width: 1024px) {
  .container {
    margin: 1rem auto;
    width: 90%;
  }

  .greeting-container {
    margin: 4rem 0;
  }

  main {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  input {
    width: 30rem;
  }

  .hand {
    display: none;
  }

  .logo {
    position: relative;
    width: 100px;
  }

  .logo img {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (min-width: 2500px) {
  body {
    overflow: scroll;
  }

  .container {
    margin: 2rem auto;
    width: 90%;
    height: 90%;
  }

  main,
  .greeting-container,
  footer {
    margin: 10rem auto;
  }
}

/* ===== Scrollbar CSS ===== */
/* Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: #798595;
}

/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
  width: 5px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

.news::-webkit-scrollbar-track {
  margin-block-start: 3rem;
  margin-block-end: 0.5rem;
}

*::-webkit-scrollbar-thumb {
  background-color: #798595;
  border-radius: 5px;
}
