/* ============================================================
   SA-HOMES · style.css
   Edita aquí todos los estilos visuales
   ============================================================ */

:root {
  --red:    #cc1111;   /* Color principal — cámbialo aquí */
  --red-lt: #e83333;
  --dark:   #0f0f0f;
  --char:   #1c1c1e;
  --mid:    #6b6b6b;
  --light:  #f5f4f2;
  --white:  #ffffff;
  --border: #e5e2dc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "DM Sans", sans-serif; background: var(--light); color: var(--char); }

/* ── HEADER ────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 110px;
  display: flex; align-items: center;
  padding: 0 40px; gap: 32px;
}

/* ── LOGO: izquierda, grande ── */
.logo {
  display: flex; align-items: center; flex-shrink: 0;
}
.logo img {
  width: auto;
  height: 90px;      /* <-- CAMBIA ESTE VALOR para agrandar/achicar */
  display: block;
  object-fit: contain;
  max-width: 600px;
}

nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
nav a { font-size: 13px; font-weight: 500; color: var(--mid); text-decoration: none; transition: color .2s; }
nav a:hover { color: var(--dark); }
.nav-cta {
  background: var(--red); color: var(--white) !important;
  padding: 8px 20px; border-radius: 4px;
  font-size: 12px !important; letter-spacing: 1.2px !important; text-transform: uppercase;
}
.nav-cta:hover { background: var(--red-lt) !important; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 480px;
  background:
    linear-gradient(135deg, rgba(10,10,10,.88) 0%, rgba(10,10,10,.45) 100%),
    url("https://images.pexels.com/photos/1396122/pexels-photo-1396122.jpeg?auto=compress&cs=tinysrgb&w=1600") center/cover;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 40px 56px;
  color: var(--white);
}

.hero-inner { animation: fadeUp .7s ease both; max-width: 600px; }
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600; line-height: 1.1;
  margin-bottom: 16px; color: var(--white);
}
.hero-tagline {
  font-size: 15px; color: rgba(255,255,255,.72); font-weight: 400;
  margin-bottom: 36px; line-height: 1.6;
}

.hero-search {
  background: rgba(255,255,255,.12); border-radius: 6px;
  padding: 6px 6px 6px 18px;
  display: flex; align-items: center; gap: 8px;
  max-width: 520px; margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
}
.hero-search input {
  flex: 1; border: none; outline: none;
  font-size: 14px; font-family: "DM Sans", sans-serif;
  color: var(--white); background: transparent;
}
.hero-search input::placeholder { color: rgba(255,255,255,.5); }
.btn-buscar {
  background: var(--red); color: var(--white); border: none;
  padding: 10px 22px; border-radius: 4px;
  font-family: "DM Sans", sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.btn-buscar:hover { background: var(--red-lt); }

/* ── FILTROS ────────────────────────────────────────────────── */
.filtros-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 14px 40px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: sticky; top: 110px; z-index: 100;
}
.f-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--mid); font-weight: 500; }
.f-sep { width: 1px; height: 22px; background: var(--border); }

.filtros-bar select {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 30px 8px 12px; font-size: 13px;
  font-family: "DM Sans", sans-serif; color: var(--char);
  background: var(--white); outline: none; cursor: pointer;
  transition: border-color .2s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6b6b'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.filtros-bar select:focus { border-color: var(--red); }

.precio-group { display: flex; flex-direction: column; gap: 4px; }
.precio-label-top {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--mid);
}
.precio-controles { display: flex; align-items: center; gap: 10px; }
input[type=range] { width: 120px; accent-color: var(--red); cursor: pointer; height: 4px; }
.precio-valor-label {
  font-size: 12px; font-weight: 600; font-family: "DM Sans", sans-serif;
  color: var(--dark); white-space: nowrap;
  background: #f5f4f2; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; min-width: 140px; text-align: center;
}

.btn-limpiar {
  margin-left: auto; background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 14px; font-size: 12px;
  font-family: "DM Sans", sans-serif; color: var(--mid); cursor: pointer; transition: all .2s;
}
.btn-limpiar:hover { border-color: var(--red); color: var(--red); }

#count-badge {
  background: var(--dark); color: var(--white);
  border-radius: 20px; padding: 2px 10px; font-size: 11px; font-weight: 500;
}

/* ── CATÁLOGO ───────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 40px 40px 100px; }
.section-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-top h2 { font-family: "Cormorant Garamond", serif; font-size: 1.75rem; font-weight: 600; color: var(--dark); }
.section-top h2 small { font-family: "DM Sans", sans-serif; font-size: 13px; color: var(--mid); font-weight: 400; margin-left: 10px; }

#catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

/* ── TARJETA ────────────────────────────────────────────────── */
.inmueble {
  background: var(--white); border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  transition: transform .3s, box-shadow .3s;
  animation: cardIn .4s ease both;
  display: flex; flex-direction: column;
}
@keyframes cardIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
.inmueble:hover { transform: translateY(-5px); box-shadow: 0 16px 44px rgba(0,0,0,.14); }

.card-img { position: relative; height: 220px; overflow: hidden; background: #e0ddd6; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; display: block; }
.inmueble:hover .card-img img { transform: scale(1.05); }
.card-img-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8e5df, #d0cdc5); font-size: 44px; color: #bbb;
}

.badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 3px; font-weight: 600; backdrop-filter: blur(6px);
}
.badge.activo  { background: rgba(204,17,17,.88); color: var(--white); }
.badge.rentado { background: rgba(0,0,0,.72); color: var(--white); }

.card-precio-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  padding: 28px 14px 12px;
}
.card-precio {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem; font-weight: 700; color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.card-precio small { font-family: "DM Sans", sans-serif; font-size: 10px; opacity: .8; font-weight: 400; }
/* Badge Renta/Venta sobre la foto */
.card-tipo-wrap {
  position: absolute; top: 12px; left: 12px;
}
.card-tipo-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 4px 10px; border-radius: 20px;
}
.card-tipo-renta { background: rgba(26,122,74,.9); color: #fff; }
.card-tipo-venta { background: rgba(138,90,26,.9);  color: #fff; }


.card-body { padding: 16px 18px 0; flex: 1; display: flex; flex-direction: column; }
.card-zona { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); font-weight: 600; margin-bottom: 4px; }
.card-dir { font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { font-size: 12.5px; color: var(--mid); margin-bottom: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.card-specs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; flex-shrink: 0; }
.spec { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mid); }

.card-foot { display: flex; align-items: center; justify-content: flex-end; padding: 14px 18px; margin-top: auto; border-top: 1px solid var(--border); }
.btn-ver {
  background: var(--dark); color: var(--white); border: none;
  padding: 9px 18px; border-radius: 4px;
  font-family: "DM Sans", sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: background .2s;
}
.btn-ver:hover { background: var(--red); }

/* ── MODAL ──────────────────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
  overflow-y: auto; padding: 32px 20px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 12px;
  width: 100%; max-width: 860px; margin: auto;
  animation: mIn .3s ease;
}
@keyframes mIn { from { opacity:0; transform:scale(.96) translateY(16px); } to { opacity:1; transform:none; } }

.modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--border);
}
.modal-hdr h2 { font-family: "Cormorant Garamond", serif; font-size: 1.4rem; color: var(--dark); }
.modal-x {
  background: none; border: none; font-size: 20px; cursor: pointer; color: var(--mid);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.modal-x:hover { background: var(--light); }
.modal-body { padding: 28px; }

/* ── Galería revista inmobiliaria ── */
.gal-wrap { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }

/* Foto principal */
.gal-main {
  position: relative; width: 100%; height: 360px;
  background: #0f0f0f; overflow: hidden;
  border-radius: 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.gal-img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  transition: opacity .25s;
}
.gal-error {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #666; font-size: 13px; gap: 8px;
}

/* Flechas superpuestas — grandes y táctiles */
.gal-arr {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; border: none;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 28px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.gal-arr:hover:not([disabled]) { background: rgba(255,255,255,.32); }
.gal-arr[disabled] { opacity: .2; cursor: default; }
.gal-arr-l { left: 14px; }
.gal-arr-r { right: 14px; }

/* Contador */
.gal-badge {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 12px; font-weight: 600;
  font-family: "DM Sans", sans-serif;
  padding: 4px 12px; border-radius: 20px;
  pointer-events: none;
}

/* Strip de miniaturas horizontal */
.gal-strip {
  display: flex; gap: 3px;
  overflow-x: auto; overflow-y: hidden;
  background: #0f0f0f;
  padding: 3px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.gal-strip::-webkit-scrollbar { display: none; }

.gal-dot {
  flex-shrink: 0; width: 72px; height: 54px;
  overflow: hidden; cursor: pointer;
  border-radius: 3px;
  border: 2px solid transparent;
  transition: border-color .15s, opacity .15s;
  opacity: .5;
  scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center;
}
.gal-dot img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  pointer-events: none;
}
.gal-dot:hover { opacity: .8; }
.gal-dot.active { opacity: 1; border-color: var(--red); }

/* Sin foto */
.m-no-foto {
  height: 180px; display: flex; align-items: center; justify-content: center;
  font-size: 48px; background: var(--light); border-radius: 10px; margin-bottom: 20px;
}
.m-no-foto {
  height: 200px; background: linear-gradient(135deg, #e8e5df, #d0cdc5);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 52px; color: #bbb; margin-bottom: 24px;
}

.m-ficha { padding: 20px; overflow-y: auto; }

/* Grupos del modal */
.m-grupo { margin-bottom: 20px; }
.m-grupo:last-child { margin-bottom: 0; }
.m-grupo-titulo {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--mid);
  border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 10px;
}
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-item { background: var(--light); border-radius: 8px; padding: 10px 12px; }
.m-item label {
  display: block; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--mid); margin-bottom: 4px;
}
.m-item span { font-size: 13px; font-weight: 600; color: var(--dark); }
.m-item-precio { background: var(--dark); }
.m-item-precio label { color: rgba(255,255,255,.5); }
.m-item-precio span  { color: #fff; font-size: 15px; }
.m-item-renta { background: #edf7f1; }
.m-item-renta label { color: #1a7a4a; }
.m-item-renta span  { color: #1a7a4a; }
.m-item-venta { background: #fdf6ed; }
.m-item-venta label { color: #8a5a1a; }
.m-item-venta span  { color: #8a5a1a; }

/* Amenidades */
.m-amenidades { display: flex; flex-wrap: wrap; gap: 6px; }
.m-amen-chip {
  font-size: 12px; background: var(--light); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px; color: var(--char);
}

/* Texto largo (descripción, requisitos) */
.m-texto-bloque { margin-bottom: 12px; }
.m-texto-bloque:last-child { margin-bottom: 0; }
.m-texto-bloque label {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--mid); margin-bottom: 6px;
}
.m-texto-bloque p { font-size: 13px; color: var(--char); line-height: 1.65; }

.m-mapa { border-radius: 8px; overflow: hidden; }
.m-mapa iframe { width: 100%; height: 250px; border: none; display: block; }

/* ── CHATBOT ────────────────────────────────────────────────── */
#cb-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 400;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--red); color: var(--white); border: none;
  font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(204,17,17,.4);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
#cb-btn:hover { background: var(--red-lt); transform: scale(1.07); }
#cb-panel {
  display: none; position: fixed; bottom: 96px; right: 28px; z-index: 400;
  width: 320px; background: var(--white); border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18); overflow: hidden;
}
#cb-panel.open { display: flex; flex-direction: column; }
.cb-head { background: var(--dark); color: var(--white); padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.cb-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.cb-head-txt { font-size: 13px; font-weight: 500; }
.cb-head-sub { font-size: 11px; opacity: .6; }
.cb-msgs { flex: 1; padding: 16px; overflow-y: auto; max-height: 240px; display: flex; flex-direction: column; gap: 10px; }
.cb-msg { max-width: 80%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.cb-msg.bot { background: var(--light); color: var(--char); align-self: flex-start; border-radius: 4px 12px 12px 12px; }
.cb-msg.usr { background: var(--red); color: var(--white); align-self: flex-end; font-weight: 500; border-radius: 12px 4px 12px 12px; }
.cb-input { display: flex; border-top: 1px solid var(--border); }
.cb-input input { flex: 1; border: none; outline: none; padding: 12px 14px; font-size: 13px; font-family: "DM Sans", sans-serif; }
.cb-send { background: var(--red); border: none; padding: 0 16px; cursor: pointer; font-size: 16px; color: white; transition: background .2s; }
.cb-send:hover { background: var(--red-lt); }

/* ── FOOTER ────────────────────────────────────────────────── */
footer { background: var(--dark); color: rgba(255,255,255,.5); text-align: center; padding: 28px; font-size: 12px; }
footer strong { color: var(--white); }

/* ── RESPONSIVE ────────────────────────────────────────────── */


/* ── SCROLL SUAVE GLOBAL ───────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
nav a { position: relative; }
nav a.active { color: var(--dark) !important; }
nav a:not(.nav-cta)::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--red); border-radius: 2px;
  transform: scaleX(0); transition: transform .25s ease;
}
nav a:not(.nav-cta):hover::after,
nav a:not(.nav-cta).active::after { transform: scaleX(1); }

/* ── SECCIONES COMUNES ─────────────────────────────────────── */
.sec-inner {
  max-width: 1280px; margin: 0 auto; padding: 100px 40px;
}
.sec-label {
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--red); font-weight: 600; margin-bottom: 14px;
}
.sec-label.light { color: #ff8888; }
.sec-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 600; line-height: 1.15; color: var(--dark);
  margin-bottom: 56px;
}
.sec-title.light { color: var(--white); margin-bottom: 20px; }

/* ── SECCIÓN NOSOTROS ──────────────────────────────────────── */
.seccion-nosotros { background: var(--white); }

.mision-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 72px;
}
.mision-card {
  background: var(--light); border-radius: 12px;
  padding: 36px 32px; border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s;
}
.mision-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.mision-icon { font-size: 32px; margin-bottom: 16px; }
.mision-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem; font-weight: 600; color: var(--dark);
  margin-bottom: 10px;
}
.mision-card p { font-size: 14px; color: var(--mid); line-height: 1.7; }

.ventajas-titulo {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--mid); font-weight: 600; margin-bottom: 28px;
}
.ventajas-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.ventaja {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 32px 28px; border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background .2s;
}
.ventaja:hover { background: var(--light); }
.ventaja:nth-child(even) { border-right: none; }
.ventaja:nth-child(3), .ventaja:nth-child(4) { border-bottom: none; }
.v-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem; font-weight: 700; color: var(--border);
  line-height: 1; flex-shrink: 0; transition: color .2s;
}
.ventaja:hover .v-num { color: var(--red); }
.ventaja strong { display: block; font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.ventaja p { font-size: 13px; color: var(--mid); line-height: 1.6; margin: 0; }

/* ── SECCIÓN CONTACTO ──────────────────────────────────────── */
.seccion-contacto {
  background: var(--dark);
  position: relative; overflow: hidden;
}
.contacto-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 60px;
}
.contacto-texto { flex: 1; position: relative; z-index: 2; }
.contacto-sub {
  font-size: 15px; color: rgba(255,255,255,.55);
  line-height: 1.7; margin-bottom: 36px; max-width: 440px;
}
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 12px;
  background: #25D366; color: var(--white);
  padding: 14px 28px; border-radius: 6px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .2s, transform .2s;
  box-shadow: 0 4px 24px rgba(37,211,102,.35);
  margin-bottom: 36px;
}
.btn-whatsapp:hover { background: #1ebe5a; transform: translateY(-2px); }
.contacto-datos { display: flex; flex-direction: column; gap: 12px; }
.dato { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,.55); }
.dato-icon { font-size: 16px; }

/* Decoración lado derecho */
.contacto-deco {
  flex-shrink: 0; width: 280px; height: 280px;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.deco-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07);
  width: 100%; height: 100%;
  animation: spin 18s linear infinite;
}
.deco-ring-2 {
  width: 68%; height: 68%;
  border-color: rgba(204,17,17,.25);
  animation-duration: 12s; animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.deco-house {
  font-size: 72px; position: relative; z-index: 2;
  filter: drop-shadow(0 0 30px rgba(204,17,17,.3));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ── RESPONSIVE NUEVAS SECCIONES ───────────────────────────── */

/* ================================================================
   RESPONSIVE — SA-HOMES
   Breakpoints: 768px (tablet), 480px (móvil grande), 360px (small)
   ================================================================ */

/* ── Hamburguesa (oculta en desktop) ─────────────────────── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  margin-left: auto; padding: 4px; border-radius: 6px;
  transition: background .2s;
}
.hamburger:hover { background: var(--light); }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px;
  transition: transform .3s, opacity .3s;
  transform-origin: center;
}
/* Animación X al abrir */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Menú móvil overlay ───────────────────────────────────── */
.menu-movil {
  display: none;
  position: fixed; inset: 110px 0 0 0; z-index: 190;
  background: rgba(255,255,255,0.99);
  backdrop-filter: blur(12px);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 32px 24px;
  animation: menuIn .25s ease;
}
.menu-movil.open { display: flex; }
@keyframes menuIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:none; } }
.menu-movil a {
  width: 100%; max-width: 320px; text-align: center;
  font-size: 18px; font-weight: 500; color: var(--dark);
  text-decoration: none; padding: 16px 24px; border-radius: 8px;
  transition: background .2s, color .2s;
}
.menu-movil a:hover { background: var(--light); }
.menu-movil-cta {
  background: var(--red) !important; color: var(--white) !important;
  font-size: 14px !important; letter-spacing: 1.2px;
  text-transform: uppercase; margin-top: 8px;
}
.menu-movil-cta:hover { background: var(--red-lt) !important; }

/* ── TABLET (≤ 768px) ─────────────────────────────────────── */

/* ── Lightbox (zoom pantalla completa) ── */
/* ── Protección de contenido ── */
.card-img img, .gal-img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
.gal-img { pointer-events: all; }

/* ── Banner de cookies ── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: var(--dark); color: #fff;
  padding: 16px 32px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.1);
  transform: translateY(100%);
  transition: transform .4s ease;
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner p {
  flex: 1; font-size: 13px; line-height: 1.6;
  color: rgba(255,255,255,.8); min-width: 260px;
}
#cookie-banner a { color: var(--red); text-decoration: underline; }
.btn-cookie-ok {
  background: var(--white); color: var(--dark);
  border: none; border-radius: 8px;
  padding: 9px 24px; font-size: 13px; font-weight: 600;
  font-family: "DM Sans", sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.btn-cookie-ok:hover { background: var(--light); }
.btn-cookie-mas {
  background: none; color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.2); border-radius: 8px;
  padding: 9px 18px; font-size: 13px;
  font-family: "DM Sans", sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: all .2s;
}
.btn-cookie-mas:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* ── Modal aviso de privacidad ── */
#privacidad-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#privacidad-overlay.open { opacity: 1; pointer-events: all; }
#privacidad-modal {
  background: var(--white); border-radius: 16px;
  max-width: 600px; width: 100%;
  max-height: 80vh; display: flex; flex-direction: column;
  overflow: hidden;
}
#privacidad-modal .priv-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
#privacidad-modal .priv-header h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem; font-weight: 700; color: var(--dark);
}
#privacidad-modal .priv-body {
  padding: 20px 24px; overflow-y: auto;
  font-size: 13px; color: var(--mid); line-height: 1.8;
}
#privacidad-modal .priv-body h4 {
  font-size: 13px; font-weight: 600; color: var(--dark);
  margin: 16px 0 6px;
}
#privacidad-modal .priv-body p { margin-bottom: 10px; }
.priv-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--mid); padding: 4px;
  line-height: 1;
}
.priv-close:hover { color: var(--dark); }

@media (max-width: 480px) {
  #cookie-banner { padding: 14px 16px; gap: 12px; }
  #cookie-banner p { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   768px = tablet/landscape   480px = móvil   360px = pequeño
   ═══════════════════════════════════════════════════════════ */

/* ── TABLET (≤ 768px) ─────────────────────────────────────── */
@media (max-width: 768px) {

  /* Header */
  header { padding: 0 20px; gap: 0; height: 80px; }
  .logo img { width: 180px; }
  nav { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .menu-movil { inset: 80px 0 0 0; }

  /* Hero */
  .hero { padding: 56px 20px 48px; min-height: auto; }
  .hero h1 { font-size: 2.1rem; }
  .hero-search { max-width: 100%; }

  /* Filtros — scroll horizontal limpio */
  .filtros-bar {
    padding: 10px 16px;
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 8px;
    scroll-snap-type: x mandatory;
  }
  .filtros-bar::-webkit-scrollbar { display: none; }
  .precio-group { min-width: 180px; }

  /* Catálogo */
  .container { padding: 24px 16px 100px; }
  #catalogo { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* Modal — sheet desde abajo */
  .overlay { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 93vh;
    animation: modalUp .3s ease;
  }
  @keyframes modalUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .modal-hdr { padding: 14px 20px 12px; position: sticky; top: 0; background: #fff; z-index: 10; border-radius: 20px 20px 0 0; }
  .modal-body { flex-direction: column; padding: 0 0 32px; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: calc(93vh - 60px); }
  .gal-main { height: 280px; }
  .gal-dot { width: 60px; height: 46px; }
  .m-ficha { padding: 16px 20px; }
  .m-grid { grid-template-columns: repeat(2, 1fr); }
  .m-mapa { padding: 0 20px 20px; }
  .m-mapa iframe { height: 200px; border-radius: 10px; }

  /* Chatbot */
  #cb-panel { width: calc(100vw - 32px); right: 16px; bottom: 88px; }
  #cb-btn { bottom: 20px; right: 16px; }

  /* Secciones */
  .sec-inner { padding: 56px 20px; }
  .sec-title { font-size: 1.7rem; margin-bottom: 36px; }
  .mision-grid { grid-template-columns: 1fr; gap: 14px; }
  .ventajas-grid { grid-template-columns: 1fr; }
  .ventaja { border-right: none !important; }
  .ventaja:not(:last-child) { border-bottom: 1px solid var(--border) !important; }
  .contacto-inner { flex-direction: column; gap: 40px; }
  .contacto-deco { display: none; }
}

/* ── MÓVIL (≤ 480px) ──────────────────────────────────────── */
@media (max-width: 480px) {

  /* Header */
  header { height: 70px; padding: 0 16px; }
  .logo img { width: 160px; }
  .menu-movil { inset: 70px 0 0 0; }

  /* Hero */
  .hero { padding: 44px 16px 40px; }
  .hero h1 { font-size: 1.85rem; line-height: 1.2; }
  .hero-tagline { font-size: 13px; margin-bottom: 24px; }
  .hero-search { padding: 4px 4px 4px 14px; border-radius: 10px; }
  .hero-search input { font-size: 13px; }
  .btn-buscar { padding: 10px 16px; font-size: 13px; white-space: nowrap; }

  /* Sticky filtros al header de 70px */
  .filtros-bar { top: 70px; scroll-margin-top: 70px; }

  /* Filtros — vertical apilados en lugar de scroll */
  .filtros-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    overflow: visible;
    flex-wrap: wrap;
    position: static;
    top: 70px;
  }
  .f-label { display: none; }
  .f-sep   { display: none; }
  .filtros-bar select {
    width: 100%; font-size: 13px;
    padding: 9px 28px 9px 12px;
  }
  .precio-group {
    grid-column: 1 / -1;
    min-width: 0;
    background: var(--light);
    border-radius: 8px;
    padding: 10px 14px;
  }
  .precio-label-top { margin-bottom: 8px; }
  .precio-controles {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  input[type=range] { width: 100%; }
  .precio-valor-label {
    min-width: 0; width: 100%;
    text-align: center;
    font-size: 13px;
  }
  #count-badge { display: none; }
  .btn-limpiar {
    grid-column: 1 / -1;
    width: 100%; justify-content: center;
    padding: 10px; font-size: 13px;
  }

  /* Catálogo — 1 columna */
  .container { padding: 16px 12px 100px; }
  .section-top { margin-bottom: 16px; }
  .section-top h2 { font-size: 1.2rem; }
  #catalogo { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Tarjetas — 2 columnas */
  .card-img { height: 150px; }
  .card-body { padding: 10px 11px 0; }
  .card-zona { font-size: 9px; }
  .card-dir  { font-size: 13px; margin-bottom: 4px; }
  .card-desc { font-size: 11px; -webkit-line-clamp: 2; margin-bottom: 8px; }
  .card-precio { font-size: 15px; }
  .card-precio small { font-size: 9px; }
  .card-specs { gap: 4px; }
  .spec { font-size: 10px; padding: 2px 6px; }
  .spec-ico { font-size: 11px; }
  .card-foot { padding: 10px 11px; }
  .btn-ver { font-size: 12px; padding: 8px 12px; width: 100%; justify-content: center; }

  /* Modal — pantalla casi completa */
  .overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 16px 16px 0 0;
    max-height: 96vh;
    width: 100%;
  }
  .modal-hdr { padding: 12px 16px; }
  .modal-hdr h2 { font-size: 1rem; line-height: 1.3; padding-right: 32px; }
  .modal-x { width: 32px; height: 32px; font-size: 16px; }
  .modal-body { max-height: calc(96vh - 56px); }

  /* Galería en modal */
  .galeria-main { height: 240px; border-radius: 0; }
  .galeria-nav { width: 36px; height: 36px; font-size: 16px; }
  .galeria-thumbs { padding: 0 12px 0; gap: 5px; }
  .g-thumb { width: 56px; height: 42px; }
  .galeria-zoom-hint { display: none; }

  /* Ficha técnica — grupos */
  .m-ficha { padding: 14px 16px; }
  .m-grupo { margin-bottom: 16px; }
  .m-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .m-item { padding: 9px 10px; }
  .m-item label { font-size: 9px; }
  .m-item span  { font-size: 12px; }
  .m-item-precio span { font-size: 14px; }
  .m-amenidades { gap: 5px; }
  .m-amen-chip { font-size: 11px; padding: 3px 10px; }
  .m-texto-bloque p { font-size: 12px; }

  /* Mapa */
  .m-mapa { padding: 0 16px 16px; }
  .m-mapa iframe { height: 180px; }

  /* Lightbox */
  .lb-nav { width: 40px; height: 40px; font-size: 18px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-hint { display: none; }

  /* Chatbot — ancho completo desde abajo */
  #cb-panel {
    width: 100vw; right: 0; bottom: 70px;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
  }
  #cb-btn {
    bottom: 14px; right: 14px;
    width: 52px; height: 52px; font-size: 22px;
  }

  /* Secciones */
  .sec-inner { padding: 48px 16px; }
  .sec-label { font-size: 10px; }
  .sec-title { font-size: 1.55rem; }
  .sec-title.light { font-size: 1.55rem; }
  .mision-card { padding: 24px 20px; }
  .ventaja { padding: 20px 16px; gap: 12px; }
  .v-num { font-size: 1.5rem; min-width: 36px; }
  .btn-whatsapp { width: 100%; justify-content: center; font-size: 14px; }
  .contacto-datos { gap: 12px; }
  .dato { font-size: 13px; }
  footer { padding: 20px 16px; font-size: 12px; }
}

/* ── MÓVIL PEQUEÑO (≤ 360px) ─────────────────────────────── */
@media (max-width: 360px) {
  .logo img { width: 140px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-search input { font-size: 12px; }
  .filtros-bar { gap: 6px; padding: 10px 12px; }
  #catalogo { grid-template-columns: 1fr; gap: 10px; }
  .card-img { height: 190px; }
  .card-dir { font-size: 14px; }
  .card-body { padding: 12px 14px 0; }
  .btn-ver { font-size: 13px; padding: 9px 14px; }
  .m-grid { grid-template-columns: 1fr; }
  .sec-title { font-size: 1.35rem; }
}

/* ── Buscador inteligente ───────────────────────────────── */
.hero-search { position: relative; }

.search-autocomplete {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.12);
  list-style: none; z-index: 300; overflow: hidden;
  display: none;
}
.search-autocomplete li {
  padding: 11px 16px; font-size: 14px; color: var(--char);
  cursor: pointer; transition: background .15s;
  font-family: "DM Sans", sans-serif;
}
.search-autocomplete li:hover { background: var(--light); }
.search-autocomplete li + li { border-top: 1px solid var(--border); }

/* Banner de resultados de búsqueda */
.search-msg {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.search-msg-cercano {
  background: #fdf6ed;
  border: 1px solid #f0c97a;
}
.search-msg-vacio {
  background: #f5f4f2;
  border: 1px solid var(--border);
}
.sm-icon { font-size: 28px; flex-shrink: 0; }
.sm-body { flex: 1; min-width: 200px; }
.sm-body strong {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--dark); margin-bottom: 3px;
}
.sm-body p { font-size: 13px; color: var(--mid); margin: 0; line-height: 1.5; }
.sm-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--dark); color: #fff;
  border-radius: 8px; padding: 10px 18px;
  font-size: 13px; font-weight: 600;
  font-family: "DM Sans", sans-serif;
  text-decoration: none; white-space: nowrap;
  transition: background .2s; flex-shrink: 0;
}
.sm-cta:hover { background: var(--char); }
.sm-cta-wa { background: #1a7a4a; }
.sm-cta-wa:hover { background: #145f38; }

@media (max-width: 480px) {
  .search-msg { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sm-cta { width: 100%; justify-content: center; }
}
