/* Attractions of each region (docs/design/attractions.md; public/js/attractions-ui.js):
   the property page's «Qué hay cerca», the region card row on the home page and the
   region's list on /propiedades/?region=<id>. Cards look complete without a photo:
   many feed items carry no image while licensing is confirmed. */

.attr-section h2, .attr-section h3 { text-wrap: balance; }
.attr-section .attr-lead { color: var(--gray-600); text-wrap: pretty; max-width: 70ch; margin: 0 0 var(--space-4); }
.attr-section { scroll-margin-top: 80px; }
.detail-content .attr-section h2 { margin-top: var(--space-10); }

.attr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: var(--space-4);
  margin: 0;
}

.attr-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.attr-media { position: relative; aspect-ratio: 16 / 9; background: var(--brand-surface); }
.attr-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.attr-body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); flex: 1; min-width: 0; }

.attr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }

.attr-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3) 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--brand-surface);
  color: var(--brand-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}
.attr-chip svg, .attr-count svg, .attr-link svg { flex-shrink: 0; }

.attr-distance { font-size: var(--font-size-xs); color: var(--gray-500); white-space: nowrap; }

.attr-card .attr-name {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--brand-primary);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.attr-summary { margin: 0; font-size: var(--font-size-sm); color: var(--gray-600); line-height: var(--line-height-relaxed); text-wrap: pretty; }
.attr-credit { margin: 0; font-size: var(--font-size-xs); color: var(--gray-500); }

.attr-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: auto;
  padding-top: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--brand-accent);
}
.attr-link:hover { text-decoration: underline; }

.attr-counts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0 0 var(--space-4); color: var(--gray-600); font-size: var(--font-size-sm); }
.attr-count { display: inline-flex; align-items: center; gap: var(--space-1); white-space: nowrap; }
.attr-sep { color: var(--gray-400); }

.attr-all { margin-top: var(--space-4); }
.attr-note { margin-top: var(--space-3); font-size: var(--font-size-xs); color: var(--gray-500); }

/* Map legend on the property page: the area circle and the attraction markers. */
.attr-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-2); font-size: var(--font-size-xs); color: var(--gray-600); }
.attr-legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.attr-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.attr-legend .attr-legend-area { background: var(--brand-surface); border: 2px solid var(--brand-accent); }
.attr-legend .attr-legend-place { background: var(--white); border: 3px solid var(--brand-cta); }

/* Region cards on the home page: the whole card links to the region's listing (a stretched
   link), and the attractions row is its own link to the region's list of attractions. */
.region-card { position: relative; }
.region-card .region-card-link { color: inherit; text-decoration: none; }
.region-card .region-card-link::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.region-card .region-card-link:focus-visible { outline: none; }
.region-card:focus-within { box-shadow: 0 0 0 3px var(--brand-accent); }

.attr-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-100);
  font-size: var(--font-size-xs);
  color: var(--gray-600);
  text-decoration: none;
}
.attr-row:hover .attr-row-label { text-decoration: underline; }
.attr-row-label { flex-basis: 100%; text-align: center; font-weight: var(--font-weight-semibold); color: var(--brand-accent); }
.attr-row-counts { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-1) var(--space-2); }
.attr-region-title { text-align: left; font-size: var(--font-size-3xl); color: var(--brand-primary); margin: 0 0 var(--space-3); text-wrap: balance; }
