/* ========================================
   Gallery Single Page Styling
   ギャラリー個別ページ専用CSS
======================================== */

/* サイドバー削除・全幅レイアウト */
.single-gallery #main_col {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
}

.single-gallery #main_contents {
    padding-top: 0 !important;
}

.gallery-single-page {
    max-width: 1200px;
    margin: 0 auto;
}

/* ページタイトル */
.gallery-title {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
}

/* 説明文エリア */
.gallery-description {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: left;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

.gallery-description p {
    margin-bottom: 1em;
}

/* 画像グリッド */
.gallery-images-grid {
    max-width: 1200px;
    margin: 0 auto 80px;
}

.gallery-row {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    justify-content: center;
}

/* 1行目: 2枚（縦480×横640） */
.gallery-row-1 .gallery-image-item {
    flex: 0 1 50%;
    max-width: 640px;
}

.gallery-image-large {
    aspect-ratio: 640 / 480;
    overflow: hidden;
}

.gallery-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 2行目: 3枚（縦426×横426） */
.gallery-row-2 .gallery-image-item {
    flex: 0 1 33.333%;
    max-width: 426px;
}

.gallery-image-square {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.gallery-image-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 関連ブログ記事セクション */
.gallery-related-posts {
    max-width: 1200px;
    margin: 80px auto 40px;
}

.gallery-related-posts .design_headline {
    margin-bottom: 40px;
}

.gallery-related-posts .recipe_list.type2 {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-related-posts .recipe_list.type2 .item {
    flex: 1;
    max-width: calc(33.333% - 14px);
}

/* View Allボタン */
.gallery-related-posts .index_view_all_link {
    text-align: right;
    margin-top: 40px;
}

.gallery-related-posts .index_view_all_link a {
    display: inline-block;
    padding: 12px 40px;
    color: #000000;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.gallery-related-posts .index_view_all_link a:hover {
    color: #902130;
}

/* ========================================
   レスポンシブ対応
======================================== */

/* タブレット (651px〜1079px) */
@media (min-width: 651px) and (max-width: 1079px) {
    .gallery-single-page {}

    .gallery-title {
        font-size: 22px;
        margin: 30px auto;
    }

    .gallery-description {
        font-size: 15px;
        margin-bottom: 50px;
    }

    .gallery-images-grid {
        margin-bottom: 60px;
    }

    .gallery-related-posts {
        margin: 60px auto 30px;
    }
}

/* モバイル (650px以下) */
@media (max-width: 650px) {
    .gallery-single-page {}

    .gallery-title {
        font-size: 20px;
        margin: 20px auto;
    }

    .gallery-description {
        font-size: 14px;
        margin-bottom: 40px;
    }

    /* 画像を1列表示 */
    .gallery-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .gallery-row-1 .gallery-image-item,
    .gallery-row-2 .gallery-image-item {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 5px;
    }

    .gallery-row-2 .gallery-image-item:last-child {
        margin-bottom: 0;
    }

    .gallery-images-grid {
        margin-bottom: 40px;
    }

    /* 関連ブログ記事も1列 */
    .gallery-related-posts {
        margin: 40px auto 20px;
    }

    .gallery-related-posts .recipe_list.type2 {
        flex-direction: column;
        gap: 20px;
    }

    .gallery-related-posts .recipe_list.type2 .item {
        max-width: 100%;
    }

    .gallery-related-posts .index_view_all_link {
        text-align: center;
        margin-top: 30px;
    }

    .gallery-related-posts .index_view_all_link a {
        padding: 10px 30px;
        font-size: 14px;
    }
}