/* ====== Design tokens ====== */
:root{
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.10);

  --primary: #2563eb;
  --primary-2: #1d4ed8;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.10);

  --container: 1120px;
  --tap: 44px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
}
img{ max-width: 100%; display:block; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 16px;
  top: 16px;
  width:auto;
  height:auto;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 9999;
}

/* =========================
   NAV (mobile-first)
========================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 0;
  gap: 12px;
}
.brand__logo{ height: 32px; width:auto; }

.nav__toggle{
  height: var(--tap);
  width: var(--tap);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  display: inline-flex;
  align-items:center;
  justify-content:center;
}
.nav__toggle-bars{
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  border-radius: 2px;
}
.nav__toggle-bars::before,
.nav__toggle-bars::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav__toggle-bars::before{ top: -6px; }
.nav__toggle-bars::after{ top: 6px; }

/* Drawer closed by default */
.nav__drawer{
  position: fixed;
  inset: 64px 12px auto 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
  padding: 10px;
  display: none;
}
.nav.is-open .nav__drawer{ display:block; }

.nav__menu{
  list-style:none;
  margin:0;
  padding: 6px;
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.nav__link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color: #334155;
  font-weight: 700;
  font-size: 15px;
}
.nav__link:hover{ background: rgba(37,99,235,0.08); color: var(--text); }
.nav__link.is-active{ color: var(--text); }

.nav__link-btn{
  width:100%;
  border:0;
  background: transparent;
  cursor: pointer;
  text-align:left;
}

/* Submenu mobile (no hover) */
.has-submenu .submenu{
  list-style:none;
  margin: 6px 0 0;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
  display: none;
}
.has-submenu.is-open .submenu{ display:block; }
.submenu a{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}
.submenu a:hover{ background: rgba(15,23,42,0.05); }

/* Desktop nav */
@media (min-width: 980px){
  .nav__toggle{ display:none; }

  .nav__drawer{
    position: static;
    inset:auto;
    border:0;
    box-shadow:none;
    padding:0;
    display:block;
    background: transparent;
  }

  .nav__menu{
    flex-direction: row;
    align-items:center;
    gap: 14px;
    padding:0;
  }

  .nav__link{
    min-height: 0;
    padding: 10px 10px;
    font-weight: 600;
  }

  .has-submenu{ position: relative; }
  .has-submenu .submenu{
    position:absolute;
    top: 44px;
    right: 0;
    min-width: 210px;
    background:#fff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.12);
    display:none;
  }
  .has-submenu:hover .submenu{ display:block; }
}

/* =========================
   HERO
========================= */
.hero{
  padding: 34px 0 20px;
  background:
    radial-gradient(900px 450px at 25% 0%, rgba(37,99,235,0.10), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fff 60%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--line);
}

.hero__inner{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items:center;
}

.hero__badge{ max-width: 100%; white-space: normal; }
@media (max-width: 560px){
  .hero__badge{ font-size: 12px; }
}


.hero__title{
  margin: 0 0 10px;
  font-size: clamp(28px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero__subtitle{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  max-width: 56ch;
}
.hero__actions{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (max-width: 560px){
  .hero__actions .btn{ width: 100%; }
}

.hero__micro{
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero__visual img{
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  object-fit: cover;
}

@media (min-width: 980px){
  .hero{ padding: 54px 0 26px; }
  .hero__inner{ grid-template-columns: 1.1fr 0.9fr; gap: 28px; }
  .hero__subtitle{ font-size: 18px; }
  .hero__actions{ display:flex; gap: 12px; flex-wrap: wrap; }
}

/* =========================
   SECTIONS
========================= */
.section{ padding: 54px 0; }
.section--alt{
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section__title{
  margin: 0 0 18px;
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: -0.01em;
}

/* GRID responsive */
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px){
  .grid{ grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 980px){
  .grid{ grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* Cards */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
  min-height: 140px;
}
.card__title{
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card__text{
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration:none;
  border: 1px solid transparent;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{ transform: translateY(-1px); }

.btn--primary{
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37,99,235,0.25);
}
.btn--ghost{
  background: rgba(15,23,42,0.03);
  border-color: var(--line);
  color: var(--text);
}
.btn--soft{
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.20);
  color: var(--text);
}

/* =========================
   CTA
========================= */
.cta{
  padding: 44px 0;
  background: linear-gradient(180deg, #0b1220 0%, #0a1530 100%);
  color: #fff;
}
.cta__inner{ text-align: center; }
.cta__title{
  margin: 0 0 10px;
  font-size: clamp(22px, 5.5vw, 40px);
  letter-spacing: -0.02em;
}
.cta__text{
  margin: 0 auto 18px;
  max-width: 70ch;
  color: rgba(255,255,255,0.80);
  font-size: 16px;
}

.cta__actions{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  justify-content:center;
  margin-top: 18px;
}
@media (min-width: 560px){
  .cta__actions{ grid-template-columns: auto auto auto; }
}

.cta .btn--soft{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

.cta__meta{
  margin-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
}
.meta{
  display:flex;
  justify-content:center;
  gap: 24px;
  flex-wrap: wrap;
}
.meta__block{
  display:flex;
  flex-direction:column;
  gap: 4px;
  color: rgba(255,255,255,0.86);
  font-size: 14px;
}
.meta__block strong{ color: #fff; }

/* =========================
   LEGAL + FOOTER
========================= */
.legal{
  padding: 34px 0;
  background: #0b1220;
  color: rgba(255,255,255,0.85);
}
.legal__inner{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items:start;
}
@media (min-width: 980px){
  .legal__inner{ grid-template-columns: 0.9fr 1.1fr; }
}

.legal__title{ margin: 0 0 6px; font-size: 16px; color:#fff; }
.legal__text{ margin: 0 0 10px; font-size: 14px; color: rgba(255,255,255,0.75); }
.legal__disclaimer{ margin: 0; font-size: 13px; color: rgba(255,255,255,0.70); line-height: 1.55; }

.link{
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.link:hover{ border-bottom-color: rgba(255,255,255,0.55); }

.footer{
  background: #070d18;
  color: rgba(255,255,255,0.75);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer__inner{
  padding: 16px 0;
  font-size: 13px;
}

/* Extra: avoid tiny text on mobile */
@media (max-width: 560px){
  .card__text{ font-size: 15px; }
}
/* ====== Sections with background image ====== */

.section--bg-lines,
.section--bg-why{
  position: relative;
  background:
    linear-gradient(
      rgba(156, 152, 152, 0.786),
      rgba(255,255,255,0.92)
    ),
    url("images/bg-city.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.section--bg-lines,
.section--bg-why{
  background-attachment: fixed;
}

/* WhatsApp floating (mobile-first) */
.wa-float{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 18px 50px rgba(2, 23, 17, 0.22);
  background: linear-gradient(180deg, #25D366 0%, #128C7E 100%);
  color: #fff;
}
/* ===== Property cards ===== */

.property-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px){
  .property-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px){
  .property-grid{ grid-template-columns: repeat(3, 1fr); }
}

.property-card{
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.property-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2,6,23,0.12);
}

.property-card img{
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

.property-card__body{
  padding: 14px;
}

.property-card h3{
  margin: 6px 0 6px;
  font-size: 17px;
  line-height: 1.25;
}

.price{
  margin: 0;
  font-weight: 900;
  font-size: 18px;
  color: #0f172a;
}

.meta{
  margin: 4px 0 0;
  font-size: 14px;
  color: #475569;
}

.tag{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.tag--venta{
  background: rgba(37,99,235,0.12);
  color: #1d4ed8;
}

.tag--arriendo{
  background: rgba(34,197,94,0.12);
  color: #15803d;
}
/* ===== Property previews (cards) ===== */
.property-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px){
  .property-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px){
  .property-grid{ grid-template-columns: repeat(3, 1fr); }
}

.property-card{
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.property-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2,6,23,0.12);
}

.property-card__media{
  position: relative;
}
.property-card__media img{
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.property-card__body{ padding: 14px; }

.property-card__title{
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.property-card__price{
  margin: 0;
  font-weight: 900;
  font-size: 18px;
  color: #0f172a;
}

.property-card__meta{
  margin: 4px 0 0;
  font-size: 14px;
  color: #475569;
}

/* Tags */
.tag{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.tag--venta{ background: rgba(37,99,235,0.12); color:#1d4ed8; }
.tag--arriendo{ background: rgba(34,197,94,0.12); color:#15803d; }
.tag--terreno{ background: rgba(245,158,11,0.16); color:#92400e; }

.tag-wrap{
  position:absolute;
  left: 12px;
  top: 12px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* FILTROS */
.filters {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary-2);
}

.filter-btn--active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    gap: 16px;
  }

  .filter-buttons {
    flex-wrap: wrap;
  }

  .filter-btn {
    flex: 1 1 auto;
    min-width: 100px;
  }
}