/* Photo Album page (photos.Rmd builds it from photos.yml). Colours follow styles.css. */

/* Year buttons */
.pa-years { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.main-container a.pa-year {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid #d8cfa8;
  border-radius: 999px;
  background: #fffde7;
  color: #33691e;
  font-size: 17px;
  text-decoration: none;
}
.main-container a.pa-year:hover { background: #dcedc8; color: #33691e; text-decoration: none; }
.main-container a.pa-year[aria-current="true"] { background: #33691e; border-color: #33691e; color: #ffffff; }
.pa-year .pa-n { font-size: 14px; color: #6d5f3a; }
.pa-year[aria-current="true"] .pa-n { color: #e8f5e9; }
.pa-year:focus-visible, .pa-open:focus-visible { outline: 3px solid #ffd54f; outline-offset: 2px; }
.pa-status { margin: 12px 0 0; }
.pa-status:empty { display: none; }

/* One section per year */
.pa-section { scroll-margin-top: 80px; }
.pa-heading { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; font-size: 30px; }
.pa-heading .pa-n { font-size: 16px; color: #6d5f3a; }
.pa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 22px 18px;
}
.pa-item { margin: 0; }
.pa-open { display: block; overflow: hidden; border-radius: 10px; background: #ece3bf; }
.pa-open img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease;
}
.pa-open:hover img { transform: scale(1.03); }
.main-container .pa-item figcaption { margin-top: 8px; font-size: 16px; line-height: 1.4; color: #4a4330; }

/* Viewer for one photo at full size */
html.pa-viewing { overflow: hidden; }
.pa-lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.pa-lightbox::backdrop { background: rgba(18, 20, 14, 0.92); }
.pa-lb-inner {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 76px 24px;
}
.pa-lb-img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 6px; }
.pa-lb-cap { max-width: 60ch; margin: 14px auto 0; color: #f4f1e4; font-size: 18px; line-height: 1.4; text-align: center; }
.pa-lb-count { margin: 4px 0 0; color: #cfc9b2; font-size: 14px; }
.pa-lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.pa-lb-btn:hover { background: rgba(255, 255, 255, 0.26); }
.pa-lb-btn:focus-visible { outline: 3px solid #ffd54f; outline-offset: 2px; }
.pa-lb-close { top: 12px; right: 12px; }
.pa-lb-prev, .pa-lb-next { top: 50%; transform: translateY(-50%); }
.pa-lb-prev { left: 14px; }
.pa-lb-next { right: 14px; }

@media (max-width: 600px) {
  .main-container a.pa-year { min-height: 36px; padding: 5px 12px; font-size: 16px; }
  .pa-years { gap: 6px; }
  .pa-heading { font-size: 26px; }
  .pa-lb-inner { padding: 60px 10px 80px; }
  .pa-lb-img { max-height: calc(100vh - 230px); }
  .pa-lb-prev, .pa-lb-next { top: auto; bottom: 16px; transform: none; }
  .pa-lb-prev { left: calc(50% - 60px); }
  .pa-lb-next { right: calc(50% - 60px); }
}
