/* ---------- Layout wrappers ---------- */
.gallery-wrap,
.gallery-grid,
.page-callout {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Gallery title bar wrapper */
.page-callout {
  margin-top: 40px;
  margin-bottom: 20px;
}

/* Full-width Gallery bar */
.page-callout--blue {
  display: block;
  width: 100%;
  background-color: #2C3E50;
  color: #ffffff;
  padding: 15px 20px;
  border-radius: 6px;
  font-size: 1.8rem;
  font-weight: normal;
  text-align: center;
  box-sizing: border-box;
  margin: 0;
}

/* Space between category boxes */
details.category {
  margin-bottom: 30px;
}

.category__name {
	font-size: 1.8rem;
}


/* ---------- Two-column gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 0;
  margin-bottom: 40px;
}

.gallery-col {
  min-width: 0;           /* prevents weird overflow forcing layout to break */
}

/* Stack columns on smaller screens */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.category summary::-webkit-details-marker { display: none; }

/* Make summary a true bar ABOVE the photos */
.category summary.category__title{
  display: block;              /* key: not flex */
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 60px 10px 20px;
  line-height: 1.2;
  text-align: center;

  background-color: #FF6600;
  color: #fff;
  border-radius: 6px;

  position: relative;
  cursor: pointer;
  list-style: none;
}

/* Arrow stays vertically centered on the bar */
.category summary.category__title::after{
  content: "▼";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  line-height: 1;
  color: #4551c4;
  transition: transform 0.25s ease;
}

.category[open] summary.category__title::after{
  transform: translateY(-50%) rotate(180deg);
}

/* ---------- Photos container ---------- */
/* Photos container */
.category__photos {
  background-color: #ebe5e1;
  padding: 20px;
  margin-top: 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

/* ---------- Photo thumbnails ---------- */
.photo {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.photo img:hover {
  opacity: 0.92;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 9999;
}

.lightbox.is-open {
  display: grid;
}

.lightbox__bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox__img {
  position: relative;
  z-index: 2;
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.lightbox__close,
.lightbox__nav {
  border-radius: 999px;
  border: none;
  background-color: rgba(44, 62, 80, 0.75);
  color: #ffffff;
  cursor: pointer;
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 54px;
  height: 54px;
  font-size: 42px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__prev { left: 0.75rem; }
.lightbox__next { right: 0.75rem; }

.lightbox__close:hover,
.lightbox__nav:hover {
  opacity: 0.85;
}

@media (max-width: 700px) {
  .lightbox__nav { display: none; }
}


/* ===== PREVIEW: show 2 when closed, all when open ===== */

/* Default: show everything */
details.category .category__photos .photo {
  display: block !important;
}

/* Closed: hide everything... */
details.category:not([open]) .category__photos .photo {
  display: none !important;
}

/* ...except the first 2 children */
details.category:not([open]) .category__photos .photo:nth-child(1),
details.category:not([open]) .category__photos .photo:nth-child(2) {
  display: block !important;
}

@media (max-width: 640px) {
  footer a[href^="tel"] {
    color: #ffd600 !important;  /* orange */
  }
}
