body {
    font-family: "Noto Sans JP", sans-serif;
}

header {
    width: 600px;
    max-width:100%;
     margin: 0 auto;
}

main {
    width:1200px;
    max-width: 100%;
    margin: 0 auto;
}

header .row {
    display: flex;
    font-size: 36px;
    justify-content: center;    /* 中央に置く*/
    font-weight: 700;
    letter-spacing: 3px;    /* 文字間隔を広げる*/
    margin: 30px;
    gap: 100px;             /*テキストの中央寄せ」*/ 
}

.img-grid {
    display: grid;         /*       */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    padding: 20px;
}

.item {
    display: flex;
    align-items: center;
    border: 2px solid #b99b9b;
    padding: 10px;
    background-color: #efe5e5;
}

.item img {
    width: 150px;
    height: auto;
    margin-right: 15px;
    object-fit: cover;
}

.description h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
}

.description p {
    margin: 0 0 4px 0;
    font-size: 12px;
}

.image-grid {
    display: flex;      /* フレックスボックスを使用する　*/
    flex-wrap: wrap;    /* 折り返しを有効にする　*/
    gap: 10px;          /* 画像間の隙間　*/
    margin-bottom: 45px; 
}

.image-grid img {
    width: calc(33.33% - 10px);     /*画像の幅を計算する　*/
    height: auto;                   /* アスペクト比を維持　*/
    object-fit: cover;              /* 画像が歪まないように調整　*/
   
 }


 /* 画像を縦横に並ばせる 画像の中にテキストを入れる */


.image-griditem {
    display: flex;      /* フレックスボックスを使用する */
    flex-wrap: wrap;    /* 折り返しを有効にする */
    gap: 10px;          /* 画像（アイテム）間の隙間 */
    margin-bottom: 45px;
}

/* 画像とテキストを包む親要素 */
.image-griditem .grid-item {
    position: relative; /* 子要素（テキスト）の配置の基準にする */
    width: calc(33.33% - 10px); /* 横に3つ並ぶように幅を計算 */
    height: 250px;      /* 画像の高さを統一（お好みで調整してください） */
    overflow: hidden;   /* 枠からはみ出た部分を隠す */
   }

/* 画像自体の設定 */
.image-griditem .grid-item img {
    width: 100%;        /* 枠いっぱいに広げる */
    height: 100%;       /* 枠いっぱいに広げる */
     object-fit: cover;  /* 画像が歪まないように調整 */
   }

/* 画像の上に重ねるテキストの黒い帯（マスク） */
.image-griditem .overlay-text {
    position: absolute; /* 親要素を基準に絶対配置 */
    bottom: 0px;          /* 画像の下側に配置 */
    left: 0;
    width: 100%;        /* 横幅いっぱい */
    background: rgba(0, 0, 0, 0.6); /* 黒色の透過背景（文字を読みやすくするため） */
    color: #fff;        /* 文字色を白に */
    padding: 10px;      /* 内側の余白 */
    box-sizing: border-box;
   }

/* 重ねるテキストの文字サイズ調整 */
.image-griditem .overlay-text h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.image-griditem .overlay-text p {
    font-size: 11px;
    line-height: 1.4;
}

/* ===================================================
   エリア3：画像の下（外）にテキストを並べるスタイル 
=================================================== */

.area3-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 10px;    /* 縦の隙間を20px、横の隙間を10pxに */
    margin-bottom: 45px;
}

/* 1つのグループの横幅だけ指定 */
.area3-grid .grid-item {
    width: calc(33.33% - 10px);
}

/* 画像の高さだけ固定して綺麗に揃える */
.area3-grid .grid-item img {
    width: 100%;
    height: 200px;     /* エリア3用の画像の高さ */
    object-fit: cover;
    margin-bottom: 8px; /* 画像と下の文字の間に少し隙間を作る */
}

/* 画像の外に出るので、文字は読みやすい黒色に */
.area3-grid .overlay-text h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.area3-grid .overlay-text p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* フッター */


footer {
    margin: 0 auto;
    width: 200px;
    background-color: rgb(21, 81, 81);
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
}