@charset "utf-8";
/* ===================================================
	GALLERY.CSS
=================================================== */
.gallery-fv {
  height: 200px;
  padding: 0;
  background: url("../images/photo-b1-1.JPG") center center / cover no-repeat;
  box-sizing: border-box;
}
.gallery-fv::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 246, 242, 0.55);
}
.gallery-fv .ja-title {
  display: inline-block;
  line-height: 1;
  text-shadow:
    1px 1px 0 #F7F6F2, -1px 1px 0 #F7F6F2, 1px -1px 0 #F7F6F2, -1px -1px 0 #F7F6F2;
}
.gallery-fv .EN-Alt {
  display: block;
  font-size: 2.5rem;
  line-height: 1;
  color: rgba(46, 107, 94, 0.8);
  text-shadow:
    1px 1px 0 #1A1A18, -1px 1px 0 #1A1A18, 1px -1px 0 #1A1A18, -1px -1px 0 #1A1A18;
}
.gallery-page-all {
  padding-top: 50px;
  padding-bottom: 50px;
}
.gallery-intro {
  padding-bottom: 30px;
}
.gallery-intro p + p {
  margin-top: 10px;
}
.gallery-exhibition {
  width: 85%;
  margin: 0 auto;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  grid-auto-flow: dense;
  grid-auto-rows: 90px;
}
.gallery-item {
  display: block;
  overflow: hidden;
  background: #D9D9D9;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.gallery-item:hover img, .gallery-item:active img {
  transform: scale(1.03);
  opacity: 0.9;
}
.gallery-item.small {
  grid-column: span 1;
  grid-row: span 1;
}
.gallery-item.horizontal {
  grid-column: span 2;
  grid-row: span 1;
}
.gallery-item.vertical {
  grid-column: span 1;
  grid-row: span 2;
}
.gallery-item.big-horizontal {
  grid-column: span 3;
  grid-row: span 2;
}
.gallery-item.big-vertical {
  grid-column: span 2;
  grid-row: span 3;
}
/* ===== tablet ===== */
@media screen and (min-width: 768px) {
  .gallery-fv {
    height: 220px;
  }
  .gallery-fv .EN-Alt {
    font-size: 4rem;
  }
  .gallery-exhibition {
    width: 90%;
    max-width: 1100px;
  }
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    grid-auto-rows: 120px;
  }
  .gallery-item.small {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gallery-item.horizontal {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-item.vertical {
    grid-column: span 1;
    grid-row: span 2;
  }
  .gallery-item.big-horizontal {
    grid-column: span 2;
    grid-row: span 2;
  }
  .gallery-item.big-vertical {
    grid-column: span 2;
    grid-row: span 3;
  }
}
/* ===== desktop ===== */
@media screen and (min-width: 1025px) {
  .gallery-fv {
    height: 240px;
  }
  .gallery-fv .EN-Alt {
    font-size: 5rem;
  }
  .gallery-exhibition {
    width: 100%;
    max-width: 1100px;
  }
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    grid-auto-rows: 125px;
  }
  .gallery-item.small {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-item.horizontal {
    grid-column: span 3;
    grid-row: span 2;
  }
  .gallery-item.vertical {
    grid-column: span 2;
    grid-row: span 2;
  }
  .gallery-item.big-horizontal {
    grid-column: span 4;
    grid-row: span 2;
  }
  .gallery-item.big-vertical {
    grid-column: span 2;
    grid-row: span 3;
  }
}
/* ===== 四隅ライン ===== */
.gallery-item {
  position: relative;
}

/* 横線 */
.gallery-item::before,
.gallery-item::after {
  content: "";
  position: absolute;
  background-color: #1A1A18;
  z-index: 2;
  transition: all 0.4s ease;
}

/* 上 */
.gallery-item::before {
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
}

/* 下 */
.gallery-item::after {
  right: 0;
  bottom: 0;
  width: 0;
  height: 3px;
}

/* 縦線（擬似要素を img に付けるのは不可なので別で） */
.gallery-item span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gallery-item span::before,
.gallery-item span::after {
  content: "";
  position: absolute;
  background-color: #1A1A18;
  transition: all 0.4s ease;
}

/* 右 */
.gallery-item span::before {
  top: 0;
  right: 0;
  width: 3px;
  height: 0;
}

/* 左 */
.gallery-item span::after {
  left: 0;
  bottom: 0;
  width: 3px;
  height: 0;
}

/* ===== hover時 ===== */
.gallery-item:hover::before,
.gallery-item:active::before {
  width: 100%;
}

.gallery-item:hover::after,
.gallery-item:active::after {
  width: 100%;
}

.gallery-item:hover span::before,
.gallery-item:active span::before {
  height: 100%;
}

.gallery-item:hover span::after,
.gallery-item:active span::after {
  height: 100%;
}
