/* ========================================
   リセット & 基本設定
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* スムーズスクロール */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Meiryo";
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    letter-spacing: 0.1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ========================================
   ヘッダー
======================================== */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #d9c4a5 100%);
    color: rgb(43, 43, 43);
    text-align: center;
    padding: 40px 20px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    font-family: "Didot", "Noto Serif JP", serif;
}

.header-description {
    font-size: 16px;
    letter-spacing: 0.1rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 40px auto 20px;
    opacity: 0.95;
}
.header-description-link {
    color: #1f1f1f;
    text-decoration: underline;
    font-weight: bold;
}
/* ========================================
   店舗タブ
======================================== */
.store-tabs {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0;
    background-color: #d4c4a8;
    border-bottom: 1px solid #a68c5c;
    border-top: 1px solid #a68c5c;
}

.tab-button {
    padding: 15px 10px;
    background-color: #d4c4a8;
    border-right: 1px solid #c9b896;
    border-bottom: 1px solid #c9b896;
    transition: all 0.3s ease;
    position: relative;
    height:auto;
}
/*
.tab-button:last-child {
    border-right: none;
}
*/
.tab-button img {
    width: 100%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: brightness(0.9);
}

.tab-button:hover {
    background-color: #e5d9c3;
}

.tab-button:hover img {
    opacity: 0.9;
    filter: brightness(1);
}

.tab-button.active {
    background-color: #f5f0e8;
    border-bottom: 1px solid #c9a96e;
}

.tab-button.active img {
    opacity: 1;
    filter: brightness(1);
}

/* ========================================
   固定ヘッダーナビ(スクロール時表示)
======================================== */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, #c9a96e 0%, #b8935e 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.fixed-nav.visible {
    opacity: 0.97;
    transform: translateY(0);
    pointer-events: auto;
}

.fixed-nav-button {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: transparent;
    color: white;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

/* 太字によるレイアウトシフト防止 */
.fixed-nav-button::before {
    content: attr(data-store);
    font-weight: bold;
    height: 0;
    visibility: hidden;
    overflow: hidden;
    user-select: none;
    pointer-events: none;
    display: block;
}

.fixed-nav-button:last-child {
    border-right: none;
}

.fixed-nav-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.fixed-nav-button.active {
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: bold;
}

/* スクロールバーを非表示(Webkit) */
.fixed-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ========================================
   メインコンテンツ
======================================== */
.events-main {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
}

/* ========================================
   店舗セクション(フェーズ2対応)
======================================== */
.store-section {
    margin-bottom: 100px;
    scroll-margin-top: 40px; /* スクロール時の上部余白 */
}

.store-section:last-child {
    margin-bottom: 100px;
}

.store-header {
    text-align: center;
    margin-bottom: 32px;
}

.store-logo {
    max-width: 300px;
    margin: 0 auto;
}

/* ========================================
   月ボックスグリッド(フェーズ2対応)
======================================== */
.month-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.month-box {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.month-box-title {
    font-size: 16px;
    font-weight: 500;
    color: #b8935e;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c9a96e;
}

.month-box-content {
    /* イベント一覧のコンテナ */
}

/* ========================================
   イベント1行表示(フェーズ2対応)
======================================== */
.event-item-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-item-row:last-child {
    margin-bottom: 0;
}

.event-bullet {
    flex-shrink: 0;
    margin-right: 6px;
    color: #333;
    line-height: 1.6;
}

.event-content {
    flex: 1;
}

.event-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
    margin-bottom: 2px;
    white-space: pre-wrap;
}

.event-detail {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    white-space: pre-wrap;
}

.no-events-message {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 8px 0;
}

/* ========================================
   旧スタイル(互換性のため残す)
======================================== */
.current-store-logo {
    max-width: 300px;
    margin: 0 auto;
}

.events-title {
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 32px;
    color: #333;
    letter-spacing: 0.05em;
}

/* ========================================
   状態表示
======================================== */
.loading,
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.loading-small {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

.error-message {
    color: #d32f2f;
    background-color: #ffebee;
    border-radius: 8px;
}

/* ========================================
   店舗別注意事項(フェーズ2対応)
======================================== */
.store-notice {
    background-color: #fff9f0;
    border: 1px solid #e0d5c0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}

.store-notice-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #b8935e;
}

.store-notice-detail {
    font-size: 12px;
    line-height: 1.7;
    color: #555;
    white-space: pre-wrap;
    margin: 0;
    margin-bottom: 12px;
}

.store-notice-detail:last-child {
    margin-bottom: 0;
}

.store-special-tag {
    font-size: 12px;
    line-height: 1.7;
    color: #333;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0d5c0;
}

.store-special-tag a {
    color: #b8935e;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.store-special-tag a:hover {
    color: #a68c5c;
}

/* ========================================
   ページトップへ戻るボタン
======================================== */
.scroll-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #c9a96e 0%, #b8935e 100%);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #b8935e 0%, #a68c5c 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* ========================================
   レスポンシブ対応(フェーズ2対応)
======================================== */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 20px;
    }

    .header-description {
        font-size: 12px;
        margin: 0;
        text-align: left;
    }

    .store-tabs {
        grid-template-columns: repeat(5, 1fr);
        overflow-x: hidden;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .tab-button {
        flex: 0 0 auto;
        min-width: 50px;
        height:60px;
        padding: 12px 6px;
    }

    .fixed-nav {
        justify-content: flex-start;
    }

    /* 月ボックスを1列に */
    .month-boxes {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .month-box {
        padding: 16px;
    }

    .month-box-title {
        font-size: 15px;
    }

    .event-title {
        font-size: 13px;
    }

    .event-detail {
        font-size: 11px;
    }

    .store-logo {
        max-width: 240px;
    }

    .store-notice {
        padding: 16px;
    }

    .store-section {
        margin-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 30px 16px;
    }

    .events-main {
        margin: 30px auto;
        padding: 0 16px;
    }

    .month-box {
        padding: 14px;
    }

    .month-box-title {
        font-size: 14px;
    }

    .store-notice {
        padding: 14px;
    }

    .store-section {
        margin-bottom: 60px;
    }

    /* ページトップボタンをスマホサイズに調整 */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        right: 16px;
        bottom: 16px;
        font-size: 20px;
    }
}
