/* --- 2. メインビジュアル（トップのスライドショー） --- */
.main-visual { 
    width: 100%; height: 600px; 
    overflow: hidden; position: relative;
}
.mySwiper, .mySwiper .swiper-slide img { 
    width: 100%; height: 100%; object-fit: cover; 
}



/* 重なるレイヤー全体 */
* 装飾レイヤー：スライドの上に透明な膜を張るイメージ */
.mv-decoration-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* これで下の要素やスライドの邪魔をしません */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* スライドショー自体の重なりを低く設定 */
.mySwiper {
    z-index: 1 !important;
}

/* 装飾レイヤーをスライドより上に */
.mv-decoration-layer {
    pointer-events: none; /* これがないと下のボタンが押せなくなります */
}

/* コピー画像の中央配置 */
.mv-copy-img {
    position: absolute;
    bottom: 5%;
    left: 5%;
    width: 60%;
    max-width: 500px;
    z-index: 60; /* スライドより上 */
}

/* イラストの配置を確定させる */
.deco {
    position: absolute;
    z-index: 55;
    width: 45px;
    height: auto;
}

/* 配置（%で指定） */
.i1 { top: 25%; left: 10%; }
.i2 { top: 20%; right: 15%; }
.i3 { top: 50%; left: 45%; }
.i4 { top: 45%; right: 8%; }
.i5 { bottom: 40%; left: 25%; }
.i6 { bottom: 70%; left: 60%;}
.i7 { bottom: 10%; right: 25%; }


/* SNSリンクのコンテナ */
.mv-sns-links {
    position: absolute;
    bottom: 40px;
    right: 30px;
    z-index: 100;
    display: flex;
    flex-direction: column; 
    gap: 15px;
    pointer-events: auto;
}

/* 各アイコンのスタイル */
.sns-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 28px;
}

.sns-icon:hover {
    transform: scale(1.2);
}

/* アイコン内のテキスト（非表示） */
.sns-icon span {
    display: none;
}

/* スマホではイラストを減らす */
@media (max-width: 768px) {
    .deco { width: 35px; }
    .i3, .i2, .i7 { display: none; }
    .mv-copy-img { 
		width: 75%;
		margin: 0 auto;
	}
    .mv-sns-links {
        bottom: 30px;
        right: 20px;
        gap: 15px;
    }
    .sns-icon i {
        font-size: 24px;
    }
}



/* --- 3. Facebook カルーセルセクション --- */

/* セクション外枠 */
.fb-carousel-section {
    padding: 60px 0;
    background: #fff;
    overflow: hidden;
    min-height: 300px; /* Safariでの高さ確保 */
}

/* Swiper本体：初期状態のガタつき防止 */
.fbSwiper {
    padding: 10px 50px 40px !important;
    width: 100%;
    display: flex;       /* JS実行前から横並びを維持 */
    overflow: hidden;
    opacity: 0;          /* 計算完了まで隠す */
    transition: opacity 0.4s ease;
}

.fbSwiper.swiper-initialized {
    opacity: 1;          /* JS実行後に表示 */
}

/* スライド：JS実行前の仮サイズ固定 */
.fbSwiper .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: calc(100% / 5.2); /* PC表示のslidesPerViewに合わせる */
}

.fbSwiper.swiper-initialized .swiper-slide {
    width: auto;         /* 初期化後の横幅 */
}

/* カードデザイン：外枠 */
.fb-carousel-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--main-green);
    border: 1px solid var(--main-green);
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    /* Safari 角丸はみ出し対策 */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.fb-carousel-card:hover {
    transform: translateY(-5px);
}

/* 画像コンテナ：正方形維持 */
.fb-square-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #fff;
    overflow: hidden;
    transform: translateZ(0); /* Safariチラつき防止 */
}

.fb-square-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* 古いSafari用のaspect-ratioフォールバック */
@supports not (aspect-ratio: 1 / 1) {
    .fb-square-container::before {
        content: "";
        display: block;
        padding-top: 100%;
    }
}

/* カード内タイトル */
.fb-overlay-title {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    width: 85%;
    padding: 0;
    text-align: center;
    z-index: 2;
}

.fb-overlay-title span {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 6px 10px;
    max-width: 100%;
    line-height: 1.4;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* カード全体リンク */
.abs-link {
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* ページネーション（ドット） */
.fb-pagination {
    position: relative !important;
    text-align: center;
    margin-top: 20px;
    margin-left: -50px;
    bottom: 0 !important;
}

.fb-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    margin: 0 6px !important;
}

.fb-pagination .swiper-pagination-bullet-active {
    background: var(--main-green) !important;
}

/* --- モバイル対応（768px以下） --- */
@media (max-width: 768px) {
    .fbSwiper {
        padding: 10px 20px 40px !important;
    }

    .fbSwiper .swiper-slide {
        width: calc(100% / 2.2); /* スマホ表示のslidesPerViewに合わせる */
    }

    .fb-carousel-card {
        border-width: 2px;
    }

    .fb-overlay-title {
        bottom: 5px;
    }

    .fb-overlay-title span {
        font-size: 0.8rem;
        padding: 4px 6px;
        max-width: 95%;
    }
}

/* --- 4. メニューボタン（ナビブロック） --- */
.top-nav-blocks { 
	padding: 50px 0 100px;
}

.block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.nav-block {
    background: var(--accent-green);
    border: 2px solid var(--accent-green);
    border-radius: 12px;
    overflow: hidden;
	position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.nav-block:hover { 
	transform: translateY(-5px);
}

.block-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #fff;
}

.block-img img {
    width: 100%; 
	height: 100%; 
	object-fit: cover;
}

.block-txt {
    padding: 5px 15px;
	flex-grow: 1;
    display: flex;
	flex-direction: column;
	gap: 0;
}

.block-title { 
	margin: 14px auto 0; 
	font-size: 1rem; 
	color: var(--main-green); 
	font-weight: bold;
	line-height: 1.2; /* 行高をタイトにする */
}

.block-txt p {
    font-size: 0.85rem;
    margin: 0;
    display: -webkit-box;
	overflow: hidden;
}

.abs-link { 
	position: absolute; 
	top: 0; 
	left: 0; 
	width: 100%; 
	height: 100%; 
	z-index: 10; 
}

/* --- 5. レスポンシブ --- */
@media (max-width: 768px) {
    .block-grid {
        grid-template-columns: 1fr 1fr; /* 1frから変更 */
        gap: 15px;
        padding: 0 15px;
    }

    .nav-block {
        /* スマホでは画像が大きくなりすぎないよう、横長の比率に調整 */
        flex-direction: column; 
    }

    .block-img {
        aspect-ratio: 4 / 3; /* 1カラム時は少し横長にすると収まりが良い */
    }

.block-title { 
	margin: 8px auto 0; 
	font-size: 0.85rem; 
	color: var(--main-green); 
	font-weight: bold;
	}

	.block-txt {
        font-size: 0.75rem;
        text-align: center;
        padding: 5px;
    }

    .block-txt p {
        display: -webkit-box !important; /* 強制的に表示 */
        /* -webkit-line-clamp: 2;  2行まで表示 */
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-top: 2px;
        line-height: 1.6;
    }
}