/* 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/キックオフ全体.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: 120px; /* 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);
}