/**
 * Estilos del hero y filtros de búsqueda — Página /inmuebles/
 *
 * Prefijo sc- en todas las clases para evitar colisiones con Elementor y XStore.
 * Tipografías: Cormorant Garamond (títulos) + DM Sans (interfaz).
 *
 * @package SoriaInmovillaSync
 */

/* ===================================================================
   HERO — Cabecera de la página de propiedades
   =================================================================== */
.sc-hero {
  background: #fbf5e9;
  padding: 48px 24px 36px;
  text-align: center;
  border-bottom: 1px solid #e5e5e5;
}
.sc-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4a8fcc;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
}
.sc-hero-eyebrow::before,
.sc-hero-eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: #4a8fcc;
  opacity: 0.5;
}
.sc-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 300;
  color: #1a1c20;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.sc-hero-title em {
  font-style: italic;
  color: #4a8fcc;
}
.sc-hero-sub {
  font-size: 14px;
  color: #54585e;
  font-weight: 300;
  margin-bottom: 24px;
  font-family: 'DM Sans', sans-serif;
}
.sc-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 40px;
  padding: 10px 24px;
}
.sc-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #54585e;
  font-family: 'DM Sans', sans-serif;
}
.sc-stat strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: #4a8fcc;
  line-height: 1;
}
.sc-stat-sep {
  width: 1px;
  height: 20px;
  background: #e5e5e5;
}

/* ===================================================================
   FILTROS — Contenedor general
   =================================================================== */
.sc-filtros-wrap {
  background: #ffffff;
  padding: 0 24px;
  max-width: 900px;
  margin: 0 auto;
}

/* ── Fila 1: Operación + Vendidas/Alquiladas ────────────────────── */
.sc-filtro-operacion {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 2px solid #e5e5e5;
}
.sc-op-group-left {
  display: flex;
  gap: 0;
}
.sc-op-group-right {
  display: flex;
  align-items: center;
  gap: 0;
}
.sc-op-btn {
  padding: 16px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #54585e;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sc-op-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4a8fcc;
  opacity: 0;
  transition: opacity 0.2s;
}
.sc-op-btn:hover {
  color: #4a8fcc;
}
.sc-op-btn.active {
  color: #4a8fcc;
}
.sc-op-btn.active::after {
  opacity: 1;
}

/* ── Vendidas: acento dorado ───────────────────────────────────── */
.sc-op-btn--vendidas:hover {
  color: #a08b6c;
}
.sc-op-btn--vendidas.active {
  color: #a08b6c;
}
.sc-op-btn--vendidas.active::after {
  background: #c9b99a;
}

/* ── Alquiladas: acento verde ──────────────────────────────────── */
.sc-op-btn--alquiladas:hover {
  color: #2e8b57;
}
.sc-op-btn--alquiladas.active {
  color: #2e8b57;
}
.sc-op-btn--alquiladas.active::after {
  background: #3cb371;
}

/* Badge de conteo dentro de la fila de operaciones */
.sc-op-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
  letter-spacing: 0.03em;
}
.sc-op-badge--vendidas {
  background: #c9b99a;
  color: #fff;
}
.sc-op-badge--alquiladas {
  background: #3cb371;
  color: #fff;
}

/* Separador vertical entre grupos */
.sc-op-sep {
  width: 1px;
  height: 20px;
  background: #e5e5e5;
  align-self: center;
  margin-right: 4px;
}

/* ── Fila 2: Tipo de inmueble (icono SVG + label) ────────────────── */
.sc-filtro-tipo {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e5e5;
  overflow-x: auto;
  scrollbar-width: none;
}
.sc-filtro-tipo::-webkit-scrollbar {
  display: none;
}

.sc-tipo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  color: inherit;
}
.sc-tipo-btn:hover {
  background: #eef5fb;
}
.sc-tipo-btn.active {
  background: #eef5fb;
}
.sc-tipo-btn.active .sc-tipo-ico path,
.sc-tipo-btn.active .sc-tipo-ico rect,
.sc-tipo-btn.active .sc-tipo-ico polygon,
.sc-tipo-btn.active .sc-tipo-ico circle,
.sc-tipo-btn.active .sc-tipo-ico ellipse {
  fill: #4a8fcc;
}
.sc-tipo-btn.active .sc-tipo-ico line {
  stroke: #4a8fcc;
}
.sc-tipo-btn.active .sc-tipo-label {
  color: #4a8fcc;
  font-weight: 500;
}
.sc-tipo-btn.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4a8fcc;
}

/* Iconos SVG */
.sc-tipo-ico {
  width: 44px;
  height: 36px;
}
.sc-tipo-ico path,
.sc-tipo-ico rect,
.sc-tipo-ico polygon,
.sc-tipo-ico circle,
.sc-tipo-ico ellipse {
  fill: #b0b8c4;
  transition: fill 0.2s;
}
.sc-tipo-ico line {
  stroke: #b0b8c4;
  transition: stroke 0.2s;
}

/* Label debajo del icono */
.sc-tipo-label {
  font-size: 11px;
  color: #54585e;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

/* Separador vertical entre tipos y vendidas */
.sc-tipo-divider {
  width: 1px;
  height: 40px;
  background: #e5e5e5;
  margin: 0 8px;
  flex-shrink: 0;
}

/* ── Tab Vendidas — acento beige corporativo ─────────────────────── */
.sc-tipo-btn.vendidas:hover {
  background: #f8f2e8;
}
.sc-tipo-btn.vendidas.active {
  background: #f8f2e8;
}
.sc-tipo-btn.vendidas.active .sc-tipo-ico path,
.sc-tipo-btn.vendidas.active .sc-tipo-ico rect,
.sc-tipo-btn.vendidas.active .sc-tipo-ico polygon,
.sc-tipo-btn.vendidas.active .sc-tipo-ico circle {
  fill: #c9b99a;
}
.sc-tipo-btn.vendidas.active .sc-tipo-label {
  color: #a08b6c;
  font-weight: 500;
}
.sc-tipo-btn.vendidas.active::after {
  background: #c9b99a;
}

/* Badge con conteo de vendidas */
.sc-badge-vendidas {
  position: absolute;
  top: 6px;
  right: 10px;
  background: #c9b99a;
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* ── Tab Alquiladas — acento verde ─────────────────────────────── */
.sc-tipo-btn.alquiladas:hover {
  background: #e6f4ec;
}
.sc-tipo-btn.alquiladas.active {
  background: #e6f4ec;
}
.sc-tipo-btn.alquiladas.active .sc-tipo-ico path,
.sc-tipo-btn.alquiladas.active .sc-tipo-ico rect,
.sc-tipo-btn.alquiladas.active .sc-tipo-ico polygon,
.sc-tipo-btn.alquiladas.active .sc-tipo-ico circle {
  fill: #3cb371;
}
.sc-tipo-btn.alquiladas.active .sc-tipo-label {
  color: #2e8b57;
  font-weight: 500;
}
.sc-tipo-btn.alquiladas.active::after {
  background: #2e8b57;
}

/* Badge con conteo de alquiladas */
.sc-badge-alquiladas {
  position: absolute;
  top: 6px;
  right: 10px;
  background: #3cb371;
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* ===================================================================
   CONTADOR DE RESULTADOS
   =================================================================== */
.sc-resultados-meta {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-count-txt {
  font-size: 13px;
  color: #54585e;
  font-family: 'DM Sans', sans-serif;
}
.sc-count-txt strong {
  color: #1a1c20;
  font-weight: 500;
}

/* ===================================================================
   LOADING OVERLAY — Indicador de carga al filtrar
   =================================================================== */
.sc-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}
.sc-loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.sc-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  padding: 32px 44px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}
.sc-loading-spinner svg {
  animation: sc-spin 1s linear infinite;
}
.sc-loading-spinner span {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #54585e;
  font-weight: 500;
  letter-spacing: 0.02em;
}
@keyframes sc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 640px) {
  .sc-hero {
    padding: 36px 20px 28px;
  }
  .sc-hero-stats {
    gap: 12px;
    padding: 10px 18px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .sc-stat-sep {
    display: none;
  }
  .sc-filtro-operacion {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .sc-filtro-operacion::-webkit-scrollbar {
    display: none;
  }
  .sc-op-btn {
    padding: 14px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  .sc-op-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
  .sc-tipo-btn {
    padding: 10px 14px;
  }
  .sc-tipo-ico {
    width: 36px;
    height: 30px;
  }
  .sc-tipo-label {
    font-size: 10px;
  }
}
