/* ============================================================
   IMOBILIÁRIA — Folha de Estilo Principal
   ============================================================ */

/* ---------- FONTES ---------- */
@font-face {
  font-family: 'Roboto';
  src: url('../uploads/fonts/Roboto-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../uploads/fonts/Roboto-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../uploads/fonts/Roboto-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../uploads/fonts/Roboto-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- VARIÁVEIS ---------- */
:root {
  --color-bg:              #09090b;
  --color-white:           #ffffff;
  --color-accent:          #10b981;
  --color-accent-hover:    #34d399;
  --color-text:            #18181b;
  --color-muted:           #52525b;
  --color-border:          #e4e4e7;
  --color-border-white:    rgba(255,255,255,0.10);

  --cor-titulo:            hsl(199, 100%, 10%);
  --cor-primaria:          hsl(199, 100%, 50%);
  --cor-titulo-card:       hsl(199, 100%, 10%);

  --line-divisor-color:    #E3E9ED;
  --button-main-color:     hsl(199, 100%, 50%);
  --button-main-color-hover: #33beff;
  --text-color:            #5b5b5b;
  --title-color:           #424242;
  --input-border-color:    #c8c8c8;
  --input-color:           #fff;
  --input-text-color:      #424242;

  --font-sans: 'Roboto', ui-sans-serif, system-ui, sans-serif;

  --radius-xl:  0.75rem;
  --radius-2xl: 1rem;

  --max-w:        80rem;
  --max-w-search: 56rem;
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-white);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button, select, input { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 500px;
  padding-bottom: 0;
  overflow: visible;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.30) 50%,
    rgba(0,0,0,0.45) 100%
  );
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--color-border-white);
}

.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* --- Brand / Logo --- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.brand__icon {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  display: block;
}
.brand__name {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-white);
}

/* --- Nav desktop --- */
.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__link {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}
.nav__link:hover { color: var(--color-white); }
.nav__link.is-active { color: var(--color-white); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--color-white);
}

/* --- Ações direita --- */
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Botão portal/login desktop */
.btn-portal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 4px;
  background-color: rgba(255,255,255,0.2);
  border: 1px solid #ffffff;
  padding: 0 15px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 40px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-portal:hover { background: var(--button-main-color); border-color: var(--button-main-color); }
.btn-portal--full { width: 100%; justify-content: center; }
.btn__caret { font-size: 0.75rem; }

/* Botão ícone pessoa (mobile) */
.btn-login-icon {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.10);
  padding: 0.5rem 0.75rem;
  color: var(--color-white);
  transition: background 0.2s;
}
.btn-login-icon:hover { background: rgba(255,255,255,0.15); }
.btn-login-icon svg { width: 1.25rem; height: 1.25rem; }

/* Hambúrguer */
.btn-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.10);
  padding: 0.5rem 0.75rem;
  color: var(--color-white);
  transition: background 0.2s;
}
.btn-hamburger:hover { background: rgba(255,255,255,0.15); }
.btn-hamburger svg { width: 1.25rem; height: 1.25rem; }

/* ============================================================
   MENU FULLSCREEN (mobile)
   ============================================================ */
.menu-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fff;
  flex-direction: column;
  overflow-y: auto;
}
.menu-fullscreen.is-open {
  display: flex;
}

.menu-fullscreen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e4e4e7;
}
.menu-fullscreen__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
}
.menu-fullscreen__close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-fullscreen__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.menu-fullscreen__nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}
.menu-fullscreen__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  border-bottom: 1px solid #f0f0f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}
.menu-fullscreen__link:hover { background: #f8f8f8; }
.menu-fullscreen__link svg {
  width: 1rem;
  height: 1rem;
  color: #aaa;
  flex-shrink: 0;
}

/* ============================================================
   HERO CONTENT
   ============================================================ */
.hero__content {
  position: relative;
  z-index: 10;
}
.hero__content-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1rem 5rem;
  text-align: center;
}
.hero__content-inner h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--color-white);
}
.hero__content-inner p {
  margin-top: 1rem;
  color: rgba(255,255,255,0.80);
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

/* ============================================================
   SEARCH BOX
   ============================================================ */
.search-box-wrapper {
  position: absolute;
  inset-inline: 0;
  z-index: 30;
  padding: 0 1rem;
  bottom: -4rem;
}
.search-box {
  max-width: var(--max-w-search);
  margin: 0 auto;
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: 0px 20px 40px 0px rgba(0,0,0,0.10);
  border: 1px solid var(--color-border);
  overflow: hidden;
  padding: 16px;
}

.search-box__form {
  display: grid;
  grid-template-columns: 1fr;
}

.field {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.field label {
  display: block;
  padding: 0 0 8px 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field select {
  padding: 0.5rem 2rem 0.5rem 0.5rem;
  width: 100%;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A1A7A8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  outline: none;
  color: #A1A7A8;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.btn-search {
  background: var(--button-main-color);
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
  border: none;
  transition: background 0.2s;
  letter-spacing: 0.02em;
  padding: 1rem 2rem;
  align-self: center;
  border-radius: 4px;
  margin: 0.75rem;
  width: calc(100% - 1.5rem);
  cursor: pointer;
}
.btn-search:hover { background: var(--button-main-color-hover); }

/* ============================================================
   SEÇÃO BRANCA
   ============================================================ */
.section {
  padding: 64px 0;
}
.section--white {
  background: #fff;
  color: #111;
  padding-top: 8rem;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section__head--spaced { margin-top: 44px; }

.section__head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  color: #111;
}

.link-more {
  font-weight: 600;
  text-decoration: none;
  color: #111;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.link-more:hover { opacity: 1; text-decoration: underline; }

/* ============================================================
   CARDS
   ============================================================ */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  display: block;
  border: 1px solid #e7e7e7;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.10);
}

.card__img {
  position: relative;
  aspect-ratio: 16/10;
  background: #f2f2f2;
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pill {
  position: absolute;
  left: 12px; top: 12px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0.92;
}
.pill--buy { background: var(--button-main-color); }

.card__body  { padding: 14px 14px 16px; }
.card__title { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.card__meta  { font-size: 12px; opacity: 0.7; margin-bottom: 10px; }
.card__price { font-weight: 900; font-size: 16px; color: var(--cor-titulo); }

.empty { padding: 16px; opacity: 0.7; }

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* Desktop >= 768px */
@media (min-width: 768px) {
  .search-box__form {
    grid-template-columns: 1.1fr 1.2fr 1.6fr 1.3fr 0.8fr;
    gap: 0;
  }
  .field {
    border-bottom: none;
    border-right: 1px solid var(--color-border);
  }
  .field:last-of-type { border-right: none; }

  .btn-search {
    margin: 0.5rem;
    width: calc(100% - 1rem);
    padding: 0.75rem 1rem;
  }

  .btn-hamburger   { display: none !important; }
  .btn-login-icon  { display: none !important; }
  .menu-fullscreen { display: none !important; }
  .btn-portal      { display: inline-flex; }
}

/* Cards */
@media (max-width: 900px) {
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .grid-cards { grid-template-columns: 1fr; }
}

/* Mobile <= 767px */
@media (max-width: 767px) {
  /* Header: hambúrguer | logo | login */
  .header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0.875rem 1rem;
    gap: 0.5rem;
  }

  .btn-hamburger {
    display: inline-flex;
    justify-self: start;
  }

  .brand {
    justify-self: center;
    justify-content: center;
  }

  .header__actions {
    justify-self: end;
  }

  .header__nav    { display: none; }
  .btn-portal     { display: none; }
  .btn-login-icon { display: inline-flex; }

  .hero__content-inner { padding: 2.5rem 1rem 4rem; }
  .search-box-wrapper  { display: none; }
  .section--white      { padding-top: 2rem; }
}