/* --- RESET GENERAL --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  background-color: #f4f4f4;
}

body {
  padding-top: 120px; 
}

/*--- ENCABEZADO FIJO ---*/
.encabezado-fijo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* --- BARRA SUPERIOR AZUL MARINO --- */
.barra-superior {
  background-color: #0e1d3e !important;
  height: 85px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.logo img {
  display: block;
  height: 80px;
  width: auto;
  object-fit: contain;
}

.menu-contacto {
  display: flex;
  align-items: center;
  gap: 28px;
}

.datos-contacto-header {
  display: flex;
  list-style: none;
  gap: 22px;
  align-items: center;
}

.datos-contacto-header a {
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.datos-contacto-header a:hover {
  color: #e67e22;
}

/* Botones de Iniciar Sesión y Registrarse en la barra azul */
.auth-header-botones,
.auth-header-usuario {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-login {
  background-color: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-login:hover {
  border-color: #e67e22;
  color: #e67e22;
}

.btn-header-registro {
  background-color: #e67e22;
  color: #ffffff;
  border: 1.5px solid #e67e22;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-registro:hover {
  background-color: #cf6d17;
  border-color: #cf6d17;
  transform: translateY(-1px);
}

.badge-usuario-activo {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
}

.btn-header-admin {
  background-color: #e67e22;
  color: #ffffff;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
}

.btn-header-logout {
  background-color: transparent;
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-logout:hover {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* --- BARRA INFERIOR NARANJA --- */
.barra-navegacion {
  background-color: #e67e22 !important;
  padding: 13px 0;
}

.barra-navegacion ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 35px;
  flex-wrap: wrap;
}

.barra-navegacion a {
  display: inline-block;
  text-decoration: none;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.barra-navegacion a.activo {
  color: #0e1d3e;
  padding-bottom: 3px;
  border-bottom: 3px solid #0e1d3e;
}

.barra-navegacion a:hover {
  color: #0e1d3e;
  transform: translateY(-2px);
}

/* --- SECCIÓN DE PORTADA (BANNER CON EFECTO PARALLAX) ---*/
.imagen-portada {
  width: 100%;
  min-height: calc(100vh - 120px);
  background-image: linear-gradient(rgba(14, 29, 62, 0.65), rgba(14, 29, 62, 0.65)), url('img/casa.jpg');
  background-attachment: fixed !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

#competencias, 
#propiedades,
#contacto {
  position: relative;
  z-index: 2;
}

#competencias,
#propiedades {
  scroll-margin-top: 120px;
}

.tarjeta-fondo-azul {
  background-image: linear-gradient(rgba(14, 29, 62, 0.82), rgba(14, 29, 62, 0.90)), url('img/casa.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
  border-radius: 20px;
  padding: 40px 35px;
  box-shadow: 0 15px 35px rgba(14, 29, 62, 0.25);
  position: relative;
  overflow: hidden;
}

.seccion-contacto-transparente {
  padding: 70px 40px;
  background-image: linear-gradient(rgba(14, 29, 62, 0.84), rgba(14, 29, 62, 0.92)), url('img/casa.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #ffffff;
}

.hero-contenido { 
  max-width: 850px; 
  color: #ffffff; 
  margin: 0 auto;
}

.hero-contenido h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-contenido p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 30px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.btn-banner {
  display: inline-block;
  background-color: #e67e22;
  color: #ffffff;
  padding: 15px 40px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.btn-banner:hover {
  background-color: #cf6d17;
  transform: translateY(-3px);
}

/* =========================================
   DISEÑO UNIFICADO DE FILTROS E INPUTS
   ========================================= */
.barra-filtros {
  background-color: #ffffff;
  padding: 22px 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(14, 29, 62, 0.08);
  border: 1px solid #e2e8f0;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.grupo-campo {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 145px;
}

.grupo-campo label,
.campo-formulario label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0e1d3e;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Estilos base para inputs, selects y textareas */
.barra-filtros select,
.barra-filtros input,
.campo-formulario input,
.campo-formulario select,
.campo-formulario textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background-color: #f8fafc;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0e1d3e;
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.barra-filtros select,
.barra-filtros input {
  height: 44px;
  padding: 0 12px;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.barra-filtros select:focus,
.barra-filtros input:focus,
.campo-formulario input:focus,
.campo-formulario select:focus,
.campo-formulario textarea:focus {
  border-color: #e67e22 !important;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.18);
}

.input-uf-caja {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background-color: #f8fafc;
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.input-uf-caja:focus-within {
  border-color: #e67e22;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.18);
}

.input-uf-caja input {
  flex: 1;
  height: 100%;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 12px;
  font-weight: 600;
}

.etiqueta-uf {
  background-color: #0e1d3e;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  letter-spacing: 0.5px;
}

.btn-filtrar {
  height: 44px;
  padding: 0 26px;
  background-color: #e67e22;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn-filtrar:hover {
  background-color: #cf6d17;
  transform: translateY(-2px);
}

/* =========================================
   DISEÑO DE LAS TARJETAS DE PROPIEDADES
   ========================================= */
.tarjeta-propiedad {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid #eaeaea;
}

.tarjeta-propiedad:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.tarjeta-propiedad img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 3px solid #e67e22;
}

/* =========================================
   WIDGET Y VENTANA FLOTANTE DE WHATSAPP
   ========================================= */
.whatsapp-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.btn-whatsapp-flotante {
  background-color: #25D366;
  color: white;
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-whatsapp-flotante:hover {
  transform: scale(1.08);
  background-color: #1ebe56;
}

.ventana-whatsapp {
  display: none;
  width: 330px;
  max-width: calc(100vw - 40px);
  background-color: #efeae2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  margin-bottom: 14px;
  border: 1px solid #d1d7db;
  animation: aparecerChat 0.25s ease-out;
}

.ventana-whatsapp.activa {
  display: block;
}

@keyframes aparecerChat {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.whatsapp-header {
  background-color: #075e54;
  color: white;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.whatsapp-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-info i {
  font-size: 1.8rem;
  color: #25D366;
}

.whatsapp-info h4 {
  font-size: 0.95rem;
  margin: 0;
}

.whatsapp-info span {
  font-size: 0.75rem;
  color: #d9fdd3;
}

.cerrar-whatsapp {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.whatsapp-cuerpo {
  padding: 18px 15px;
  min-height: 130px;
  background-color: #efeae2;
}

.mensaje-bot {
  background-color: #ffffff;
  color: #111b21;
  padding: 12px 14px;
  border-radius: 0 12px 12px 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  max-width: 90%;
}

.hora-mensaje {
  display: block;
  text-align: right;
  font-size: 0.7rem;
  color: #667781;
  margin-top: 5px;
}

.whatsapp-footer {
  background-color: #f0f2f5;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.whatsapp-footer input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 20px;
  background-color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  color: #111b21;
}

.whatsapp-footer button {
  background-color: #25D366;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}

.whatsapp-footer button:hover {
  background-color: #1ebe56;
}

/* =========================================
   DISEÑO DE VENTANAS MODALES (AUTH Y AGENDAMIENTO)
   ========================================= */
.modal-overlay {
  display: none; 
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(14, 29, 62, 0.85); 
  z-index: 10001;
  justify-content: center;
  align-items: center;
}

.modal-contenido {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  width: 92%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  border-top: 5px solid #e67e22; 
}

.cerrar-modal {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}

.cerrar-modal:hover { color: #e67e22; }

.modal-contenido h2 { color: #0e1d3e; margin-bottom: 5px; }

/* Aviso informativo dentro de los modales */
.alerta-modal-aviso {
  background-color: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid #e67e22;
  color: #9a3412;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.alerta-modal-aviso i {
  color: #e67e22;
  margin-top: 3px;
}

/* Pestañas del modal Iniciar Sesión / Registrarse */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 18px;
  gap: 10px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: #0e1d3e;
  border-bottom-color: #e67e22;
}

.campo-formulario { margin-bottom: 14px; text-align: left; }

.campo-formulario textarea {
  resize: vertical;
  min-height: 90px;
}

.btn-modal {
  width: 100%;
  background-color: #e67e22;
  color: white;
  padding: 13px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin-top: 8px;
}

.btn-modal:hover {
  background-color: #cf6d17;
  transform: translateY(-2px);
}

/* =========================================
   DISEÑO DE BOTONES DE OPERACIÓN (TARJETAS DE PERFILAMIENTO)
   ========================================= */
.selector-operacion {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.opcion-tarjeta input[type="radio"] { display: none; }

.opcion-tarjeta span {
  display: block;
  text-align: center;
  padding: 15px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #555;
  transition: all 0.3s ease;
}

.opcion-tarjeta span:hover { border-color: #e67e22; }

.opcion-tarjeta input[type="radio"]:checked + span {
  background-color: #0e1d3e;
  color: #ffffff;
  border-color: #0e1d3e;
  box-shadow: 0 4px 10px rgba(14, 29, 62, 0.3);
}

/* Adaptabilidad en pantallas pequeñas */
@media (max-width: 850px) {
  .barra-superior {
    padding: 10px 18px;
  }
  .datos-contacto-header {
    display: none;
  }
  .barra-navegacion ul {
    gap: 18px;
  }
}

/* =========================================
   SOLUCIÓN DEFINITIVA PARA EL RELOJ (INPUT TIME)
   ========================================= */
input[type="time"] {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    font-size: 0.95rem !important;
    color: #0e1d3e !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: auto !important; 
    -webkit-appearance: auto !important;
    display: block !important;
}

input[type="time"]:focus {
    border-color: #e67e22 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.18) !important;
}

/* Quitar el texto fantasma que bloquea el input */
input[type="time"]::before {
    content: none !important;
}

/* ===== PIE DE PÁGINA ===== */
.pie-pagina { background: #0e1d3e; color: #cbd5e1; margin-top: 40px; }
.pie-contenedor { max-width: 1200px; margin: 0 auto; padding: 40px 20px 25px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.pie-columna { flex: 1 1 220px; }
.pie-columna h4 { color: #e67e22; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px 0; }
.pie-columna a, .pie-columna span { color: #e2e8f0; text-decoration: none; font-size: 0.95rem; display: block; }
.pie-columna a:hover { color: #e67e22; }
.pie-columna i { color: #e67e22; margin-right: 8px; }
.pie-copy { border-top: 1px solid rgba(255,255,255,0.12); text-align: center; padding: 15px 20px; font-size: 0.8rem; color: #94a3b8; }

/* ===== AVISOS PROFESIONALES (reemplazan los alert del navegador) ===== */
.aviso-overlay {
  position: fixed; inset: 0; z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(14, 29, 62, 0.72);
  backdrop-filter: blur(3px);
  animation: avisoFondo 0.2s ease;
}
.aviso-overlay.aviso-saliendo { opacity: 0; transition: opacity 0.18s ease; }
.aviso-tarjeta {
  width: 100%; max-width: 420px;
  background: #ffffff; border-radius: 16px;
  padding: 36px 32px 28px; text-align: center;
  border-top: 5px solid #e67e22;
  box-shadow: 0 25px 60px rgba(14, 29, 62, 0.35);
  animation: avisoTarjeta 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.aviso-icono {
  width: 70px; height: 70px; margin: 0 auto 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; background: #fef3e8; color: #e67e22;
}
.aviso-titulo { color: #0e1d3e; font-size: 1.35rem; margin: 0 0 10px 0; line-height: 1.3; }
.aviso-mensaje { color: #64748b; font-size: 0.98rem; line-height: 1.6; margin: 0 0 26px 0; }
.aviso-acciones { display: flex; flex-direction: column; gap: 10px; }
.aviso-boton { width: 100%; padding: 13px 18px; border-radius: 10px; font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s; }
.aviso-boton-principal { background: #0e1d3e; color: #ffffff; border: none; }
.aviso-boton-principal:hover { background: #1a3060; transform: translateY(-1px); }
.aviso-boton-secundario { background: transparent; color: #64748b; border: 1.5px solid #e2e8f0; }
.aviso-boton-secundario:hover { background: #f4f6f9; color: #0e1d3e; }
.aviso-exito { border-top-color: #22c55e; }
.aviso-exito .aviso-icono { background: #dcfce7; color: #16a34a; }
.aviso-error { border-top-color: #ef4444; }
.aviso-error .aviso-icono { background: #fee2e2; color: #dc2626; }
.aviso-alerta { border-top-color: #f59e0b; }
.aviso-alerta .aviso-icono { background: #fef3c7; color: #d97706; }
@keyframes avisoFondo { from { opacity: 0; } to { opacity: 1; } }
@keyframes avisoTarjeta { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }


/* =====================================================================
   VERSIÓN CELULAR (se agrega al final para que tenga prioridad)
   Los !important son necesarios porque varias páginas usan estilos en línea.
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; }

@media (max-width: 768px) {

  /* --- Encabezado: altura fija y compacta (así el espacio de arriba es exacto) --- */
  body { padding-top: 112px !important; }

  .barra-superior {
    height: 62px;
    padding: 0 12px !important;
    gap: 8px;
  }
  .logo img { height: 48px; }
  .menu-contacto { gap: 8px; min-width: 0; }
  .barra-superior h2 { font-size: 1rem !important; }

  .auth-header-usuario, .auth-header-botones { gap: 6px; }
  .btn-header-login, .btn-header-registro, .btn-header-admin, .btn-header-logout {
    padding: 7px 10px !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
  }
  .badge-usuario-activo { display: none; }

  /* Menú naranja en una sola fila, con scroll lateral si no cabe */
  .barra-navegacion { padding: 11px 0; }
  .barra-navegacion ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 22px;
    padding: 0 14px;
    scrollbar-width: none;
  }
  .barra-navegacion ul::-webkit-scrollbar { display: none; }
  .barra-navegacion a { font-size: 0.78rem; white-space: nowrap; letter-spacing: 0.4px; }

  /* --- Portada: el parallax "fixed" falla en iPhone --- */
  .imagen-portada {
    background-attachment: scroll !important;
    min-height: calc(100vh - 112px);
    padding: 30px 16px;
  }
  .hero-contenido h1 { font-size: 1.8rem; }
  .hero-contenido p { font-size: 1rem; }

  /* --- Secciones con relleno grande en línea --- */
  section[style*="padding"] { padding-left: 16px !important; padding-right: 16px !important; }
  section[style*="padding: 60px"] { padding-top: 36px !important; padding-bottom: 36px !important; }
  section[style*="padding: 80px"] { padding-top: 40px !important; padding-bottom: 40px !important; }
  [style*="gap: 50px"] { gap: 24px !important; }

  /* Rejillas de 2 columnas en línea -> 1 columna */
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* --- Catálogo y filtros --- */
  #contenedor-propiedades { grid-template-columns: 1fr !important; gap: 20px !important; }
  .tarjeta-propiedad img { height: 200px; }
  .tarjeta-propiedad:hover { transform: none; }
  .barra-filtros { padding: 16px; gap: 12px; }
  .grupo-campo { flex: 1 1 100%; min-width: 0; }
  .btn-filtrar { width: 100%; }

  /* --- Formularios: 16px evita el zoom automático de iPhone al escribir --- */
  input, select, textarea { font-size: 16px !important; }
  #form-perfilamiento { padding: 22px 16px !important; }
  #form-perfilamiento div[style*="display: flex"] { flex-wrap: wrap; }
  #form-perfilamiento .campo-formulario[style*="flex"] { flex: 1 1 100% !important; }

  /* --- Ventanas emergentes --- */
  .modal-contenido {
    padding: 22px 16px;
    max-height: 92vh;
    overflow-y: auto;
  }
  .aviso-tarjeta { width: 92%; padding: 26px 18px; }

  /* --- WhatsApp flotante más pequeño --- */
  .whatsapp-widget { bottom: 14px; right: 14px; }
  .btn-whatsapp-flotante { width: 54px; height: 54px; font-size: 30px; }

  /* --- Pie de página --- */
  .pie-contenedor { padding: 28px 16px 18px; gap: 18px; }

  /* --- Detalle de propiedad --- */
  .detalle-container { padding: 0 12px !important; gap: 16px !important; }
  .detalle-izq, .detalle-der { flex: 1 1 100% !important; min-width: 0 !important; }
  .galeria-principal { height: 280px !important; }
  .galeria-flecha { width: 36px !important; height: 36px !important; }
  .galeria-miniaturas img { width: 84px !important; height: 62px !important; }
  .caja-contacto { position: static !important; }
  .caja-info, .caja-contacto { padding: 18px !important; }
  .caract-grid { grid-template-columns: 1fr !important; }
  .videos-grid { grid-template-columns: 1fr !important; }
  .detalle-cabecera .ficha-titulo { font-size: 1.5rem !important; }

  /* --- Panel admin y reportes --- */
  .panel-container { padding: 16px !important; }
  table.tabla-panel, .tabla { display: block; overflow-x: auto; white-space: nowrap; }
  [style*="min-width: 350px"], [style*="min-width: 300px"] { min-width: 0 !important; flex: 1 1 100% !important; }
  .kpis { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .kpi h3 { font-size: 1.7rem !important; }
  .grid-graf { grid-template-columns: 1fr !important; }
  .grafico { height: 240px !important; }
  .exportar { flex-direction: column; }
  .exportar button { width: 100%; }
}

@media (max-width: 400px) {
  .barra-navegacion ul { gap: 16px; }
  .hero-contenido h1 { font-size: 1.55rem; }
  .kpis { grid-template-columns: 1fr !important; }
}
