/* =========================
   CARRUSEL FLOTANTE DE PROPIEDADES — Residencial
   Tarjeta translúcida flotando SOBRE la foto del hero (no un panel
   aparte): una propiedad a la vez, con flechas/puntos para navegar
   y fotos internas que van rotando solas. En móvil se apila debajo
   del texto del hero, dentro de la misma sección.
========================= */

.propiedades-flotante {
  position: absolute;
  z-index: 3;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(300px, 27vw, 370px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.propiedades-flotante__eyebrow {
  align-self: flex-start;
  font-family: var(--fh);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-h);
  background: rgba(7, 7, 8, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 999px;
}

.propiedades-flotante__stage {
  width: 100%;
}

/* ── Tarjeta de propiedad — cristal esmerilado sobre la foto ── */
.propiedad-card {
  position: relative;
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(15, 15, 17, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, .14);
  animation: propiedadCardIn .4s ease;
}
@keyframes propiedadCardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.propiedad-card__foto-stack {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg3);
}
.propiedad-card__foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: propiedadFotoCycle 18s infinite;
}
@keyframes propiedadFotoCycle {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  14%  { opacity: 1; }
  17%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .propiedad-card__foto { animation: none; opacity: 0; }
  .propiedad-card__foto:first-child { opacity: 1; }
}

.propiedad-card__scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 15, .9) 82%);
  pointer-events: none;
}

.propiedad-card__vermas {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  background: rgba(7, 7, 8, .6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--fh);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.propiedad-card__vermas:hover,
.propiedad-card__vermas:focus-visible {
  background: var(--accent);
  color: #04211f;
  border-color: var(--accent);
}

.propiedad-card__body {
  position: relative;
  padding: 16px 18px 18px;
}
.propiedad-card__body h2,
.propiedad-card__body h3 {
  font-family: var(--fh);
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 2px;
}
.propiedad-card__zona {
  font-size: 12.5px;
  color: var(--text3);
  margin: 0 0 8px;
}
.propiedad-card__precio {
  font-family: var(--fh);
  font-size: 21px;
  font-weight: 900;
  color: var(--accent-h);
  margin: 0 0 4px;
}
.propiedad-card__specs {
  font-size: 12.5px;
  color: var(--text2);
  margin: 0 0 14px;
}

/* ── Botones de "Agendar visita" — grandes y claros ── */
.propiedad-card__cta,
.ficha-modal__cta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-agendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--fh);
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  padding: 12px 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}
.btn-agendar:hover,
.btn-agendar:focus-visible { transform: translateY(-2px); }
.btn-agendar i { font-size: 16px; }
.btn-agendar--whatsapp {
  background: #25D366;
  color: #04210f;
  width: 100%;
}
.btn-agendar--whatsapp:hover { filter: brightness(1.08); }

/* Se repite el color con :link y :visited porque la regla general
   "a, a:link, a:visited { color: inherit }" pesa mas que esta clase sola:
   el texto acababa heredando el gris del cuerpo y quedaba en 1.01 de
   contraste sobre el verde. Con el verde oscuro sube a 9.1. */
a.btn-agendar--whatsapp:link,
a.btn-agendar--whatsapp:visited,
a.btn-agendar--whatsapp:hover,
a.btn-agendar--whatsapp span { color: #04210f; }
.btn-agendar-row {
  display: flex;
  gap: 8px;
}
.btn-agendar--secundario {
  flex: 1;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  font-size: 12.5px;
  padding: 10px 10px;
}
.btn-agendar--secundario:hover { background: rgba(255, 255, 255, .18); }

/* ── Navegación entre propiedades ── */
.propiedades-flotante__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.propiedades-flotante__flecha {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(7, 7, 8, .55);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.propiedades-flotante__flecha:hover {
  background: var(--accent);
  color: #04211f;
  transform: scale(1.08);
}
.propiedades-flotante__dots {
  display: flex;
  gap: 6px;
}
.propiedades-flotante__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.propiedades-flotante__dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}

/* ── Responsive: en móvil se apila debajo del texto del hero ── */
@media (max-width: 900px) {
  .landing-hero {
    display: block;
    min-height: auto;
  }
  .landing-hero__split--left {
    padding-bottom: 32px;
  }
  .propiedades-flotante {
    position: relative;
    z-index: 2;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 20px 40px;
  }
}

/* =========================
   FICHA COMPLETA — modal con galería ampliable + mapa
========================= */
.ficha-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ficha-modal.is-abierto { display: flex; }

.ficha-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 5, .88);
}

.ficha-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  width: min(1100px, 100%);
  height: min(84vh, 780px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
}

.ficha-modal__cerrar {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.ficha-modal__cerrar:hover {
  background: var(--accent);
  color: #04211f;
}

.ficha-modal__galeria-col {
  flex: 1.2 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}
.ficha-modal__galeria {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
}
.ficha-modal__foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ficha-modal__flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.ficha-modal__flecha--izq { left: 14px; }
.ficha-modal__flecha--der { right: 14px; }
.ficha-modal__flecha:hover {
  background: var(--accent);
  color: #04211f;
}
.ficha-modal__contador {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 12px;
  font-family: var(--fh);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.ficha-modal__miniaturas {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  background: var(--bg3);
}
.ficha-modal__mini {
  flex-shrink: 0;
  width: 64px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s ease, border-color .2s ease;
}
.ficha-modal__mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ficha-modal__mini.is-active,
.ficha-modal__mini:hover { opacity: 1; border-color: var(--accent); }

.ficha-modal__info {
  flex: 1 1 0%;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 30px 34px;
}
.ficha-modal__info h2 {
  font-family: var(--fh);
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 4px;
  padding-right: 30px;
}
.ficha-modal__zona {
  color: var(--text3);
  font-size: 14px;
  margin: 0 0 10px;
}
.ficha-modal__precio {
  font-family: var(--fh);
  font-size: 26px;
  font-weight: 900;
  color: var(--accent-h);
  margin: 0 0 18px;
}
.ficha-modal__specs {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0 0 26px;
  padding: 0;
}
.ficha-modal__specs li {
  font-size: 13.5px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ficha-modal__specs li i {
  color: var(--accent);
  width: 16px;
  text-align: center;
}
.ficha-modal__mantenimiento {
  font-size: 13.5px;
  color: var(--text2);
  margin: 0 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.ficha-modal__mantenimiento i {
  color: var(--accent);
  width: 16px;
  text-align: center;
  margin-right: 8px;
}
.ficha-modal__cta { margin-bottom: 20px; }
.ficha-modal__cta-label {
  display: block;
  font-family: var(--fh);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}
/* ── Formulario compacto (al final de la ficha) ── */
.ficha-modal__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
}
.ficha-modal__form-fila {
  display: flex;
  gap: 8px;
}
.ficha-modal__form input,
.ficha-modal__form textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--fh);
  font-size: 13px;
  color: var(--text);
  resize: vertical;
}
.ficha-modal__form input::placeholder,
.ficha-modal__form textarea::placeholder { color: var(--text3); }
.ficha-modal__form input:focus,
.ficha-modal__form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.ficha-modal__form button[type="submit"] {
  margin-top: 4px;
  align-self: flex-start;
  background: var(--accent);
  color: #04211f;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--fh);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: filter .2s ease;
}
.ficha-modal__form button[type="submit"]:hover { filter: brightness(1.1); }
.ficha-modal__form-ok {
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
}
.ficha-modal__form-ok i { margin-right: 6px; }

/* ── Amenidades / lugares cercanos ── */
.ficha-modal__bloque {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.ficha-modal__bloque h2,
.ficha-modal__bloque h3 {
  font-family: var(--fh);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 12px;
}
.ficha-modal__amenidades {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
}
.ficha-modal__amenidades li {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ficha-modal__amenidades li i { color: var(--accent); }
.ficha-modal__cercanos {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
}
.ficha-modal__cercanos li {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ficha-modal__cercanos li i {
  color: var(--accent);
  width: 16px;
  text-align: center;
  margin-top: 2px;
}
.ficha-modal__cercanos li strong { color: var(--text); font-weight: 700; }

.ficha-modal__mapa {
  border-radius: var(--r2);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
.ficha-modal__mapa iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

/* ── "Ver catálogo completo" — placeholder, se activa cuando llegue el link ── */
.btn-ver-catalogo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--fh);
  font-size: 13.5px;
  font-weight: 800;
  color: #04211f;
  text-decoration: none;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}
/* Se repite el color con :link y :visited porque la regla general
   "a, a:link, a:visited { color: inherit }" pesa mas que esta clase sola:
   el texto acababa heredando el gris del cuerpo y quedaba en 1.00 de
   contraste sobre el cian, o sea ilegible. Con el verde-negro sube a 8.4. */
a.btn-ver-catalogo:link,
a.btn-ver-catalogo:visited,
a.btn-ver-catalogo:hover,
.btn-ver-catalogo i { color: var(--on-accent); }

.btn-ver-catalogo i { font-size: 15px; }
.btn-ver-catalogo:hover,
.btn-ver-catalogo:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .ficha-modal { padding: 0; }
  .ficha-modal__panel {
    flex-direction: column;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    overflow-y: auto;
  }
  .ficha-modal__galeria-col { flex: 0 0 auto; }
  .ficha-modal__galeria { aspect-ratio: 4 / 3; flex: 0 0 auto; }
  .ficha-modal__info { flex: 0 0 auto; overflow-y: visible; padding: 24px 20px 40px; }
}
