body.page-gallery {
  --gallery-accent: #7cf03d;
  --gallery-ink: #080a0b;
  --gallery-muted: #62696c;
  --gallery-surface: #f7f7f4;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--gallery-surface);
  color: var(--gallery-ink);
}

.page-gallery .hero-header {
  --home-panel-padding: clamp(1rem, 3vw, 3rem);
  --home-content-width: 96rem;
}

.gallery-page {
  min-height: 75vh;
  background: var(--gallery-surface);
}

.gallery-shell {
  width: min(calc(100% - 2rem), 105rem);
  margin-inline: auto;
}

.gallery-hero {
  padding: clamp(9rem, 14vw, 14rem) 0 clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid rgba(8, 10, 11, 0.14);
}

.gallery-hero__eyebrow {
  margin: 0 0 0.8rem;
  color: #4d7d08;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.gallery-hero h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.gallery-hero__summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.gallery-hero__summary p {
  max-width: 48rem;
  margin: 0;
  color: var(--gallery-muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.gallery-hero__summary span {
  white-space: nowrap;
  font-size: 0.9rem;
}

.gallery-content {
  padding-block: clamp(2.5rem, 5vw, 5rem) clamp(5rem, 9vw, 9rem);
}

.gallery-notice {
  margin: 0 0 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--gallery-accent);
  background: #fff;
  color: #32383a;
}

.gallery-filters {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(8, 10, 11, 0.14);
}

.gallery-filters h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}

.gallery-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.gallery-filter-group > span {
  min-width: 6rem;
  color: #6a7174;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-filter-group a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #cbd0c8;
  border-radius: 999px;
  background: #fff;
  color: #252a2d;
  font-size: 0.88rem;
  font-weight: 700;
}

.gallery-filter-group a:hover,
.gallery-filter-group a:focus-visible,
.gallery-filter-group a[aria-current="true"] {
  border-color: var(--gallery-ink);
  background: var(--gallery-ink);
  color: var(--gallery-accent);
}

.gallery-results {
  padding-top: clamp(2rem, 4vw, 4rem);
}

.gallery-results__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.gallery-results__header h2,
.gallery-results__header p {
  margin: 0;
}

.gallery-results__header h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.gallery-results__header p {
  color: var(--gallery-muted);
  font-size: 0.88rem;
}

.gallery-results__header > div {
  display: grid;
  gap: 0.35rem;
}

.gallery-view-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid #cbd0c8;
  border-radius: 999px;
  background: #fff;
}

.gallery-view-switcher__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: #313638;
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-view-switcher__item:hover,
.gallery-view-switcher__item:focus-visible {
  background: var(--gallery-ink);
  color: var(--gallery-accent);
}

.gallery-view-switcher__item[aria-current="true"] {
  background: var(--gallery-accent);
  color: var(--gallery-ink);
}

.gallery-view-switcher__item[aria-disabled="true"]:not([aria-current="true"]) {
  color: #747b77;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-card,
.gallery-card__open {
  min-width: 0;
  width: 100%;
}

.gallery-card__open {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.gallery-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e9ebe6;
}

.gallery-card__media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #777e79;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.gallery-card__play {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--gallery-accent);
  color: var(--gallery-ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.2);
}

.gallery-card__play svg {
  width: 1.5rem;
  fill: currentColor;
}

.gallery-card__action {
  position: absolute;
  z-index: 2;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 10, 11, 0.9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
}

.gallery-card__body {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.9rem;
}

.gallery-card__category {
  color: #61705d;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-card__title {
  overflow: hidden;
  color: var(--gallery-ink);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card__description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gallery-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.gallery-card:hover .gallery-card__media img,
.gallery-card:focus-within .gallery-card__media img {
  transform: scale(1.035);
}

.gallery-card__open:focus-visible {
  outline: 3px solid #4e8700;
  outline-offset: 5px;
}

.gallery-circular {
  position: relative;
  width: 100%;
  height: clamp(28rem, 65vh, 44rem);
  overflow: hidden;
  border: 1px solid rgba(124, 240, 61, 0.26);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(124, 240, 61, 0.12), transparent 34%),
    #090c0a;
  color: #fff;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  isolation: isolate;
}

.gallery-circular[hidden] {
  display: none;
}

.gallery-circular:active {
  cursor: grabbing;
}

.gallery-circular:focus-visible {
  outline: 3px solid #4e8700;
  outline-offset: 4px;
}

.gallery-circular__viewport {
  display: none;
}

.gallery-circular__canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gallery-circular__loader,
.gallery-circular__fallback {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: min(90%, 34rem);
  margin: 0;
  padding: 1rem 1.2rem;
  color: #dce4dd;
  text-align: center;
  transform: translate(-50%, -50%);
}

.gallery-circular__loader::before {
  display: block;
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.8rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gallery-accent);
  border-radius: 50%;
  animation: gallery-circular-spin 800ms linear infinite;
  content: "";
}

.gallery-circular__overlay {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(2.4rem, 5vw, 3.8rem);
  display: grid;
  justify-items: center;
  width: min(92%, 34rem);
  padding: 0.8rem 1rem;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-circular__overlay[hidden],
.gallery-circular__loader[hidden],
.gallery-circular__fallback[hidden] {
  display: none;
}

.gallery-circular__meta,
.gallery-circular__title {
  margin: 0;
  text-shadow: 0 2px 18px #000;
}

.gallery-circular__meta {
  color: var(--gallery-accent);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-circular__title {
  overflow: hidden;
  margin-top: 0.25rem;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-circular__action {
  min-height: 2.75rem;
  margin-top: 0.65rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--gallery-accent);
  color: var(--gallery-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  pointer-events: auto;
}

.gallery-circular__action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.gallery-circular__hint {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0.7rem;
  width: min(92%, 45rem);
  margin: 0;
  color: #aeb7b0;
  font-size: 0.72rem;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-circular.is-fallback {
  height: auto;
  min-height: 7rem;
  margin-bottom: 1.5rem;
  cursor: default;
}

.gallery-circular.is-fallback .gallery-circular__hint {
  display: none;
}

.gallery-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.gallery-ring {
  --ring-card-width: 260px;
  --ring-card-height: 307px;
  --ring-radius: 700px;
  position: relative;
  width: 100%;
  height: clamp(30rem, 68vh, 46rem);
  min-height: 30rem;
  overflow: hidden;
  border: 1px solid rgba(124, 240, 61, 0.24);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 240, 61, 0.11), transparent 36%),
    linear-gradient(180deg, #121713, #050706);
  color: #fff;
  isolation: isolate;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.gallery-ring[hidden] {
  display: none;
}

.gallery-ring.is-dragging {
  cursor: grabbing;
}

.gallery-ring:focus-visible {
  outline: 3px solid #4e8700;
  outline-offset: 4px;
}

.gallery-ring__viewport {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: visible;
  perspective: 1800px;
  perspective-origin: 50% 44%;
  transform-style: preserve-3d;
}

.gallery-ring__track {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.gallery-ring__item {
  --ring-depth: 0;
  --ring-parallax: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--ring-card-width);
  height: var(--ring-card-height);
  opacity: calc(0.18 + var(--ring-depth) * 0.82);
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.gallery-ring__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(124, 240, 61, 0.18), transparent 45%),
    #1b211d;
  box-shadow: 0 1.2rem 3.6rem rgba(0, 0, 0, 0.36);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gallery-ring__item.is-active .gallery-ring__media {
  border-color: var(--gallery-accent);
  box-shadow:
    0 0 0 1px rgba(124, 240, 61, 0.36),
    0 1.5rem 4.5rem rgba(0, 0, 0, 0.62);
  transform: scale(1.035);
}

.gallery-ring__media img {
  display: block;
  width: calc(100% + 3.5rem);
  height: 100%;
  margin-left: -1.75rem;
  object-fit: cover;
  transform: translate3d(var(--ring-parallax), 0, 0) scale(1.08);
  transition: opacity 180ms ease;
  will-change: transform;
  pointer-events: none;
}

.gallery-ring__item.has-broken-image .gallery-ring__media::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gallery-accent);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  content: "IMAGEN NO DISPONIBLE";
}

.gallery-ring__item.has-broken-image img {
  opacity: 0;
}

.gallery-ring__video-indicator {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: var(--gallery-accent);
  color: var(--gallery-ink);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.gallery-ring__vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(4, 6, 5, 0.92),
      rgba(4, 6, 5, 0.22) 27%,
      transparent 43%,
      transparent 57%,
      rgba(4, 6, 5, 0.22) 73%,
      rgba(4, 6, 5, 0.92)
    );
  pointer-events: none;
}

.gallery-ring__loader,
.gallery-ring__fallback {
  position: absolute;
  z-index: 5;
  inset: 50% auto auto 50%;
  width: min(90%, 34rem);
  margin: 0;
  padding: 1rem 1.2rem;
  color: #dce4dd;
  text-align: center;
  transform: translate(-50%, -50%);
}

.gallery-ring__loader::before {
  display: block;
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.8rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gallery-accent);
  border-radius: 50%;
  animation: gallery-circular-spin 800ms linear infinite;
  content: "";
}

.gallery-ring__overlay {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  justify-items: center;
  width: min(92%, 34rem);
  padding: 0.8rem 1rem;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-ring__overlay[hidden],
.gallery-ring__loader[hidden],
.gallery-ring__fallback[hidden] {
  display: none;
}

.gallery-ring__meta,
.gallery-ring__title {
  margin: 0;
  text-shadow: 0 2px 18px #000;
}

.gallery-ring__meta {
  color: var(--gallery-accent);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-ring__title {
  overflow: hidden;
  margin-top: 0.25rem;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-ring__action {
  min-height: 2.75rem;
  margin-top: 0.65rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--gallery-accent);
  color: var(--gallery-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  pointer-events: auto;
}

.gallery-ring__action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.gallery-ring__hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0.7rem;
  width: min(92%, 45rem);
  margin: 0;
  color: #aeb7b0;
  font-size: 0.72rem;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-ring.is-fallback {
  height: auto;
  min-height: 7rem;
  margin-bottom: 1.5rem;
  cursor: default;
}

.gallery-ring.is-fallback .gallery-ring__viewport,
.gallery-ring.is-fallback .gallery-ring__vignette,
.gallery-ring.is-fallback .gallery-ring__hint {
  display: none;
}

/* ── Infinite Menu ── */
.gallery-infinite {
  --infinite-scale: 1;
  position: relative;
  width: 100%;
  height: clamp(32rem, 70vh, 48rem);
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 40%, #151a1c, #080a0b);
  cursor: grab;
}

.gallery-infinite[hidden] {
  display: none;
}

.gallery-infinite.is-dragging {
  cursor: grabbing;
}

.gallery-infinite:focus-visible {
  outline: 3px solid #4e8700;
  outline-offset: 4px;
}

.gallery-infinite__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.gallery-infinite.is-ready .gallery-infinite__canvas {
  opacity: 1;
}

.gallery-infinite__loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #e4ebe5;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  background: radial-gradient(ellipse at 50% 40%, #151a1c, #080a0b);
  pointer-events: none;
}

.gallery-infinite.is-ready .gallery-infinite__loader {
  display: none;
}

.gallery-infinite__overlay {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: clamp(1.2rem, 3vw, 2rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 1.5rem;
  border-radius: 1.15rem;
  background: rgba(8, 10, 11, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.gallery-infinite.is-moving .gallery-infinite__overlay {
  opacity: 0.5;
}

.gallery-infinite__overlay[hidden] {
  display: none;
}

.gallery-infinite__meta,
.gallery-infinite__title {
  margin: 0;
  text-shadow: 0 2px 12px #000;
}

.gallery-infinite__meta {
  color: var(--gallery-accent);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-infinite__title {
  margin-top: 0.15rem;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: #f4f6f3;
}

.gallery-infinite__action {
  min-height: 2.75rem;
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--gallery-accent);
  color: var(--gallery-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  pointer-events: auto;
}

.gallery-infinite__action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.gallery-infinite__hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0.65rem;
  width: min(92%, 38rem);
  margin: 0;
  color: #8f9690;
  font-size: 0.7rem;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-infinite.is-ready .gallery-infinite__hint {
  display: none;
}

.gallery-infinite__fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: #aeb7b0;
  font-size: 0.9rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 40%, #151a1c, #080a0b);
}

.gallery-infinite__fallback[hidden] {
  display: none;
}

.gallery-infinite.is-fallback {
  height: auto;
  min-height: 7rem;
  cursor: default;
}

.gallery-infinite.is-fallback .gallery-infinite__canvas,
.gallery-infinite.is-fallback .gallery-infinite__loader,
.gallery-infinite.is-fallback .gallery-infinite__overlay,
.gallery-infinite.is-fallback .gallery-infinite__hint {
  display: none;
}

.gallery-empty {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  min-height: 20rem;
  align-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid #d9dcd6;
  background: #fff;
}

.gallery-empty h3,
.gallery-empty p {
  margin: 0;
}

.gallery-empty a {
  color: #3f6805;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.gallery-pagination ol {
  display: flex;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-pagination a,
.gallery-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  color: #22282a;
  font-size: 0.86rem;
  font-weight: 750;
}

.gallery-pagination a:hover,
.gallery-pagination a:focus-visible,
.gallery-pagination [aria-current="page"] {
  background: var(--gallery-ink);
  color: var(--gallery-accent);
}

.gallery-pagination [aria-disabled="true"] {
  color: #a0a5a1;
}

.gallery-cta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(4rem, 8vw, 8rem);
  padding: clamp(2rem, 5vw, 5rem);
  background: var(--gallery-ink);
  color: #fff;
}

.gallery-cta p,
.gallery-cta h2 {
  margin: 0;
}

.gallery-cta p {
  margin-bottom: 0.5rem;
  color: var(--gallery-accent);
  font-weight: 750;
}

.gallery-cta h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.gallery-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: var(--gallery-accent);
  color: var(--gallery-ink);
  font-weight: 850;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 3vw, 2rem);
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.86);
  cursor: default;
}

.gallery-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(96vw, 90rem);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  background: #111513;
  color: #fff;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.45);
}

.gallery-modal__close {
  position: absolute;
  z-index: 3;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--gallery-accent);
  color: #080a0b;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-modal__stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: min(72vh, 48rem);
  place-items: center;
  overflow: hidden;
  background: #050706;
}

.gallery-modal__image,
.gallery-modal__video {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 48rem);
  object-fit: contain;
}

.gallery-modal__image[hidden],
.gallery-modal__video[hidden] {
  display: none;
}

.gallery-modal__status {
  position: absolute;
  margin: 0;
  color: #c8cec9;
}

.gallery-modal__stage.has-error .gallery-modal__status {
  color: #ffcfca;
}

.gallery-modal__details {
  align-self: center;
  padding: clamp(2rem, 4vw, 3.5rem);
}

.gallery-modal__category {
  margin: 0 0 0.65rem;
  color: var(--gallery-accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-modal__details h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.gallery-modal__details > p:last-child {
  margin: 1rem 0 0;
  color: #bdc5bf;
  line-height: 1.6;
}

.gallery-modal__navigation {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem;
  border-top: 1px solid #303632;
}

.gallery-modal__navigation button {
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid #4b554e;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.gallery-modal__navigation button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gallery-modal button:focus-visible,
.gallery-cta a:focus-visible {
  outline: 3px solid var(--gallery-accent);
  outline-offset: 3px;
}

body.is-gallery-modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .gallery-hero {
    padding-top: 8rem;
  }

  .gallery-hero h1 {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .gallery-hero__summary,
  .gallery-results__header,
  .gallery-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-filter-group > span {
    flex-basis: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 0.8rem;
  }

  .gallery-view-switcher {
    width: 100%;
  }

  .gallery-view-switcher__item {
    flex: 1 1 auto;
  }

  .gallery-circular {
    height: clamp(24rem, 65vh, 34rem);
    border-radius: 0.8rem;
  }

  .gallery-ring {
    --ring-card-width: 210px;
    --ring-card-height: 248px;
    --ring-radius: 520px;
    height: clamp(28rem, 66vh, 36rem);
    min-height: 28rem;
    border-radius: 0.8rem;
  }

  .gallery-ring__viewport {
    perspective: 1450px;
  }

  .gallery-ring__vignette {
    background:
      linear-gradient(
        to right,
        rgba(4, 6, 5, 0.7),
        transparent 25%,
        transparent 75%,
        rgba(4, 6, 5, 0.7)
      );
  }

  .gallery-ring__overlay {
    bottom: 2.3rem;
  }

  .gallery-circular__overlay {
    bottom: 2.25rem;
  }

  .gallery-modal {
    padding: 0;
  }

  .gallery-modal__panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    width: 100vw;
    max-height: 100dvh;
  }

  .gallery-modal__stage {
    min-height: 52dvh;
  }

  .gallery-modal__image,
  .gallery-modal__video {
    max-height: 52dvh;
  }

  .gallery-modal__details {
    padding: 1.25rem;
  }

  .gallery-modal__navigation {
    grid-column: 1;
  }
}

@media (max-width: 350px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-pagination {
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-circular__loader::before {
    animation: none;
  }

  .gallery-ring__loader::before {
    animation: none;
  }

  .gallery-card__media img {
    transition-duration: 0.01ms;
  }

  .gallery-card:hover .gallery-card__media img,
  .gallery-card:focus-within .gallery-card__media img {
    transform: none;
  }
}
