/* ===== Bogotá Arriendos — Estilos ===== */
:root {
  --primary: #0f3d5e;
  --primary-dark: #0a2c44;
  --accent: #2a9d8f;
  --accent-dark: #1f7a6f;
  --cta: #e76f51;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1c2733;
  --text-muted: #64707d;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 42, 67, 0.08);
  --shadow-lg: 0 6px 24px rgba(16, 42, 67, 0.12);
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: 1350px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--primary); white-space: nowrap; }
.brand-name span { color: var(--accent); }
.brand-logo { flex-shrink: 0; }

.header-nav { display: flex; gap: 4px; margin-left: 8px; }
.header-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.header-nav a:hover { background: #eef1f4; color: var(--text); }
.header-nav a.active { color: var(--accent-dark); background: #e7f3f1; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-dark { background: #1c2733; color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: #eef1f4; color: var(--text); }
.btn-avatar { background: transparent; color: var(--primary); }
.btn-avatar:hover { background: #eef1f4; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

/* ===== Layout principal ===== */
.main-container { max-width: 1350px; margin: 0 auto; padding: 0 20px 60px; }

.results-header { padding: 24px 0 18px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent-dark); text-decoration: underline; }
.breadcrumb .sep { color: #b8c0c8; }
.breadcrumb .current { color: var(--text); font-weight: 500; }
.page-title { font-size: 28px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.results-count { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }

.results-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sorter { display: flex; align-items: center; gap: 8px; }
.sorter label { font-size: 13px; color: var(--text-muted); }
.sorter select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  min-width: 190px;
}

/* ===== Grid de filtros + resultados ===== */
.results-list { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }

/* ===== Sidebar filtros ===== */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.filters-close { display: none; background: none; border: none; font-size: 18px; color: var(--text-muted); }

.accordion { border-bottom: 1px solid var(--border); }
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.accordion[open] summary::after { transform: rotate(45deg); }
.accordion-body { padding: 4px 16px 16px; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 8px; }
.field select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: var(--surface); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.12s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Check list */
.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-list label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer; }
.check-list input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

.filters-buttons { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.btn-filtros-mobile { display: none; }

/* ===== Banner de resultados ===== */
.results-banner {
  background: linear-gradient(120deg, var(--primary) 0%, #17577f 100%);
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 26px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.banner-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.banner-content h3 { margin: 0 0 4px; font-size: 18px; }
.banner-content p { margin: 0; font-size: 14px; opacity: 0.85; }
.banner-actions { display: flex; gap: 10px; }

/* ===== Secciones / grid ===== */
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-bottom: 30px; }

/* ===== Card de propiedad ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-media { position: relative; aspect-ratio: 16/10; background: #dfe4e9; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
}
.card-badge.orange { background: var(--cta); }
.card-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: color 0.15s;
}
.card-fav:hover { color: var(--cta); }
.card-fav svg { fill: currentColor; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-price { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.card-price small { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; line-height: 1.35; color: var(--text); }
.card-location { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }
.card-location svg { flex-shrink: 0; }

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.feature-tag {
  background: #eef1f4;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-actions { margin-top: auto; display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }

/* ===== Estado vacío ===== */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state p { margin: 0 0 14px; font-size: 15px; }

/* ===== Paginación ===== */
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination button {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* ===== Footer ===== */
.site-footer { background: #0a1f30; color: #c7d2dc; margin-top: 40px; }
.footer-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.footer-col a { display: block; font-size: 13.5px; padding: 5px 0; color: #c7d2dc; }
.footer-col a:hover { color: #fff; }
.footer-brand .brand { color: #fff; font-size: 17px; }
.footer-brand .brand-name span { color: var(--accent); }
.footer-brand p { font-size: 13px; color: #8fa1b0; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 20px; text-align: center; font-size: 12.5px; color: #7d90a0; }

/* ===== Overlay móvil ===== */
.overlay { position: fixed; inset: 0; background: rgba(10,20,30,0.5); z-index: 60; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .header-nav { display: none; }
  .results-list { grid-template-columns: 1fr; }
  .filters {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    z-index: 70;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .filters.open { transform: translateX(0); }
  .filters-close { display: block; }
  .btn-filtros-mobile { display: inline-flex; }
  .btn-avatar span { display: none; }
}

@media (max-width: 560px) {
  .page-title { font-size: 22px; }
  .property-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .header-actions .btn-ghost { display: none; }
}
