/* 基本的なリセットとフォント設定 */
body {
    font-family: 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    margin: 0;
    /*padding: 20px;*/
    background-color: #f4f4f4;
    color: #333;
}

h1 {
    text-align: center;
    color: #1a5c9a;
    margin-bottom: 40px;
}

/* リフォーム事例のセクション */
.reform-case {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.reform-case h2 {
    color: #3873ba;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 0;
}

/* 画像ギャラリーのコンテナ（レスポンシブの核となる部分） */
.image-gallery {
    display: grid;
    /* デフォルトでは、小さな画面向けに1列のレイアウト */
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
}

/* 画像アイテム */
.image-item {
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.image-item h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.image-item img {
    /* 画像が親要素の幅に合わせて伸縮し、はみ出さないようにする */
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    /* オブジェクトフィットで画像のトリミングを防ぎ、一貫した高さにしたい場合は設定しても良い */
    /* object-fit: cover; 
       height: 300px; */ 
}

/* BeforeとAfterのタイトルカラー */
.image-item.before h3 {
    color: #c0392b; /* 赤系 */
}

.image-item.after h3 {
    color: #27ae60; /* 緑系 */
}

.description {
    line-height: 1.6;
    margin-top: 10px;
    background-color: #f9f9f9;
    padding: 15px;
    border-left: 5px solid #3873ba;
    border-radius: 4px;
}

.enlarge-image {
    width: 100%;   /* 親要素の幅いっぱいに広がる */
    max-width: none; /* 最大幅の制限をなくす（元のサイズ以上に拡大を許可） */
    height: auto;  /* 縦横比を維持する */
}

/* ------------------------------------------- */
/* メディアクエリ（レスポンシブ対応）          */
/* ------------------------------------------- */

/* 画面幅が600px以上のとき（タブレット・PCなど） */
@media (min-width: 600px) {
    .image-gallery {
        /* 2つの画像を横に並べる */
        grid-template-columns: 1fr 1fr;
    }
}

/* 画面幅が960px以上のとき（より大きなPC画面） */
@media (min-width: 960px) {
    body {
        /* コンテンツの最大幅を設定し、中央に寄せる */
/*
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding: 40px;
*/
    }
}