/* reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #ffffff;
  color: #111;
  line-height: 1.6;
  overflow-x: auto;
  min-width: calc(var(--col-width, 700px) * 2 + 16rem);
}

/* title link */
.title-link,
.title-link:visited,
.title-link:hover,
.title-link:active {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* content rail */
.content-rail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* header */
.page-header {
  max-width: 1200px;
  margin: 4rem auto 3rem;
  padding: 0 1.5rem;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  text-align: center;
}

/* description */
.description {
  position: relative;
  margin-top: 2rem;
  padding-top: 2rem;
  color: #555;
  text-align: center;
  padding-bottom: 2rem;
}
.description::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);

  width: calc(var(--col-width, 700px) * 2 + 8rem);
  border-top: 1px dashed #777;
}
.description::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);

  width: calc(var(--col-width, 700px) * 2 + 2rem);
  border-bottom: 1px dashed #777;
}

/* hotlinks */
.hotlinks {
  margin-top: 2rem;
  /* padding-left: 2rem; */
  text-align: left;
  font-size: 0.95rem;
  color: #444;
  padding-bottom: 2rem;
  border-bottom: 1px dashed #777;
}
.hotlinks a {
  color: #1155cc;
  text-decoration: underline;
}


/* gallery */
.gallery {
  display: grid;
  grid-template-columns: var(--col-width) var(--col-width);
  justify-content: center;
  column-gap: .25rem;

  max-width: 1100px;
  min-width: calc(var(--col-width) * 2 + .25rem);
  margin: 3rem auto;
  padding: 2rem;
}
/* .gallery > .group:nth-child(odd) {
  justify-self: end;
}
.gallery > .group:nth-child(even) {
  justify-self: start;
} */

/* group */
.group {
  width: fit-content;
  justify-self: center;

  padding: 2rem 3rem;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}
.group:hover {
  background-color: #f2f2f2;
}

.group-grid {
  display: flex;
  align-items: stretch;      /* vertical alignment (already fine) */
  justify-content: center;   /* ← HORIZONTAL CENTERING */

  flex-wrap: nowrap;
  width: 100%;
}

.group-grid img {
  height: 300px;          /* fixed, uniform height */
  width: max-content;     /* allow overflow right */
  object-fit: contain;    /* NEVER crop */

  flex: 0 0 auto;         /* DO NOT shrink or grow */
  min-width: auto;

  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.group-grid img:hover {
  transform: scale(1.01);
}

/* footer */
.page-footer {
  margin: 4rem auto 2rem;
  padding-top: 2rem;
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}

.page-footer .content-rail {
  border-top: 1px dashed #777;
}

/* footer chips container */
.footer-chips {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
}

/* individual chip */
.footer-chip {
  display: inline-flex;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;              /* oval / pill */
  font-size: 0.85rem;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
  color: #666;
  background: transparent;
  cursor: pointer;

  transition:
    background-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

/* hover effect */
.footer-chip:hover {
  background: #f2f2f2;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* row of images */
.lightbox-row {
  display: flex;
  gap: 0;                 /* flush */
  max-width: 95vw;
  max-height: 95vh;
}

.lightbox-row img {
  height: 90vh;
  width: auto;
  object-fit: contain;
  border-radius: 0;
}

.hidden {
  display: none;
}

/* SMALLER BROWSER / DEVICE STYLING */
@media (max-width: 768px) {

  /* --- GLOBAL MOBILE RESET --- */
  html,
  body {
    width: 100%;
    min-width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
  }

  /* Prevent layout viewport from exceeding screen */
  body {
    position: relative;
  }

  /* Header fixes */
  .page-header {
    margin-bottom: 0;
  }

  /* --- GALLERY: left-anchored vertical list --- */
  .gallery {
    display: flex;                 /* ← override grid */
    flex-direction: column;
    align-items: flex-start;       /* ← left wall anchor */

    width: 100%;
    max-width: 100%;
    min-width: 100%;

    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;            /* ← visible left offset */
    padding-right: 1rem;

    gap: 1rem;                     /* spacing between groups */
  }

  /* --- GROUP CARD: wraps content width, not full row --- */
  .group {
    display: inline-block;
    width: max-content;
    overflow: visible;

    padding: 1rem 2rem;
    border-radius: 14px;
    background: #f5f5f5;
    transition: background-color 0.15s ease;
  }
  .group:active {
    background: #ececec;
  }

  /* --- IMAGE STRIP: horizontal, scrollable --- */
  .group-grid {
    display: flex;
    justify-content: flex-start;
    width: max-content;

    overflow-x: auto;
    overflow-y: hidden;

    gap: 0.75rem;
    padding: 0.5rem;               /* inner breathing room */

    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  /* Image */
  .group-grid img {
    height: 260px;
    width: auto;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* Hide scrollbar but keep scroll */
  .group-grid::-webkit-scrollbar {
    display: none;
  }
  .group-grid {
    scrollbar-width: none;
  }

  /* --- LIGHTBOX CONTAINER --- */
  #lightbox:not(.hidden) {
    position: fixed;
    inset: 0;
  }

  #lightbox-row {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    padding-right: 5vw;

    overflow-x: auto;
    overflow-y: hidden;

    gap: 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  #lightbox-row::before {
    content: "";
    flex: 0 0 5vw;           /* same as left padding */
    scroll-snap-align: start;
  }

  #lightbox-row img {
    scroll-snap-align: start;
    object-fit: contain;
  }
}
