/* ================================================
   QuintoAndar Clone — Stylesheet completo
   Mobile-first | Breakpoints: 768px / 1024px
   ================================================ */

/* --- Reset & Base -------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #00A868;
  --green-dark: #008f58;
  --green-light: #E6F7F1;
  --white: #FFFFFF;
  --bg-light: #F5F5F5;
  --text-dark: #1A1A1A;
  --text-muted: #6B6B6B;
  --border: #E0E0E0;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.14);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1280px;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* --- Container ---------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* --- Buttons ------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-green:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-outline-green {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-outline-green:hover {
  background: var(--green-light);
}

.btn-white {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--green-light);
  border-color: var(--green-light);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* --- Navbar ------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.navbar-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--green);
}

.nav-cta {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 20px;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px 0;
  transition: color var(--transition);
}

.mobile-menu a:hover {
  color: var(--green);
}

.mobile-menu .btn {
  width: 100%;
  justify-content: center;
}

/* --- Hero --------------------------------------- */
.hero {
  background: var(--green);
  padding: 60px 0;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.hero-text {
  color: var(--white);
  text-align: center;
  max-width: 600px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 28px;
  line-height: 1.6;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 16px;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: transparent;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition);
}

.search-btn:hover {
  background: var(--green-dark);
}

.search-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.search-tag {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.search-tag:hover {
  background: rgba(255,255,255,0.3);
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Sections ----------------------------------- */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* --- How It Works ------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--green);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Listings ----------------------------------- */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--border);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.listing-card:hover .card-image img {
  transform: scale(1.04);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-badge-buy {
  background: var(--text-dark);
}

.card-body {
  padding: 16px;
}

.card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.card-price-label {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.card-neighborhood {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.card-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.card-meta-item {
  white-space: nowrap;
}

.listings-cta {
  text-align: center;
  margin-top: 40px;
}

/* --- Trust / Stats ------------------------------ */
.trust {
  background: var(--bg-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- CTA Banner --------------------------------- */
.cta-banner {
  background: var(--green);
  padding: 64px 0;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.cta-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.cta-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
}

/* --- Footer ------------------------------------- */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  display: block;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 220px;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 14px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.footer-legal {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  transition: color var(--transition);
}

.footer-legal-links a:hover {
  color: var(--green);
}

/* ================================================
   RESPONSIVE — 768px (tablet)
   ================================================ */
@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .hero {
    padding: 80px 0;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ================================================
   RESPONSIVE — 1024px (desktop)
   ================================================ */
@media (min-width: 1024px) {
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
  }

  .hero-text {
    text-align: left;
    flex: 1;
  }

  .search-bar {
    margin: 0;
  }

  .search-tags {
    justify-content: flex-start;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-image {
    flex: 1;
  }

  .hero-image img {
    max-width: 100%;
    margin: 0;
  }

  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .section-title {
    font-size: 2rem;
  }
}