/* ==========================================================================
   divola.com — custom photo gallery (stage + filmstrip layout)

   Layout: a large "stage" area shows the selected image, with its caption
   underneath. A horizontal strip of thumbnails sits at the bottom of the
   page. Clicking a thumbnail swaps the stage image — no popup/modal.

   EDIT THIS FIRST: set --gallery-bg to divola.com's actual page background
   color so the stage area blends in seamlessly.
   ========================================================================== */

:root {
  --gallery-bg: #8A8C8F;        /* <-- match divola.com's page background exactly */
  --caption-color: #e6e6e6;     /* arrow icon color, should read on --gallery-bg */
  --info-color: #ffffff;        /* title/artist/year text color, top-left of stage */
  --thumb-height: 90px;         /* height of each filmstrip thumbnail */
  --thumb-gap: 8px;             /* space between thumbnails */
  --active-border-color: #4a90d9; /* border shown on the currently selected thumbnail */
  --stage-padding: 48px;        /* space around the enlarged image in the stage */
  --divider-color: rgba(255, 255, 255, 0.35); /* the thin rule between stage and filmstrip */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--gallery-bg);
}

.viewer {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--gallery-bg);
  font-family: 'Times New Roman', Times, serif;
}

/* ---------- Info block (title / artist / year, top-left) ---------- */

.viewer__info {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  margin: 0;
  color: var(--info-color);
  font-family: 'Times New Roman', Times, serif;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: normal;
  word-spacing: normal;
  pointer-events: none; /* text sits over the stage without blocking arrow clicks */
}

.viewer__info p {
  margin: 0;
}

/* ---------- Stage (large image) ---------- */

.viewer__stage {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--stage-padding);
  min-height: 0; /* allows flex child to shrink properly */
}

.viewer__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.viewer__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  color: var(--caption-color);
  opacity: 0.55;
  line-height: 0;
  /* No transition/transform-on-hover — a plain, thin, static control */
}

.viewer__arrow svg {
  display: block;
  width: 22px;
  height: 22px;
}

.viewer__arrow:hover {
  opacity: 0.9;
}

.viewer__arrow:focus-visible {
  outline: 2px solid var(--active-border-color);
  opacity: 0.9;
}

.viewer__arrow--prev {
  left: 12px;
}

.viewer__arrow--next {
  right: 12px;
}

/* ---------- Divider between stage and filmstrip ---------- */

.viewer__divider {
  flex: 0 0 auto;
  height: 6px;
  border-top: 1px solid var(--divider-color);
  border-bottom: 1px solid var(--divider-color);
}

/* ---------- Filmstrip (bottom thumbnail row) ---------- */

.filmstrip {
  flex: 0 0 auto;
  display: flex;
  gap: var(--thumb-gap);
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  overflow-x: auto;
  background: var(--gallery-bg);
}

.filmstrip__item {
  flex: 0 0 auto;
}

.filmstrip__thumb {
  display: block;
  height: var(--thumb-height);
  width: auto;
  padding: 0;
  margin: 0;
  border: 3px solid transparent;
  background: none;
  cursor: pointer;
  /* No transition/transform/filter — no hover effect by design */
}

.filmstrip__thumb img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Selection state — a persistent border, not a hover effect */
.filmstrip__thumb.is-active {
  border-color: var(--active-border-color);
}

.filmstrip__thumb:focus-visible {
  outline: 2px solid var(--active-border-color);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  :root {
    --thumb-height: 60px;
    --stage-padding: 20px;
  }
}
