/* ==========================================================================
   v8.10.0 — Secciones de anuncios, favoritos e insignias.
   Solo capa de presentación: respeta colores y tipografía actuales del tema.
   ========================================================================== */

.mv-section-archive { padding-block: clamp(18px, 3vw, 34px); }
.mv-section-archive-head {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px;
}
.mv-section-archive-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0; line-height: 1.15;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
}
.mv-section-count { margin: 0 0 12px; font-size: .9rem; }

/* Pestañas de secciones (scroll táctil en móvil, sin overflow de página) */
.mv-section-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 100%;
}
.mv-section-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid hsl(140 15% 88%);
  background: #fff; color: hsl(150 30% 14%);
  font-size: .78rem; font-weight: 700; text-decoration: none;
  white-space: nowrap;
}
.mv-section-tab.is-active,
.mv-section-tab:hover { background: hsl(145 63% 32%); border-color: hsl(145 63% 32%); color: #fff; }

/* Rejilla unificada de tarjetas */
.mv-listings-grid {
  display: grid; gap: clamp(12px, 1.4vw, 20px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 1279px) { .mv-listings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .mv-listings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .mv-listings-grid { grid-template-columns: 1fr; } }

.mv-listings-grid > * { min-width: 0; }
.mv-listings-grid .mv-card { display: flex; flex-direction: column; height: 100%; }
.mv-listings-grid .mv-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.mv-listings-grid .mv-card-title { overflow-wrap: anywhere; }

/* Insignias reales (solo se imprimen si el dato existe) */
.mv-card-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  isolation: isolate;
  contain: layout paint;
}
.mv-card-media > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mv-card-media .mv-badge,
.mv-card-media .mv-card-flags,
.mv-card-media .mv-fav-btn { box-sizing: border-box; }
.mv-card-flags {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-end;
  justify-content: flex-start;
  pointer-events: none;
  min-width: 0;
  max-width: calc(100% - 16px);
  z-index: 4;
}
.mv-flag {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 0; max-width: 100%;
  padding: 3px 8px; border-radius: 999px;
  font-size: .66rem; font-weight: 800; letter-spacing: .02em;
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255,255,255,.94); color: hsl(150 30% 14%);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.mv-flag-verified    { background: hsl(145 63% 32%); color: #fff; }
.mv-flag-recommended { background: hsl(38 92% 50%); color: hsl(30 60% 12%); }

/* Botón de favoritos */
.mv-fav-btn {
  position: absolute; left: 8px; top: 8px; z-index: 3;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid hsl(140 15% 88%); border-radius: 999px;
  background: rgba(255,255,255,.95); color: hsl(350 70% 45%);
  font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.mv-fav-btn:hover { transform: scale(1.07); }
.mv-fav-btn.is-active { background: hsl(350 75% 96%); border-color: hsl(350 60% 70%); }
.mv-fav-btn[disabled] { opacity: .6; cursor: progress; }

.mv-card { position: relative; }

/* Paginación */
.mv-section-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 22px; }
.mv-section-pagination a,
.mv-section-pagination span {
  min-width: 40px; min-height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid hsl(140 15% 88%); border-radius: 10px;
  background: #fff; color: hsl(150 30% 14%); text-decoration: none; font-weight: 700; font-size: .85rem;
}
.mv-section-pagination .current { background: hsl(145 63% 32%); border-color: hsl(145 63% 32%); color: #fff; }

/* Bloques de portada */
.mv-home-section-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mv-home-section-actions .mv-btn { min-height: 44px; }
.mv-home-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.mv-home-strip > * { flex: 0 0 min(84%, 320px); scroll-snap-align: start; }
@media (min-width: 901px) { .mv-home-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); overflow: visible; } .mv-home-strip > * { flex: initial; } }

/* Anti-overflow global de las secciones nuevas */
.mv-section-archive, .mv-section-archive * { max-width: 100%; }
.mv-section-archive img { height: auto; }


/* ==========================================================================
 * UMA 14.9.5 — Tarjetas y ficha: capa consolidada de layout.
 * La hoja se carga después de las capas base y controla el componente real.
 * ========================================================================== */
.mv-card { position: relative; min-width: 0; overflow: hidden; }
.mv-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
}
.mv-card-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  display: block;
}
.mv-card-media .mv-badge {
  position: absolute;
  top: 8px;
  z-index: 5;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(50% - 12px);
  min-width: 0;
  padding: 3px 8px;
  font-size: .68rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mv-card-media .mv-badge-featured { left: 8px; right: auto; }
.mv-card-media .mv-badge-category { right: 8px; left: auto; }
.mv-card-media .mv-card-flags {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  top: auto;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 5px;
  max-width: calc(100% - 16px);
  min-width: 0;
  pointer-events: none;
}
.mv-card-media .mv-flag {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 3px 7px;
  font-size: .63rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mv-card-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  margin-top: .65rem;
  gap: 3px;
  font-size: .75rem;
  line-height: 1.35;
  direction: inherit;
  text-align: start;
  overflow: hidden;
}
.mv-card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  max-width: 100%;
}
.mv-card-meta-location-row { font-weight: 650; }
.mv-card-meta-detail-row, .mv-card-meta-category-row { font-weight: 500; opacity: .82; }
/* UMA 14.9.15 — iconos de metadatos recreados con CSS puro.
 * No usa SVG inline, emoji ni background-image: el navegador dibuja cada icono. */
.uma-card-icon {
  display: none;
  position: relative;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  max-width: 13px;
  max-height: 13px;
  margin: 0 7px 0 0;
  padding: 0;
  box-sizing: border-box;
  color: #667085;
  vertical-align: middle;
  opacity: .86;
}
.uma-card-icon::before,
.uma-card-icon::after {
  content: '';
  position: absolute;
  box-sizing: border-box;
}
/* Ubicación: pequeño pin */
.uma-card-icon-location {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
  margin-left: 1px;
  margin-right: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
.uma-card-icon-location::after {
  width: 3px;
  height: 3px;
  left: 2.5px;
  top: 2.5px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
/* Usuario: cabeza y hombros */
.uma-card-icon-user::before {
  width: 5px;
  height: 5px;
  left: 4px;
  top: 1px;
  border: 1.35px solid currentColor;
  border-radius: 50%;
}
.uma-card-icon-user::after {
  width: 11px;
  height: 6px;
  left: 1px;
  bottom: 1px;
  border: 1.35px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
/* Tiempo: reloj */
.uma-card-icon-time {
  border: 1.35px solid currentColor;
  border-radius: 50%;
}
.uma-card-icon-time::before {
  width: 1.2px;
  height: 4px;
  left: 5.5px;
  top: 2px;
  background: currentColor;
  border-radius: 1px;
}
.uma-card-icon-time::after {
  width: 4px;
  height: 1.2px;
  left: 5.5px;
  top: 6px;
  background: currentColor;
  border-radius: 1px;
  transform-origin: left center;
  transform: rotate(28deg);
}
/* Categoría: pequeña etiqueta */
.uma-card-icon-category {
  border: 1.35px solid currentColor;
  border-radius: 2px;
}
.uma-card-icon-category::before {
  width: 7px;
  height: 1.2px;
  left: 2px;
  top: 4px;
  background: currentColor;
  box-shadow: 0 3px 0 currentColor;
}
.uma-card-icon-category::after {
  width: 3px;
  height: 1.2px;
  left: 2px;
  top: 1px;
  background: currentColor;
}
body.home .uma-card-icon,
body.front-page .uma-card-icon { display: inline-block; }
body.home .mv-card-meta-row,
body.front-page .mv-card-meta-row { flex-wrap: nowrap; align-items: center; gap: 0; }
body.home .mv-card-meta-item,
body.front-page .mv-card-meta-item { min-width: 0; }

.mv-card-meta-item { min-width: 0; }
.mv-card-meta-item {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.35;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mv-card-location { max-width: 100%; }
.mv-card-author { max-width: 48%; }
.mv-card-time,
.mv-card-category { max-width: 32%; }

/* Ficha individual: las columnas son independientes y ningún bloque puede
 * invadir la galería, el mapa o la columna opuesta. */
.mv-single-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  align-items: start;
  min-width: 0;
}
.mv-single-layout > * { min-width: 0; max-width: 100%; }
.mv-single-media,
.mv-gallery-modern {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  contain: layout paint;
}
.mv-gallery-modern {
  min-height: clamp(260px, 40vw, 620px);
  height: auto;
  max-height: 680px;
}
.mv-gallery-modern #mv-gallery-main {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  min-width: 0;
  max-width: 100%;
  max-height: 680px;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  display: block;
  margin: 0;
}
.mv-sidebar {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 1rem;
  align-content: start;
}
.mv-sidebar > * { min-width: 0; max-width: 100%; }
.mv-v1172-map-desktop,
.mv-v1189-map-desktop-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.mv-v1172-map-desktop iframe,
.mv-v1189-map-desktop-wrap iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 0;
}
@media (max-width: 1100px) {
  .mv-single-layout { grid-template-columns: minmax(0, 1fr); }
  .mv-sidebar { width: 100%; }
  .mv-gallery-modern { min-height: 0; }
}
@media (max-width: 700px) {
  .mv-card-media .mv-badge { top: 6px; max-width: calc(50% - 10px); padding: 3px 7px; font-size: .62rem; }
  .mv-card-media .mv-badge-featured { left: 6px; }
  .mv-card-media .mv-badge-category { right: 6px; }
  .mv-card-media .mv-card-flags { left: 6px; right: 6px; bottom: 6px; max-width: calc(100% - 12px); gap: 4px; }
  .mv-card-meta { font-size: .69rem; gap: 3px; margin-top: .55rem; }
  .mv-card-meta-row { gap: 3px 8px; }
  .uma-card-icon { flex-basis: 13px; width: 13px; height: 13px; min-width: 13px; min-height: 13px; max-width: 13px; max-height: 13px; }
  .mv-card-location, .mv-card-author, .mv-card-time, .mv-card-category { max-width: 100%; }
  .mv-gallery-modern { height: min(76vw, 420px); min-height: 0; }
  .mv-gallery-modern #mv-gallery-main { height: 100%; aspect-ratio: auto; max-height: none; }
  .mv-single-card,
  .mv-single-sidebar { min-width: 0; max-width: 100%; overflow: hidden; }
}

