/* =========================================================
   AAC Gallery page — masonry grid, viewer, quotes
   ========================================================= */
.aac-gal {
  --g-green: #007d45;
  --g-deep: #063a33;
  --g-gold: #ffcd00;
  --g-ink: #10210f;
  --g-ease: cubic-bezier(.22, 1, .36, 1);
  padding: clamp(70px, 8vw, 110px) 0;
  background: #fff;
}

.aac-gal__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.aac-gal__heading {
  margin: 0;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--g-ink);
}
.aac-gal__heading em { font-style: normal; color: var(--g-green); }
.aac-gal__count {
  margin: 0;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  color: #5c6a5a;
}
.aac-gal__count strong { font-size: 1.6rem; color: var(--g-green); margin-right: 4px; }

/* masonry via CSS columns: keeps each photo's natural shape */
.aac-gal__grid {
  columns: 3 280px;
  column-gap: clamp(12px, 1.6vw, 20px);
}

.aac-gal__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(12px, 1.6vw, 20px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #eef3ec;
  cursor: zoom-in;
  break-inside: avoid;
  isolation: isolate;
  box-shadow: 0 16px 34px -26px rgba(16, 33, 15, .55);
  transition: transform .6s var(--g-ease), box-shadow .6s var(--g-ease), opacity .8s var(--g-ease);
}
.aac-gal__item img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.01);
  transition: transform 1s var(--g-ease), filter .6s var(--g-ease);
}
.aac-gal__item::after {                 /* green wash on hover */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 41, 31, .65), rgba(4, 41, 31, 0) 60%);
  opacity: 0;
  transition: opacity .5s var(--g-ease);
}
.aac-gal__zoom {
  position: absolute;
  z-index: 2;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--g-gold);
  color: var(--g-ink);
  font-size: 1.4rem;
  opacity: 0;
  transform: scale(.4) rotate(-45deg);
  transition: opacity .4s var(--g-ease), transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.aac-gal__item:hover,
.aac-gal__item:focus-visible { transform: translateY(-5px); box-shadow: 0 26px 46px -26px rgba(16, 33, 15, .6); }
.aac-gal__item:hover img,
.aac-gal__item:focus-visible img { transform: scale(1.08); }
.aac-gal__item:hover::after,
.aac-gal__item:focus-visible::after { opacity: 1; }
.aac-gal__item:hover .aac-gal__zoom,
.aac-gal__item:focus-visible .aac-gal__zoom { opacity: 1; transform: none; }
.aac-gal__item:focus-visible { outline: 3px solid var(--g-gold); outline-offset: 3px; }

.aac-gal__item.is-more { display: none; }

/* entrance (JS adds .is-ready to the grid) */
.aac-gal__grid.is-ready .aac-gal__item:not(.is-in) { opacity: 0; transform: translate3d(0, 40px, 0) scale(.97); }
.aac-gal__grid.is-ready .aac-gal__item.is-in { transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s; }

.aac-gal__more { margin-top: clamp(28px, 4vw, 44px); text-align: center; }
.aac-gal__more-btn { border: 0; cursor: pointer; }
.aac-gal__more-btn:hover i { transform: translateY(3px); }
.aac-gal__shown { margin: 14px 0 0; font-family: var(--font-secondary, "Poppins", sans-serif); font-size: .88rem; color: #6b786a; }
.aac-gal__empty { text-align: center; color: #5c6a5a; }

/* ================= Viewer ================= */
.aac-lb {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .4s ease;
}
.aac-lb[hidden] { display: none; }
.aac-lb.is-open { opacity: 1; }

.aac-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 22, 16, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.aac-lb__stage {
  position: relative;
  margin: 0;
  max-width: min(92vw, 1600px);
  max-height: 82vh;
  display: grid;
  place-items: center;
}
.aac-lb__img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  transform: scale(.94);
  opacity: 0;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.aac-lb.is-open .aac-lb__img.is-loaded { transform: none; opacity: 1; }
.aac-lb__img.is-left  { transform: translate3d(-40px, 0, 0) !important; opacity: 0 !important; }
.aac-lb__img.is-right { transform: translate3d(40px, 0, 0) !important; opacity: 0 !important; }

.aac-lb__spinner {
  position: absolute;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: #ffcd00;
  animation: aacLbSpin .8s linear infinite;
  opacity: 0;
  transition: opacity .2s;
}
.aac-lb.is-loading .aac-lb__spinner { opacity: 1; }
@keyframes aacLbSpin { to { transform: rotate(360deg); } }

.aac-lb__btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: background-color .3s, color .3s, transform .3s cubic-bezier(.22, 1, .36, 1), border-color .3s;
}
.aac-lb__btn:hover { background: #ffcd00; border-color: #ffcd00; color: #10210f; transform: scale(1.08); }
.aac-lb__btn:focus-visible { outline: 3px solid #ffcd00; outline-offset: 3px; }
.aac-lb__close { top: 22px; right: 22px; }
.aac-lb__prev { left: 22px; top: 50%; margin-top: -27px; }
.aac-lb__next { right: 22px; top: 50%; margin-top: -27px; }

.aac-lb__bar {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .8);
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: .9rem;
}
.aac-lb__bar strong { color: #ffcd00; }

body.aac-lb-open { overflow: hidden; }

@media (max-width: 575.98px) {
  .aac-lb__prev, .aac-lb__next { top: auto; bottom: 14px; margin-top: 0; width: 46px; height: 46px; }
  .aac-lb__prev { left: 14px; }
  .aac-lb__next { right: 14px; }
  .aac-lb__bar { bottom: 20px; }
  .aac-lb__close { top: 14px; right: 14px; }
  .aac-gal__head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .aac-gal *, .aac-lb *, .aac-lb { transition-duration: .01ms !important; animation: none !important; }
}

/* ================= Viewer filmstrip ================= */
.aac-lb__stage { max-height: calc(100vh - 210px); transform: translateY(-38px); }
.aac-lb__img   { max-height: calc(100vh - 210px); }

/* counter moves to the top */
.aac-lb__bar { top: 26px; bottom: auto; }

.aac-lb__strip {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  max-width: min(92vw, 1100px);
  padding: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
}
.aac-lb__strip::-webkit-scrollbar { display: none; }

.aac-lb__thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  opacity: .45;
  transform: scale(.94);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: opacity .35s, transform .4s cubic-bezier(.22, 1, .36, 1), outline-color .35s;
}
.aac-lb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aac-lb__thumb:hover { opacity: .85; transform: scale(1); }
.aac-lb__thumb.is-active { opacity: 1; transform: scale(1.04); outline-color: #ffcd00; }
.aac-lb__thumb:focus-visible { outline-color: #fff; opacity: 1; }

@media (max-width: 575.98px) {
  .aac-lb__stage, .aac-lb__img { max-height: calc(100vh - 190px); }
  .aac-lb__stage { transform: translateY(-30px); }
  .aac-lb__thumb { width: 72px; height: 52px; border-radius: 10px; }
  .aac-lb__strip { bottom: 12px; gap: 8px; padding: 8px; }
  .aac-lb__prev, .aac-lb__next { display: none; }      /* swipe or tap the filmstrip on phones */
  .aac-lb__bar { top: 18px; }
}
