/* Gallery page */
.gallery-page {
  font-family: var(--primary-font);
  color: var(--rs-text-primary);
}
.gallery-container {
  width: min(1400px, calc(100% - 48px));
  margin-inline: auto;
}

.gallery-hero {
  position: relative;
  min-height: 382px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--primary-color);
  background: linear-gradient(
    112deg,
    color-mix(in srgb, var(--primary-color) 5%, var(--rs-white)) 0%,
    color-mix(in srgb, var(--secondary-color) 7%, var(--rs-white)) 48%,
    color-mix(in srgb, var(--secondary-color) 13%, var(--rs-white)) 100%
  );
}
.gallery-hero::before,
.gallery-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(3px);
}
.gallery-hero::before {
  top: -135px;
  left: -95px;
  width: 490px;
  height: 420px;
  background: radial-gradient(
    ellipse at 48% 56%,
    color-mix(in srgb, var(--secondary-color) 27%, transparent) 0%,
    color-mix(in srgb, var(--secondary-color) 13%, transparent) 34%,
    color-mix(in srgb, var(--primary-color) 9%, transparent) 58%,
    transparent 73%
  );
  animation: gallery-hero-glow 11s ease-in-out infinite alternate;
}
.gallery-hero::after {
  top: 80px;
  left: 22%;
  width: 300px;
  height: 260px;
  background: radial-gradient(
    ellipse,
    color-mix(in srgb, var(--primary-color) 13%, transparent) 0%,
    color-mix(in srgb, var(--primary-color) 7%, transparent) 44%,
    transparent 72%
  );
  animation: gallery-hero-glow 14s ease-in-out -4s infinite alternate-reverse;
}
@keyframes gallery-hero-glow {
  0% {
    transform: translate3d(-12px, 8px, 0) scale(0.94);
  }
  100% {
    transform: translate3d(26px, -10px, 0) scale(1.08);
  }
}
.gallery-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 36px;
  padding-block: 42px;
}
.gallery-hero-copy {
  position: relative;
  z-index: 2;
}
.gallery-hero-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 25%, transparent);
  border-radius: 99px;
  padding: 6px 18px;
  margin-bottom: 6px;
  background: color-mix(in srgb, var(--secondary-color) 8%, var(--rs-white));
  color: var(--secondary-color);
  font-size: var(--rs-fs-sm);
  font-weight: var(--rs-fw-sbold);
}
.gallery-hero h1 {
  margin: 0 0 18px;
  max-width: 740px;
  color: var(--primary-color);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: var(--rs-fw-bold);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.gallery-hero h1 span {
  color: var(--secondary-color);
}
.gallery-hero p {
  max-width: 500px;
  margin: 0 0 26px;
  color: var(--rs-text-primary);
  font-size: var(--rs-fs-md);
  line-height: 1.7;
}
.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.gallery-hero-art {
  position: relative;
  width: 100%;
  height: 280px;
}
.gallery-hero-photo {
  position: absolute;
  overflow: hidden;
  margin: 0;
  border: 5px solid var(--rs-white);
  border-radius: 18px;
  background: var(--primary-color);
  box-shadow: var(--rs-shadow-xl);
}
.gallery-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-hero-photo-one {
  top: 0;
  left: 0;
  width: 54%;
  height: 62%;
}
.gallery-hero-photo-two {
  top: 12%;
  right: 0;
  width: 47%;
  height: 52%;
}
.gallery-hero-photo-three {
  bottom: 0;
  left: 23%;
  width: 51%;
  height: 45%;
}
.gallery-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 11px 24px;
  font: var(--rs-fw-sbold) var(--rs-fs-sm)/1.2 var(--primary-font);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.gallery-button:hover {
  transform: translateY(-2px);
}
.gallery-button-pink {
  background: var(--secondary-color);
  color: var(--rs-white);
  box-shadow: 0 10px 24px
    color-mix(in srgb, var(--secondary-color) 22%, transparent);
}
.gallery-button-pink:hover {
  background: var(--primary-color);
  color: var(--rs-white);
}
.gallery-button-light {
  border-color: color-mix(in srgb, var(--rs-white) 82%, transparent);
  background: color-mix(in srgb, var(--rs-white) 8%, transparent);
  color: var(--rs-white);
}
.gallery-button-light:hover {
  background: var(--rs-white);
  color: var(--primary-color);
}
.gallery-button-outline {
  border-color: var(--primary-color);
  background: var(--rs-white);
  color: var(--primary-color);
}
.gallery-button-outline:hover {
  background: var(--primary-color);
  color: var(--rs-white);
}
.gallery-button:focus-visible,
.gallery-filters button:focus-visible,
.gallery-card:focus-visible,
.gallery-lightbox button:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 3px;
}

.gallery-section {
  padding: 26px 0 22px;
}
.gallery-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.gallery-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-size: var(--rs-fs-base);
  font-weight: var(--rs-fw-medium);
}
.gallery-eyebrow::before {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--secondary-color);
}
.gallery-heading-copy h2 {
  margin: 0 0 8px;
  color: var(--primary-color);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: var(--rs-fw-bold);
  line-height: 1.2;
}
.gallery-heading-copy p {
  margin: 0;
  color: var(--rs-text-primary);
  font-size: var(--rs-fs-base);
}
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.gallery-filters button {
  min-height: 40px;
  border: 1px solid var(--rs-border-primary);
  border-radius: 99px;
  padding: 9px 18px;
  background: var(--rs-white);
  box-shadow: var(--rs-shadow-sm);
  color: var(--primary-color);
  font: var(--rs-fw-medium) var(--rs-fs-sm)/1.2 var(--primary-font);
  cursor: pointer;
  transition: 0.2s ease;
}
.gallery-filters button:hover {
  border-color: var(--primary-color);
}
.gallery-filters button.is-active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: var(--rs-white);
}

.gallery-grid {
  columns: 3;
  column-gap: 20px;
}
.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  height: 270px;
  overflow: hidden;
  break-inside: avoid;
  margin: 0 0 20px;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    color-mix(in srgb, var(--primary-color) 72%, var(--secondary-color))
  );
  box-shadow: var(--rs-shadow-lg);
  text-align: left;
  cursor: zoom-in;
}
.gallery-card--tall {
  height: 340px;
}
.gallery-card--medium {
  height: 300px;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(
    transparent,
    color-mix(in srgb, var(--rs-black) 68%, transparent)
  );
  opacity: 0.92;
  transition: opacity 0.2s ease;
}
.gallery-card:hover img {
  transform: scale(1.045);
}
.gallery-card-category {
  position: absolute;
  z-index: 1;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 99px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--rs-white) 94%, transparent);
  color: var(--primary-color);
  font-size: var(--rs-fs-xs);
  font-weight: var(--rs-fw-sbold);
}
.gallery-card-category i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary-color);
}
.gallery-card-title {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 46px;
  bottom: 15px;
  color: var(--rs-white);
  font-size: var(--rs-fs-sm);
  font-weight: var(--rs-fw-sbold);
}
.gallery-card-open {
  position: absolute;
  z-index: 1;
  right: 13px;
  bottom: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--rs-white) 65%, transparent);
  border-radius: 50%;
  color: var(--rs-white);
  font-size: var(--rs-fs-md);
  opacity: 0;
  transform: translateY(4px);
  transition: 0.2s ease;
}
.gallery-card:hover .gallery-card-open,
.gallery-card:focus-visible .gallery-card-open {
  opacity: 1;
  transform: none;
}
.gallery-card.is-hidden {
  display: none;
}
.gallery-load-wrap {
  display: flex;
  justify-content: center;
  margin: 26px 0 48px;
}
.gallery-load-wrap [hidden] {
  display: none;
}
.gallery-empty {
  margin: 24px 0;
  color: var(--rs-text-primary);
  text-align: center;
}
.gallery-empty[hidden] {
  display: none;
}

.gallery-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 58px;
  border: 1px solid var(--rs-border-primary);
  border-radius: 22px;
  padding: 30px 16px;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--secondary-color) 6%, var(--rs-white)),
    color-mix(in srgb, var(--primary-color) 6%, var(--rs-white))
  );
}
.gallery-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.gallery-stats div + div {
  border-left: 1px solid var(--rs-border-primary);
}
.gallery-stats strong {
  color: var(--primary-color);
  font-size: var(--rs-fs-3xl);
  line-height: 1;
  font-weight: var(--rs-fw-bold);
}
.gallery-stats span {
  color: var(--rs-text-primary);
  font-size: var(--rs-fs-sm);
}
.gallery-cta {
  display: grid;
  grid-template-columns: 1.15fr 1fr auto;
  align-items: center;
  gap: 28px;
  border-radius: 22px;
  padding: 34px 40px;
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--primary-color) 88%, var(--secondary-color)),
    color-mix(in srgb, var(--secondary-color) 70%, var(--primary-color))
  );
  color: var(--rs-white);
}
.gallery-cta h2 {
  margin: 0;
  color: var(--rs-white);
  font-size: clamp(var(--rs-fs-2xl), 2.5vw, 30px);
  font-weight: var(--rs-fw-bold);
  line-height: 1.25;
}
.gallery-cta h2 span {
  color: color-mix(in srgb, var(--secondary-color) 55%, var(--rs-white));
}
.gallery-cta p {
  margin: 0;
  color: color-mix(in srgb, var(--rs-white) 86%, transparent);
  font-size: var(--rs-fs-base);
  line-height: 1.7;
}
.gallery-cta .gallery-button {
  white-space: nowrap;
}

.gallery-lightbox {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}
.gallery-lightbox.is-open {
  visibility: visible;
  opacity: 1;
}
.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--rs-black) 91%, transparent);
  backdrop-filter: blur(5px);
}
.gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1240px, 100%);
  height: min(88vh, 850px);
}
.gallery-lightbox-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 0 58px 18px;
  color: var(--rs-white);
  font-family: var(--primary-font);
}
.gallery-lightbox-top h2 {
  margin: 0 0 4px;
  color: var(--rs-white);
  font-size: clamp(var(--rs-fs-2xl), 3vw, 34px);
  font-weight: var(--rs-fw-bold);
  line-height: 1.2;
}
.gallery-lightbox-top p {
  margin: 0;
  color: color-mix(in srgb, var(--rs-white) 66%, transparent);
  font-size: var(--rs-fs-base);
}
.gallery-lightbox-close {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rs-white) 14%, transparent);
  color: var(--rs-white);
  font: var(--rs-fw-regular) 32px/1 var(--primary-font);
  cursor: pointer;
}
.gallery-lightbox-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.gallery-lightbox-arrow {
  position: absolute;
  z-index: 2;
  top: 56%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--rs-white);
  font: var(--rs-fw-regular) 40px/1 var(--primary-font);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.gallery-lightbox-arrow:hover {
  background: var(--secondary-color);
  transform: scale(1.06);
}
.gallery-lightbox-prev {
  left: 0;
}
.gallery-lightbox-next {
  right: 0;
}
body.gallery-viewer-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .gallery-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .gallery-filters {
    justify-content: flex-start;
  }
  .gallery-grid {
    columns: 2;
  }
  .gallery-cta {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-cta .gallery-button {
    justify-self: start;
  }
}
@media (max-width: 600px) {
  .gallery-container {
    width: min(100% - 32px, 520px);
  }
  .gallery-hero {
    min-height: 0;
  }
  .gallery-hero-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 38px;
  }
  .gallery-hero p {
    font-size: var(--rs-fs-base);
  }
  .gallery-hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 280px;
  }
  .gallery-hero-art {
    height: 240px;
    max-width: 480px;
    margin: 0 auto;
  }
  .gallery-section {
    padding: 48px 0 52px;
  }
  .gallery-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding: 2px 1px 10px;
  }
  .gallery-filters button {
    flex: 0 0 auto;
  }
  .gallery-grid {
    columns: 2;
    column-gap: 10px;
  }
  .gallery-card {
    height: 195px;
    margin-bottom: 10px;
    border-radius: 11px;
  }
  .gallery-card--tall {
    height: 245px;
  }
  .gallery-card--medium {
    height: 215px;
  }
  .gallery-card-category {
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    font-size: 10px;
  }
  .gallery-card-title {
    left: 10px;
    bottom: 10px;
    font-size: var(--rs-fs-xs);
  }
  .gallery-card-open {
    display: none;
  }
  .gallery-stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
    padding: 24px 10px;
    margin-bottom: 48px;
  }
  .gallery-stats div:nth-child(3) {
    border-left: 0;
  }
  .gallery-stats strong {
    font-size: var(--rs-fs-2xl);
  }
  .gallery-stats span {
    font-size: var(--rs-fs-xs);
  }
  .gallery-cta {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 26px 22px;
    border-radius: 18px;
  }
  .gallery-cta .gallery-button {
    justify-self: start;
  }
  .gallery-lightbox {
    padding: 12px;
  }
  .gallery-lightbox-panel {
    height: min(82vh, 760px);
  }
  .gallery-lightbox-top {
    padding: 0 2px 12px;
  }
  .gallery-lightbox-close {
    width: 42px;
    height: 42px;
  }
  .gallery-lightbox-arrow {
    top: 55%;
    width: 42px;
    height: 42px;
    font-size: 32px;
  }
  .gallery-lightbox-prev {
    left: 0;
  }
  .gallery-lightbox-next {
    right: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-hero::before,
  .gallery-hero::after {
    animation: none;
  }
  .gallery-button,
  .gallery-card img,
  .gallery-card-open,
  .gallery-lightbox,
  .gallery-lightbox-arrow {
    transition: none;
  }
}
