.public-gallery-page {
  position: relative;
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 88px;
  color: #23332b;
}

.public-gallery-heading {
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: center;
}

.public-gallery-eyebrow,
.gallery-admin-eyebrow {
  color: #8d5d24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-gallery-heading h1 {
  margin: 10px 0;
  color: #183e2d;
  font-family: "Urbanist", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.public-gallery-heading p {
  color: #637168;
  font-size: 1.05rem;
  line-height: 1.65;
}

.public-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 32px;
}

.public-gallery-filters a {
  padding: 9px 16px;
  border: 1px solid #dfe8e1;
  border-radius: 999px;
  background: #fff;
  color: #385344;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.public-gallery-filters a:hover,
.public-gallery-filters a.is-active {
  border-color: #1d6845;
  background: #1d6845;
  color: #fff;
}

.public-gallery-photo-grid,
.public-gallery-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.public-gallery-photo {
  overflow: hidden;
  border: 1px solid #e8eee9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(27, 55, 39, 0.08);
}

.public-gallery-photo-open {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
}

.public-gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #edf2ee;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.public-gallery-photo-open:hover img,
.public-gallery-photo-open:focus-visible img {
  transform: scale(1.045);
  filter: brightness(0.82);
}

.public-gallery-photo-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(15, 35, 24, 0.76);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.public-gallery-photo-open:hover .public-gallery-photo-zoom,
.public-gallery-photo-open:focus-visible .public-gallery-photo-zoom {
  opacity: 1;
  transform: translateY(0);
}

.public-gallery-photo-open:focus-visible {
  outline: 3px solid #1d6845;
  outline-offset: -3px;
}

.public-gallery-lightbox {
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: #111a14;
  color: #fff;
}

.public-gallery-lightbox::backdrop {
  background: rgba(8, 15, 10, 0.84);
  backdrop-filter: blur(4px);
}

.public-gallery-lightbox-content {
  position: relative;
  display: flex;
  max-height: calc(100dvh - 32px);
  flex-direction: column;
}

.public-gallery-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: 14px 14px 0 0;
}

.public-gallery-lightbox-caption {
  padding: 14px 20px 17px;
}

.public-gallery-lightbox-caption span {
  color: #e6bd77;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-gallery-lightbox-caption p {
  margin-top: 5px;
  color: #fff;
  line-height: 1.5;
}

.public-gallery-lightbox-close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(10, 18, 12, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.public-gallery-lightbox-close:hover,
.public-gallery-lightbox-close:focus-visible {
  background: #1d6845;
}

.public-gallery-photo figcaption {
  padding: 16px 18px 19px;
}

.public-gallery-photo figcaption span {
  color: #8d5d24;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-gallery-photo figcaption p {
  margin-top: 6px;
  color: #23332b;
  font-weight: 650;
  line-height: 1.5;
}

.public-gallery-video {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(27, 55, 39, 0.12);
}

.public-gallery-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.public-gallery-video-caption {
  margin: 0;
  padding: 14px 16px 16px;
  color: #23332b;
  font-family: "Urbanist", sans-serif;
  font-size: 1.1rem;
  line-height: 1.4;
}

.gallery-admin-video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #10251a;
}

.gallery-admin-video-caption {
  margin: 0;
  padding: 12px 14px;
  color: #33463a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.public-gallery-empty {
  max-width: 560px;
  margin: 36px auto 0;
  padding: 48px 24px;
  border: 1px dashed #cbd9ce;
  border-radius: 20px;
  background: #f8faf8;
  text-align: center;
}

.public-gallery-empty > .material-icons-outlined {
  color: #668d73;
  font-size: 2.5rem;
}

.public-gallery-empty h2 {
  margin: 12px 0 8px;
  color: #183e2d;
  font-family: "Urbanist", sans-serif;
}

.public-gallery-empty p {
  color: #637168;
  line-height: 1.6;
}

.public-gallery-empty a {
  display: inline-block;
  margin-top: 16px;
  color: #1d6845;
  font-weight: 700;
}

.public-gallery-pagination {
  margin-top: 30px;
}

.past-winners-section {
  padding: clamp(52px, 7vw, 92px) 24px;
  background: linear-gradient(180deg, #f8faf8 0%, #fff 100%);
}

.past-winners-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.past-winners-heading {
  max-width: 700px;
  margin: 0 auto 34px;
  text-align: center;
}

.past-winners-heading h2 {
  margin: 10px 0;
  color: #183e2d;
  font-family: "Urbanist", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.past-winners-heading p {
  color: #637168;
  font-size: 1.05rem;
  line-height: 1.65;
}

.past-winners-feature {
  position: relative;
  min-height: 320px;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #e8eee9;
  box-shadow: 0 16px 42px rgba(27, 55, 39, 0.14);
}

.past-winners-feature img {
  display: block;
  width: 100%;
  height: clamp(320px, 52vw, 600px);
  object-fit: contain;
  background: #e8eee9;
}

.past-winners-feature-image-changing {
  animation: past-winners-image-change 0.55s ease;
}

@keyframes past-winners-image-change {
  from {
    opacity: 0.55;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.past-winners-feature figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 72px 32px 28px;
  background: linear-gradient(transparent, rgba(10, 28, 17, 0.82));
  color: #fff;
}

.past-winners-feature figcaption span {
  color: #f1cf8b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.past-winners-feature figcaption h3 {
  margin: 8px 0 0;
  color: #fff;
  font-family: "Urbanist", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.past-winners-strip-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 14px;
}

.past-winners-strip-heading h3 {
  margin: 0;
  color: #183e2d;
  font-family: "Urbanist", sans-serif;
  font-size: 1.35rem;
}

.past-winners-strip-heading p {
  margin: 0;
  color: #718076;
  font-size: 0.88rem;
}

.past-winners-strip {
  overflow: hidden;
  padding: 2px 2px 14px;
  overscroll-behavior-x: contain;
}

.past-winners-strip-track {
  display: flex;
  width: max-content;
  gap: 16px;
  will-change: scroll-position;
}

.past-winners-strip-card {
  flex: 0 0 clamp(220px, 24vw, 270px);
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e4ebe5;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(27, 55, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.past-winners-strip-card:focus-visible {
  outline: 3px solid #c38b31;
  outline-offset: 3px;
}

.past-winners-strip-card:disabled {
  opacity: 1;
  cursor: default;
}

.past-winners-strip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(27, 55, 39, 0.14);
}

.past-winners-strip-card img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #edf2ee;
}

.past-winners-empty {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px;
  border: 1px dashed #cbd9ce;
  border-radius: 20px;
  background: #fff;
  text-align: center;
}

.past-winners-empty .material-icons-outlined {
  color: #668d73;
  font-size: 2.5rem;
}

.past-winners-empty h3 {
  margin: 12px 0 8px;
  color: #183e2d;
  font-family: "Urbanist", sans-serif;
}

.past-winners-empty p {
  color: #637168;
  line-height: 1.6;
}

.past-winners-empty a {
  display: inline-block;
  margin-top: 16px;
  color: #1d6845;
  font-weight: 700;
}

.past-winners-more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.past-winners-more-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid #1d6845;
  border-radius: 999px;
  background: #1d6845;
  color: #fff;
  font-weight: 750;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.past-winners-more-button:hover {
  transform: translateY(-2px);
  background: #155539;
  box-shadow: 0 8px 18px rgba(29, 104, 69, 0.2);
}

.past-winners-more-button span {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.past-winners-more-button:hover span {
  transform: translateX(3px);
}

.past-winners-videos {
  margin-top: 46px;
}

.past-winners-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.past-winners-video-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e1e9e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(27, 55, 39, 0.08);
}

.past-winners-video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.past-winners-video-card figcaption {
  padding: 14px 16px 16px;
  color: #23332b;
  font-family: "Urbanist", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.past-winners-youtube-icon {
  display: grid;
  width: 68px;
  height: 48px;
  place-items: center;
  color: #d93025;
}

.past-winners-youtube-icon svg {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-admin-heading,
.gallery-admin-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.gallery-admin-heading h3 {
  margin: 5px 0;
}

.gallery-admin-heading p,
.gallery-admin-form-card > p,
.gallery-admin-list-heading p {
  color: #68756e;
}

.gallery-admin-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 34px;
}

.gallery-admin-form-card {
  padding: 22px;
  border: 1px solid #e5ebe6;
  border-radius: 12px;
  background: #fbfcfb;
}

.gallery-admin-form-card h4,
.gallery-admin-list-heading h4 {
  margin: 0 0 6px;
  color: #263c30;
  font-size: 1.15rem;
}

.gallery-admin-form-card form {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.gallery-admin-form-card label {
  margin-top: 4px;
  color: #34493c;
  font-weight: 700;
}

.gallery-admin-form-card input,
.gallery-admin-form-card select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #ccd7ce;
  border-radius: 7px;
  background: #fff;
}

.gallery-admin-form-card input[type="file"] {
  min-height: unset;
}

.gallery-admin-form-card small {
  color: #6c7971;
}

.gallery-admin-form-card button {
  justify-self: start;
  margin-top: 10px;
}

.gallery-admin-errors {
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid #f0c4c0;
  border-radius: 8px;
  background: #fff5f4;
  color: #8b2f27;
}

.gallery-admin-errors ul {
  margin: 8px 0 0 20px;
}

.gallery-admin-list-heading > span {
  color: #5e6f63;
  font-weight: 700;
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-admin-item {
  overflow: hidden;
  border: 1px solid #e4eae5;
  border-radius: 10px;
  background: #fff;
}

.gallery-admin-item > img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #edf1ed;
}

.gallery-admin-item-details {
  min-height: 78px;
  padding: 12px 14px;
}

.gallery-admin-item-details p {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: #33463a;
  font-weight: 600;
}

.gallery-admin-item-details .gallery-admin-url {
  font-size: 0.82rem;
  font-weight: 400;
}

.gallery-admin-tag {
  color: #8d5d24;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-admin-video-preview {
  display: flex;
  height: 190px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #eef3ef;
  color: #315a40;
  font-weight: 700;
}

.gallery-admin-video-preview .material-icons-outlined {
  font-size: 2rem;
}

.gallery-admin-item > form {
  padding: 0 14px 14px;
}

.gallery-admin-item > form button {
  padding: 6px 12px;
}

.gallery-admin-empty {
  padding: 34px;
  border: 1px dashed #cbd6cc;
  border-radius: 10px;
  color: #64736a;
  text-align: center;
}

.gallery-admin-empty .material-icons-outlined {
  margin-bottom: 8px;
  color: #668d73;
  font-size: 2rem;
}

.gallery-admin-pagination {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .public-gallery-photo-grid,
  .public-gallery-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .public-gallery-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .public-gallery-page {
    width: calc(100% - 28px);
    padding: 48px 0 60px;
  }

  .public-gallery-heading {
    margin-bottom: 26px;
  }

  .public-gallery-photo-grid,
  .public-gallery-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-gallery-photo-grid,
  .public-gallery-video-grid {
    gap: 16px;
  }

  .public-gallery-photo-open {
    aspect-ratio: 4 / 3;
  }

  .past-winners-section {
    padding: 48px 14px;
  }

  .past-winners-feature {
    min-height: 260px;
    border-radius: 16px;
  }

  .past-winners-feature img {
    height: 310px;
  }

  .past-winners-feature figcaption {
    padding: 56px 18px 20px;
  }

  .past-winners-strip-track {
    gap: 12px;
  }

  .past-winners-strip-card {
    flex-basis: min(78vw, 300px);
  }

  .past-winners-strip-card img {
    height: 150px;
  }

  .past-winners-videos {
    margin-top: 34px;
  }

  .past-winners-video-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

}

@media (max-width: 640px) {
  .gallery-admin-forms,
  .gallery-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-admin-heading,
  .gallery-admin-list-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-admin {
    padding: 18px;
  }
}

@media (max-width: 900px) {
  .gallery-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
