/*
	van Lamoen Gestión Inmobiliaria
	2024
	I <3 CSS
*/

body {
  background-color: #f8fafc;
  color: #374151;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: #0f6b9f;
  transition: color 0.15s ease;
}

a:hover {
  color: #21ACFF;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid #21ACFF;
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Estructura, común a todas las páginas. */

.container {
  background: #ffffff;
  padding: 0 20px;
}

.site-header {
  position: relative;
  margin: 0 0 50px;
  padding: 55px 0 50px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 4px solid #21ACFF;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.site-header img {
  display: inline;
  height: 120px;
}

.header-nav {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.header-nav-link:hover {
  color: #0f6b9f;
  background: #f0f9ff;
}

footer {
  margin-top: 50px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 13px;
  padding: 40px 0;
  color: #6b7280;
}

footer a {
  color: #4b5563;
}

footer a:hover {
  color: #21ACFF;
}

[data-media-card] {
  cursor: grab;
}

[data-media-card]:active {
  cursor: grabbing;
}

/* Listado de Propiedades (Home) */

.propiedad_lista {
  position: relative;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.propiedad_lista:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.propiedad_lista:hover .font-bold {
  color: #21ACFF;
}

.propiedad_lista .link_invisible {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.propiedad_lista .datos {
  background: white;
  padding: 14px 14px 16px;
}

.propiedad_lista .foto {
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}

.propiedad_lista .foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.propiedad_lista .card-image {
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 18px;
}

.listado-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 10px 0 18px;
}

.meta-filtros {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.resultado-total {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.orden-activo {
  font-size: 12px;
  color: #374151;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.chips-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips-filtros .chip {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #4b5563;
  text-decoration: none;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.chips-filtros .chip:hover {
  border-color: #21ACFF;
  color: #0f6b9f;
  background: #f0f9ff;
}

.chips-filtros .chip:focus-visible,
.limpiar-todo:focus-visible,
.paginacion .pag-link:focus-visible,
.filtros-actions button:focus-visible,
.filtros-actions a:focus-visible,
.sticky-cta-mobile a:focus-visible {
  outline: 2px solid #21ACFF;
  outline-offset: 2px;
}

.detalle-resumen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.detalle-resumen .resumen-pill {
  font-size: 12px;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 500;
}

.limpiar-todo {
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px dashed #d1d5db;
  transition: all 0.15s ease;
}

.limpiar-todo:hover {
  color: #21ACFF;
  border-bottom-color: #21ACFF;
}

.paginacion {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.paginacion .pag-link,
.paginacion .pag-info {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
}

.paginacion .pag-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
}

.paginacion .pag-link:hover {
  border-color: #21ACFF;
  color: #0f6b9f;
  background: #f8fafc;
}

.paginacion .pag-link.disabled {
  color: #6b7280;
  border-color: #f3f4f6;
  background: #fafafa;
}

.paginacion .pag-link[aria-current="page"] {
  background: #111827;
  color: #fff;
  border-color: #111827;
  font-weight: 600;
}

.filtros {
  padding: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.filtro-sort {
  min-width: 160px;
}

.filtro-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filtro-item select {
  width: 100%;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 9px 10px;
  border-radius: 6px;
  color: #1f2937;
  font-size: 14px;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filtro-item select:focus {
  border-color: #21ACFF;
  outline: none;
  box-shadow: 0 0 0 3px rgba(33,172,255,0.12);
}

.filtros-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.filtros-actions button {
  border: none;
  background: #111827;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 18px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.15s ease;
}

.filtros-actions button:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.filtros-actions a {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  text-decoration: none;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.filtros-actions a:hover {
  border-color: #21ACFF;
  color: #0f6b9f;
  background: #f8fafc;
}

.propiedad_lista .badges {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.propiedad_lista .badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.propiedad_lista .badge-op {
  background: #111827;
  color: #fff;
  border: 1px solid #111827;
}

.propiedad_lista .badge:not(.badge-op) {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.propiedad_lista .titulo-card {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.propiedad_lista .valor-card {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f6b9f;
  margin-bottom: 10px;
}

.propiedad_lista .meta-card {
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
  margin-bottom: 0;
}

.propiedad_lista .metricas-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.propiedad_lista .metrica {
  font-size: 12px;
  color: #4b5563;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid #f1f5f9;
}

/* Single de Propiedad */

/* . Slider de fotos y videos */

.slider {
  margin: 20px 0 30px;
  width: 100%;
  height: 650px;
  max-height: 70vh;
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f1f5f9;
}

.slider-wrapper {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.slider-wrapper .slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-wrapper .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-wrapper .slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider .btn {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  background-color: rgba(255,255,255,0.95);
  font-size: 24px;
  font-weight: bold;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: opacity 0.2s ease, transform 0.1s ease;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.slider .btn:hover {
  background-color: #fff;
}

.slider .btn-prev {
  left: 16px;
}

.slider .btn-next {
  right: 16px;
}

.slider .btn-prev::before {
  content: "‹";
  display: block;
  margin-right: 2px;
}

.slider .btn-next::before {
  content: "›";
  display: block;
  margin-left: 2px;
}

.slider .btn:active {
  transform: translateY(-50%) scale(0.92);
}

/* Dots de navegación */

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background: transparent;
  cursor: pointer;
  padding: 6px;
  box-sizing: content-box;
  background-clip: content-box;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.slider-dot.active {
  background: #fff;
  border-color: #fff;
}

.slider-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  -webkit-user-select: none;
  user-select: none;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: #0f6b9f;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 8px 0;
}

.footer-nav a {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: #21ACFF;
}

/* Desktop: force filters visible even when details is closed */
@media (min-width: 641px) {
  .filtros-details .filtros {
    display: block !important;
  }
}

/* . Ficha o descripcion  */

.ficha {
  padding-right: 1em;
}

.ficha p, .ficha ul, .ficha ol {
  margin-bottom: 1em;
}

.ficha p.text-xl {
  margin-bottom: 0;
}

.ficha li {
  margin-left: 2em;
  list-style-type: disc;
  list-style-position: inside;
}

/* . Sidebar */

.sidebar div {
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sidebar .contacto a {
  font-weight: bold;
  color: #0f6b9f;
}

.sidebar .contacto .btn-wa-sidebar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: #157a3e;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.sidebar .contacto .btn-wa-sidebar:hover {
  background: #107c3f;
}

.compartir {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 16px;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.compartir .btn-whatsapp,
.compartir .btn-copy {
  display: inline-block;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  text-decoration: none;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 10px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.compartir .btn-whatsapp:hover,
.compartir .btn-copy:hover {
  border-color: #21ACFF;
  color: #0f6b9f;
}

.compartir .btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #157a3e;
  color: #fff;
  border-color: #157a3e;
  font-weight: 600;
}

.compartir .btn-whatsapp:hover {
  background: #107c3f;
  border-color: #107c3f;
  color: #fff;
}

.related-properties {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

.related-properties h2 {
  color: #111827;
  font-weight: 700;
}

.related-properties .propiedad_lista .foto {
  height: 110px;
}

.related-properties .propiedad_lista .datos {
  padding: 10px 10px 12px;
}

.related-properties .propiedad_lista .badges {
  margin-bottom: 5px;
  gap: 4px;
}

.related-properties .propiedad_lista .titulo-card {
  font-size: 13px;
  margin-bottom: 4px;
}

.related-properties .propiedad_lista .valor-card {
  font-size: 13px;
  margin-bottom: 4px;
}

.related-properties .propiedad_lista .metricas-card {
  gap: 4px;
  margin-bottom: 5px;
}

.related-properties .propiedad_lista .metrica {
  font-size: 10px;
  padding: 2px 5px;
}

.related-properties .propiedad_lista .meta-card {
  font-size: 11px;
}

.filtros-details {
  margin: 0 0 18px;
}

.filtros-summary {
  display: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filtros-summary:focus-visible {
  outline: 2px solid #21ACFF;
  outline-offset: 2px;
}

.sticky-cta-mobile {
  display: none;
}

.sticky-cta-mobile a {
  text-decoration: none;
  text-align: center;
  color: #fff;
  font-weight: 700;
  padding: 14px 10px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.sticky-cta-mobile .cta-whatsapp {
  background: #157a3e;
}

.sticky-cta-mobile .cta-email {
  background: #111827;
}

@media (max-width: 900px) {
  .container {
    padding: 5px 12px;
  }

  .site-header {
    padding: 50px 0 30px;
    margin-bottom: 30px;
  }

  .site-header img {
    height: 80px;
  }

  .header-nav {
    top: 12px;
    right: 12px;
  }

  .slider {
    height: 420px;
    max-height: 60vh;
  }
}

@media (max-width: 640px) {
  .slider {
    height: 280px;
    max-height: 50vh;
  }

  .sidebar {
    margin-top: 14px;
  }

  .paginacion {
    flex-wrap: wrap;
  }

  .filtros-summary {
    display: block;
  }

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

  .filtros-actions {
    flex-wrap: wrap;
  }

  .listado-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-filtros {
    width: 100%;
  }

  .orden-activo {
    width: auto;
  }

  .sticky-cta-mobile {
    position: sticky;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 16px;
    border: none;
    border-radius: 0;
    overflow: hidden;
  }
}

/* ---- Página de Contacto ---- */

.contacto-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.contacto-page-header {
  margin-bottom: 32px;
}

.contacto-page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.contacto-page-header p {
  color: #6b7280;
  font-size: 0.95rem;
}

.contacto-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  max-width: 560px;
  margin: 0 auto;
}

.contacto-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.contacto-card h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contacto-form-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}

.contacto-form-card input,
.contacto-form-card textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.contacto-form-card input:focus,
.contacto-form-card textarea:focus {
  outline: none;
  border-color: #21ACFF;
  box-shadow: 0 0 0 3px rgba(33,172,255,0.12);
}

.contacto-form-card textarea {
  resize: vertical;
  min-height: 110px;
}

.contacto-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.contacto-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contacto-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contacto-btn-submit {
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.contacto-btn-submit:hover {
  background: #374151;
}

.contacto-wa-card {
  background: #f0fdf4;
  border-color: #bbf7d0;
  text-align: center;
  margin-bottom: 16px;
}

.contacto-wa-card p {
  font-size: 0.85rem;
  color: #157a3e;
  margin-bottom: 14px;
  font-weight: 500;
}

.contacto-wa-card .btn-wa-grande {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #157a3e;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}

.contacto-wa-card .btn-wa-grande:hover {
  background: #107c3f;
  color: #fff;
}

.contacto-wa-card .horario {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0;
}

.contacto-info-card .info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
}

.contacto-info-card .info-row:last-child {
  border-bottom: none;
}

.contacto-info-card .info-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.contacto-info-card .info-label {
  font-size: 0.75rem;
  color: #6b7280;
  display: block;
}

.contacto-info-card a {
  color: #0f6b9f;
}

.contacto-back-link {
  margin-top: 16px;
}

.contacto-back-link a {
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 700px) {
  .contacto-layout {
    grid-template-columns: 1fr;
  }

  .contacto-form-row {
    grid-template-columns: 1fr;
  }

  .contacto-info-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .contacto-wa-card {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .contacto-info-col {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slider-wrapper,
  .slider .btn {
    transition: none;
  }
}
