/* ============================================
   SECCIÓN PROPIEDADES — Pentagram / Minimalismo Suizo
   Tipografía fuerte · 60%+ espacio negativo · rojo como único acento
   ============================================ */

/* ── Contenedor de sección ── */
.propiedades-section {
  position: relative;
  padding: 120px 0 108px;
  background: var(--white);
  overflow: hidden;
}

/* Línea sutil superior como separador editorial */
.propiedades-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--container);
  height: 1px;
  background: var(--line);
}

/* ── Cabecera tipo editorial Pentagram ── */
.propiedades-header {
  max-width: 720px;
  margin: 0 auto 72px;
  text-align: center;
}

.propiedades-header .section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.propiedades-header h2 {
  margin: 0 0 20px;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.propiedades-header h2 em {
  display: block;
  font-style: normal;
  color: var(--brand);
}

.propiedades-header .desc {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 580px;
  margin-inline: auto;
}

/* ── Grid de propiedades: 3 columnas ── */
.propiedades-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: var(--container);
  margin-inline: auto;
}

/* ── Tarjeta de propiedad ── */
.propiedad-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 32px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.propiedad-card:hover {
  border-color: var(--ink);
  box-shadow: 0 2px 0 0 var(--brand), 0 8px 24px rgba(7, 17, 31, 0.07);
}

/* Número de índice — sutil, Pentagram-style */
.propiedad-card .idx {
  display: block;
  margin-bottom: 24px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Distrito — etiqueta editorial */
.propiedad-card .distrito {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Dirección — la jerarquía principal */
.propiedad-card .direccion {
  margin: 0 0 10px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Tipo — información secundaria */
.propiedad-card .tipo-prop {
  margin: 0 0 28px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Push spacer para alinear botón abajo */
.propiedad-card .spacer {
  flex: 1;
}

/* Botón "Ver propiedad" — limpio, tipográfico */
.propiedad-card .btn-ver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid var(--line);
  background: none;
  color: var(--ink);
  font-family: Inter, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, gap 0.2s ease;
}

.propiedad-card .btn-ver:hover,
.propiedad-card .btn-ver:focus-visible {
  color: var(--brand);
  border-bottom-color: var(--brand);
  gap: 14px;
}

.propiedad-card .btn-ver .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.propiedad-card .btn-ver:hover .arrow {
  transform: translateX(4px);
}

/* ── Footer de sección — CTA principal ── */
.propiedades-footer {
  margin-top: 64px;
  text-align: center;
}

.propiedades-footer .texto-cierre {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.propiedades-footer .texto-cierre strong {
  color: var(--ink);
}

/* ── Barra de filtro ── */
.propiedades-filtro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--container);
  margin: 0 auto 40px;
}

.filtro-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.filtro-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.filtro-input {
  width: 100%;
  padding: 13px 46px 13px 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, sans-serif;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

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

.filtro-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(7, 17, 31, 0.06);
}

.filtro-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filtro-clear:hover {
  background: var(--line);
  color: var(--ink);
}

.filtro-clear .material-symbols-outlined {
  font-size: 1rem;
}

.filtro-contador {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Estado vacío ── */
.propiedades-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
}

.propiedades-empty .material-symbols-outlined {
  font-size: 3rem;
  color: var(--line);
}

.propiedades-empty p {
  margin: 0;
  font-size: 1rem;
}

.link-reset {
  border: none;
  background: none;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.link-reset:hover {
  color: var(--brand);
}

/* ── Botón "Ver más propiedades" ── */
.btn-ver-mas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  padding: 13px 36px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-ver-mas:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-ver-mas .material-symbols-outlined {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.btn-ver-mas:hover .material-symbols-outlined {
  transform: translateY(2px);
}

.btn-ver-mas[hidden] {
  display: none;
}

.btn-todas {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 38px;
  border: none;
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn-todas:hover {
  background: var(--brand);
  transform: translateY(-1px);
}

.btn-todas .material-symbols-outlined {
  font-size: 1.15rem;
}

/* ── Divisor geométrico inferior (referencia del código original) ── */
.propiedades-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.propiedades-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.propiedades-divider .shape-fill {
  fill: var(--paper);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1060px) {
  .propiedades-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .propiedades-section {
    padding: 96px 0 84px;
  }

  .propiedades-header {
    margin-bottom: 56px;
  }

  .propiedades-header h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
}

@media (max-width: 720px) {
  .propiedades-section {
    padding: 72px 0 60px;
  }

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

  .propiedades-header {
    margin-bottom: 44px;
    padding-inline: 4px;
  }

  .propiedades-header h2 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .propiedades-header .desc {
    font-size: 0.96rem;
  }

  .propiedad-card {
    padding: 28px 24px 22px;
  }

  .propiedad-card .direccion {
    font-size: 1.08rem;
  }

  .propiedades-footer {
    margin-top: 48px;
  }

  .btn-todas {
    width: 90%;
    max-width: 380px;
    justify-content: center;
    padding: 15px 24px;
    font-size: 0.9rem;
  }

  .propiedades-filtro {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 32px;
  }

  .filtro-input-wrapper {
    max-width: 100%;
    min-width: 0;
  }

  .filtro-contador {
    text-align: center;
    font-size: 0.76rem;
  }

  .btn-ver-mas {
    width: 90%;
    max-width: 380px;
    justify-content: center;
  }

  .propiedades-divider svg {
    height: 34px;
  }
}

@media (max-width: 390px) {
  .propiedades-header h2 {
    font-size: 1.75rem;
  }

  .propiedad-card .direccion {
    font-size: 1rem;
  }
}

/* ── El sistema reveal lo maneja styles.css + main.js; no redefinir aquí ── */

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .propiedades-section .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
