/* 基本のスタイル */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
}
img {
  max-width: 100%;
}
h1 {
	padding: 0;
	margin: 0;
}
h1 img {
	width: 100%;
}
.read {
	width: 90%;
	max-width: 800px;
	margin: 0 auto;
}
.read-text {
	text-align: center;
	line-height: 1.6;
	font-size: 20px;
}

.gallery {
  display: grid;
  gap: 0; /* 画像間の隙間をなくす */
  padding: 0; /* 余白もなくす */
  grid-template-columns: repeat(3, 1fr); /* 初期状態は3列 */
}
.t_center {text-align: center;}
.mb1 {margin-bottom: 1rem;}
.mb2 {margin-bottom: 2rem;}
.mb3 {margin-bottom: 3rem;}
.mtb1 {margin-top: 1rem; margin-bottom: 1rem;}

.gallery-item {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0; /* アイテムのマージンをなくす */
}

.gallery-item img {
  display: block; /* 画像の下部の隙間を無くすために必要 */
  width: 100%;
  height: auto;
  cursor: pointer;
  margin: 0; /* 画像の周りの余計な隙間をなくす */
  padding: 0; /* 画像の周りに余計なパディングがないように */
  border-radius: 0; /* 丸みをなくす */
}

/* ポップアップのスタイル */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

/* ポップアップのコンテンツ */
.popup {
  background-color: white;
  padding: 20px;
  width: 500px;
  height: 700px;
  overflow: auto; /* コンテンツが長くなるとスクロール可能 */
  text-align: center;
}

.popup img {
  width: 100%;
/*  max-height: 400px;
*/  object-fit: contain;
  border-radius: 0; /* ポップアップ画像にも丸みをなくす */
}
/* ポップアップテキスト */
#popup-text {
  white-space: pre-wrap; /* 改行を有効にする */
  word-wrap: break-word; /* 長い単語が途切れるようにする */
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
	text-align: left;
}
#close-popup {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 10px;
  border-radius: 5px;
  cursor: pointer;
}

/* レスポンシブ対応(スマホ用) */
@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr); /* PCでは5列 */
  }
	.sp {
		display: none !important;
	}	
}
/* レスポンシブ対応(PC用) */
@media ( max-width: 767px ){
	.pc {
		display: none !important;
	}
}
/*　改行 */
.br-sp {
  display: none;
}
@media screen and (max-width: 768px) {
  .br-sp {
    display: inline;
  }
}