/* Property tours: black page, Cinzel headings, photo gallery. */

:root {
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --muted: #ddd;
  --gap: 5px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2em;
  background: #000;
  color: #fff;
  font: 14px/1.43 var(--sans);
  text-align: center;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--muted);
  text-decoration: underline;
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 400;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin-inline: auto;
  padding-inline: 15px;
}

/* Header: crest left, name and phone right */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.masthead__logo {
  width: 150px;
  height: auto;
}

.masthead__contact {
  text-align: right;
}

.masthead__contact h4 {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1;
}

.masthead__contact h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

/* Search page */

.search {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 2em;
}

.search input,
.search button {
  height: 34px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font: 14px var(--sans);
}

.search input {
  width: 207px;
  color: #555;
  box-shadow: inset 0 1px 1px rgb(0 0 0 / 7.5%);
}

.search button {
  color: #333;
  cursor: pointer;
}

.search button:hover {
  border-color: #adadad;
  background: #e6e6e6;
}

/* Listing header */

.tour-header {
  text-align: left;
}

.tour-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 2;
}

.tour-header h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1;
}

/* Gallery */

.gallery__stage {
  position: relative;
}

.gallery__slides,
.gallery__thumbs {
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.gallery__slides::-webkit-scrollbar,
.gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.gallery__slides {
  position: relative;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}

.gallery__slide {
  flex: 0 0 100%;
  max-height: 80svh;
  aspect-ratio: 3 / 2;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  opacity: 0.5;
  cursor: pointer;
  translate: 0 -50%;
  transition: opacity 0.35s;
}

.gallery__nav:hover,
.gallery__nav:focus-visible {
  opacity: 1;
}

.gallery__nav[hidden] {
  display: none;
}

.gallery__nav--prev {
  left: 10px;
}

.gallery__nav--next {
  right: 10px;
}

.gallery__nav svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 2px rgb(0 0 0 / 50%));
}

.gallery__thumbs {
  gap: var(--gap);
  margin-top: 5px;
  scroll-snap-type: x proximity;
}

.gallery__thumbs li {
  flex: 0 0 calc((100% - (var(--thumbs) - 1) * var(--gap)) / var(--thumbs));
  scroll-snap-align: start;
}

.gallery__thumbs a {
  display: block;
  overflow: hidden;
  transition: border-radius 0.12s linear;
}

.gallery__thumbs a:hover,
.gallery__thumbs a[aria-current] {
  border-radius: 5px;
}

.gallery__thumbs img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (max-width: 767px) {
  body {
    padding: 1em 0;
  }

  .masthead__contact {
    text-align: left;
  }

  .masthead__contact h4 {
    margin-bottom: 8px;
  }

  .tour-header h1 {
    margin-block: 0.5em;
    line-height: 1.3;
  }

  .gallery__thumbs li {
    flex-basis: calc((100% - 5 * var(--gap)) / 6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__nav,
  .gallery__thumbs a {
    transition: none;
  }
}
