/* 全体のボディ */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* ビューポートにフィット */
    background-color: #f4f4f4;
    position: relative; /* 親要素にrelativeを指定 */
}

/* h1のスタイル */
h1 {
    position: relative;
    color: #158b2b;
    font-size: 20px;
    padding: 10px 0;
    text-align: center;
    margin: 1.5em 0;
  }
  h1:before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    width: 150px;
    height: 58px;
    border-radius: 50%;
    border: 5px solid #a6ddb0;
    border-left-color: transparent;
    border-right-color: transparent;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }

  h4 {
    position: relative;
    padding: 1rem .5rem;
    text-align: center;
    color: #ae0606;
  }
  
  h4:after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    content: '';
    border-radius: 3px;
    background-image: -webkit-linear-gradient(20deg, yellow, blue, orange, purple, green, red);
    background-image: linear-gradient(70deg, yellow, blue, orange, purple, green, red);
  }



/* 写真のグリッドレイアウト */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 900px;
    width: 100%;
    margin: 100px auto; /* 上に余白を追加してh1と重ならないように */
}

/* 各アイテムのスタイル */
.photo-item {
    text-align: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 100%;
    max-height: 200px; /* 最大高さを指定 */
    height: auto; /* 高さを自動調整 */
    object-fit: contain; /* アスペクト比を保ちながら表示 */
    object-position: center; /* 画像の中央を基準に表示 */
    display: block; /* 要素をブロック化して隙間を防ぐ */
}

/* 写真下の説明 */
.photo-item p {
    margin: 10px;
    font-size: 14px;
    color: #1414c3;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .photo-item p {
        font-size: 12px;
    }
}
