@charset "utf-8";

/* --- 1. 全体リセットと基本設定 --- */
body, h1, h2, p, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "メイリオ", Meiryo, sans-serif;
    background-color: #99f5b4;
    line-height: 1.6;
}

/* --- 2. キービジュアル（画面上部に完全固定） --- */
.key-visual {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 10000; /* 最前面 */
    background: url(../images/sky_park.png) center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
    /* 重要：画像背後の要素をクリック可能にする */
    pointer-events: none; 
}

.key-visual .inner {
    pointer-events: auto; /* 文字部分はクリック可能に */
    text-align: center;
}

.key-visual h1 {
    font-size: 3.0rem;
    margin-bottom: 5px;
}

.key-visual p {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- 3. サイドメニュー（左側に完全固定） --- */
header ul {
    width: 120px;
    position: fixed;
    left: 0;
    top: 180px; /* キービジュアルの高さ分下げる */
    height: calc(100vh - 180px);
    background: #07f34e;
    list-style: none;
    z-index: 5000;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

header ul li {
    text-align: center;
    list-style: none;
}

header ul li a {
    color: #000;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    display: block;
    padding: 5px;
    text-shadow: 
    1px 1px 0 #fff, /* 右下に1pxずらした影 */
    -1px 1px 0 #fff, /* 左下に1pxずらした影 */
    1px -1px 0 #fff, /* 右上に1pxずらした影 */
    -1px -1px 0 #fff; /* 左上に1pxずらした影 */
}

header ul li a:hover {
    color: #fffef0;
    background-color: #666;
    text-shadow: none;
}


/* --- 4. メインコンテンツ（右側に寄せる） --- */
main {
    margin-left: 140px; /* サイドメニュー幅(120px) + 余白 */
    margin-top: 200px;  /* キービジュアル高さ(180px) + 余白 */
    padding-right: 20px;
    position: relative;
    z-index: 1;
    background-color: #99f5b4;
}

.box-item {
    background: #fff;
    margin-bottom: 40px;
    padding: 20px;
    /* アンカーリンクで飛んだ時に画像に隠れないための設定 */
    scroll-margin-top: 200px;
    background: #fff;
    margin-bottom: 40px;
    padding: 20px;
    /* ↓ここを追加：ふんわりした影 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-radius: 8px; /* 角をほんの少し丸くすると、グッと優しくなります */
    max-width: 900px; /* 横幅を制限する（広すぎないように） */
    margin-left: auto;
    margin-right: auto;
}

.box-item h2 {
    font-size: 1.0rem;
    margin-bottom: 15px;
    text-align: center;
}

.box-item img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin-bottom: 20px;
    border: 1px solid #07f34e;
    padding: 5px;       /* 額縁風の余白 */
    background: #ddd;
}
.box-item p {
    text-align: center;
    
    color: #666;
    font-style: italic;
}

/* --- 5. 作品内のタブメニュー（4枚均等・横並び） --- */
.tab {
    
    width: 100% ;
    list-style: none ;
    margin: 20px 0 0 0 ;
    padding: 0 ;
    position: relative ;
    z-index: 10 ;
}

.tab li {
    flex: 1; /* 4枚の幅を均等にする */
    margin-right: 2px;
    list-style: none ;
}

.tab li a {
    display: flex ;
    align-items: center;
    justify-content: center;
    height: 40px;           /* 高さを低くしました */
    padding: 2px ; /* 余白をほぼゼロに */
    font-size: 10px ; /* 最小クラスのサイズに設定 */
    line-height: 1.1;
    text-align: center;
    background: #ccc ;
    color: #fff ;
    text-decoration: none ;
    border-radius: 4px 4px 0 0;
}

/* 選択されているタブ（JavaScriptでselectedクラスが付きます） */
.tab li a.selected {
    background: #07f34e ;
    color: #000 ;
    font-weight: bold;
}

/* --- 6. タブパネル（中身） --- */
.panel {
    display: block;
    list-style: none ;
    margin: 0 ;
    padding: 0 ;
    border: 2px solid #07f34e ;
    background: #fffef0 ;
    position: relative ;
}

.panel li {
    display: none; /* JS切り替え用 */
    padding: 20px 20px 40px; /* 下側にガイド用の余白 */
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    letter-spacing: 0.05em;
    white-space: pre-wrap;

    /* ▼ クリック開閉の設定 */
    cursor: pointer;
    overflow: hidden;
    max-height: 120px; /* 最初に見せる高さ */
    transition: max-height 0.5s ease; /* スムーズに動かす */
    position: relative;
}

/* 一つ目だけ表示（高さ制限は維持） */
.panel li:first-child {
    display: block;
}

/* 開いた時の状態 */
.panel li.is-open {
    max-height: 2000px; /* 全開 */
}

/* 閉じている時の「続きを読む」ガイド */
.panel li:not(.is-open)::after {
    content: "▼ クリックで全て表示";
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    height: 60px;
    background: linear-gradient(transparent, rgba(255,254,240,0.9) 70%);
    color: #07f34e;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
}


/* --- 1. 【スマホ版】399px以下：拡大あり・縦並び --- */
@media screen and (max-width: 399px) {
    .imggroup p {
        display: block;
        text-align: center;
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    .box-item img {
        transition: transform 0.3s ease;
        cursor: pointer;
        display: block;
        margin: 0 auto;
        width: 100%;
    }
    .box-item img.is-active {
        transform: scale(1.4) ;
        position: relative;
        z-index: 9999;
    }
    .box-item {
        overflow: visible ;
    }
    .panel li {
    line-height: 1.8;      /* 行間を広げてゆとりを出す */
    letter-spacing: 0.03em; /* 文字の間隔をわずかに広げる */
    }

/* 箇条書きや改行（br）の後に少し隙間を作る */
.panel li br {
    display: block;
    content: "";
    margin-top: 10px;
}
}

/* --- 2. 【中間サイズ】400px〜799px：拡大なし・縦並び（文字崩れ防止） --- */
@media screen and (min-width: 400px) and (max-width: 949px) {
    .imggroup {
        display: block;
        text-align: center;
    }
    .imggroup h2 {
        display: block;
        margin-bottom: 15px;
        font-size: 1.2rem;
    }
    .box-item img {
        display: block;
        margin: 0 auto;
        width: 80%;
        max-width: 400px;
        transform: none ;
        cursor: default;
    }
    .imggroup p {
        display: none ;
    }
}

/* --- 3. 【PC・タブレット横版】950px以上：拡大なし・横並び・中央配置 --- */
@media screen and (min-width: 950px) {
    .box-item {
        height: auto ;      /* 固定値(500px)を解除 */
        display: flex;
        text-align: center;
        background: #fff;
        padding: 10px 20px; /* 全表示になるので、上下の余白を少し広げる */
        border: dashed 5px #07f34e;
        margin-bottom: 80px; /* 次のボックスとの間隔を広くする */
        scroll-margin-top: 120px;
    }

    .box-item h2 {
    color: #333;
    text-shadow: 1px 1px 0 #fff, 2px 2px 0 #07f34e; /* 文字の後ろにグリーンの影を少しずらして出す */
    font-size: 1.5rem; /* PC版なら少し大きくしてもOK */
    }

    /* 拡大を完全に禁止 */
    .box-item img, .imggroup img, .imggroup img.is-active {
        transform: none ;
        cursor: default ;
        transition: none ;
        position: static ;
    }

    .imggroup p { display: none ; }/* 表示させない */

/* 画像のかたまり */
     .imggroup {
        margin-top: 8px;
        margin-right: 20px;
    }

    .imggroup h2 {
        margin: 30px;
        font-size: 1.2rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .imggroup img {
        width: auto ;
        max-width: 400px;
        height: auto ;
    }

    /* タブ（li）を均等に揃え、パネルと幅を一致させる */
    .box-item .tab {
        display: flex ;
        width: 100% ;
        max-width: 600px ;
        margin-bottom: 5px;
        padding: 0 ;
        list-style: none ;
        align-items: flex-end; /* 下のラインを揃える */
    }

    .box-item .tab li {
        flex: 1 ;
        margin: 0 1px ; /* ボタン同士の境目 */
    }

    .box-item .tab li a {
        /* 文字をど真ん中に配置するための設定 */
        display: flex ;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        padding: 5px;
        min-height: 45px;   /* ボタンの高さ */
        height: auto;
        font-size: 14px ;  /* 文字を大きく */
        font-weight: bold;
        text-decoration: none;
        color: #fff;
        background: #ccc ; /* 未選択時の色 */
        border-radius: 5px 5px 0 0;
        text-align: center;
        width: 100% ;
    }

    /* 選択されている時の色 */
    .box-item .tab li a.selected {
        background: #07f34e ;
        color: #000 ;
        height: 60px; /* 選択中だけ少し高くする */
        border: #ccc solid 2px;
    }

    .box-item .panel {
        width: 100% ;
        max-width: 600px ;
        margin: 0 auto ;
        text-align: left;
    }

/* 右側のエリア自体に「中身が減っても縮むな」と命令する */
.sidbaer {
    flex: 1;      /* 残りの幅を全部使う */
    min-width: 0; /* ← これが重要！中身の少なさに引きずられなくなる */
}

/* パネルの箱自体にも幅・たてを確保させる */
.box-item .panel li {
    width: 100%;
    min-height: 350px;
}


    /* メニュー・ビジュアル固定設定 */
    .key-visual {
        height: 100px;
        position: fixed;
        top: 0; left: 0; width: 100%;
        z-index: 10000;
        background: url(../images/base.jpg) center/cover no-repeat;
        display: flex; justify-content: center; align-items: center;
        font-size: 2rem;
    margin: 0;
    color: #fff;
    /* 境界線を追加 */
    text-shadow: 
        2px  2px 0 #07f34e,
       -2px  2px 0 #07f34e,
        2px -2px 0 #07f34e,
       -2px -2px 0 #07f34e;
       padding-bottom: 10px;
    }
    header ul {
        top: 100px;
        height: calc(100vh - 100px);
        position: fixed;
        width: 120px;
    }
    main {
        margin-left: 140px;
        margin-top: 120px;
    }

/* --- 共通・フッター設定 --- */
html { scroll-behavior: smooth; }

#wrap { padding-bottom: 50px; }

footer {
    text-align: center;
    z-index: 9999;
    margin-left: 140px;
    padding: 20px 0;
    position: relative;
}
}

/* スマホ・タブレット（800px未満）はフッターの余白を消す */
@media screen and (max-width: 799px) {
    footer {
        margin-left: 0;
        position: relative;
        z-index: 20000;
        background-color: transparent;
        text-align: center;
    }
}
