.gallery-hero {
  background: #f4f7f7;
  border-bottom: 1px solid #dce6e8;
}
.gallery-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(48px, 7vw, 120px);
  padding-top: 90px;
  padding-bottom: 90px;
}
.gallery-hero-copy h1 {
  font-size: clamp(58px, 6vw, 90px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 650px;
  margin-bottom: 30px;
}
.gallery-hero-copy p {
  color: #58707c;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.62;
  max-width: 560px;
}
.gallery-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #39789d;
  padding-bottom: 7px;
  margin-top: 34px;
  color: #2a6f9a;
  font-weight: 700;
  font-size: 16px;
}
.gallery-scroll-link span {
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}
.gallery-hero-image {
  position: relative;
  margin: 0;
}
.gallery-hero-image img {
  width: 100%;
  height: clamp(420px, 40vw, 620px);
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
}
.gallery-hero-image::before {
  content: '';
  position: absolute;
  inset: 15px -15px -15px 15px;
  border: 1px solid #d8af47;
  z-index: 0;
  pointer-events: none;
}
.gallery-hero-image img,
.gallery-hero-image figcaption {
  position: relative;
  z-index: 1;
}
.gallery-hero-image figcaption {
  color: var(--copy);
  font-size: 13px;
  margin-top: 13px;
}
.gallery-section {
  padding: 100px 0 120px;
}
.gallery-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 37px;
}
.gallery-intro h2 {
  font-size: clamp(42px, 4.2vw, 61px);
  line-height: 1.1;
  margin-bottom: 15px;
}
.gallery-intro p {
  color: var(--copy);
  font-size: 18px;
}
.gallery-intro .gallery-result {
  white-space: nowrap;
  font-size: 14px;
  color: #58747f;
}
.gallery-tools {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid #dbe5e7;
  border-bottom: 1px solid #dbe5e7;
  margin-bottom: 28px;
}
.gallery-years {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gallery-years button {
  min-height: 40px;
  padding: 7px 12px;
  color: #5c7480;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
}
.gallery-years button:hover,
.gallery-years button:focus-visible {
  background: #eaf2f5;
  color: #275f82;
}
.gallery-years button[aria-pressed='true'] {
  background: #315c7c;
  color: #fff;
}
.gallery-theme-label {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--copy);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.gallery-theme-label select {
  appearance: none;
  border: 1px solid #cbdbe0;
  border-radius: 4px;
  color: #36576b;
  font: 600 15px var(--font);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2336576b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 11px center;
  min-width: 170px;
  min-height: 44px;
  padding: 10px 34px 10px 13px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 18px;
}
.gallery-loading {
  grid-column: 1/-1;
}
.gallery-card {
  display: block;
  width: 100%;
  border: 0;
  text-align: left;
  color: inherit;
  cursor: zoom-in;
}
.gallery-card-image {
  display: block;
  overflow: hidden;
  background: #e5ebeb;
  aspect-ratio: 4/3;
  border-radius: 3px;
}
.gallery-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.035);
}
.gallery-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #5d737e;
}
.gallery-card-meta span:last-child {
  color: #2670a0;
}
.gallery-more {
  display: block;
  margin: 52px auto 0;
  min-height: 48px;
  padding: 12px 25px;
  border: 1px solid #8ba4b1;
  color: #335d77;
  background: #fff;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
}
.gallery-more:hover {
  background: #eef4f6;
  border-color: #477b98;
}
.gallery-more[hidden] {
  display: none;
}
.gallery-empty {
  grid-column: 1/-1;
  padding: 60px 0;
  color: var(--copy);
  font-size: 18px;
}
.gallery-end {
  background: #f9f1dd;
  border-top: 1px solid #f0e0b9;
  padding: 68px 0;
}
.gallery-end-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
}
.gallery-end h2 {
  font-size: clamp(34px, 3.4vw, 48px);
  max-width: 670px;
}
.gallery-end p {
  font-size: 17px;
  margin-top: 13px;
  color: var(--copy);
  max-width: 650px;
}
.gallery-end-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gallery-end-links a {
  white-space: nowrap;
  min-height: 46px;
}
.gallery-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1120px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #f7f9f9;
  color: #385365;
  box-shadow: 0 25px 70px rgba(23, 49, 70, 0.3);
}
.gallery-dialog::backdrop {
  background: rgba(27, 52, 71, 0.84);
}
.gallery-dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  font-size: 14px;
  color: var(--copy);
}
.gallery-dialog-bar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #315b75;
  font-size: 15px;
  font-weight: 700;
}
.gallery-dialog-bar button span {
  font-size: 28px;
  font-weight: 400;
  line-height: 0.7;
}
.gallery-dialog-stage {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
}
.gallery-dialog-stage img {
  width: 100%;
  max-height: calc(100dvh - 170px);
  object-fit: contain;
  margin: 0 auto;
}
.gallery-dialog-stage button {
  width: 44px;
  height: 44px;
  border: 1px solid #b8cbd1;
  border-radius: 50%;
  color: #315b75;
  background: #fff;
  font-size: 34px;
  line-height: 1;
}
.gallery-dialog-stage button:hover {
  background: #e8f0f3;
}
.gallery-dialog #gallery-dialog-title {
  margin: 0;
  padding: 13px 20px 19px;
  text-align: center;
  font-size: 16px;
  color: #496575;
}
@media (max-width: 800px) {
  .gallery-hero-inner {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 58px;
    padding-bottom: 72px;
  }
  .gallery-hero-copy h1 {
    font-size: clamp(49px, 9vw, 68px);
  }
  .gallery-hero-image img {
    height: auto;
    aspect-ratio: 4/3;
  }
  .gallery-section {
    padding: 75px 0 90px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 27px 13px;
  }
  .gallery-tools {
    display: block;
  }
  .gallery-years {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
    margin-bottom: 12px;
  }
  .gallery-years button {
    flex: 0 0 auto;
  }
  .gallery-theme-label {
    justify-content: space-between;
  }
  .gallery-end-inner {
    display: block;
  }
  .gallery-end-links {
    margin-top: 25px;
  }
}
@media (max-width: 500px) {
  .gallery-hero-inner {
    padding-top: 44px;
    gap: 35px;
  }
  .gallery-hero-copy h1 {
    font-size: clamp(43px, 12vw, 55px);
    margin-bottom: 20px;
  }
  .gallery-hero-copy p {
    font-size: 17px;
  }
  .gallery-hero-image::before {
    inset: 10px -8px -8px 8px;
  }
  .gallery-section {
    padding: 60px 0 75px;
  }
  .gallery-intro {
    display: block;
    margin-bottom: 25px;
  }
  .gallery-intro h2 {
    font-size: 38px;
  }
  .gallery-intro p {
    font-size: 16px;
  }
  .gallery-intro .gallery-result {
    margin-top: 10px;
  }
  .gallery-grid {
    gap: 22px 10px;
  }
  .gallery-card-meta {
    font-size: 12px;
    padding-top: 8px;
  }
  .gallery-end {
    padding: 54px 0;
  }
  .gallery-end-links a {
    width: 100%;
    justify-content: center;
  }
  .gallery-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .gallery-dialog-stage {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 0;
    padding: 0 5px;
  }
  .gallery-dialog-stage button {
    width: 33px;
    height: 33px;
    font-size: 26px;
  }
}
@media (max-width: 340px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
