.gallery-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 7.5rem 1.5rem 4rem;
  background: #111;
}

.gallery-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gallery-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.22) 36%,
    rgba(0, 0, 0, 0.78) 100%
  );
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 0.5rem;
  background: none;
  box-shadow: none;
}

.gallery-hero-content h1,
.gallery-hero-content p {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.gallery-hero-content h1 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.45rem, 4.2vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .gallery-hero-content h1 {
    white-space: nowrap;
    font-size: clamp(1.7rem, 3.15vw, 3.6rem);
  }
}

.gallery-hero-content p {
  margin: 1.15rem 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.75rem, 1.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1.4;
  text-transform: uppercase;
}

.gallery-page .section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.gallery-page .section-header h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
}

.gallery-page .section-header p {
  color: #555;
}

.gallery-soon-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #d11f26, #040404);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-soon-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 54px rgba(209, 31, 38, 0.38);
}

.gallery-soon-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.edition-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: editionPulse 1.8s ease-out infinite;
}

.gallery-soon-card h3 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-soon-card p:last-child {
  max-width: 36rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.65;
}

@keyframes editionRise {
  from {
    transform: translateY(110%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes editionFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editionRule {
  to {
    transform: scaleX(1);
  }
}

@keyframes editionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(209, 31, 38, 0.45);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(209, 31, 38, 0);
  }
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.gallery-intro .section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.2em;
}

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.filter-btn {
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #111;
  font-weight: 600;
  transition: all 0.2s ease;
}

.filter-btn.active {
  background: #d11f26;
  border-color: #d11f26;
  color: #fff;
  box-shadow: 0 15px 30px rgba(209, 31, 38, 0.4);
}

.filter-btn:focus-visible {
  outline: 2px solid #d11f26;
  outline-offset: 3px;
}

.edition-photos {
  padding: 12px 12px 40px;
}

.edition-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 1.75rem;
}

.edition-photo-grid .gallery-card {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #111;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.edition-photo-grid .gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edition-photo-grid .gallery-card:focus-visible {
  outline: 2px solid #d11f26;
  outline-offset: 3px;
}

.edition-download {
  max-width: 36rem;
  margin: 0.4rem auto 0;
  padding: 0 1rem;
  text-align: center;
}

.edition-download p {
  margin: 0 auto 0.85rem;
  color: #333;
  line-height: 1.6;
}

.edition-download-pin {
  margin: 0 auto 1.1rem;
  color: #111;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.28em;
}

.edition-download .btn {
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  animation: editionViewMore 2.6s ease-in-out infinite;
}

.edition-download .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: editionViewRing 2.6s ease-out infinite;
}

@keyframes editionViewMore {
  0%,
  100% {
    box-shadow: 0 8px 16px rgba(209, 31, 38, 0.22);
  }
  50% {
    box-shadow: 0 10px 24px rgba(209, 31, 38, 0.42);
  }
}

@keyframes editionViewRing {
  0% {
    box-shadow: 0 0 0 0 rgba(209, 31, 38, 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 12px rgba(209, 31, 38, 0);
  }
}

.edition-video .section-header {
  margin-bottom: 1.25rem;
}

.edition-video-frame {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.edition-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-grid {
  column-count: 3;
  column-gap: clamp(1rem, 2vw, 1.5rem);
}

.gallery-card {
  break-inside: avoid;
  margin: 0 0 1.25rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.video-frame {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-card--video {
  position: relative;
}

.gallery-card--video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.gallery-card--video figcaption::before {
  content: '\25B6';
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.9rem;
}

.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:focus-visible,
.gallery-card:hover {
  outline: none;
}

.gallery-card:focus-visible img,
.gallery-card:hover img {
  transform: scale(1.02);
}

.gallery-card figcaption {
  padding: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gallery-card figcaption span {
  color: #111;
  font-weight: 600;
}

.gallery-card figcaption small {
  color: rgba(0, 0, 0, 0.6);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(1, 1, 1, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1200;
}

.gallery-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  max-width: min(960px, 95vw);
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65);
  position: relative;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.lightbox-media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.lightbox-filename {
  display: none;
}

.lightbox-toolbar {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  top: 0.35rem;
  right: 3rem;
  z-index: 2;
}

.lightbox-toolbar .lightbox-tool:not(.lightbox-download) {
  display: none;
}

.lightbox-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  cursor: pointer;
  text-decoration: none;
}

.lightbox-tool svg {
  width: 26px;
  height: 26px;
}

.lightbox-toolbar .lightbox-download {
  color: #fff;
}

.lightbox-download-bottom {
  display: none;
}

.lightbox-heart[aria-pressed="true"] svg path {
  fill: #111;
}

@media (max-width: 960px) {
  .gallery-lightbox {
    background: #fff;
    padding: 0;
    align-items: stretch;
  }

  .lightbox-inner {
    max-width: none;
    height: 100%;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .lightbox-close {
    display: none;
  }

  .lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: static;
    right: auto;
    padding: calc(0.65rem + env(safe-area-inset-top)) 0.45rem 0.35rem 0.35rem;
  }

  .lightbox-toolbar .lightbox-tool:not(.lightbox-download) {
    display: inline-flex;
  }

  .lightbox-toolbar .lightbox-download {
    color: #222;
  }

  .lightbox-actions {
    display: flex;
    align-items: center;
  }

  .lightbox-media {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    overflow: hidden;
    touch-action: pan-y;
  }

  .lightbox-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
  }

  .lightbox-filename {
    display: block;
    margin: 0;
    padding: 0.75rem 1rem 0.35rem;
    text-align: center;
    color: #9a9a9a;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .lightbox-download-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 2rem);
    min-height: 48px;
    margin: 0.35rem auto calc(0.85rem + env(safe-area-inset-bottom));
    border-radius: 8px;
    background: #d11f26;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
  }

  .gallery-ios .gallery-lightbox.open,
  .gallery-ios .lightbox-media {
    overscroll-behavior: none;
    touch-action: none;
  }

  .gallery-ios .lightbox-media img {
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

@media (max-width: 1024px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    column-count: 1;
  }

  .gallery-filter {
    gap: 0.5rem;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
  }

  .gallery-hero {
    min-height: 100vh;
    padding: 6.5rem 1rem 3rem;
  }

  .gallery-hero-content h1 {
    letter-spacing: 0.03em;
  }

  .gallery-hero-content p {
    letter-spacing: 0.16em;
  }

  .gallery-page .section-header h2,
  .gallery-soon-card h3 {
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 960px) {
  .edition-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edition-line span,
  .edition-rule,
  .gallery-hero-content p:last-child,
  .edition-status-dot {
    animation: none;
  }

  .gallery-soon-card,
  .gallery-soon-card:hover,
  .gallery-card img,
  .gallery-card:hover img,
  .edition-download .btn,
  .edition-download .btn::after {
    transform: none;
    transition: none;
    animation: none;
  }
}

