.gallery {
  font-family: "Noto Sans JP", sans-serif;
}
.gallery .page-header {
  display: none;
}
.gallery .page-body > .container {
  padding: 0 0 130px !important;
  width: 100%;
}
.gallery-hero {
  height: auto;
  position: relative;
}
.gallery-hero-inner {
  background-color: #d4ecee;
  position: relative;
  height: inherit;
  width: 100%;
}
.gallery-hero-inner::before {
  display: none;
}
.gallery h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  margin: 40px 0 0;
  padding: 0 16px;
}
.gallery .cards {
  display: block;
  padding: 30px 16px;
}
.gallery .cards .card-header {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  height: 90vw;
}
.gallery .cards .card .card-header a:hover::before {
  background: #21445b4d;
}
.gallery .cards .card .card-header a::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 10px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(33, 68, 91, 0) 85.71%, rgba(33, 68, 91, 0.2) 92.86%, rgba(33, 68, 91, 0.5) 100%);
}
.gallery .cards .card .card-header a img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  z-index: 0;
  height: 100%;
}
.gallery .cards .card .card-header p {
  position: absolute;
  bottom: 8px;
  left: 12px;
  margin: 0;
  z-index: 1;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #fff;
}
.gallery .cards .card .card-body {
  margin: 12px 0;
}
.gallery .cards .card .card-body ul {
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  height: 64px;
  overflow: hidden;
}
.gallery .cards .card .card-body ul li {
  margin-right: 6px;
  margin-bottom: 8px;
}
.gallery .cards .card .card-body ul li a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  border-radius: 100vmax;
  border: 1px solid #21445b;
  padding: 6px 8px;
  display: block;
}
.gallery .button-wrapper {
  padding: 0 15px;
}
@media only screen and (min-width: 769px) {
  .gallery-hero {
    height: 400px;
  }
  .gallery-hero-inner img {
    display: none;
  }
  .gallery-hero-inner::before {
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    background-image: url(/wp-content/themes/locca/images/photo-gallery/kv-pc@2x.png);
    background-repeat: no-repeat;
    background-position: 50% bottom;
    position: absolute;
    right: 0;
    max-width: 1855px;
    width: 100%;
    bottom: 0;
    margin: auto;
    background-size: cover;
    display: block;
  }
  .gallery .page-body > .container {
    padding: 0 0 260px !important;
  }
  .gallery .cards {
    width: 1024px;
    margin: 30px auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .gallery .cards .card {
    margin-top: 12px;
  }
  .gallery .cards .card:nth-child(-n + 4) {
    margin-top: 0;
  }
  .gallery .cards .card {
    max-width: calc((100% - 12px * 3) / 4);
    flex: 0 0 calc((100% - 12px * 3) / 4);
  }
  .gallery .cards::before {
    content: "";
    display: block;
    max-width: calc((100% - 12px * 3) / 4);
    flex: 0 0 calc((100% - 12px * 3) / 4);
    order: 1;
  }
  .gallery .cards::after {
    content: "";
    display: block;
    max-width: calc((100% - 12px * 3) / 4);
    flex: 0 0 calc((100% - 12px * 3) / 4);
  }
  .gallery .cards .card-header {
    height: 247px;
  }
  .gallery .button-wrapper {
    padding: 0;
  }
}
