.title:has(.title__main-page) {
  margin-top: 2.5em;
}
.about-bg {
  margin-bottom: 2.5em;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1.2rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
}
.gallery-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}
.gallery.dimmed .gallery-item:not(.active)::before {
   opacity: 0.7;
}
.gallery.dimmed .gallery-item:not(.active) {
  filter: brightness(90%) !important;
}
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.popup-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0;}
  to {opacity: 1;}
}
.popup-box {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  background-color: white;
  padding: .5em .5em 0 .5em;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}
.popup-box img {
  max-width: 100%;
  max-height: 70vh;
}
.popup-box p {
  margin: 1em 0;
  line-height: 1.2em;
  text-align: left;
}
.popup-close {
  position: absolute;
  top: -2rem;
  right: -2rem;
  background-color: #f4f4f4;
  background-image: url('../images/gallery-close.svg');
  background-size: 1em auto;
  background-repeat: no-repeat;
  background-position: center center;
  width: 4.4rem;
  height: 4.4rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}
.media-location {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5em;
  margin-top: var(--space-md);
}
.media-location .media-location__box {
  display: flex;
  flex-direction: column;
  row-gap: var(--space-sm);
}
.lead-lay01 {
  margin: 3.5em 0;
}
.media-content__txt .icon-clock {
  position: relative;
  padding-left: 3em;
  margin-bottom: 1em;
}
.media-content__txt .icon-clock span {
  font-size: 1.125em;
  font-weight: 400;
  margin-bottom: 1.6rem;
}
.media-content__txt .icon-clock img {
  display: block;
  width: 2em;
  height: 2em;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.media-content__txt .ttl-time {
  font-size: 1.375em;
  line-height: 1.6em;
  font-weight: 500;
  margin-bottom: 1.25em;
}
.media-content__txt .button01 {
  margin-top: 2em;
}
.media-space {
  margin-top: 3.5em;
  margin-bottom: 3.5em;
}
@media screen and (max-width: 767px) {
  .media-content__img01 {
    width: 100%;
    height: 24rem;
    overflow: hidden;
    position: relative;
  }
  .media-content__img01 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .gallery {
    width: 100vw;
    transform: translateX(-1em);
  }
}
@media screen and (min-width: 768px) {
  .title:has(.title__main-page) {
    margin-top: 7.5em;
  }
  .about-bg {
    position: relative;
    margin-bottom: 10em;
  }
  .about-bg::before,.about-bg::after {
    content: "";
    display: block;
    width: 100vw;
    height: 76.7rem;
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  .about-bg::before {
    background-image: url('../images/bg_line11.svg');
    background-position: center top;
    top: -17.6rem;
  }
  .about-bg::after {
    background-image: url('../images/bg_line12.svg');
    background-position: center bottom;
    bottom: 0;
    top: auto;
  }
  .media-content__txt:has(.ttl-time) {
    width: 48rem;
  }
  .gallery {
    grid-template-columns: repeat(4,1fr);
    gap: .5em;
  }
  .popup-box {
    padding: 1em 1em 0 1em;
  }
  .media-location {
    grid-template-columns: 1fr 1fr;
    gap: 6.5em;
  }
  .media-content__txt .ttl-time {
    margin-bottom: 4rem;
  }
  .lead-lay01 {
    margin: 5em auto 10em auto;
  }
  .media-content__txt .button01 {
    margin-top: 2.5em;
  }
  .media-space {
    margin-top: 7.5em;
    margin-bottom: 7.5em;
  }
}
