.svg-gallery {
  --svg-u: calc(100vw / 1950);
  --svg-red: #f44145;
  --svg-filter-bg: #f1f3f5;
  --svg-filter-text: #58677e;
  --svg-radius: clamp(14px, calc(20 * var(--svg-u)), 22px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  color: inherit;
}

.svg-gallery *,
.svg-gallery *::before,
.svg-gallery *::after {
  box-sizing: border-box;
}

.svg-gallery__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, calc(var(--svg-filter-gap) * var(--svg-u)), 14px);
  margin: 0 auto clamp(48px, calc(72 * var(--svg-u)), 76px);
}

.svg-gallery__filter {
  min-height: clamp(38px, calc(50 * var(--svg-u)), 52px);
  margin: 0;
  padding: clamp(8px, calc(11 * var(--svg-u)), 12px) clamp(16px, calc(30 * var(--svg-u)), 32px);
  border: 0;
  border-radius: clamp(5px, calc(6 * var(--svg-u)), 7px);
  background: var(--svg-filter-bg);
  color: var(--svg-filter-text);
  font: inherit;
  font-size: clamp(13px, calc(15 * var(--svg-u)), 16px);
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.svg-gallery__filter:hover:not(:disabled) {
  transform: translateY(-1px);
}

.svg-gallery__filter:focus-visible,
.svg-gallery__more:focus-visible,
.svg-gallery__poster:focus-visible,
.svg-gallery__expand:focus-visible,
.svg-gallery__close:focus-visible {
  outline: 3px solid rgba(244, 65, 69, 0.34);
  outline-offset: 3px;
}

.svg-gallery__filter.is-active {
  background: var(--svg-red);
  color: #fff;
}

.svg-gallery__filter:disabled {
  cursor: wait;
  opacity: 0.72;
}

.svg-gallery__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.svg-gallery__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--svg-cols-desktop), minmax(0, 1fr));
  gap: clamp(12px, calc(var(--svg-gap) * var(--svg-u)), 26px);
  width: 100%;
  transition: height var(--svg-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

.svg-gallery__item {
  min-width: 0;
  transition: transform var(--svg-duration) cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}


.svg-gallery__item.is-filter-ghost {
  position: absolute !important;
  z-index: 4;
  margin: 0 !important;
  pointer-events: none !important;
  will-change: transform, opacity;
}

.svg-gallery__card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--svg-radius);
  background: #000;
  box-shadow: none;
  transform-origin: center center;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease;
}

.svg-gallery__poster {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #250d43, #7d071c);
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.svg-gallery__poster[hidden],
.svg-gallery__inline-video[hidden],
.svg-gallery__expand[hidden] {
  display: none !important;
}

.svg-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 350ms ease, filter 350ms ease;
}

.svg-gallery__poster:hover .svg-gallery__image {
  transform: scale(1.015);
  filter: brightness(1.04);
}

.svg-gallery__play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(48px, calc(62 * var(--svg-u)), 64px);
  height: clamp(48px, calc(62 * var(--svg-u)), 64px);
  border-radius: 50%;
  background: var(--svg-red);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(244,65,69,.6), 0 10px 25px rgba(0,0,0,.58);
  transform: translate(-50%, -50%);
  isolation: isolate;
  animation: svgallery-pulse-main 3s infinite;
}
.svg-gallery__play::before,
.svg-gallery__play::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(244,65,69,.6);
  animation: svgallery-pulse-wave 3s infinite;
  pointer-events: none;
}
.svg-gallery__play::after { animation-delay: .3s; }
.svg-gallery__play::before { animation-delay: .9s; }
.svg-gallery__play img {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(11px, calc(13 * var(--svg-u)), 14px);
  height: auto;
  margin-left: clamp(2px, calc(3 * var(--svg-u)), 3px);
}

.svg-gallery__inline-video,
.svg-gallery__inline-video iframe {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: #000;
}

.svg-gallery__expand {
  position: absolute;
  z-index: 5;
  top: clamp(9px, calc(12 * var(--svg-u)), 14px);
  right: clamp(9px, calc(12 * var(--svg-u)), 14px);
  display: grid;
  place-items: center;
  width: clamp(36px, calc(42 * var(--svg-u)), 44px);
  height: clamp(36px, calc(42 * var(--svg-u)), 44px);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background-color 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.svg-gallery__expand:hover {
  background: rgba(0, 0, 0, 0.78);
  transform: scale(1.04);
}

.svg-gallery__expand svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 1025px) {
  .svg-gallery__item.is-video-active {
    position: relative;
    z-index: 8;
  }

  .svg-gallery__item.is-video-active .svg-gallery__card {
    transform: scale(1.10);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  }
}

.svg-gallery__item.is-modal-source {
  position: relative;
  z-index: 1000000;
  /* will-change: transform creates a containing block for fixed descendants.
     Disable it while the card is expanded so position: fixed is relative
     to the viewport and the video is genuinely centered. */
  will-change: auto;
  transform: none !important;
}

.svg-gallery__card.is-modal-active {
  border-radius: clamp(12px, 1.1vw, 20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
}

.svg-gallery__card.is-modal-active .svg-gallery__expand {
  opacity: 0;
  pointer-events: none;
}

@keyframes svgallery-pulse-main {
  0% { box-shadow: 0 0 0 0 rgba(244,65,69,.6), 0 10px 25px rgba(0,0,0,.58); }
  70% { box-shadow: 0 0 0 20px rgba(244,65,69,0), 0 10px 25px rgba(0,0,0,.58); }
  100% { box-shadow: 0 0 0 0 rgba(244,65,69,0), 0 10px 25px rgba(0,0,0,.58); }
}
@keyframes svgallery-pulse-wave {
  0% { box-shadow: 0 0 0 0 rgba(244,65,69,.6); }
  70% { box-shadow: 0 0 0 20px rgba(244,65,69,0); }
  100% { box-shadow: 0 0 0 0 rgba(244,65,69,0); }
}

.svg-gallery__empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--svg-filter-text);
}

.svg-gallery__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(44px, calc(60 * var(--svg-u)), 60px);
}

.svg-gallery__more-wrap[hidden],
.svg-gallery__empty[hidden] {
  display: none !important;
}

.svg-gallery__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  margin: 0;
  padding: 2em 4em;
  border: 0;
  border-radius: 10px;
  background: var(--svg-red);
  color: #f8f9fa;
  font: inherit;
  font-size: clamp(14px, calc(16 * var(--svg-u)), 17px);
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.svg-gallery__more:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(244, 65, 69, 0.25);
}

.svg-gallery__more-icon {
  width: 0.72em;
  height: 0.72em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-gallery__modal[hidden] {
  display: none !important;
}

.svg-gallery__modal {
  position: static;
}

.svg-gallery__backdrop {
  position: fixed;
  z-index: 999998;
  inset: 0;
  background: rgba(5, 5, 12, 0.88);
  opacity: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 320ms ease;
}

.svg-gallery__modal.is-visible .svg-gallery__backdrop {
  opacity: 1;
}

.svg-gallery__close {
  position: fixed;
  z-index: 1000002;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  opacity: 0;
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
  transition: opacity 180ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.svg-gallery__modal.is-visible .svg-gallery__close {
  opacity: 1;
}

.svg-gallery__close:hover {
  transform: scale(1.08);
}

.svg-gallery__close svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

html.svgallery-modal-open,
html.svgallery-modal-open body {
  overflow: hidden !important;
}

@media (max-width: 1024px) {
  .svg-gallery__grid {
    grid-template-columns: repeat(var(--svg-cols-tablet), minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .svg-gallery {
    --svg-u: calc(100vw / 390);
  }

  .svg-gallery__filters {
    gap: clamp(6px, calc(var(--svg-filter-gap) * var(--svg-u)), 10px);
    margin-bottom: clamp(44px, calc(58 * var(--svg-u)), 62px);
  }

  .svg-gallery__filter {
    min-height: clamp(34px, calc(38 * var(--svg-u)), 42px);
    padding: clamp(8px, calc(9 * var(--svg-u)), 10px) clamp(12px, calc(16 * var(--svg-u)), 18px);
    font-size: clamp(12px, calc(13 * var(--svg-u)), 14px);
  }

  .svg-gallery__grid {
    grid-template-columns: repeat(var(--svg-cols-mobile), minmax(0, 1fr));
    gap: clamp(16px, calc(var(--svg-gap) * var(--svg-u)), 24px);
  }

  .svg-gallery__play {
    width: clamp(38px, calc(46 * var(--svg-u)), 50px);
    height: clamp(38px, calc(46 * var(--svg-u)), 50px);
  }

}

@media (prefers-reduced-motion: reduce) {
  .svg-gallery__card,
  .svg-gallery__image,
  .svg-gallery__filter,
  .svg-gallery__more {
    transition-duration: 0.01ms !important;
  }

  .svg-gallery__play,
  .svg-gallery__play::before,
  .svg-gallery__play::after {
    animation: none !important;
  }
}
