* {
  padding: 0;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
  outline: none;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html::-webkit-scrollbar {
  width: 0.5rem;
}

html::-webkit-scrollbar-thumb {
  background-color: #2a3f6d;
  border-radius: 2rem;
}

html::-webkit-scrollbar-track {
  background-color: transparent;
}

body {
  min-height: 100dvh;
  padding-top: 6.7rem;
  height: max-content;
  background-image: radial-gradient(circle at 50% 0%, #eef2f8 0%, transparent 70%);
}

#intro {
  width: 100%;
  height: 100%;
  background-color: #eaecef;
  z-index: -9999;
  position: fixed;
  display: grid;
  left: 0;
  top: 0;
  place-items: center;
  opacity: 0;

  &::after {
    content: '';
    background-image: url(./assets/logo-intro.png);
    background-size: cover;
    width: 15rem;
    aspect-ratio: 1;
    scale: 0;
    animation: intro-intro 2s ease forwards;
  }
}

@keyframes intro-intro {
  50% {
    scale: .9;
  }

  60%,
  80% {
    scale: 0.7;
  }
}

@keyframes intro {

  0%,
  75% {
    z-index: 99999;
    opacity: 1;
  }

  100% {
    z-index: 99999;
  }
}

header {
  padding: 0.2rem 2rem;
  display: grid;
  place-items: center;
  background-color: #ffffffcc;
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  box-shadow: rgba(0, 0, 0, 0.00) 0px 6px 24px 0px, rgba(0, 0, 0, 0.04) 0px 0px 0px 1px;
}

header .container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  align-items: center;
  justify-content: space-between;
}

header img {
  width: 6rem;
  animation: intro-header 1s;
}

@keyframes intro-header {
  0% {
    scale: 2;
    opacity: 0;
  }
}

header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

header nav button {
  display: none;
}

header nav a {
  color: #3498db;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.5rem 0.5rem;
  border-bottom: 2px solid transparent;
  transition: all 0.5s;
  font-size: 1rem;

  &:hover {
    border-color: #3498db;
  }
}

header nav a:nth-child(2),
a:first-child {
  color: #333333;

  &:hover {
    border-color: #333333;
  }
}

header nav a.btn {
  background-color: #3498db;
  color: #fff;
  padding: 0.75rem 1rem;
  border: 0;
  margin-left: 2rem;
  border-radius: 0.2rem;
  border: 2px solid #3498db;

  &:hover {
    color: #3498db;
    background-color: transparent;
  }
}

a {
  text-decoration: none;
  cursor: pointer;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 5rem;
  gap: 4rem;
}

main .banner-container {
  position: relative;
}

main .banner-container h1 {
  position: absolute;
  top: 60%;
  z-index: 99;
  left: calc(50% - 15rem);
  width: 40rem;
  font-size: 1.7rem;
  text-transform: uppercase;
  background-image: linear-gradient(to right, #2a3f6d, transparent);
  padding: 1.5rem;
  text-wrap: wrap;
  transform: translate(-50%, -50%);
  border-radius: 1rem;
  color: #fff;
}

main .banner {
  filter: brightness(0.75);
  max-width: 100%;
  height: 20rem;
  width: 100vw;
  object-fit: cover;
}

main .banner-container {
  overflow: hidden;
}

main .banner-container .banner {
  animation: banner2 15s infinite;
}

@keyframes banner2 {
  50% {
    scale: 1.1;
    rotate: -.7deg;
  }
}

main .diferenca {
  max-width: 1040px;
  width: 100%;
  display: flex;
  gap: 2rem;
}

.diferenca-track {
  display: contents;
}

.diferenca-dots {
  display: none;
}

main .diferenca .box .icone {
  width: 4rem;
  aspect-ratio: 1;
  background-color: #5dade2;

  &.descomplicado {
    mask: url(./assets/chave.png);
    mask-size: contain;
  }

  &.seguro {
    mask: url(./assets/seguro.png);
    mask-size: contain;
  }

  &.suporte {
    mask: url(./assets/24-7.png);
    mask-size: contain;
  }
}

main .diferenca .box {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2rem;
  color: #333333;
  font-size: 0.65rem;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  text-wrap: nowrap;
  text-transform: uppercase;
  padding: 2rem;
  border-radius: 1rem;
  justify-content: center;
  background-color: #ffffff;
  align-items: center;
  opacity: 0;
}

@keyframes diferencas {
  to {
    opacity: 1;
  }
}

main #imoveis {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  height: max-content;
  column-gap: 2.5rem;
  perspective: 1000px;
  row-gap: 3rem;
}

main #imoveis .imovel {
  width: 22rem;
  padding: 1rem;
  display: flex;
  overflow: hidden;
  border-radius: 1rem;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  background-color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(15%);
  transition: all 0.5s;

  &:hover {
    box-shadow: rgba(0, 0, 0, 0.15) 0px 6px 24px 0px, rgba(0, 0, 0, 0.1) 0px 0px 0px 1px;
  }

  &:hover img {
    scale: 1.1;
    transform: translateY(-2.5%);
  }
}

@keyframes card {
  100% {
    opacity: 1;
    transform: none;
  }
}

main #imoveis .imovel.left {
  transform: translateY(15%) translateX(-15%);
}

main #imoveis .imovel.right {
  transform: translateY(15%) translateX(15%);
}

main #imoveis .imovel.visivel {
  transform: none;
  opacity: 1;
}

main #imoveis .imovel .id {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 99;
  border-radius: 1rem;
  padding: 0.5rem;
  background-color: #2a3f6d;
  color: #fff;
}

main #imoveis .imovel .img {
  position: relative;
  left: -1rem;
  top: -1rem;
  margin-bottom: -1rem;
  width: calc(100% + 2rem);
  height: 14rem;
  overflow: hidden;
}

main #imoveis .imovel img {
  object-fit: cover;
  width: 100%;
  transition: all 1s;
  height: 100%;
}

main #imoveis .imovel h3 {
  color: #333;
  font-size: 1rem;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

main #imoveis .imovel .detalhes {
  display: flex;
  border-top: 1px solid #33333350;
  padding-block: 1rem;
  position: relative;
  width: 100%;
  justify-content: space-between;
}

main #imoveis .imovel .line {
  width: 3px;
  display: block;
  background-color: #333;
  height: 3rem;
  transform: translateY(-0.5rem);
}

main #imoveis .imovel .detalhes ul {
  font-weight: 500;
  font-size: 1.05rem;
  display: flex;
  flex-direction: column;
  color: #333;
  gap: 1rem;
  list-style: none;
  /* list-style-image: linear-gradient(to right, #3498db, transparent); */
}

main #imoveis .imovel .detalhes ul li {
  position: relative;
  left: 1.5rem;
}

main #imoveis .imovel .detalhes ul li::before {
  content: "";
  position: absolute;
  z-index: 99;
  top: 50%;
  left: -1.5rem;
  transform: translateY(-50%);
  width: 1rem;
  aspect-ratio: 1;
}

main #imoveis .imovel .detalhes ul li:nth-child(1)::before {
  background-color: #3498db;
  mask: url(./assets/local.png);
  mask-size: contain;
}

main #imoveis .imovel .detalhes ul li:nth-child(2)::before {
  background-color: #3498db;
  mask: url(./assets/mobilia.png);
  mask-size: contain;
}

main #imoveis .imovel .detalhes ul li:nth-child(3)::before {
  background-color: #3498db;
  mask: url(./assets/carro.png);
  mask-size: contain;
}

main #imoveis .imovel .detalhes p {
  color: #333;
  font-weight: 500;
  background-image: linear-gradient(to top, #2a3f6d50, transparent 50%);
  height: fit-content;
  padding: 0.2rem;
  font-size: 1.05rem;

}

footer {
  background-color: #2a3f6d;
  display: grid;
  place-items: center;
  padding-inline: 2rem;
}

footer .container {
  max-width: 1000px;
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

footer .footer-logo {
  width: 10rem;
  aspect-ratio: 1;
  background-color: #eaecef;
  mask-image: url(./assets/logo-intro.png);
  mask-size: contain;
  filter: saturate(100) grayscale(1);
}

footer .box {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 1rem;
  padding-bottom: 1.2rem;
}

footer .social {
  display: flex;
  gap: 1rem;
  overflow: hidden;
  position: relative;
  border-radius: 50px;
  padding: 0 0.25rem;

  &::before {
    content: '';
    width: 1.5rem;
    height: 200%;
    rotate: 20deg;
    position: absolute;
    left: 0;
    top: -50%;
    background-color: #eaecef50;
    z-index: 0;
    animation: reflex 1.7s infinite;
  }
}

@keyframes reflex {

  0%,
  50% {
    left: -2.5rem;
  }

  100% {
    left: 110%;
  }
}

footer .social a {
  width: 3rem;
  cursor: pointer;
  padding: 0.5rem;
  background-color: #eaecef;
  color: #00000000;

  &.wa {
    mask: url(./assets/whatsapp.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center center;
  }

  &.in {
    mask: url(./assets/instagram.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center center;
  }

  &.fa {
    mask: url(./assets/facebook.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center center;
  }
}

footer p {
  color: #eaecef;
  font-size: 0.8rem;
}


/* ===== BUSCA ===== */
.busca-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-inline: 1rem;
}

.busca-wrapper {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: -2rem;
}

.busca-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  transition: box-shadow 0.3s;

  &:focus-within {
    box-shadow: rgba(52, 152, 219, 0.2) 0px 6px 24px 0px, rgba(52, 152, 219, 0.4) 0px 0px 0px 2px;
  }
}

.busca-icone {
  width: 1.3rem;
  height: 1.3rem;
  flex-shrink: 0;
  background-color: #3498db;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8' fill='none' stroke='black' stroke-width='2'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
}

#busca-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #333;
  font-family: 'Montserrat', sans-serif;

  &::placeholder {
    color: #aaa;
    font-weight: 400;
  }
}

#busca-clear {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.2rem;
  transition: color 0.2s;
  display: none;

  &:hover {
    color: #3498db;
  }
}

#busca-clear.visivel {
  display: block;
}

.busca-filtros {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.busca-filtros select {
  background-color: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  color: #555;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233498db' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.7rem;
  padding-right: 2rem;

  &:hover,
  &:focus {
    border-color: #3498db;
    color: #3498db;
  }
}

.busca-filtros select.ativo {
  background-color: #3498db;
  border-color: #3498db;
  color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

#filtro-limpar {
  background: none;
  border: 1.5px solid #e0e0e0;
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  color: #aaa;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s;
  display: none;

  &:hover {
    border-color: #e74c3c;
    color: #e74c3c;
  }
}

#filtro-limpar.visivel {
  display: block;
}

#busca-resultado-texto {
  font-size: 0.85rem;
  color: #999;
  font-weight: 500;
  padding-inline: 0.25rem;
  min-height: 1.2em;
}

/* ===== FIM BUSCA ===== */

/* ===== PAGINAÇÃO ===== */
#paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}

.pag-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid #e0e0e0;
  border-radius: 2rem;
  background-color: #fff;
  color: #555;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.25s;
  min-width: 2.6rem;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 2px 8px 0px;
}

.pag-btn:hover:not(:disabled) {
  border-color: #3498db;
  color: #3498db;
}

.pag-btn.ativo {
  background-color: #2a3f6d;
  border-color: #2a3f6d;
  color: #fff;
}

.pag-btn.disabled,
.pag-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.pag-btn.pag-prev,
.pag-btn.pag-next {
  font-size: 1rem;
  padding-inline: 0.85rem;
}

.pag-dots {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: #aaa;
  padding-inline: 0.25rem;
  user-select: none;
}

/* ===== FIM PAGINAÇÃO ===== */

@media screen and (width <=1150px) {
  main .diferenca {
    justify-content: center;
  }

  main #imoveis .imovel.left {
    transform: none;
  }

  main #imoveis .imovel.right {
    transform: none;
  }

  main .banner-container h1 {
    left: 50%;
  }

  main #imoveis {
    grid-template-columns: repeat(2, max-content);
  }
}

@media screen and (width <=900px) {
  .busca-filtros {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .busca-filtros select,
  #filtro-limpar {
    flex-shrink: 0;
  }


  header {
    position: fixed;
  }

  header nav {
    flex-direction: column;
    position: absolute;
    justify-content: center;
    align-items: center;
    gap: 1rem !important;
    z-index: 999;
    background-color: #eaecef;
    right: 1.5rem;
    top: calc(50% - 2.5rem);
  }

  body.open header nav,
  body.closed header nav {
    width: calc(100%);
    padding: 2rem;
    right: 0rem;
    top: 0rem;
    height: calc(100vh);
    gap: 1.5rem !important;

    & a {
      display: block;
    }

    & button {
      top: 2.5rem;
      right: 2rem;
    }

    & button .line {
      position: relative;
    }

    & button .line:nth-child(1) {
      rotate: 45deg;
      top: 13px;
    }

    & button .line:nth-child(2) {
      opacity: 0;
    }

    & button .line:nth-child(3) {
      rotate: -45deg;
      bottom: 12px;
    }
  }

  body.closed header nav {
    animation: nav-out .3s ease-in-out forwards;
  }

  body.open header nav {
    animation: nav-intro .3s ease-in-out;
  }

  @keyframes nav-intro {
    0% {
      transform: translateY(-100%);
    }

    100% {
      transform: translateY(0);
    }
  }

  @keyframes nav-out {
    0% {
      transform: translateY(0);
    }

    100% {
      transform: translateY(-100%);
    }
  }

  header nav button {
    cursor: pointer;
    transition: all 0.3s;
    position: absolute;
    right: 1rem;
    top: 1.5rem;
    width: 3rem;
    display: flex;
    background-color: transparent;
    border: none;
    flex-direction: column;
    gap: 0.6rem;
    color: #00000000;
  }

  header nav button .line {
    width: 100%;
    height: 3px;
    border-radius: 5px;
    transition: all 0.3s;
    background-color: #3498db;
  }

  header nav button .line:nth-child(2) {
    transition: none;
  }

  header nav a {
    text-align: center;
    display: none;
    width: 100%;
    font-size: 1rem;
    background-color: #ffffff99;
    padding-inline: 0;
    border-radius: .2rem;
    padding-block: 1.5rem;
    text-wrap: nowrap;

    &:not(.btn):hover {
      border-color: transparent !important;
      filter: brightness(1.1);
    }
  }

  header .container nav .btn {
    margin: 0;
    padding-block: 1.5rem;

    &:hover {
      background-color: #f3f3f3;
    }
  }

  main {
    gap: 3rem;
    padding-bottom: 3rem;
    overflow-x: hidden;
  }

  main .diferenca .box h2 {
    font-weight: 600;
  }

  main #imoveis {
    grid-template-columns: repeat(1, max-content);
    row-gap: 2rem;
  }

  main #imoveis .imovel {
    animation: none;
    opacity: 0;
    transform: translateY(20%) rotate(0) translate(0) translateX(0) !important;
    width: calc(100vw - 3rem);
  }

  main #imoveis .imovel:nth-child(odd) {
    transform: translateY(20%) rotate(0) translate(0) translateX(0) !important;
  }

  main #imoveis .imovel.visivel {
    animation: none;
    opacity: 1;
    transform: translateY(0) rotate(0) translate(0) translateX(0) !important;
    width: calc(100vw - 3rem);
  }

  main .banner-container h1 {
    left: calc(50%);
    position: absolute;
    max-width: calc(100% - 2rem);
    font-size: 1.3rem;
    line-height: 1.8rem;
  }

  main .banner-container {
    overflow: hidden;
  }

  main .banner-container .banner {
    animation: banner2 15s infinite;
  }

  @keyframes banner2 {
    50% {
      scale: 1.15;
      rotate: 1deg;
    }
  }

  main .diferenca {
    overflow: hidden;
    gap: 0;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }

  .diferenca-track {
    display: flex;
    flex-direction: row;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  main .diferenca .box {
    min-width: 100%;
    flex-shrink: 0;
    flex-direction: column;
    padding-block: 2.5rem;
    gap: 1rem;
    padding-inline: 2rem;
    justify-content: center;
    position: relative;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid #eee;
  }

  main .diferenca .box .icone {
    width: 4rem;
    background-color: #5dade2;
  }

  main .diferenca .box h2 {
    font-size: 1rem;
    z-index: 3;
    font-weight: 600;
    color: #333;
    width: 100%;
    text-align: center;
  }

  .diferenca-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding-block: 0.9rem;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  }

  .diferenca-dots .dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 2rem;
    border: none;
    background-color: #c8d6e5;
    cursor: pointer;
    transition: all 0.35s ease;
    padding: 0;
  }

  .diferenca-dots .dot.ativo {
    background-color: #2a3f6d;
    width: 1.4rem;
  }

  footer {
    padding: 2rem;
    justify-content: center;
    align-items: center;
  }

  footer .footer-logo {
    display: none;
  }

  footer .box {
    justify-content: center;
    align-items: center;
    padding: 0;
  }
}