/* =========================================================
   ARCHIVE PAGE
========================================================= */

.archive-page {
  background: #fff;
  color: var(--text, #222);
  min-height: 100vh;
}

.archive-container {
  width: min(1400px, 92%);
  margin: 0 auto;
}

/* =========================================================
   INTRO
========================================================= */

.archive-intro {
  padding: 80px 0 55px;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(0, 133, 43, 0.08),
    rgba(255, 208, 0, 0.12)
  );
}

.archive-kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--green, #00852b);
}

.archive-intro h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  font-weight: 800;
  color: var(--green-dark, #006d25);
}

.archive-intro p {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
}

/* =========================================================
   NAVIGATION
========================================================= */

.archive-navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
}

.archive-nav-inner {
  width: min(1400px, 94%);
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 8px;

  overflow-x: auto;
  scrollbar-width: thin;
}

.archive-nav-inner a {
  flex: 0 0 auto;

  padding: 17px 18px;

  text-decoration: none;
  color: #333;

  font-size: 0.9rem;
  font-weight: 600;

  border-bottom: 3px solid transparent;

  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.archive-nav-inner a:hover {
  color: var(--green, #00852b);
  border-bottom-color: var(--gold, #ffd000);
  background: rgba(0, 133, 43, 0.04);
}

/* =========================================================
   SECTIONS
========================================================= */

.archive-section {
  scroll-margin-top: 80px;
  padding: 90px 0;

  border-bottom: 1px solid #eee;
}

.archive-section:last-child {
  border-bottom: none;
}

.archive-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.archive-heading span {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 45px;
  height: 45px;

  flex: 0 0 45px;

  border-radius: 50%;

  background: var(--green, #00852b);
  color: #fff;

  font-size: 0.85rem;
  font-weight: 800;
}

.archive-heading h2 {
  margin: 0;

  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;

  color: var(--green-dark, #006d25);
}

.archive-description {
  max-width: 750px;

  margin: 0 0 32px 63px;

  color: #666;

  line-height: 1.7;
  font-size: 1rem;
}

/* =========================================================
   IMAGE GRID
========================================================= */

.archive-photo-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 22px;
}

.archive-item {
  position: relative;

  overflow: hidden;

  border-radius: 14px;

  background: #f5f5f5;

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);

  cursor: pointer;

  aspect-ratio: 4 / 3;
}

.archive-item::after {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent 45%);

  opacity: 0;

  transition: opacity 0.3s ease;

  pointer-events: none;
}

.archive-item:hover::after {
  opacity: 1;
}

.archive-item img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

.archive-item:hover img {
  transform: scale(1.06);
}

/* =========================================================
   VISITOR BOOK / DOCUMENTS
========================================================= */

.archive-document-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 25px;

  align-items: start;
}

.archive-document {
  aspect-ratio: 3 / 4;
  background: #f7f5ed;

  padding: 10px;
}

.archive-document img {
  object-fit: contain;

  background: #fff;
}

/* =========================================================
   LIGHTBOX
========================================================= */

.archive-lightbox {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 40px;

  background: rgba(0, 0, 0, 0.94);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.archive-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;

  width: min(90vw, 1400px);
  height: 88vh;

  display: flex;

  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;

  object-fit: contain;

  transform-origin: center center;

  transition: transform 0.2s ease;

  user-select: none;
}

/* =========================================================
   LIGHTBOX BUTTONS
========================================================= */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;

  z-index: 10001;

  border: none;

  background: rgba(255, 255, 255, 0.12);

  color: #fff;

  cursor: pointer;

  display: flex;

  align-items: center;
  justify-content: center;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 208, 0, 0.85);
  color: #111;
}

.lightbox-close {
  top: 20px;
  right: 25px;

  width: 50px;
  height: 50px;

  border-radius: 50%;

  font-size: 32px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;

  width: 55px;
  height: 55px;

  border-radius: 50%;

  font-size: 28px;

  transform: translateY(-50%);
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

/* =========================================================
   LIGHTBOX TOOLBAR
========================================================= */

.lightbox-toolbar {
  position: absolute;

  bottom: 15px;
  left: 50%;

  transform: translateX(-50%);

  display: flex;

  align-items: center;
  gap: 5px;

  padding: 5px;

  background: rgba(0, 0, 0, 0.65);

  border-radius: 30px;
}

.lightbox-toolbar button {
  min-width: 42px;
  height: 38px;

  border: none;

  border-radius: 20px;

  background: rgba(255, 255, 255, 0.12);

  color: #fff;

  cursor: pointer;

  font-size: 18px;
}

.lightbox-toolbar button:hover {
  background: var(--gold, #ffd000);
  color: #111;
}

#zoomReset {
  min-width: 58px;
  font-size: 12px;
  font-weight: 700;
}

.lightbox-counter {
  position: absolute;

  top: 15px;
  left: 50%;

  transform: translateX(-50%);

  padding: 7px 14px;

  border-radius: 20px;

  background: rgba(0, 0, 0, 0.6);

  color: #fff;

  font-size: 13px;
}

/* Prevent page scrolling while lightbox is open */

body.lightbox-open {
  overflow: hidden;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {
  .archive-photo-grid,
  .archive-document-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  .archive-container {
    width: 90%;
  }

  .archive-intro {
    padding: 55px 0 40px;
  }

  .archive-intro p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .archive-nav-inner {
    width: 100%;
    padding: 0 12px;
  }

  .archive-nav-inner a {
    padding: 14px 13px;

    font-size: 0.82rem;
  }

  .archive-section {
    padding: 60px 0;

    scroll-margin-top: 60px;
  }

  .archive-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .archive-heading span {
    width: 38px;
    height: 38px;

    flex-basis: 38px;

    font-size: 0.75rem;
  }

  .archive-heading h2 {
    font-size: 1.65rem;
  }

  .archive-description {
    margin-left: 50px;

    font-size: 0.92rem;
  }

  /* .archive-photo-grid,
  .archive-document-grid {
    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
  } */
  .archive-photo-grid,
  .archive-document-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .archive-item {
    border-radius: 9px;
  }

  .archive-document {
    padding: 6px;
  }

  .archive-lightbox {
    padding: 15px;
  }

  .lightbox-content {
    width: 100%;
    height: 80vh;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 42px;

    font-size: 20px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;

    width: 42px;
    height: 42px;

    font-size: 26px;
  }

  .lightbox-toolbar {
    bottom: 8px;
  }
}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 430px) {
  .archive-photo-grid,
  .archive-document-grid {
    grid-template-columns: 1fr 1fr;
  }

  .archive-heading h2 {
    font-size: 1.45rem;
  }

  .archive-description {
    margin-left: 50px;
  }
}
