/* Shiloh layout corrections — gallery + host */

/* Keep the gallery as a deliberate editorial grid regardless of source image dimensions. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "bedroom bedroom"
    "living kitchen"
    "bathroom garden";
  gap: 14px;
  align-items: stretch;
}
.gallery .gallery-item {
  display: block;
  width: 100%;
  min-width: 0;
  height: 300px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
  padding: 0;
}
.gallery .gallery-item:nth-child(1) { grid-area: bedroom; height: 430px; }
.gallery .gallery-item:nth-child(2) { grid-area: living; }
.gallery .gallery-item:nth-child(3) { grid-area: kitchen; }
.gallery .gallery-item:nth-child(4) { grid-area: bathroom; }
.gallery .gallery-item:nth-child(5) { grid-area: garden; }
.gallery .gallery-item.wide { grid-column: auto; }

/* Host: isolate the portrait in its own column so it can never overlap copy. */
.host {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(38px, 5vw, 70px);
  align-items: center;
  overflow: hidden;
}
.host > div { min-width: 0; }
.host .host-photo {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  max-width: 300px;
  justify-self: start;
}
.host h2 { overflow-wrap: anywhere; }
.host blockquote { margin-left: 0; margin-right: 0; }

@media (max-width: 1100px) and (min-width: 992px) {
  .content-wrap { grid-template-columns: minmax(0, 1fr) 300px; gap: 45px; }
  .host { grid-template-columns: 210px minmax(0, 1fr); gap: 35px; }
  .host blockquote { font-size: 22px; }
}

@media (max-width: 991px) {
  .gallery .gallery-item { height: 270px; }
  .gallery .gallery-item:nth-child(1) { height: 380px; }
  .host { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 35px; }
  .host .host-photo { width: 100%; height: auto; max-width: 240px; }
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-template-areas:
      "bedroom"
      "living"
      "kitchen"
      "bathroom"
      "garden";
    gap: 10px;
  }
  .gallery .gallery-item,
  .gallery .gallery-item:nth-child(1) {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    grid-column: auto;
  }
  .gallery .gallery-item:nth-child(1) { aspect-ratio: 16 / 10; }
  .host { grid-template-columns: 1fr; gap: 30px; }
  .host .host-photo { width: min(100%, 320px); max-width: 320px; aspect-ratio: 1 / 1; }
}

/* Actual-photo gallery lightbox */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: rgba(18, 22, 19, .94);
  cursor: zoom-out;
}
.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 18px 70px rgba(0,0,0,.35);
  cursor: default;
}
.lightbox button {
  position: fixed;
  top: 22px;
  right: 30px;
  z-index: 2;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: 300 42px/1 Arial, sans-serif;
  cursor: pointer;
}
@media (max-width: 640px) {
  .lightbox { padding: 55px 15px 25px; }
  .lightbox img { max-width: 100%; max-height: 82vh; }
  .lightbox button { top: 10px; right: 12px; }
}

/* Mobile horizontal-overflow corrections */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

.location,
.location-copy,
.location > * {
  min-width: 0;
  max-width: 100%;
}

.location h2,
.location-copy p {
  overflow-wrap: break-word;
}

.location .map-placeholder {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

@media (max-width: 640px) {
  .location {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .location h2 {
    font-size: clamp(38px, 11vw, 52px);
    line-height: 1.02;
    letter-spacing: -.035em;
  }

  .location-copy > p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.75;
  }

  .location-tags {
    width: 100%;
    gap: 8px;
  }

  .location-tags span {
    flex: 0 0 auto;
  }

  .mobile-booking-bar {
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    left: 0;
    right: 0;
    gap: 12px;
    padding: 10px 12px;
  }

  .mobile-booking-bar > div {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mobile-booking-bar strong,
  .mobile-booking-bar span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-booking-bar a {
    flex: 0 0 auto;
    max-width: 44vw;
    padding: 11px 14px;
    white-space: nowrap;
  }
}
