

@media screen and (max-width: 639px) {
figure p, .lightbox-close {display: none;}

}

@media screen and (min-width: 640px) {

.row figure {/*表示されている画像。*/
  height: 240px;
  width: 240px;
  margin: 0;
  background-size: cover;
  background-position: 50% 50%;
  transition: all 1s ease-in-out;
  background-repeat: no-repeat;
  z-index: 2;
  display: inline-block;
  position: relative;
  text-align: center;
}

figure p{  text-align: center; letter-spacing: 0.1em;
}

.row a {/*拡大画像を表示させる為の要素*/
  display: inline-block;
  text-align: center;
  margin: 40px;
  text-decoration: none;
  color: white;
}

.row a p {/*テキスト表示。デフォルトでは透過しておく*/
  position: absolute;
  opacity: 0;
  font-size: 14px;
  top: 45%;
  z-index: 100;
  left: 0;
  right: 0;
  margin: auto;
}

figure:hover p {/*テキスト表示*/
  opacity: 1;
}

figure:after {/*オーバーレイ。デフォルトでは透過*/
  content: "";
  display: inline-block;
  height: 100%;
  width: 100%;
  background-color: #000;
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  transition: all 0.4s ease-in-out 0s;
  z-index: 99;
}



figure:hover:after {/*マウスホバーでオーバーレイ表示*/
  opacity: 0.7;
}

.photo01 {/*表示する画像*/
  background-image: url("https://seikiin.com/img/room01.png");
}

.photo02 {/*表示する画像*/
  background-image: url("https://seikiin.com/img/room02.png");
}

.photo03 {/*表示する画像*/
  background-image: url("https://seikiin.com/img/room03.png");
}

.lightbox-target {/*lightbox*/
  position: fixed;
  top: -100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  overflow: hidden;
  z-index: 300;
}

.lightbox-target .container {
  margin: auto;
  position: absolute;
  top: 50vh;
  left: 50vw;
  transition: 0.5s ease-in-out;
  text-align: center;
  transform: translate3d(-50%, -50%, 0);
}

a.lightbox-close {/*閉じるボタン*/
  display: block;
  width: 50px;
  height: 50px;
  text-decoration: none;
  position: absolute;
  top: 20px;
  right: 0;
  margin: 0;
  padding-top: 10px;
 font-size: 300%;
 background-color:rgba(0, 0, 0, 0.3);
}

.lightbox-target:target {
  opacity: 1;
  top: 0;
  bottom: 0;
}

.lightbox-target:target img {
  vertical-align: top;
}

}