@charset "UTF-8";

:root {
    --main-bg: #3B2314;
}

.mw50 {
    max-width: 50% !important;
}

/* ==============================================
   1. 基本設定（ズーネット式 remスケーリング）
============================================== */
html {
    font-size: 62.5%; 
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
    scroll-behavior: smooth;
}

@media screen and (max-width: 768px) {
    html {
        font-size: calc(10 / 375 * 100vw);
    }
}

body {
    background: #fff;
    color: #333;
    text-align: center;
    font-size: 1.6rem;
    line-height: 1.5;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

.is-pc { display: block; }
.is-sp { display: none; }

@media screen and (max-width: 768px) {
    .is-pc { display: none; }
    .is-sp { display: block; }
}

/* ==============================================
   2. レイアウトの骨組み（左右固定＋中央スクロール）
============================================== */
#pc {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    box-sizing: border-box;
    z-index: 1; 
}

#pcbg {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 0;
}

/* 左右の背景パネル */
#pcbg::before,
#pcbg::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: -1;
    background-color: #fff;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center; 
}
#pcbg::before { left: 0; background-image: url('images/bg_fixed_left.webp'); }
#pcbg::after { right: 0; background-image: url('images/bg_fixed_right.webp'); }

@media screen and (max-width: 768px) {
    #pcbg::before,
    #pcbg::after {
        background-image: none !important;
    }
}

/* 中央のスクロールエリア */
#main {
    margin: 0 auto;
    width: 37.5rem;
    position: relative;
    z-index: 10; 
    background: var(--main-bg);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5); 
}

@media screen and (max-width: 768px) {
    #main {
        width: 100%; 
        box-shadow: none;
    }
}

/* --- 左右のコンテンツエリア --- */
.side-left, .side-right {
    position: absolute;
    top: 0;
    width: calc(50% - 18.75rem);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3%;
    box-sizing: border-box;
    z-index: 10;
}
.side-left { left: 0; }
.side-right { right: 0; overflow: hidden; }

.menu, .title-img {
    width: 100%;
    max-width: 35rem; 
}

/* --- 右側：ロゴと動画をまとめる親の箱 --- */
.right-content {
    width: 100%;
    max-width: 45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    z-index: 10;
}

/* --- 右側：中央のロゴ --- */
.title-img {
    width: 65%;
    max-height: 30%;
}

.title-img img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

/* --- 右側（PC版）の動画サイズ調整 --- */
.movie-wrap {
    width: 80%;
    margin: 0 auto;
}

/* YouTubeレスポンシブコンテナ */
.youtube-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9の比率 */
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto; 
}

/* ==============================================
   ★ スマホ版（SP）の動画
============================================== */
@media screen and (max-width: 768px) {

    #movie.box {
        width: 95%;
        max-width: none;
    }

    #movie .box-inner {
        padding: 0;
    }
}


/* --- 右側：キャラクター浮遊設定 --- */
.char-item {
    position: absolute;
    z-index: 5;
    animation: floating 4s infinite ease-in-out;
}
.char-item img {
    width: 100%;
    height: auto;
}

/* キャラ個別の配置 */
.c1 { width: 15rem; top: 10%; left: 10%; animation-delay: 0s; }
.c2 { width: 12rem; top: 15%; right: 10%; animation-delay: 0.5s; }
.c3 { width: 18rem; bottom: 15%; left: 5%; animation-delay: 1.2s; }
.c4 { width: 13rem; bottom: 10%; right: 5%; animation-delay: 0.8s; }
.c5 { width: 16rem; top: 45%; right: 15%; animation-delay: 2.3s; }

@keyframes floating {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-2rem) rotate(5deg); }
}

/* ==============================================
   3. ファーストビュー (MV)
============================================== */
#mv {
    width: 100%;
    margin-bottom: 4rem;
    position: relative;
    text-align: center;
}
#mv h1 { margin: 0; padding: 0; }
#mv img { width: 100%; height: auto; display: block; }


/* ==============================================
   ★ メニューの共通設定（PC・スマホ両用）
============================================== */
.title-wrap {
    max-width: 80%;
    margin: 0 auto;
    }

.menu-content {
    position: relative;
    width: 100%;
    max-width: 45rem;
    margin: 0 auto;
    aspect-ratio: 500 / 650;
}

/* 背景 */
.menu-bg-frame {
    position: absolute;
    top: 5%;
    left: 10%;
    width: 90%;
    height: 90%;
    z-index: 1;
}
.menu-bg-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* メニューの並び */
.menu-content .menulist {
    position: absolute;
    top: 0;
    left: 6%;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15%;
    box-sizing: border-box;
}

.main-menu, .sub-menu { 
    width: 70%; 
    list-style: none; 
    margin: 0 auto; 
}

.main-menu li,
.sub-menu li { 
    text-align: left;  
    margin: 0.5rem 0;
}
.main-menu li a {
     display: inline-block;
}

.sub-menu { 
    text-align: left;
}

.sub-menu li a {
     display: inline-block;
}

.main-menu li img { 
    width: 65% !important;
    height: auto !important;    
    max-width: 100% !important;
    flex-shrink: 0 !important; 
} 

.sub-menu li img { 
    width: 65% !important;
    height: auto !important; 
    max-width: 100% !important; 
}

.menu-header {
    width: 50% !important;
    height: auto !important;    
    max-width: 100% !important;
    flex-shrink: 0 !important; 
    margin: 0 auto;
}

/* ==============================================
   4. コンテンツ（箱の要素）
============================================== */
.box {
    margin: 0 auto 6rem;
    width: 34.5rem;
    position: relative;    
    box-sizing: border-box;
    scroll-margin-top: 5rem;
}
.box h2 {
    margin: 0 0 2rem;
    padding: 0;
    text-align: center;
}
.box-inner {
    text-align: center;
    width: 100%;
}
.box-inner .content-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.contact-wrap {

}

/* ==============================================
   5. スライダー
============================================== */
.overview-inner-wrap,
.facilities-inner-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.overview-bottom-wrap {
    max-width: 90%;
}

.bg-base-img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- スライダー本体の共通設定 --- */
.mapSwiper {
    position: absolute;
    z-index: 10;
    
    width: 80%;
    left: 9.2%; 
    
    height: auto;
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
    overflow: hidden; 
}

/* --- スライダーごとの縦位置（top）の個別設定 --- */
.overview-inner-wrap .mapSwiper {
    top: 68%; /* 概要の窓の位置 */
}
.facilities-inner-wrap .sw1 {
    top: 29%; /* 施設紹介（上）の窓の位置 */
}
.facilities-inner-wrap .sw2 {
    top: 66%; /* 施設紹介（下）の窓の位置 */
}

/* --- スライド内の画像・余白 --- */
.mapSwiper .swiper-slide {
    padding: 0;
    box-sizing: border-box;
}
.mapSwiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.mapSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* --- 矢印ボタンのデザインと配置 --- */
.mapSwiper .swiper-button-prev,
.mapSwiper .swiper-button-next {
    color: #fff;
    background-color: rgba(59, 35, 20, 0.8);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    margin-top: -1.5rem;
}

.mapSwiper .swiper-button-prev { 
    left: 4px; 
}
.mapSwiper .swiper-button-next { 
    right: 4px; 
}

.mapSwiper .swiper-button-prev::after,
.mapSwiper .swiper-button-next::after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* ==============================================
   ★ 施設紹介スライダー（sw1, sw2）専用の個別調整
============================================== */
.facilities-inner-wrap .swiper-slide {
    padding: 0; 
}

.facilities-inner-wrap .swiper-button-prev,
.facilities-inner-wrap .swiper-button-next {
    background-color: rgba(59, 35, 20, 0.8);
    top: 50%; 
}

.facilities-inner-wrap .swiper-button-prev { left: 4px; }
.facilities-inner-wrap .swiper-button-next { right: 4px; }

/* ==============================================
   6. 詳しくはこちら ボタン周り
============================================== */
.facilities-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    font-weight: 700;
    margin: 2rem 0;
}
.facilities-text::before,
.facilities-text::after {
    content: "";
    width: 16px;
    height: 2px;
    background: currentColor; 
    display: block;
}
.facilities-text::before { transform: rotate(45deg); }
.facilities-text::after { transform: rotate(-45deg); }

.btn-wrap {
    max-width: 70%;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s;
}
.btn-wrap:hover {
    transform: scale(1.05);
}

/* ==============================================
   7. スマホ用ハンバーガーメニュー
============================================== */
/* PCの時は強制的に非表示にする */
#menu_open.is-sp,
.menubox {
    display: none;
}

@media screen and (max-width: 768px) {
    
    /* --- ハンバーガーボタン --- */
    #menu_open.is-sp {
        display: flex; 
        position: fixed;
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        background: rgba(0, 0, 0, 0.8);
        z-index: 100;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        border-radius: 5px;
    }

    .burger-inner {
        width: 25px;
        height: 18px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .burger-inner span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s;
    }

    .menubox {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(4px); 
        z-index: 200;
        display: none; 
        justify-content: center;
        align-items: center;
    }
    .menubox.active { display: flex; }

    /* --- 閉じるボタン（×） --- */
    .btn_close {
        position: absolute;
        right: 1rem;  
        top: -2rem;
        width: 45px;
        height: 45px;
        background: #fff; 
        border-radius: 50%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        cursor: pointer;
        z-index: 100; 
    }
    
    .btn_close::before, 
    .btn_close::after {
        content: "";
        position: absolute;
        top: 50%; left: 50%;
        width: 3px; height: 20px;
        background: #3B2314; 
    }
    .btn_close::before { transform: translate(-50%,-50%) rotate(45deg); }
    .btn_close::after { transform: translate(-50%,-50%) rotate(-45deg); }


    .menu-bg-frame {
        position: absolute;
        left: 5%;
    }

    .menu-content .menulist {
        top: 0; 
        left: 0;
        padding: 15% 10%;
    }

    .main-menu li,
    .sub-menu li {
        margin: 1.3rem 0;
    }
    .sub-menu {
      
    }

    .main-menu li img {
        width: 75% !important;
    }
    .sub-menu li img {
        width: 75% !important;
    }

}

/* ==============================================
   8. フッター
============================================== */
#footer {
    padding: 0; 
    background-color: #fff;
    color: #3C2415;
    font-size: 1.2rem;
}

/* --- ページトップ画像ボタン --- */
.page-top-btn {
    display: block;
    width: 100%;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
}

.page-top-btn img {
    width: 100%;
    height: auto;
    display: block;
}

#footer .copy {
    margin: 0;
}

/* seo */
.visually-hidden,
.title span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

/* --- 練習問題クイズエリア --- */
.quiz-container {
    position: relative;
    width: 100%;
}

.quiz-overlay {
    position: absolute;
    top: 85%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* 入力欄のデザイン */
#quiz-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.8rem;
    border: 2px solid #3B2314;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
}

/* ボタンのデザイン */
#quiz-btn {
    padding: 0.8rem 2rem;
    background-color: #3B2314;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.2s;
}
#quiz-btn:active { transform: scale(0.95); }

/* 正解・不正解の文字 */
#quiz-result {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 1rem;
    min-height: 2.4rem;
}
.correct { color: #d32f2f; } /* 正解（赤） */
.incorrect { color: #2196f3; } /* 不正解（青） */

/* ==============================================
   ★ クイズ結果モーダル（ポップアップ）
============================================== */
/* 初期状態：非表示 */
.modal-overlay {
    display: none; /* JSでflexにします */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* 背景を暗く */
    z-index: 9999; /* 他の要素より手前に */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* 背景を少しぼかす */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* モーダル表示時のクラス */
.modal-overlay.is-open {
    display: flex;
    opacity: 1;
}

/* 画像コンテナ */
.modal-content {
    position: relative;
    width: 90%; /* スマホ基準 */
    max-width: 500px;

    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* 閉じるボタン（×） */
.modal-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10;
}
.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 3px; height: 20px;
    background: #3B2314;
}
.modal-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.modal-close::after { transform: translate(-50%,-50%) rotate(-45deg); }

/* --- アニメーション定義 --- */
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.1); } /* 一瞬少し大きくする */
    100% { transform: scale(1); opacity: 1; }
}