.house { padding: 1rem 0 2rem; }

/* Header */
.house__header { margin-bottom: 1rem; }
.house__title { margin: 0; font-size: 1.75rem; line-height: 1.2; }
.house__subtitle { margin: .25rem 0 0; color: #444; }

/* Card */
.card {
  border: 1px solid #eaeaea;
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
}

/* Gallery */
.house__gallery { margin-bottom: 1rem; }
.gallery {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, 1fr);
}
.gallery__image {
  height: 180px;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
}

/* Responsive: stack gallery */
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__image { height: 220px; }
}

/* Content grid */
.house__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.4fr 0.8fr 1fr; /* description, price, location */
  align-items: start;
}
@media (max-width: 920px) {
  .house__grid { grid-template-columns: 1fr; }
}

/* Description text */
.house__text { margin: 0; color: #222; line-height: 1.5; }

/* Price */
.house__price-value {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
}
.house__price-meta { margin: .25rem 0 0; color: #555; font-size: .95rem; }

/* Location */
.house__location-text { margin: 0; font-weight: 600; }
.house__location-meta { margin: .25rem 0 0; color: #555; }

.house__contact { grid-column: 1 / -1; }

.contact-row__label { font-weight: 650; color: #222; }
.contact-row__value { color: inherit; }


/* Slideshow functionality */
/* Clickable thumbnails */
.gallery__thumb {
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}
.gallery__thumb:focus {
  outline: 3px solid rgba(0,0,0,.25);
  outline-offset: 2px;
}
.gallery__thumb:hover {
  border-color: #eaeaea;
}

/* Lightbox */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}
.lightbox__panel {
  position: relative;
  width: min(1000px, calc(100vw - 2rem));
  margin: 4vh auto 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.lightbox__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid #eee;
}
.lightbox__counter {
  color: #444;
  font-weight: 600;
}
.lightbox__close {
  border: 1px solid #e8e8e8;
  background: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__figure {
  margin: 0;
  padding: 0;
}
.lightbox__image {
  width: 100%;
  height: min(70vh, 680px);
  object-fit: contain;
  background: #0b0b0b;
}
.lightbox__caption {
  padding: .75rem 1rem 1rem;
  color: #444;
}
.lightbox__controls {
  position: absolute;
  inset: 0;               /* overlay on top of the image */
  display: flex;
  justify-content: space-between;
  align-items: center;  /* center vertically in the panel/image area */
  padding: 0 .75rem;
  pointer-events: none; /* let buttons receive events only */
}

.lightbox__nav {
  pointer-events: auto;
  border: 0;
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  font-size: 2rem;
  display: grid;
  place-items: center;
  line-height: 1;
}

.lightbox__nav:hover {
  background: rgba(255,255,255,1);
}

@media (max-width: 760px) {
  .lightbox__nav { width: 2.5rem; height: 2.5rem; font-size: 1.7rem; }
  .lightbox__controls { padding: 0 .5rem; }
}

@media (max-width: 760px) {
  .lightbox__panel { margin-top: 2.5vh; }
  .lightbox__controls { padding: 0 .5rem .5rem; }
  .lightbox__nav { width: 2.5rem; height: 2.5rem; font-size: 1.7rem; }
}
/* End Slideshow Styling */

/* Google Maps Preview Styling */
.map {
  margin-top: .75rem;
}
#houseMapFrame {
  width: 100%;
  height: 240px;
  border: 0;
  border-radius: 10px;
  background: #f4f4f4;
}
.map__link {
  display: inline-block;
  margin-top: .5rem;
  color: #0b57d0;
  font-weight: 600;
}
.map__link:focus {
  outline: 3px solid rgba(11,87,208,.25);
  outline-offset: 2px;
  border-radius: 6px;
}
/* End Maps Styling */

/* Expand/collapse button on the 9th thumbnail */
/* Expand/show-less overlay button (uses image 9 background) */
.gallery__thumb {
  position: relative;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}

.gallery__expand {
  border-color: #eaeaea;
}

.gallery__expand::after {
  z-index: 0;
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 28, 0.45);
  border-radius: inherit;
  pointer-events: none;
}

.gallery__expand-text {
  z-index: 1;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: .02em;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}

/* When expanded: show less button look */
.gallery__showless::after {
  background: rgba(30,30,30,.72); /* darker gray/black */
}

@media (prefers-reduced-motion: reduce) {
  .gallery__thumb * { transition: none !important; }
}
/* End Gallery View Expansion button styling */