/* Componentes compartidos agregados con la optimización SEO/conversión.
   Usan las variables de /css/root/root.css (--color1, --fondo, --fuente). */

/* ---------- Header ----------
   .navbar-no-shadow-container es position: fixed (home/style.css): el <header> reserva su alto
   para que las migas de pan y los H1 no queden tapados. */
header.navbar-no-shadow { height: 90px; }
button.menu-button {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.nav-link.is-active {
  text-decoration: underline;
  text-underline-offset: 6px;
}
.nav-phone {
  color: #fff;
  font-family: var(--fuente), sans-serif;
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 12px;
}
.nav-phone:hover { text-decoration: underline; }
@media (max-width: 991px) {
  .nav-menu-wrapper .nav-phone { color: var(--color1); }
}

/* ---------- Migas de pan ---------- */
.breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-family: var(--fuente), sans-serif;
  font-size: 0.85em;
  color: #4a5a6a;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 4px;
  color: #8a97a5;
}
.breadcrumbs a { color: var(--color1); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] {
  color: #4a5a6a;
  display: inline-block;
  max-width: 60ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* ---------- Tarjetas ---------- */
.miniatura-propiedad { text-decoration: none; color: inherit; }
.miniatura-propiedad .link-block-8 { position: relative; }
.miniatura-propiedad .image-4 { width: 100%; height: 100%; object-fit: cover; }
.badge-estado {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #b3261e;
  color: #fff;
  font-family: var(--fuente), sans-serif;
  font-weight: 700;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
}
.grid-propiedades {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22em), 1fr));
  gap: 24px;
}
/* La tarjeta reutiliza clases de la home pensadas para un carrusel con anchos fijos
   (25em, 22em, 7.4em): dentro de la grilla ocupa el ancho de su columna. */
.grid-propiedades .miniatura-propiedad {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
}
.grid-propiedades .link-block-8 { width: 100%; overflow: hidden; }
.grid-propiedades .link-block-6,
.grid-propiedades .div-block-17 { width: auto; min-width: 0; }
.grid-propiedades .text-block-8 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid-propiedades .heading-4 {
  max-width: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  text-wrap: pretty;
  font-size: 1.15em;
  line-height: 1.3;
  margin: 0;
}
.grid-propiedades .heading-4::after { content: none; }
.grid-propiedades .div-block-18 { gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-propiedades .link-block-9 {
  width: auto;
  height: auto;
  min-height: 2.4em;
  padding: 0.35em 0.8em;
}
.grid-propiedades .text-block-13 { font-size: 0.88em; line-height: 1.3; }
.grid-propiedades .text-block-14 { text-align: right; white-space: nowrap; }
.miniatura-propiedad:focus-visible { outline: 3px solid var(--color1); outline-offset: 3px; }

/* ---------- Bloques de contenido SEO ---------- */
.seo-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: var(--fuente), sans-serif;
  color: #1d2b38;
  line-height: 1.65;
}
.seo-section h2 {
  color: var(--color1);
  font-size: 1.6em;
  line-height: 1.25;
  margin: 0 0 16px;
}
.seo-section h3 {
  color: var(--color1);
  font-size: 1.15em;
  margin: 24px 0 8px;
}
.seo-section p { margin: 0 0 14px; max-width: 75ch; }
.seo-section ul { max-width: 75ch; padding-left: 1.2em; }
.seo-section a:not(.btn) { color: var(--color1); }

/* ---------- Preguntas frecuentes ---------- */
.faq-list { max-width: 900px; }
.faq-list details {
  border-bottom: 1px solid #d9e2ec;
  padding: 14px 0;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: #1d2b38;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: -2px;
  font-size: 1.3em;
  color: var(--color1);
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin: 10px 0 0; }

/* ---------- Llamados a la acción ---------- */
.cta-band {
  background: var(--color1);
  color: #fff;
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--fuente), sans-serif;
}
.cta-band h2, .cta-band h3, .cta-band p { color: #fff; margin: 0; }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--fuente), sans-serif;
  font-weight: 700;
  font-size: 1em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.2;
}
.btn-whatsapp { background: #15803d; color: #fff; }
.btn-whatsapp:hover { background: #116a33; }
.btn-primary { background: var(--color1); color: #fff; }
.btn-primary:hover { background: var(--color2); }
.btn-light { background: #fff; color: var(--color1); }
.btn-outline { background: transparent; color: var(--color1); border-color: var(--color1); }
.cta-band .btn-outline { color: #fff; border-color: #fff; }

/* ---------- Paginación ---------- */
.paginacion {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 32px 0 0;
  font-family: var(--fuente), sans-serif;
}
.paginacion a, .paginacion span {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #c7d3df;
  text-align: center;
  text-decoration: none;
  color: var(--color1);
}
.paginacion [aria-current] { background: var(--color1); color: #fff; border-color: var(--color1); }

/* ---------- Footer ---------- */
.footer-address { font-style: normal; }
.footer-address a, .footer .link-3 { display: block; }
.footer-hours { margin-top: 8px; }
.footer-review { margin-top: 12px; }
@media (min-width: 768px) {
  /* En escritorio los links a las landings se ven siempre (en celulares se despliegan con .toggle). */
  .footer .optionContainer { max-height: none; overflow: visible; }
}

/* ---------- Formularios ---------- */
.form-privacy {
  font-size: 0.8em;
  color: #5b6875;
  margin: 4px 0 12px;
}
.form-privacy a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 767px) {
  header.navbar-no-shadow { height: 65px; }
  .nav-phone { display: block; margin: 12px 0; }
  .seo-section { padding: 28px 16px; }
  .cta-band { padding: 20px; }
  .breadcrumbs { padding: 10px 16px 0; }
}

/* ---------- Accesibilidad y ajustes de la revisión ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  background: #fff;
  color: var(--color1);
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--fuente), sans-serif;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }
.close-modal-btn { min-width: 44px; min-height: 44px; }
/* Aviso de envío exitoso con contraste suficiente (style.css es de solo lectura). */
#warning.success { background: #15803d; }
.miniatura-sin-link { cursor: default; }
#encontrar li + li { margin-top: 0.6em; }
.div-block-30 .link-2 { font-size: inherit; }
@media (max-width: 767px) {
  /* El botón flotante de WhatsApp no tapa precios ni botones. */
  .wpp-btn { width: 56px; height: 56px; right: 12px; bottom: 12px; }
  .wpp-btn svg { width: 32px; height: 32px; }
  .grid-propiedades .div-block-18 { padding-right: 56px; }
  .footer .link-3 { font-size: 14px; padding: 4px 0; }
}

/* El botón flotante de WhatsApp queda por encima del buscador del hero (z-index 2 en style.css). */
.wpp-btn { z-index: 60; }
