/* Custom styles for M PLUS Rounded 1c and base font */
body {
    font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
    /* Prioritize M PLUS Rounded 1c */
    background-color: #f8f8f8;
    /* Soft white base */
    color: #333;
}

/* Accent colors */
.text-accent {
    color: #EA580C;
}

.bg-accent {
    background-color: #EA580C;
}

.border-accent {
    border-color: #EA580C;
}

/* Parallax effect for hero section */
.parallax-bg {
    background-image: url('image/haikei_1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Scroll animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Event card hover effect */
.event-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.event-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.event-card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

.event-card-details.is-expanded {
    max-height: 500px;
    /* Adjust as needed */
    opacity: 1;
}

/* Fixed CTA button for mobile */
.fixed-cta-button {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 2rem);
    max-width: 400px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --- ▼▼▼ ハンバーガーメニューのスタイル ▼▼▼ --- */

/* メニューのコンテナ (オーバーレイとしても機能) */
aside {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    background-color: transparent;
    transition: background-color 0.4s ease-in-out;
}

input[type="checkbox"]:checked~aside {
    pointer-events: auto;
}

.aside-section {
    top: 0;
    bottom: 0;
    position: fixed;
}

.aside-left {
    display: none;
}

.aside-right {
    width: 100%;
    right: 0;
    background-color: #EA580C;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    /* ▼▼▼ モバイル向け修正 ▼▼▼ */
    height: 100%;
    /* 高さを100%に指定 */
    overflow-y: auto;
    /* 縦にコンテンツがはみ出たらスクロールさせる */
    padding-bottom: 50px;
    /* スクロールした際に下部に余白を作る */
    box-sizing: border-box;
    /* paddingを含めて高さを計算する */
}

.aside-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* ▼▼▼ モバイル向け修正 ▼▼▼ */
    margin-top: 120px;
    /* 上の余白を少し縮める */
    text-align: left;
    padding-left: 50px;
}

.aside-list li {
    /* ▼▼▼ モバイル向け修正 ▼▼▼ */
    margin-bottom: 18px;
    /* 各項目の下の余白を少し縮める */
}

.aside-anchor {
    padding-bottom: 7px;
    color: #fff;
    text-decoration: none;
    /* ▼▼▼ モバイル向け修正 ▼▼▼ */
    font-size: 26px;
    /* 文字サイズを少し縮める */
    position: relative;
    font-weight: 500;
    display: inline-block;
}

.aside-anchor::after {
    content: "";
    position: absolute;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px;
}

.aside-anchor::before {
    border-radius: 3px;
    content: "";
    position: absolute;
    bottom: 0;
    background-color: #fff;
    left: 0;
    height: 3px;
    z-index: 1;
    width: 0;
    transition: width 0.3s ease-in-out;
}

.aside-anchor:hover::before {
    width: 100%;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked~aside .aside-right {
    transform: translateX(0%);
}

/* アイコンのスタイル */
label[for="myInput"] {
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 7px 10px;
    cursor: pointer;
    margin: 10px;
    z-index: 1001;
    position: fixed;
}

.bar {
    display: block;
    background-color: #EA580C;
    width: 30px;
    height: 3px;
    border-radius: 5px;
    margin: 5px auto;
    transition: all 0.4s ease-in-out;
}

input[type="checkbox"]:checked~label .bar {
    background-color: #fff;
}

input[type="checkbox"]:checked~label .top {
    transform: translateY(8px) rotateZ(45deg);
}

input[type="checkbox"]:checked~label .bottom {
    transform: translateY(-8px) rotateZ(-45deg);
}

input[type="checkbox"]:checked~label .middle {
    width: 0;
}

/* PC版での表示調整 (992px以上) */
@media (min-width: 992px) {
    input[type="checkbox"]:checked~aside {
        background-color: rgba(0, 0, 0, 0.5);
    }

    .aside-right {
        width: 450px;
        padding-bottom: 0;
        /* PC版では不要なのでリセット */
    }

    .aside-list {
        margin-top: 120px;
        padding-left: 60px;
    }

    .aside-anchor {
        font-size: 24px;
    }
}

/* --- ▼▼▼ ロゴスクロールアニメーションのスタイル（デュアルトラック版） ▼▼▼ --- */

/* アニメーションの定義: 左へスクロール */
@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* アニメーションの定義: 右へスクロール */
@keyframes scroll-right {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* 2つのトラックを横並びにするためのラッパー */
.scrolling-wrapper {
    display: flex;
    width: 100%;
    overflow: hidden;
    /* 左右を自然にフェードさせるためのマスク */
    -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

/* 実際に動くロゴの列 */
.scrolling-track {
    display: flex;
    flex-shrink: 0;
    /* トラックが縮まないようにする */
    min-width: 100%;
    /* トラックの最小幅を画面幅と同じにする */
    /* アニメーションを適用 */
    animation: scroll-left 40s linear infinite;
}

/* 逆方向のトラック */
.scrolling-track.reverse {
    animation-name: scroll-right;
}

/* 各ロゴのスタイル */
.sponsor-logo {
    height: 60px;
    margin: 0 32px;
    flex-shrink: 0;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* マウスホバーで少し目立たせる */
.scrolling-wrapper:hover .sponsor-logo {
    opacity: 0.5;
}

.scrolling-wrapper .sponsor-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* --- ▼▼▼ ヘッダーのスクロール時のスタイル ▼▼▼ --- */

/* ヘッダーの背景色や影の変化を滑らかにするための設定 */
header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* スクロール時にヘッダーに付与される`.scrolled`クラスのスタイル */
header.scrolled {
    /* 半透明の白色を指定 (0.85の部分で透明度を調整) */
    background-color: rgba(255, 255, 255, 0.85);
    /* すりガラスのような効果を追加 (対応ブラウザのみ) */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    /* 影を少し調整して立体感を出す */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --- ▼▼▼ カード内スライドショー用のスタイル ▼▼▼ --- */

/* JavaScriptによって追加される .active クラスで、画像を表示状態にする */
.image-slideshow .slide.active {
    opacity: 1;
}

/* --- ▼▼▼ Z世代カンファレンス スライドショー ▼▼▼ --- */
.slideshow-container {
    position: relative;
    overflow: hidden;
    /* 高さはHTML側の 'h-80' (Tailwind) で制御 */
}

/* スライド画像 */
.slideshow-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.0s ease-in-out;
    visibility: hidden;
    /* 非表示中は完全に隠す */
}

/* 表示中のスライド */
.slideshow-container .slide.active {
    opacity: 1;
    position: relative;
    /* activeなスライドだけが高さを確保する */
    visibility: visible;
}

/* スライドショードット (丸いボタン) のコンテナ */
.slideshow-dots {
    position: absolute;
    bottom: 16px;
    /* 下から16pxの位置 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    /* ドット間の隙間 */
}

/* ドットのスタイル */
.slideshow-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    /* 半透明の白 */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* アクティブなドットのスタイル */
.slideshow-dots .dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slideshow-dots .dot.active {
    background-color: #EA580C;
    /* アクセントカラー */
}

/* --- ▼▼▼ レポート全文表示のアニメーション ▼▼▼ --- */
.full-report-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.full-report-content.is-expanded {
    max-height: 1500px;
    /* 十分な高さを確保 */
    opacity: 1;
}

/* --- ▼▼▼ ほぼいえクエスト 近日公開セクション ▼▼▼ --- */

/* セクション全体 */
.quest-announcement-section {
    position: relative;
    width: 100%;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('image/bg-map.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* オーバーレイ */
.quest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(15, 10, 40, 0.55) 50%,
            rgba(0, 0, 0, 0.45) 100%);
    z-index: 1;
}

/* テキストコンテンツ */
.quest-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1.5rem;
}

/* サブタイトル */
.quest-subtitle {
    color: #FFD700;
    font-size: 0.95rem;
    letter-spacing: 0.5em;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* メインタイトル */
.quest-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quest-title-main {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-shadow:
        2px 2px 0 #1a1a2e,
        -1px -1px 0 #1a1a2e,
        0 0 15px rgba(234, 88, 12, 0.6),
        0 0 30px rgba(234, 88, 12, 0.3);
}

/* 「近日公開！」点滅テキスト */
.quest-coming-soon {
    color: #FFD700;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-shadow:
        2px 2px 0 #1a1a2e,
        0 0 10px rgba(255, 215, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.3);
    animation: quest-blink 2s ease-in-out infinite;
}

@keyframes quest-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* 説明テキスト */
.quest-description {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 1.5rem;
}

/* 装飾ボーダー（RPG風ウィンドウ囲み） */
.quest-decorative-border {
    width: 200px;
    height: 4px;
    margin: 0 auto;
    background: linear-gradient(90deg,
            transparent 0%,
            #FFD700 20%,
            #EA580C 50%,
            #FFD700 80%,
            transparent 100%);
    border-radius: 2px;
}

/* SP用改行制御 */
.sm-break {
    display: none;
}

/* レスポンシブ */
@media (max-width: 640px) {
    .quest-announcement-section {
        min-height: 350px;
    }

    .quest-title-main {
        font-size: 1.6rem;
    }

    .quest-coming-soon {
        font-size: 1.3rem;
    }

    .quest-description {
        font-size: 0.9rem;
    }

    .sm-break {
        display: inline;
    }
}

@media (min-width: 768px) {
    .quest-announcement-section {
        min-height: 500px;
    }

    .quest-title-main {
        font-size: 3rem;
    }

    .quest-coming-soon {
        font-size: 2.2rem;
    }

    .quest-description {
        font-size: 1.15rem;
    }
}