.iyg-gallery,
.iyg-gallery *,
.iyg-lightbox,
.iyg-lightbox * {
  box-sizing: border-box;
}

.iyg-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.iyg-year-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #181818;
  border: 0;
  border-radius: 1rem;
  cursor: pointer;
  font: inherit;
  text-align: left;
  appearance: none;
}

.iyg-year-card__image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.iyg-year-card__image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 55%);
  pointer-events: none;
}

.iyg-year-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.iyg-year-card__video-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.iyg-year-card__video-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.iyg-year-card__content {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 14px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.iyg-year-card__season {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}

.iyg-year-card__title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.iyg-year-card__credit {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  line-height: 1.25;
}

.iyg-year-card:hover .iyg-year-card__image img,
.iyg-year-card:focus-visible .iyg-year-card__image img {
  transform: scale(1.035);
}

.iyg-year-card:focus-visible,
.iyg-lightbox button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

body.iyg-lightbox-open {
  overflow: hidden !important;
}

.iyg-lightbox[hidden] {
  display: none !important;
}

.iyg-lightbox {
  position: fixed;
  z-index: 2147483647 !important;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  opacity: 0;
  transition: opacity 220ms ease;
}

body.iyg-lightbox-open .idm_advanced_menu,
body.iyg-lightbox-open .idm-nav-stacking-context,
body.iyg-lightbox-open .idm-nav--sticky,
body.iyg-lightbox-open .idm-nav-portal {
  z-index: 2147483646 !important;
}

.iyg-lightbox.is-open {
  opacity: 1;
}

.iyg-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.iyg-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  padding: 20px clamp(16px, 4vw, 60px) 18px;
  color: #fff;
}

.iyg-lightbox__close {
  position: absolute;
  z-index: 3;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font: 300 36px/1 Arial, sans-serif;
}

.iyg-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.iyg-lightbox__header {
  position: relative;
  min-height: 44px;
  padding: 3px 56px 8px;
  text-align: center;
}

.iyg-lightbox__view-toggle {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  min-height: 40px;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}

.iyg-lightbox__view-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.iyg-lightbox__view-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.iyg-lightbox__view-icon--carousel,
.iyg-lightbox__view-toggle[aria-pressed="true"] .iyg-lightbox__view-icon--grid {
  display: none;
}

.iyg-lightbox__view-toggle[aria-pressed="true"] .iyg-lightbox__view-icon--carousel {
  display: block;
}

.iyg-lightbox__year {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
}

.iyg-lightbox__stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  touch-action: pan-y;
}

.iyg-lightbox__image {
  display: block;
  max-width: min(90vw, 1800px);
  max-height: calc(100dvh - 180px);
  object-fit: contain;
  opacity: 1;
  animation: iyg-image-fade 180ms ease both;
}

.iyg-lightbox__image[hidden] {
  display: none;
}

.iyg-lightbox--no-upscale .iyg-lightbox__image {
  width: var(--iyg-native-width);
  height: auto;
  max-width: min(90vw, 1800px, var(--iyg-native-width));
  max-height: min(calc(100dvh - 180px), var(--iyg-native-height));
  object-fit: scale-down;
}

.iyg-lightbox__video-poster,
.iyg-lightbox__video-player {
  position: relative;
  width: min(90vw, 1600px);
  max-height: calc(100dvh - 180px);
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
}

.iyg-lightbox__video-poster {
  cursor: pointer;
}

.iyg-lightbox__video-poster[hidden],
.iyg-lightbox__video-player[hidden] {
  display: none;
}

.iyg-lightbox__video-poster > img,
.iyg-lightbox__video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.iyg-lightbox__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.iyg-lightbox__play svg {
  width: 52%;
  height: 52%;
  fill: currentColor;
}

.iyg-lightbox__image-grid {
  display: grid;
  width: 100%;
  max-height: calc(100dvh - 180px);
  padding: 8px;
  overflow-y: auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 16px);
  align-self: stretch;
}

.iyg-lightbox__image-grid[hidden] {
  display: none;
}

.iyg-lightbox__grid-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.iyg-lightbox__grid-video {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 0;
  cursor: pointer;
}

.iyg-lightbox__grid-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.iyg-lightbox.is-grid-view .iyg-lightbox__counter {
  visibility: hidden;
}

@keyframes iyg-image-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.iyg-lightbox__loader {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: iyg-spin 750ms linear infinite;
}

.iyg-lightbox__loader[hidden] {
  display: none;
}

@keyframes iyg-spin {
  to { transform: rotate(360deg); }
}

.iyg-lightbox__photo-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

.iyg-lightbox__photo-nav svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.iyg-lightbox__photo-nav:hover {
  background: rgba(255, 255, 255, 0.14);
}

.iyg-lightbox__photo-nav--prev {
  left: 0;
}

.iyg-lightbox__photo-nav--next {
  right: 0;
}

.iyg-lightbox__footer {
  min-height: 70px;
  padding-top: 8px;
  text-align: center;
}

.iyg-lightbox__counter {
  min-height: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.iyg-lightbox__year-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 24px;
}

.iyg-lightbox__year-link,
.iyg-lightbox__retry {
  padding: 8px 12px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
}

.iyg-lightbox__year-link:hover,
.iyg-lightbox__retry:hover {
  background: rgba(255, 255, 255, 0.12);
}

.iyg-lightbox__error {
  text-align: center;
}

.iyg-lightbox__error p {
  margin: 0 0 14px;
}

.iyg-gallery .screen-reader-text,
.iyg-lightbox .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .iyg-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iyg-lightbox__view-toggle span {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 700px) {
  .iyg-gallery__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .iyg-lightbox__dialog {
    padding: 12px 8px max(10px, env(safe-area-inset-bottom));
  }

  .iyg-lightbox__header {
    padding: 3px 48px 4px;
  }

  .iyg-lightbox__view-toggle {
    left: 4px;
  }

  .iyg-lightbox__image {
    max-width: 96vw;
    max-height: calc(100dvh - 168px);
  }

  .iyg-lightbox--no-upscale .iyg-lightbox__image {
    max-width: min(96vw, var(--iyg-native-width));
    max-height: min(calc(100dvh - 168px), var(--iyg-native-height));
  }

  .iyg-lightbox__video-poster,
  .iyg-lightbox__video-player {
    width: 96vw;
    max-height: calc(100dvh - 168px);
  }

  .iyg-lightbox__image-grid {
    max-height: calc(100dvh - 210px);
    padding: 4px;
    gap: 5px;
  }

  .iyg-lightbox__photo-nav {
    top: auto;
    bottom: 6px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.58);
    transform: none;
  }

  .iyg-lightbox__footer {
    min-height: 78px;
  }

  .iyg-lightbox__year-nav {
    padding: 0 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iyg-lightbox,
  .iyg-year-card__image img,
  .iyg-lightbox__image,
  .iyg-lightbox__video-poster {
    transition: none;
    animation-duration: 1ms;
  }
}
