.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 900;
  line-height: 1.1;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent),
    linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  box-shadow: 0 18px 38px rgba(0, 109, 111, 0.32);
}

.button-primary:hover {
  box-shadow: 0 22px 48px rgba(0, 109, 111, 0.42);
}

/* ── HERO PRIMARY CTA — teal with amber border accent ── */
.button-hero-cta {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent),
    linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  border: 1.5px solid rgba(196, 151, 79, 0.70);
  box-shadow:
    0 18px 38px rgba(0, 109, 111, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 14px 28px;
  font-size: 1.02rem;
}

.button-hero-cta:hover {
  border-color: rgba(196, 151, 79, 1);
  box-shadow:
    0 22px 52px rgba(0, 109, 111, 0.48),
    0 0 0 3px rgba(196, 151, 79, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.button-secondary {
  background: rgba(255, 253, 248, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  backdrop-filter: blur(12px);
}

.button-dark {
  background: var(--heading);
  color: #fff;
  box-shadow: 0 18px 38px rgba(9, 26, 58, 0.28);
}

.button-dark:hover {
  background: var(--primary-dark);
  box-shadow: 0 22px 48px rgba(0, 77, 79, 0.36);
}

/* ── FEATURE GRID ── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature-grid article {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  color: #f8fafc;
  box-shadow: 0 18px 42px rgba(0, 77, 79, 0.28);
}

.feature-grid article:nth-child(2) {
  background: linear-gradient(145deg, #c96830, var(--accent-dark));
  box-shadow: 0 18px 42px rgba(138, 61, 24, 0.28);
}

.feature-grid article:nth-child(3) {
  background: linear-gradient(145deg, #1a3a5c, var(--heading));
  box-shadow: 0 18px 42px rgba(9, 26, 58, 0.28);
}

.feature-grid article::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-grid span {
  display: inline-flex;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.70);
  font-family: var(--latin);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.feature-grid h3 {
  margin-bottom: 10px;
  color: #ffffff;
}

.feature-grid p {
  color: rgba(255, 255, 255, 0.82);
}

/* ── CONTACT CARD ── */
.contact-card-large span {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── FILTER BAR ── */
.filter-bar {
  top: 88px;
  z-index: 5;
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  padding: 12px;
  border: 1px solid rgba(0, 109, 111, 0.12);
  overflow-x: auto;
  flex-wrap: nowrap;
  border-radius: 18px;
  background: rgba(250, 248, 244, 0.88);
  box-shadow: 0 14px 42px rgba(0, 77, 79, 0.10);
  backdrop-filter: blur(18px);
}

.filter-button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 18px;
  background: transparent;
  color: var(--heading);
  cursor: pointer;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.filter-button:hover {
  background: rgba(0, 109, 111, 0.10);
  color: var(--primary-dark);
}

.filter-button.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 22px rgba(0, 109, 111, 0.28);
}

/* ── PROPERTY GRID ── */
.property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.loading,
.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(0, 109, 111, 0.32);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(250, 248, 244, 0.72);
  text-align: center;
}

.property-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 109, 111, 0.12);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.property-card:hover {
  border-color: rgba(0, 109, 111, 0.30);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.card-image {
  position: relative;
  height: 230px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 109, 111, 0.18), rgba(181, 91, 44, 0.14)),
    var(--surface-muted);
  /* Crisp amber-teal dual border at the bottom to separate from dark card-body */
  border-bottom: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 2px 0 0 rgba(0, 160, 163, 0.55), 0 3px 0 0 rgba(181, 91, 44, 0.30);
}

.card-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(0, 20, 20, 0.68));
  pointer-events: none;
}

.card-image img,
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms ease;
}

.property-card:hover .card-image img {
  transform: scale(1.06);
}

.image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(0, 109, 111, 0.20), rgba(181, 91, 44, 0.16)),
    repeating-linear-gradient(45deg, rgba(250, 248, 244, 0.36) 0 2px, transparent 2px 12px);
  color: rgba(9, 26, 58, 0.72);
  font-weight: 900;
  text-align: center;
}

.badge-row {
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(250, 248, 244, 0.90);
  color: var(--heading);
  font-size: 0.75rem;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.badge.city {
  background: rgba(0, 77, 79, 0.82);
  color: #fff;
}

.card-body {
  padding: 20px 22px 22px;
  background: linear-gradient(170deg, #2c3038, #1e2228);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  height: 100%;
}

/* Subtle teal shimmer line at the very top */
.card-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 180, 184, 0.55), transparent);
}

.card-title-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.card-body h3 {
  margin-bottom: 6px;
  color: #f0f2f5;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.property-type {
  display: inline-flex;
  color: #e8956a;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.area {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 180, 184, 0.22);
  border-radius: 10px;
  padding: 6px 11px;
  background: rgba(0, 109, 111, 0.22);
  color: #7dd8da;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.property-facts {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.property-facts div {
  display: grid;
  gap: 3px;
}

.property-facts dt {
  color: rgba(0, 180, 184, 0.80);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.property-facts dd {
  margin: 0;
  color: #dde2ea;
  font-weight: 800;
  font-size: 0.94rem;
  line-height: 1.35;
}

.description {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: rgba(200, 208, 220, 0.72);
  font-size: 0.88rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.text-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 0;
  flex: 1 1 0;
  justify-content: center;
  border-radius: 10px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(0, 140, 142, 0.30), rgba(0, 77, 79, 0.40));
  border: 1px solid rgba(0, 180, 184, 0.20);
  color: #7dd8da;
  cursor: pointer;
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: background 200ms ease, box-shadow 200ms ease, color 200ms ease;
}

.text-link:hover {
  background: linear-gradient(135deg, rgba(0, 160, 163, 0.50), rgba(0, 100, 102, 0.60));
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 109, 111, 0.36);
}

/* ── MODAL ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  padding: 20px;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  /* Deep indigo-black — clearly distinct from the teal page background */
  background: rgba(8, 6, 20, 0.88);
  backdrop-filter: blur(18px) saturate(160%) brightness(0.55);
}

/* ── MODAL CARD shell ── */
.modal-card {
  position: relative;
  width: min(1000px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 28px;
  /* Dark premium shell matching card-body */
  background: linear-gradient(170deg, #23282f, #181c21);
  border: 1px solid rgba(0, 180, 184, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 48px 120px rgba(0, 0, 0, 0.60),
    0 0 60px rgba(0, 109, 111, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 180, 184, 0.30) transparent;
}

/* Teal glow top edge */
.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 205, 0.70), transparent);
  pointer-events: none;
  z-index: 1;
}

/* ── CLOSE BUTTON ── */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  /* Solid light background so the × is always clearly visible */
  background: rgba(240, 242, 245, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  /* Bright white — maximum contrast on dark modal */
  color: #f0f2f5;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.modal-close:hover {
  background: rgba(255, 80, 80, 0.22);
  border-color: rgba(255, 120, 120, 0.45);
  color: #fff;
  transform: rotate(90deg);
}

/* ── MODAL IMAGE ── */
.modal-image {
  position: relative;
  height: 280px;
  background: #111518;
  overflow: hidden;
  /* Dual separator matching card-image */
  box-shadow: 0 2px 0 0 rgba(0, 160, 163, 0.55), 0 3px 0 0 rgba(181, 91, 44, 0.30);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.88;
}

/* Gradient fade at bottom of image into dark modal body */
.modal-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(24, 28, 33, 0.92));
  pointer-events: none;
}

/* ── MODAL CONTENT area ── */
.modal-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 26px 24px 28px;
}

/* Title */
.modal-content h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #f0f2f5;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

/* ── META ROW (badges) ── */
.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.modal-meta .badge {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c8d0dc;
  backdrop-filter: none;
}

.modal-meta .badge.city {
  background: rgba(0, 109, 111, 0.30);
  border-color: rgba(0, 180, 184, 0.30);
  color: #7dd8da;
}

/* ── FACTS GRID inside modal ── */
.modal-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.modal-facts dt {
  color: rgba(0, 180, 184, 0.80);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.modal-facts dd {
  margin: 0 0 14px;
  color: #dde2ea;
  font-weight: 800;
  font-size: 0.96rem;
  line-height: 1.3;
}

.modal-facts dd:last-child {
  margin-bottom: 0;
}

/* ── DESCRIPTION inside modal ── */
.modal-content > div > p,
.modal-content > p {
  color: rgba(200, 208, 220, 0.78);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── HIGHLIGHT LIST ── */
.highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.highlight-list li {
  border: 1px solid rgba(181, 91, 44, 0.28);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(181, 91, 44, 0.12);
  color: #e8956a;
  font-size: 0.80rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ── CONTACT CARD inside modal ── */
.contact-card {
  align-self: start;
  padding: 22px;
  border: 1px solid rgba(0, 180, 184, 0.20);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(0, 109, 111, 0.18), rgba(0, 50, 52, 0.30));
  position: relative;
  overflow: hidden;
}

/* Teal shimmer top line on contact card */
.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 205, 0.60), transparent);
}

.contact-card strong {
  display: block;
  color: #f0f2f5;
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.contact-card span {
  display: block;
  color: rgba(200, 208, 220, 0.65);
  font-size: 0.86rem;
}

.contact-card .button {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 980px) {
  .modal-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .property-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    border-radius: var(--radius-lg);
  }

  .modal {
    padding: 12px;
  }

  .modal-image {
    height: 260px;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-facts {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 700px) {
  .property-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 861px) {
  .filter-bar {
    position: sticky;
  }
}

@media (min-width: 981px) {
  .property-grid,
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-image {
    height: 380px;
  }

  .modal-content {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
    padding: 30px;
  }
}
