/* --- ベーススタイル --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: "ふい字";
    background-image: url(../img/bk1.png);
}

h1 {
    padding-bottom: 40px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 機能制御用の非表示チェックボックス */
.hidden-checkbox {
    display: none;
}

/* --- 透過メニューバー (サイドバー) --- */
.sidebar-menu {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    background-color: rgba(230, 240, 255, 0.95);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.4s ease-in-out;
    padding-top: 50px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    /* 修正点: メニューバー内のコンテンツをブロック要素として整列させる */
    display: block;
}

/* ⚠️ メニュー開閉のロジック: チェックボックスがONになったらメニューの幅を広げる */
#menu-toggle:checked~.sidebar-menu {
    width: 250px;
}

.menu-header {
    padding: 20px 15px 10px;
    font-size: 18px;
    font-weight: bold;
    color: #3b5066;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.menu-list {
    list-style: none;
    padding: 20px 0;
}

.menu-list a {
    font-family: "ふい字";
    padding: 10px 15px;
    font-size: 23px;
    color: #3b5066;
    display: block;
    transition: 0.3s;
}

.close-btn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    color: #3b5066;
    cursor: pointer;
}

/* --- メインコンテンツ --- */
.main-container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px 80px;
    position: relative;

}

/* --- タイトル部分 --- */
.title-area {
    margin-bottom: 40px;
    position: relative;
    /* ⚠️ 修正点: 左パディングを0に変更 (雲アイコンが占めるスペースの調整を解除) */
    padding-left: 0;
    display: flex;
    /* 修正点: コンテンツを中央に配置 */
    justify-content: center;
    align-items: center;

}

.cloud-icon {
    /* 雲アイコンは absolute で左端に固定 */
    position: absolute;
    left: 0;
    top: -15px;
    background-color: transparent;
    border: 1px solid rgba(204, 238, 255, 0.8);
    padding: 5px 20px;
    border-radius: 20px 20px 10px 10px;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.3);
    color: #3b5066;
    font-weight: bold;
    font-size: 18px;
    white-space: nowrap;
    cursor: pointer;
}

wf-roundedmplus1c {
    font-family: "M PLUS Rounded 1c";
}

.sakuhinmain-title {
    /* ⚠️ 修正点: h1要素の幅を fit-content に設定し、flexboxで親要素の中央に配置させる */
    width: fit-content;
    font-size: 45px;
    font-weight: bold;
    font-family: "M PLUS Rounded 1c";
    text-align: center;
    color: #deb887;

}

@media screen and (max-width: 768px) {
    .sakuhinmain-title {
        font-size: 26px;
        margin: 0 auto;
    }

}

/* --- TOPボタン --- */
.to-top {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background-color: transparent;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: #007bff;
    font-weight: bold;
    font-size: 14px;
    transform: rotate(-15deg);
    opacity: 0.8;
}

.to-top::after {
    /* 紙飛行機の形状を疑似要素で表現 */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(15deg);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #a8e0ff;
    opacity: 0.5;
    z-index: -1;
}

/* --- 📱 レスポンシブ対応 (スマートフォン/タブレット向け: 768px以下) --- */
@media (max-width: 768px) {

    .main-container {
        margin: 40px 10px;
        padding: 0 10px 60px;
    }

    /* タイトル中央寄せ */
    .title-area {
        padding-left: 0;
        display: block;
        text-align: center;
        margin-bottom: 30px;
    }

    .cloud-icon {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
        font-size: 16px;
        padding: 4px 15px;
        transform: none;
    }

    .main-title {
        font-size: 28px;
    }

    /* TOPボタンの位置調整 */
    .to-top {
        right: 10px;
        bottom: 10px;
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 12px;
    }

    .to-top::after {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 16px solid #a8e0ff;
    }

    /* 拡大表示時の調整 */
    .modal-content {
        /* スマホでは画面いっぱいに広げる */
        width: 95%;
        margin-top: 50%;
    }
}

/* 虹色ホバー */
.overlay-menu ul li a:hover {
    background: linear-gradient(90deg, #0ea19a, #6c75c5, #eb64c9);
    -webkit-background-clip: text;
    color: transparent;
}

/* ギャラリーページ */
.hes-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: 10px;
    padding: 10px;
    columns: 4;
}

.hes-gallery img {
    width: 100%;
    object-fit: cover;
    transition: 0.3s;
    cursor: pointer;
}

@media (max-width: 800px) {
    header img {
        width: 80%;
        object-fit: contain;
    }

    .hes-gallery {
        grid-template-columns: 1fr 1fr;
    }
}

/* 中吊りレイアウト */
.naka-grid {
    display: grid;
    width: 60vw;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;

}

@media (max-width: 768px) {
    .naka-grid {
        display: grid;
        /* width: 80vw; */
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
        /* margin-left: -15vw; */
        margin: 0 auto;
    }
}