/* =====================================================================
   Homelengo — Property card (.homelengo-box)
   Fase A, Paso 1 — piloto en src/Views/public/propiedades.php
   ---------------------------------------------------------------------
   Extraído de _template_source/build/dist/homelengo.css (SCSS Homelengo
   1.0.2, Themesflat) y scoped bajo `.homelengo-box` para no arrastrar
   el resto del skin de la plantilla. Tokens recoloreados en Fase A:
     $primary        #A9AFFF  (lavanda MIO)
     $primary-hover  #001935  (azul marca)
     $on-surface     #001935  (texto / títulos)
     $outline        #e4e4e4  |  $variant-1 #5c6368  |  $variant-2 #a3abb0
   ===================================================================== */

.homelengo-box {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  background-color: #ffffff;
}

/* Espacio entre cards: Bootstrap deja --bs-gutter-y en 0, así que las
   filas quedan pegadas. .g-4 / .mii-hl-card-grid / :has() cubren home,
   listado, ficha y directorios. */
body.mii-hl-public .mii-hl-card-grid,
body.mii-hl-public .mii-hl-listing-grid,
body.mii-hl-public .row:has(> [class*="col-"] > .homelengo-box) {
  --bs-gutter-x: 24px;
  --bs-gutter-y: 24px;
}

body.mii-hl-public .mii-hl-card-grid > [class*="col-"],
body.mii-hl-public .mii-hl-listing-grid > [class*="col-"],
body.mii-hl-public .row:has(> [class*="col-"] > .homelengo-box) > [class*="col-"] {
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  margin-top: var(--bs-gutter-y);
}

body.mii-hl-public [class*="col-"] > .homelengo-box {
  height: 100%;
  margin-bottom: 0;
}

.homelengo-box .images-group {
  position: relative;
  display: block;
}

.homelengo-box .images-group .top {
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  justify-content: space-between;
  position: absolute;
  align-items: flex-start;
  z-index: 1;
  gap: 8px;
  flex-wrap: wrap;
}

.homelengo-box .images-group .bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-size: 14px;
  line-height: 19.6px;
}

.homelengo-box .images-group .bottom svg {
  flex-shrink: 0;
}

.homelengo-box .images-group::after {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 69.05%, rgba(0, 0, 0, 0.7) 100%);
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box .images-style {
  position: relative;
  overflow: hidden;
}

.homelengo-box .images-style img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box:hover .images-style img {
  transform: scale(1.05);
}

.homelengo-box .archive-bottom {
  padding: 20px;
}

.homelengo-box .content-top {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e4e4e4;
}

.homelengo-box .content-top .meta-list {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.homelengo-box .content-top .meta-list .item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.homelengo-box .content-top .meta-list .item .icon {
  font-size: 16px;
  color: #a3abb0;
}

.homelengo-box .archive-bottom .content-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Tipografía de la card (scoped para no afectar el resto de la página) */
.homelengo-box h6 {
  font-size: 18px;
  line-height: 25.2px;
  font-weight: 600;
  color: #001935;
  margin: 0;
}

.homelengo-box .content-top h6 {
  text-transform: capitalize;
}

.homelengo-box .content-top h6 a {
  color: #001935;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box .content-top h6 a:hover {
  color: #A9AFFF !important;
}

/* Título de la card: máx. 2 líneas con ellipsis (fuente Rubik es más ancha
   que Barlow Semi Condensed; evita títulos de 3+ líneas desalineando el grid) */
.homelengo-box .content-top h6 a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.homelengo-box .content-bottom h6.price {
  font-size: 18px;
  line-height: 25.2px;
  font-weight: 600;
  color: #001935;
  white-space: nowrap;
}

/* Badges de la card */
.homelengo-box .flag-tag {
  font-weight: 600;
  font-size: 12px;
  line-height: 28px;
  letter-spacing: 0.8px;
  text-align: center;
  display: inline-block;
  padding: 0 10px;
  border-radius: 99px;
  background-color: rgba(11, 33, 50, 0.4);
  color: #ffffff;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box .flag-tag.style-1 {
  background-color: rgba(0, 0, 0, 0.3);
}

.homelengo-box .flag-tag.primary {
  background-color: #A9AFFF;
  color: #001935;
}

.homelengo-box .gallery-count i {
  margin-right: 4px;
  font-size: 12px;
}

/* Avatar / agente */
.homelengo-box .avatar.avt-40 {
  width: 40px;
  min-width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
}

.homelengo-box .avatar img {
  width: 100%;
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.homelengo-box .agent-name {
  color: #001935;
  font-size: 14px;
  line-height: 19.6px;
  font-weight: 500;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.homelengo-box .agent-name:hover {
  color: #A9AFFF;
}

/* Utilidades de la card (scoped) */
.homelengo-box .fw-6 {
  font-weight: 600 !important;
}

.homelengo-box .text-variant-1 {
  color: #5c6368;
}

.homelengo-box .gap-6 {
  gap: 6px !important;
}

.homelengo-box .gap-8 {
  gap: 8px;
}

/* =====================================================================
   Homelengo — Cards de agente y agencia (.homelengo-*-card)
   Fase A, Paso 2 — agentes.php / agencias.php
   ---------------------------------------------------------------------
   Misma piel que la card de propiedad (radio 16px, borde #e4e4e4, fondo
   blanco) combinada con el patrón .box-agent de about-us.html / home-03.html:
   imagen o logotipo arriba, head con nombre + iconos de contacto, lista de
   datos y botón píldora. Scoped bajo .homelengo-box.
   ===================================================================== */

/* Estructura común de ambas cards */
.homelengo-box.homelengo-agent-card,
.homelengo-box.homelengo-agency-card {
  display: flex;
  flex-direction: column;
}

.homelengo-box.homelengo-agent-card .box-img,
.homelengo-box.homelengo-agency-card .box-img {
  position: relative;
  display: block;
  overflow: hidden;
}

.homelengo-box.homelengo-agent-card .box-img img,
.homelengo-box.homelengo-agency-card .box-img img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box.homelengo-agent-card:hover .box-img img,
.homelengo-box.homelengo-agency-card:hover .box-img img {
  transform: scale(1.05);
}

/* Logo de agencia: recuadro claro con la marca contenida */
.homelengo-box.homelengo-agency-card .box-img {
  padding: 28px;
  background-color: #f7f7f7;
}

.homelengo-box.homelengo-agency-card .box-img img {
  object-fit: contain;
}

/* Barra de redes sociales (hover en escritorio) */
.homelengo-box .agent-social {
  position: absolute;
  z-index: 1;
  left: 45px;
  right: 45px;
  bottom: 0px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  padding: 12px 0px;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box .agent-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box .agent-social a:hover {
  color: #A9AFFF;
}

.homelengo-box.homelengo-agent-card:hover .agent-social {
  bottom: 20px;
  opacity: 1;
  visibility: visible;
}

/* En táctiles no hay hover: la barra de redes del agente queda visible */
@media (hover: none) {
  .homelengo-box.homelengo-agent-card .agent-social {
    bottom: 12px;
    opacity: 1;
    visibility: visible;
  }
}

/* Cuerpo de la card */
.homelengo-box.homelengo-agent-card .archive-content,
.homelengo-box.homelengo-agency-card .archive-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 20px;
}

.homelengo-box.homelengo-agent-card .agent-head,
.homelengo-box.homelengo-agency-card .agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e4e4e4;
}

.homelengo-box.homelengo-agent-card .info h6,
.homelengo-box.homelengo-agency-card .info h6 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

/* Ítem 17 (OP-10): con badge de verificado el h6 no se trunca (el badge es
   parte del nombre y debe verse completo). */
.homelengo-box.homelengo-agent-card .info h6:has(.mii-badge-verificado),
.homelengo-box.homelengo-agency-card .info h6:has(.mii-badge-verificado) {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.homelengo-box.homelengo-agent-card .info h6 a,
.homelengo-box.homelengo-agency-card .info h6 a {
  color: #001935;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box.homelengo-agent-card .info h6 a:hover,
.homelengo-box.homelengo-agency-card .info h6 a:hover {
  color: #A9AFFF !important;
}

.homelengo-box.homelengo-agent-card .info p,
.homelengo-box.homelengo-agency-card .info p {
  font-size: 14px;
  line-height: 19.6px;
  margin: 2px 0 0;
}

/* Iconos circulares de contacto (tel / mail) */
.homelengo-box.homelengo-agent-card .box-icon,
.homelengo-box.homelengo-agency-card .box-icon {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.homelengo-box.homelengo-agent-card .box-icon a,
.homelengo-box.homelengo-agency-card .box-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 1000px;
  font-size: 14px;
  color: #a3abb0;
  border: 1px solid #e4e4e4;
  background-color: #ffffff;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box.homelengo-agent-card .box-icon a:hover,
.homelengo-box.homelengo-agency-card .box-icon a:hover {
  background-color: #A9AFFF;
  color: #001935;
}

/* Lista de datos (agencia / ubicación / nº de propiedades) */
.homelengo-box.homelengo-agent-card .list-info,
.homelengo-box.homelengo-agency-card .list-info {
  margin: 0 0 16px;
}

.homelengo-box.homelengo-agent-card .list-info .item,
.homelengo-box.homelengo-agency-card .list-info .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 19.6px;
  color: #001935;
}

.homelengo-box.homelengo-agent-card .list-info .item i,
.homelengo-box.homelengo-agency-card .list-info .item i {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  font-size: 15px;
  color: #a3abb0;
}

.homelengo-box.homelengo-agent-card .list-info .item:not(:last-child),
.homelengo-box.homelengo-agency-card .list-info .item:not(:last-child) {
  margin-bottom: 8px;
}

/* Botón píldora "Ver Perfil" */
.homelengo-box.homelengo-agent-card .btn-card,
.homelengo-box.homelengo-agency-card .btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  margin-top: auto;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  background-color: #A9AFFF;
  color: #001935;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.homelengo-box.homelengo-agent-card .btn-card:hover,
.homelengo-box.homelengo-agency-card .btn-card:hover {
  background-color: #001935;
  color: #ffffff;
}
