:root {
  --yellow: #f5c518;
  --yellow-dark: #d9aa00;
  --blue: #072b61;
  --blue-dark: #041c42;
  --navy: #0f1e47; /* igual al fondo del logo: el navbar y el logo se funden */
  --white: #ffffff;
  --cream: #f7f8fb;
  --text: #1b263b;
  --muted: #667085;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { width: 100%; display: block; object-fit: cover; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

/* ===== NAVBAR ===== */
.site-header { position: sticky; top: 0; z-index: 50; width: 100%; transition: box-shadow 0.25s ease; }
.site-header.scrolled { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28); }

/* ===== NAVBAR =====
   El marcado del navbar lo genera nav.js con estilos inline.
   Aquí solo queda lo que el inline no puede resolver: el fondo del <header>
   (que envuelve la barra) y los ajustes por tamaño de pantalla.
   Nota: en CSS, !important SÍ gana sobre un style="" inline. */
.site-header { background-color: #0D1B3E; padding: 0; }
.site-header ul li a:hover { background: rgba(245, 197, 24, 0.2) !important; color: #F5C518 !important; }

/* Respaldo del marcado estático: se ve así el instante previo a que corra
   nav.js, y también si el usuario tiene JavaScript desactivado.
   Sin !important a propósito: los estilos inline de nav.js deben ganar. */
.nav-wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 20px; box-sizing: border-box; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 90px; width: auto; display: block; background: transparent; border: none; }
.nav-links { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; align-items: center; }
.site-nav a { color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; padding: 10px 14px; border-radius: 8px; display: block; }
.site-nav a.nav-admon { color: var(--yellow); font-weight: 700; border: 1px solid var(--yellow); }
.site-nav a.active { color: var(--yellow); }
/* ===== HERO ANIMADO ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 0 3rem;
  color: var(--white);
  background: linear-gradient(-45deg, #0d1b3e, #1a2f5e, #0f1e47, #162448);
  background-size: 400% 400%;
  animation: gradientShift 14s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero > .container { position: relative; z-index: 1; }
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.particle {
  position: absolute; bottom: -10px;
  width: 4px; height: 4px;
  background: var(--yellow); border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.45; }
  90% { opacity: 0.45; }
  100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}
.particle:nth-child(1)  { left: 6%;  animation-duration: 22s; animation-delay: 0s;   }
.particle:nth-child(2)  { left: 16%; animation-duration: 28s; animation-delay: 3s;   width: 3px; height: 3px; }
.particle:nth-child(3)  { left: 27%; animation-duration: 18s; animation-delay: 6s;   }
.particle:nth-child(4)  { left: 38%; animation-duration: 25s; animation-delay: 1.5s; width: 5px; height: 5px; }
.particle:nth-child(5)  { left: 49%; animation-duration: 30s; animation-delay: 8s;   }
.particle:nth-child(6)  { left: 60%; animation-duration: 20s; animation-delay: 4s;   width: 3px; height: 3px; }
.particle:nth-child(7)  { left: 71%; animation-duration: 26s; animation-delay: 10s;  }
.particle:nth-child(8)  { left: 80%; animation-duration: 17s; animation-delay: 2s;   width: 5px; height: 5px; }
.particle:nth-child(9)  { left: 88%; animation-duration: 24s; animation-delay: 7s;   }
.particle:nth-child(10) { left: 95%; animation-duration: 29s; animation-delay: 12s;  width: 3px; height: 3px; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow { color: var(--yellow); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; font-size: 0.8rem; margin-bottom: 0.45rem; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.8rem; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
.hero-copy { font-size: 1rem; color: #d7e7ff; max-width: 560px; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.2rem; }
/* ===== BOTONES CON EFECTOS ===== */
.btn, button {
  position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.25s ease;
}
.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: 0.8rem 1.6rem; font-family: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.btn:hover, button:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 30px rgba(4, 28, 66, 0.2); }
.btn:active, button:active { transform: translateY(0) scale(0.98); box-shadow: 0 4px 10px rgba(4, 28, 66, 0.12); }
.btn:focus-visible, button:focus-visible { outline: 3px solid rgba(245, 197, 24, 0.5); outline-offset: 2px; }

/* Ripple al hacer clic */
.btn::after {
  content: ''; position: absolute; z-index: 0;
  width: 0; height: 0; top: 50%; left: 50%;
  background: rgba(255, 255, 255, 0.35); border-radius: 50%;
  transform: translate(-50%, -50%); opacity: 1; pointer-events: none;
  transition: width 0.45s ease, height 0.45s ease, opacity 0.45s ease;
}
.btn:active::after { width: 260px; height: 260px; opacity: 0; transition: 0s; }
.btn > * { position: relative; z-index: 1; }

/* Botón amarillo con brillo dorado en movimiento */
.btn-primary {
  color: var(--blue-dark);
  background: linear-gradient(135deg, #f5c518 0%, #e6b800 50%, #f5c518 100%);
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}
.btn-primary:hover { background-position: 100% center; }

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.btn-secondary { background: #fff; color: var(--blue); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--blue); }
.full { width: 100%; }
.hero-card, .filters-card, .info-card, .detail-card, .contact-form, .admin-card {
  background: var(--white); color: var(--text); border-radius: 1rem; box-shadow: 0 14px 34px rgba(4, 28, 66, 0.08); border: 1px solid var(--border); }
.hero-card { padding: 1.25rem; }
.section { padding: 3.2rem 0 3.6rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.text-link { color: var(--blue); font-weight: 700; }
.listing-shell { display: block; }
.filters-card { padding: 1rem; display: grid; gap: 0.8rem; }
.filters-card label, .contact-form label, .search-form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 0.7rem; padding: 0.75rem 0.85rem; font: inherit; color: var(--text); background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7, 43, 97, 0.12); }
.property-grid { display: grid; gap: 1rem; }
.property-card { overflow: hidden; background: var(--white); border-radius: 1rem; border: 1px solid var(--border); box-shadow: 0 10px 24px rgba(4, 28, 66, 0.06); transition: transform 0.24s ease, box-shadow 0.24s ease; }
.property-card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(4, 28, 66, 0.1); }
.property-card .card-media { height: 220px; }
.property-card .card-body { padding: 1rem; display: grid; gap: 0.7rem; }
.property-title { font-weight: 700; font-size: 1.1rem; }
.property-meta { display: flex; flex-wrap: wrap; gap: 0.7rem; color: var(--muted); font-size: 0.9rem; }
.property-footer { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 0.2rem; flex-wrap: wrap; }
.price-tag { font-weight: 800; color: var(--blue); }
.tag { display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.75rem; font-weight: 700; background: #fff4c7; color: var(--blue); }
/* Badge de operación más visible */
.badge-op { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; background: var(--yellow); color: var(--blue-dark); box-shadow: 0 4px 12px rgba(245, 197, 24, 0.35); }
.badge-op.badge-arriendo { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(7, 43, 97, 0.28); }
.property-sector { font-size: 0.82rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.property-extra { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.25rem 0.6rem; font-size: 0.78rem; font-weight: 600; background: var(--cream); border: 1px solid var(--border); color: var(--text); }
.chip-off { color: var(--muted); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.2rem; }
.card-actions .btn { padding: 0.7rem 0.8rem; font-size: 0.88rem; }
/* ===== WHATSAPP FLOTANTE ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: inline-flex; align-items: center; gap: 0;
  height: 60px; padding: 0; border-radius: 999px;
  background: #25d366; color: #fff;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35);
  overflow: hidden;
  transition: gap 0.28s ease, padding 0.28s ease, box-shadow 0.2s ease;
  animation: waPulse 2.4s ease-in-out infinite;
}
.wa-float-icon { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 60px; }
.wa-float svg { width: 30px; height: 30px; }
.wa-float-label {
  max-width: 0; opacity: 0; white-space: nowrap;
  font-weight: 600; font-size: 0.9rem; line-height: 1;
  transition: max-width 0.32s ease, opacity 0.25s ease;
}
.wa-float:hover, .wa-float:focus-visible {
  animation-play-state: paused;
  padding-right: 1.1rem;
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.45);
}
.wa-float:hover .wa-float-label, .wa-float:focus-visible .wa-float-label { max-width: 260px; opacity: 1; }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  60% { box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35), 0 0 0 16px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) { .wa-float { animation: none; } }
@media (max-width: 480px) { .wa-float:hover .wa-float-label { max-width: 150px; white-space: normal; line-height: 1.2; } }

/* ===== BUSCADOR DESPLEGABLE ===== */
.hero-search { display: block; }
.btn-buscador {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 20px auto; padding: 16px 32px;
  background: linear-gradient(135deg, #f5c518 0%, #e6b800 50%, #f5c518 100%);
  background-size: 200% auto;
  color: #0d1b3e; border: none; border-radius: 50px;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 25px rgba(245, 197, 24, 0.4);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  animation: shimmer 4s linear infinite;
}
.btn-buscador:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 32px rgba(245, 197, 24, 0.55); }
.btn-buscador:active { transform: translateY(0) scale(0.98); }
.btn-buscador:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.7); outline-offset: 3px; }

.panel-buscador {
  background: #fff; color: var(--text);
  border-radius: 20px; padding: 24px;
  max-width: 500px; margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}
.panel-buscador[hidden] { display: none; }
.panel-buscador h3 { color: var(--blue-dark); margin-bottom: 1rem; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
.btn-solo-filtrar {
  display: block; width: 100%; margin-top: 0.6rem; padding: 0.6rem;
  background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer;
}
.btn-solo-filtrar:hover { color: var(--blue); }
@media (max-width: 480px) {
  .btn-buscador { width: 100%; padding: 15px 20px; font-size: 15px; }
  .panel-buscador { padding: 18px; border-radius: 16px; }
}

/* ===== BOTÓN FLOTANTE IA ===== */
.ia-float {
  position: fixed; right: 16px; bottom: 160px; z-index: 9999;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 10px 16px; border-radius: 50px; font-size: 12px;
  background: linear-gradient(135deg, #f5c518, #e6b800);
  color: #0d1b3e; font-weight: 700; line-height: 1;
  border: none; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 20px rgba(245, 197, 24, 0.5);
  animation: iaPulse 2.6s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ia-float:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 28px rgba(245, 197, 24, 0.65); animation-play-state: paused; }
.ia-float:active { transform: translateY(0) scale(0.98); }
.ia-float-icon { font-size: 1.1rem; }
@keyframes iaPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(245, 197, 24, 0.5), 0 0 0 0 rgba(245, 197, 24, 0.4); }
  60% { box-shadow: 0 4px 20px rgba(245, 197, 24, 0.5), 0 0 0 14px rgba(245, 197, 24, 0); }
}
@media (max-width: 480px) {
  .ia-float { padding: 9px 14px; font-size: 11.5px; bottom: 150px; }
}

/* Accesibilidad: si el usuario pide menos movimiento, se apagan las animaciones */
@media (prefers-reduced-motion: reduce) {
  .hero, .particle, .btn-primary, .ia-float, .wa-float { animation: none !important; }
  .hero-particles { display: none; }
  .btn:hover, button:hover { transform: none; }
}

/* ===== ESTADÍSTICAS DE CONFIANZA ===== */
.stats-band { background: var(--white); padding: 2.4rem 0; border-bottom: 1px solid var(--border); }
.stats-band-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stat-tile { text-align: center; padding: 1.1rem 0.6rem; border-radius: 1rem; background: var(--cream); border: 1px solid var(--border); }
.stat-icon { font-size: 1.6rem; line-height: 1; display: block; margin-bottom: 0.35rem; }
.stat-number { display: block; font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; color: var(--blue); line-height: 1.1; }
.stat-label { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }

/* ===== SECCIÓN IA ===== */
.ai-section { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: var(--white); padding: 3.4rem 0; }
.ai-section h2 { color: var(--white); }
.ai-sub { color: #d7e7ff; max-width: 620px; margin: 0 0 1.4rem; }
.ai-box { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 1rem; padding: 1.1rem; }
.ai-box textarea { min-height: 130px; resize: vertical; border-radius: 0.8rem; }
.sr-only-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 0.9rem; }
.ai-hint { font-size: 0.82rem; color: #a9bbdb; margin: 0; }
.ai-result { margin-top: 1rem; background: var(--white); color: var(--text); border-radius: 1rem; padding: 1.1rem; opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.ai-result[hidden] { display: none; }
.ai-result.visible { opacity: 1; transform: translateY(0); }
.ai-result p { margin: 0 0 0.7rem; white-space: pre-wrap; }
.ai-result .ai-cta { border-top: 1px solid var(--border); padding-top: 0.9rem; margin-top: 0.9rem; display: grid; gap: 0.7rem; }
.ai-result .ai-cta strong { color: var(--blue-dark); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1eb356; }
.ai-error { color: #b42318; font-weight: 600; }

/* ===== DIFERENCIADORES ===== */
.why-grid { display: grid; gap: 1rem; margin-top: 1.2rem; }
.why-card { background: var(--white); border: 1px solid var(--border); border-radius: 1rem; padding: 1.2rem; display: flex; gap: 0.8rem; align-items: flex-start; box-shadow: 0 10px 24px rgba(4, 28, 66, 0.05); transition: transform 0.22s ease, box-shadow 0.22s ease; }
.why-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(4, 28, 66, 0.1); }
.why-icon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #fff4c7; color: var(--blue-dark); font-weight: 800; }
.why-card h3 { font-size: 1rem; margin: 0 0 0.2rem; color: var(--blue-dark); }
.why-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* ===== CAPTAR PROPIETARIOS ===== */
.sell-band { background: var(--yellow); color: #101828; padding: 3.2rem 0; }
.sell-inner { display: grid; gap: 1rem; align-items: center; }
.sell-band h2 { color: #101828; margin-bottom: 0.6rem; }
.sell-band p { margin: 0; max-width: 640px; color: #26303f; }
.btn-navy { background: var(--blue-dark); color: #fff; }
.btn-navy:hover { background: var(--blue); }
/* ===== FOOTER ===== */
.site-footer { margin-top: 4rem; background: var(--navy); color: #cdd9ef; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 2.5rem; }
.footer-logo { height: 80px; width: auto; display: block; margin-bottom: 0.9rem; border-radius: 0; }
.footer-brand .brand-title { color: #fff; font-size: 1.2rem; }
.footer-brand .brand-subtitle { color: var(--yellow); }
.footer-about { margin: 1rem 0; max-width: 320px; font-size: 0.9rem; line-height: 1.65; color: #a9bbdb; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); color: #fff; transition: background 0.2s ease, transform 0.2s ease; }
.footer-social a:hover { background: var(--yellow); color: var(--blue-dark); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-col h4 { color: #fff; font-size: 0.95rem; letter-spacing: 0.03em; margin: 0 0 1rem; }
.footer-col a { display: block; padding: 0.32rem 0; color: #cdd9ef; font-size: 0.92rem; transition: color 0.2s ease, padding-left 0.2s ease; }
.footer-col a:hover { color: var(--yellow); padding-left: 4px; }
.footer-col p { margin: 0.32rem 0; font-size: 0.92rem; color: #cdd9ef; }
/* Franja de estadísticas en el footer */
.footer-stats {
  background: #162448;
  padding: 30px 20px;
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  border-top: 1px solid rgba(245, 197, 24, 0.2);
}
.footer-stat { text-align: center; color: #fff; min-width: 90px; }
.footer-stat-num { font-size: 28px; font-weight: 800; color: var(--yellow); line-height: 1.1; }
.footer-stat-label { font-size: 12px; opacity: 0.7; margin-top: 0.2rem; }
@media (max-width: 480px) {
  .footer-stats { gap: 22px 28px; padding: 22px 16px; }
  .footer-stat-num { font-size: 23px; }
}

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.2rem 0; }
.footer-bottom p { margin: 0; text-align: center; font-size: 0.85rem; color: #8fa3c9; }
.footer-bottom a { color: #8fa3c9; }
.footer-bottom a:hover { color: var(--yellow); }
.footer-sep { opacity: 0.5; margin: 0 0.4rem; }
.page-section { padding: 2.4rem 0 3.4rem; }
.about-grid, .team-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.info-card { padding: 1.25rem; }
.agent-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.4rem 1rem; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.agent-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(4, 28, 66, 0.1); }
.agent-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; object-position: center top; border: 3px solid var(--yellow); box-shadow: 0 10px 24px rgba(4, 28, 66, 0.12); margin-bottom: 1rem; }
.agent-info h3 { color: var(--blue-dark); font-size: 1.1rem; margin-bottom: 0.2rem; }
.agent-info p { color: var(--muted); margin: 0; }
.agent-role { color: var(--blue) !important; font-weight: 700; font-size: 0.88rem; line-height: 1.35; }
.agent-bio { margin-top: 0.6rem !important; font-size: 0.9rem; line-height: 1.6; }
.agent-cta { margin-top: 0.9rem; }
.contact-grid { display: grid; gap: 1rem; }
.contact-form { padding: 1.2rem; display: grid; gap: 0.8rem; }
.detail-page { padding: 2.4rem 0 3.4rem; }
.detail-card { padding: 1rem; display: grid; gap: 1rem; }
.gallery-grid { display: grid; gap: 0.75rem; }
.gallery-grid img { height: 250px; border-radius: 0.9rem; }
.stats-grid { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.stat-card { padding: 1rem; background: var(--white); border-radius: 1rem; border: 1px solid var(--border); }
.table-wrap { overflow-x: auto; }
.table-admin { width: 100%; border-collapse: collapse; }
.table-admin th, .table-admin td { padding: 0.7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-address { font-size: 0.8rem; color: var(--blue); font-weight: 600; }
.admin-address::before { content: "🔒 "; }
.admin-card { padding: 1rem; margin-bottom: 1rem; }
.admin-grid { display: grid; gap: 1rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
.small-btn { padding: 0.45rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--cream); margin-right: 0.35rem; cursor: pointer; }
@media (max-width: 767px) {
  /* El logo PNG es cuadrado (1024x1024), así que ocupa poco ancho: logo y
     enlaces caben en UNA sola fila incluso en pantallas pequeñas. */
  .site-header .nav-wrap { padding: 6px 12px !important; }
  .site-header img { height: 56px !important; width: auto !important; }
  .site-header ul { gap: 2px !important; }
  .site-header ul li a { font-size: 13px !important; padding: 7px 9px !important; }

  /* Menos aire vertical en móvil: las tarjetas suben y se ven con un solo scroll */
  .hero { padding: 2rem 0 1.8rem; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero-copy { font-size: 0.95rem; }
  .hero-grid { gap: 1.2rem; }
  .hero-actions { margin-top: 0.9rem; }
  .hero-card { padding: 1rem; }
  .search-form { display: grid; gap: 0.6rem; }
  .stats-band { padding: 1.4rem 0; }
  .stat-tile { padding: 0.8rem 0.5rem; }
  .section { padding: 1.8rem 0 2rem; }
  .section-head { margin-bottom: 0.9rem; }
  .property-grid { gap: 0.9rem; }
  .property-card { width: 100%; margin: 0; }
  .property-card .card-media { height: 190px; }
  .ai-section { padding: 2.2rem 0; }
  .sell-band { padding: 2.2rem 0; }
  .site-footer { margin-top: 2rem; }
  .footer-grid { padding: 2rem 0 1.5rem; gap: 1.5rem; }
}
/* Pantallas muy angostas (360px y menos): último ajuste para que nada se corte */
/* Pantallas angostas: los 4 enlaces deben caber en la segunda fila */
@media (max-width: 400px) {
  .site-header img { height: 48px !important; }
  .site-header ul { gap: 0 !important; }
  .site-header ul li a { font-size: 12px !important; padding: 6px 7px !important; }
}

/* Pantallas mínimas (iPhone SE / Android antiguos, 320px) */
@media (max-width: 345px) {
  .site-header img { height: 42px !important; }
  .site-header ul li a { font-size: 11px !important; padding: 5px 5px !important; }
}

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.2fr 0.9fr; }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1.4fr 0.8fr; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1.2fr 0.8fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sell-inner { grid-template-columns: 1.6fr auto; gap: 2rem; }
}
@media (min-width: 1024px) {
  .property-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.5fr 0.9fr 1fr 1fr 1.1fr; }
}

/* ===== TAMAÑO DEL LOGO =====
   Va al final a propósito: con la misma especificidad e !important, gana la
   última regla del archivo, así que esta manda sobre los ajustes anteriores. */
nav img, .nav-logo img {
  height: 75px !important;
}

@media (min-width: 768px) {
  nav img, .nav-logo img {
    height: 95px !important;
  }
}
