/* Section 04: specimen carousel, styled after the accounting reference. */
.recently--archive {
  position: relative;
  overflow: hidden;
  padding: 70px 0 76px;
  background: #f7f0e8;
}

.recently--archive::after { display: none; }

.recently--archive > .gallery-container {
  position: relative;
  z-index: 1;
}

.recent-archive-curve {
  position: absolute;
  z-index: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 70px;
  pointer-events: none;
}

.recent-archive-curve--top {
  top: -1px;
  fill: #fcfbf7;
}

.recent-archive-curve--bottom {
  bottom: -1px;
  fill: #fcfbf7;
}

.recently--archive .recent-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin: 0 0 34px;
  text-align: center;
}

.recently--archive .recent-heading__copy { min-width: 0; }

.recently--archive .recent-heading .gallery-kicker {
  display: block;
  margin: 0 0 30px;
}

.recently--archive .recent-heading h2 {
  margin: 0;
  padding: 0;
  color: #171917;
  font: 600 clamp(42px, 4.7vw, 66px)/1.05 'Anuphan', Arial, sans-serif;
  letter-spacing: -.045em;
}

.recently--archive .recent-heading h2::before { display: none; }

.recently--archive .recent-heading__copy > p:last-child {
  max-width: none;
  margin: 16px 0 0;
  padding: 0;
  color: #5e685f;
  font-size: 14px;
  line-height: 1.5;
}

.recently--archive .recent-heading__summary {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0;
  color: #6c746b;
  font-size: 12px;
  letter-spacing: .025em;
  white-space: nowrap;
}

.recently--archive .recent-heading__summary strong {
  color: #31483a;
  font-size: 14px;
  font-weight: 600;
}

.recently--archive .recent-archive-track {
  display: flex;
  gap: 20px;
  width: calc(50% + 50vw);
  max-width: none;
  margin: 0;
  padding: 0 0 5px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.recently--archive .recent-archive-track::-webkit-scrollbar { display: none; }

.recently--archive .recent-archive-item {
  display: grid;
  grid-template-rows: 290px auto;
  flex: 0 0 290px;
  min-width: 290px;
  height: auto;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  color: #344138;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  scroll-snap-align: start;
}

.recently--archive .recent-archive-image {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #e5e1d9;
  box-shadow: none;
  overflow: hidden;
}

.recently--archive .recent-archive-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.recently--archive .recent-archive-meta {
  display: block;
  min-width: 0;
  padding: 14px 24px;
  background: #fff;
}

.recently--archive .recent-archive-meta em {
  display: block;
  color: #1d231e;
  font: 600 18px/1.5 var(--herbarium-font-body);
  white-space: normal;
  overflow-wrap: anywhere;
}

.recently--archive .recent-archive-meta small {
  display: block;
  margin-top: 7px;
  color: #85877e;
  font: 12px/1.2 'Anuphan', sans-serif;
  letter-spacing: 0;
}

.recently--archive .recent-date-note { margin:0; color:#747567; font:400 12px/1.6 var(--herbarium-font-body); }
.recently--archive .recent-archive-image.latest-image-failed { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:24px; background:#f8e8c8; color:#916a32; font:400 13px/1.6 var(--herbarium-font-body); }
.recently--archive .latest-image-failed i { font-size:25px; }
[data-latest-status]:empty { display:none; }

.latest-viewer { width:min(1120px,94vw); max-width:94vw; max-height:92dvh; padding:0; border:0; background:#fcfbf7; color:#173e33; opacity:0; transform:translateY(14px) scale(.98); transition:opacity 220ms ease,transform 260ms cubic-bezier(.2,.7,.3,1); }
.latest-viewer.is-visible { opacity:1; transform:translateY(0) scale(1); }
.latest-viewer::backdrop { background:rgba(12,23,18,0); transition:background-color 220ms ease; }
.latest-viewer.is-visible::backdrop { background:rgba(12,23,18,.88); }
.latest-viewer-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; }
.latest-viewer-picture { display:flex; align-items:center; justify-content:center; min-height:500px; height:80dvh; padding:24px; background:#eeefea; }
.latest-viewer-picture img { display:block; width:100%; height:100%; object-fit:contain; opacity:0; transform:scale(.985); transition:opacity 260ms ease,transform 320ms ease; }
.latest-viewer-picture img.is-ready { opacity:1; transform:scale(1); }
.latest-viewer-info { padding:76px 28px 30px; }
.latest-viewer-info > small { color:#8a713e; font:500 11px/1.5 var(--herbarium-font-body); letter-spacing:.12em; }
.latest-viewer-info h2 { margin:18px 0; font:500 30px/1.2 var(--herbarium-font-display); overflow-wrap:anywhere; }
.latest-viewer-info p { font:400 14px/1.6 var(--herbarium-font-body); }
.latest-viewer-close { position:absolute; z-index:2; right:12px; top:10px; width:42px; height:42px; border:0; border-radius:50%; background:#fcfbf7; color:#173e33; font:400 30px/1 var(--herbarium-font-body); cursor:pointer; }
.latest-viewer-detail { display:inline-block; margin-top:24px; padding:11px 18px; border-radius:24px; background:#173e33; color:#fff; text-decoration:none; font:400 13px/1.5 var(--herbarium-font-body); }
.latest-viewer-controls { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:40px; font:400 13px/1 var(--herbarium-font-body); }
.latest-viewer-controls button { border:1px solid #ccd2c4; border-radius:50%; width:42px; height:42px; color:#173e33; background:transparent; font:400 20px/1 var(--herbarium-font-body); cursor:pointer; }
.latest-viewer-controls button:disabled { opacity:.3; cursor:default; }
.latest-viewer :focus-visible { outline:2px solid #a58140; outline-offset:3px; }
.latest-viewer-picture.latest-viewer-failed { flex-direction:column; gap:24px; background:#f8e8c8; color:#916a32; }
.latest-viewer-failed i { font-size:30px; }
.latest-viewer-failed p { margin:0; font:400 15px/1.6 var(--herbarium-font-body); }
@media(max-width:700px) { .latest-viewer-layout{grid-template-columns:1fr;}.latest-viewer-picture{min-height:0;height:55dvh;padding:16px;}.latest-viewer-info{padding:24px;}.latest-viewer-info h2{font-size:26px;}.latest-viewer-controls{margin-top:22px;} }
@media(prefers-reduced-motion:reduce) { .latest-viewer,.latest-viewer::backdrop,.latest-viewer-picture img { transition:none; transform:none; } }

.recently--archive .recent-archive-item:hover img,
.recently--archive .recent-archive-item:focus-visible img {
  transform: scale(1.025);
}

.recently--archive .recent-archive-image img { transition: transform .3s ease; }

.recent-archive-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.recent-archive-nav { display: flex; gap: 10px; }

.recent-archive-nav button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0 0 5px;
  border: 1px solid #dfd8cd;
  border-radius: 50%;
  background: transparent;
  color: #1d231e;
  font: 300 34px/1 Arial, sans-serif;
  cursor: pointer;
}

.recent-archive-nav button:hover,
.recent-archive-nav button:focus-visible {
  border-color: #26392e;
  background: #fff;
}

.recent-archive-cta {
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  margin: 0;
  padding: 12px 23px;
  border: 0;
  border-radius: 999px;
  background: #3b6d47;
  color: #fafafa;
  box-shadow: 0 8px 18px #2b3e3115;
  font: 500 14px/1.5 var(--herbarium-font-body);
  text-decoration: none;
  transition: background-color .25s ease, box-shadow .25s ease;
}

.recent-archive-cta:hover { background:#16483c; color:#fff; box-shadow:0 12px 24px #2b3e3120; }
.recent-archive-cta:focus-visible { outline:2px solid #a58140; outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { .recent-archive-cta { transition:none; } }

@media (max-width: 1000px) {
  .recently--archive .recent-archive-item {
    grid-template-rows: 260px auto;
    flex-basis: 260px;
    min-width: 260px;
    height: auto;
  }
}

@media (max-width: 760px) {
  .recently--archive .recent-archive-meta em { font-size: 16px; }
}

@media (max-width: 600px) {
  .recently--archive { padding: 60px 0 68px; }

  .recent-archive-curve { height: 48px; }

  .recently--archive .recent-heading {
    margin-bottom: 30px;
  }

  .recently--archive .recent-heading__summary {
    flex-direction: column;
    gap: 5px;
  }

  .recently--archive .recent-archive-track {
    width: calc(50% + 50vw);
  }

  .recently--archive .recent-archive-item {
    grid-template-rows: 248px auto;
    flex-basis: 248px;
    min-width: 248px;
    height: auto;
  }

  .recent-archive-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}
