:root {
    --text-color: #333;
    --background-color: #f4f7f6;
    --card-background-color: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
}
/* スムーズなスクロール */
html {
    scroll-behavior: smooth;
}

/* 基本的なページスタイル */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
}
.page-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
h1.page-title { /* h1のクラス名を変更 */
    text-align: center;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 40px;
    font-size: 2.5em;
}

/* カテゴリーナビゲーションメニューのスタイル */
.category-nav {
    background-color: #ecf0f1;
    padding: 10px 0;
    margin-bottom: 40px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.category-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.category-nav li {
    margin: 5px 10px;
}
.category-nav a {
    text-decoration: none;
    color: #34495e;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}
.category-nav a:hover,
.category-nav a:focus {
    background-color: #3498db;
    color: #fff;
}

/* カテゴリースタイル */
.category-group {
    margin-bottom: 45px;
}
.category-group h2 {
    font-size: 1.8em;
    color: #3498db;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* イベントリストスタイル */
.event-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.event-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}
.event-item img.event-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    cursor: pointer;
    border: 1px solid #eee;
}
.event-info-list { /* リストに表示する情報用のコンテナ */
    margin-top: auto;
}
.event-info-list h3 { /* 企画名 */
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.25em;
    color: #333;
}
.event-info-list p { /* 団体名 */
    margin: 4px 0;
    font-size: 0.95em;
    color: #555;
}

/* ポップアップスタイル */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}
.popup-window {
    background: white;
    padding: 25px 35px;
    border-radius: 10px;
    width: 90%;
    max-width: 550px;
    text-align: left;
    position: relative;
    animation: fadeInScale 0.4s ease-out;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.popup-window .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.popup-window .close:hover {
    color: #333;
}
.popup-window h2 { /* ポップアップ内の企画名 */
    margin-top: 0;
    margin-bottom: 15px;
    color: #3498db;
    font-size: 1.7em;
}
.popup-window p {
    margin: 8px 0;
    line-height: 1.6;
    font-size: 1.05em;
    color: #444;
}
.popup-window p .label {
    font-weight: bold;
    color: #333;
    margin-right: 5px;
}
.popup-sns-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.popup-sns-links a {
    display: inline-block;
    margin-right: 10px;
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    padding: 5px 0;
}
.popup-sns-links a:hover {
    text-decoration: underline;
    color: #2980b9;
}

/* ハンバーガーメニュー */
/* hamburger(ハンバーガーアイコン) */
.hamburger {
  position: fixed;
  right: 20px;
  top: 20px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 300;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.hamburger__line {
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.5s;
}

.hamburger__line--1 {
  top: 14px;
}

.hamburger__line--2 {
  top: 21px;
}

.hamburger__line--3 {
  top: 28px;
}

.open .hamburger__line--1 {
  transform: rotate(-45deg);
  top: 21px;
}

.open .hamburger__line--2 {
  opacity: 0;
}

.open .hamburger__line--3 {
  transform: rotate(45deg);
  top: 21px;
}

/* sp-nav(ナビ) */
.sp-nav {
  position: fixed;
  right: -100%;
  top: 0;
  width: 70%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--card-background-color);
  transition: all 0.5s;
  z-index: 200;
  overflow-y: auto;
  box-shadow: -4px 0 10px rgba(0,0,0,0.1);
}

.open .sp-nav {
  right: 0;
}

.sp-nav ul {
    list-style: none;
    padding: 80px 0 20px 0;
    margin: 0;
}
.sp-nav li a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: 500;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    transition: background-color 0.2s;
}
.sp-nav li a:hover {
    background-color: var(--background-color);
}

/* black-bg(ハンバーガーメニュー解除) */
.black-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  background-color: rgba(40, 60, 80, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s;
  cursor: pointer;
}

.open .black-bg {
  opacity: 1;
  visibility: visible;
}

/* フェードイン & スケールアニメーション */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* スマートフォン表示（横スクロール） */
@media (max-width: 768px) {
    .category-group {
        overflow: hidden;
    }

    .event-list {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 15px; 
        padding: 0 20px;
        scroll-padding: 0 20px;
    }
    
    .event-item {
        flex-shrink: 0;
        width: 80%;
        scroll-snap-align: start;
    }
    
    .event-list::-webkit-scrollbar {
        height: 8px;  /* スクロールバーの高さ */
    }
    .event-list::-webkit-scrollbar-track {
        background: #f0f0f0; /* 背景色 */
        border-radius: 4px;
    }
    .event-list::-webkit-scrollbar-thumb {
        background: #ccc;   /* つまみ部分の色 */
        border-radius: 4px;
    }
    .event-list::-webkit-scrollbar-thumb:hover {
        background: #999;   /* つまみにカーソルが乗った時の色 */
    }
}