/* ============================================================
   Business opportunities: listing, cards, detail page.
   A curated acquisition portfolio, not a marketplace: hairline rules, plenty
   of space, few data points per card. Tokens only, so both themes work.
   ============================================================ */

/* ── Badges ───────────────────────────────────────────────── */

.opp-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  vertical-align: middle;
}

.opp-badge--featured {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-strong);
}

/* ── Filters ──────────────────────────────────────────────── */

.opp-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.opp-filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: min(15rem, 100%);
}

.opp-filters__clear {
  padding-bottom: 0.9rem;
  font-size: var(--text-small);
  color: var(--text-subtle);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.opp-filters__clear:hover { color: var(--accent-strong); }

.opp-count {
  margin-bottom: var(--space-4);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ── Grid and cards ───────────────────────────────────────── */

.opp-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 760px) {
  .opp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
}

.opp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.opp-card--featured { border-top: 3px solid var(--accent); }

.opp-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--bg-sunken);
  overflow: hidden;
}

.opp-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opp-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.opp-card__meta {
  margin-bottom: var(--space-2);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.opp-card__meta .opp-badge:first-of-type { margin-left: 0.75rem; }

.opp-card__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 400;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
}

.opp-card__title a:hover { color: var(--accent-strong); }

.opp-card__where {
  margin-bottom: var(--space-3);
  font-size: var(--text-small);
  color: var(--text-subtle);
}

.opp-card__summary {
  margin-bottom: var(--space-3);
  font-size: var(--text-small);
  line-height: 1.7;
  color: var(--text-muted);
}

.opp-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem var(--space-3);
  margin-bottom: var(--space-3);
  padding: 0;
  list-style: none;
  font-size: var(--text-small);
  color: var(--text);
}

.opp-card__facts li + li::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: var(--space-3);
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
}

.opp-card__price {
  margin-top: auto;
  padding-top: var(--space-3);
  font-size: var(--text-body);
  color: var(--text);
}

.opp-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.opp-card__link {
  font-size: var(--text-small);
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}

.opp-card__link:hover { color: var(--accent-strong); }

/* ── Pager and empty state ────────────────────────────────── */

.opp-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  color: var(--text-subtle);
  font-size: var(--text-micro);
}

.opp-empty {
  max-width: 44rem;
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.opp-empty__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
}

.opp-empty__text {
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  line-height: 1.7;
}

.opp-empty__text a { text-decoration: underline; text-underline-offset: 0.2em; }

/* ── Detail: header ───────────────────────────────────────── */

.opp-head__crumb {
  margin-bottom: var(--space-3);
  font-size: var(--text-small);
}

.opp-head__crumb a { color: var(--text-subtle); }
.opp-head__crumb a:hover { color: var(--accent-strong); }

.opp-head__where {
  margin-bottom: var(--space-3);
  font-size: var(--text-body);
  color: var(--text-muted);
}

.opp-preview {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--accent);
  background: var(--accent-tint);
  font-size: var(--text-small);
  text-align: center;
}

.opp-preview a { text-decoration: underline; text-underline-offset: 0.2em; }

/* ── Detail: layout ───────────────────────────────────────── */

.opp-layout {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .opp-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--space-7); align-items: start; }
  .opp-aside { position: sticky; top: 7rem; }
}

.opp-main > * + * { margin-top: var(--space-6); }

.opp-gallery {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opp-gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  aspect-ratio: 4 / 3;
}

.opp-gallery__item--lead { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

.opp-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opp-block__title {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
}

.opp-block__sub {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-weight: 400;
}

.opp-block__text { max-width: 62ch; line-height: 1.7; color: var(--text-muted); }

.opp-block__small {
  margin-top: var(--space-3);
  font-size: var(--text-micro);
  color: var(--text-subtle);
}

.opp-highlights {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.opp-highlights li {
  position: relative;
  padding-left: var(--space-4);
  max-width: 62ch;
  line-height: 1.6;
}

.opp-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.625rem;
  height: 1px;
  background: var(--accent);
}

.opp-facts { margin: 0; }

.opp-facts__row {
  display: grid;
  gap: 0.25rem var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.opp-facts__row dt {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.opp-facts__row dd { margin: 0; overflow-wrap: anywhere; }

@media (min-width: 640px) {
  .opp-facts__row { grid-template-columns: 12rem minmax(0, 1fr); }
}

/* ── Detail: aside ────────────────────────────────────────── */

.opp-aside__card {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.opp-aside__ref,
.opp-aside__label {
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.opp-aside__price {
  margin: 0.25rem 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
}

.opp-aside__status {
  margin-bottom: var(--space-3);
  font-size: var(--text-small);
  color: var(--text-muted);
}

.opp-aside__cta { width: 100%; justify-content: center; margin-top: var(--space-2); }

.opp-aside__note {
  margin-top: var(--space-3);
  font-size: var(--text-micro);
  line-height: 1.6;
  color: var(--text-subtle);
}

.opp-related { border-top: 1px solid var(--border); }

/* A range such as "AED 2,500,000 to AED 3,200,000" should break between the two
   figures, not through one of them. */
.opp-aside__price {
  font-size: 1.3rem;
  text-wrap: balance;
}

/* Headings an administrator writes inside a description sit below the section
   title, not level with it. */
.opp-block .prose__h2,
.opp-block .prose__h3 {
  margin-top: var(--space-5);
  font-size: 1.15rem;
}
