/* ==========================================
   日本最低山縦走大会 プレビュー/公開用スタイル
   ========================================== */

:root {
    --deep-green: #00824e;
    --bright-green: #a6d05b;
    --red: #e60012;
    --yellow: #fff100;
    --bg-color: #f8fcf9;
    --text-color: #333333;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#e0eee0 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* スクロールスナップ用の設定 */
.snap-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

section, header.hero {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    padding: 80px 20px 40px; /* 固定ヘッダー分の余白 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* ナビゲーションバー */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 3px solid var(--deep-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo-box {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--deep-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-box span {
    background-color: var(--yellow);
    border: 2px solid var(--deep-green);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 4px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background-color: var(--bright-green);
    color: var(--white);
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--deep-green);
    cursor: pointer;
}

/* ヒーローセクション */
header.hero {
    text-align: center;
    background: linear-gradient(180deg, rgba(166, 208, 91, 0.1) 0%, rgba(248, 252, 249, 0) 100%);
}

header.hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--deep-green);
    text-shadow: 2px 2px 0px var(--yellow);
    margin-bottom: 20px;
}

.flyer-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1000px;
    width: 100%;
}

.flyer-display img {
    max-height: 50vh;
    max-width: 45%;
    object-fit: contain;
    border: 3px solid var(--deep-green);
    border-radius: 12px;
    background-color: var(--white);
    box-shadow: 5px 5px 0px var(--bright-green);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.flyer-display img:hover {
    transform: scale(1.02);
}

.hero-message {
    font-weight: 900;
    color: var(--red);
    margin-top: 20px;
    font-size: 1.5rem;
    text-align: center;
    background: var(--white);
    border: 3px solid var(--deep-green);
    padding: 10px 30px;
    border-radius: 30px;
    box-shadow: 4px 4px 0px var(--yellow);
}

/* セクション共通 */
.section-header {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--deep-green);
    border-bottom: 4px solid var(--bright-green);
    padding-bottom: 8px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.content-scroll {
    width: 100%;
    max-width: 800px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

/* レベル/山頂カード */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.info-box {
    background-color: var(--white);
    border: 3px solid var(--deep-green);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 5px 5px 0px var(--bright-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--yellow);
    border: 3px solid var(--deep-green);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 3px 3px 0px var(--bright-green);
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--deep-green);
}

.stat-unit {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--deep-green);
    margin-left: 2px;
    align-self: flex-end;
    margin-bottom: 18px;
}

.info-box h3 {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--deep-green);
    margin-bottom: 10px;
}

.intro-text {
    background-color: var(--white);
    border: 3px solid var(--deep-green);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 5px 5px 0px var(--bright-green);
}

/* 開催要綱テーブル */
.guideline-container {
    background-color: var(--white);
    border: 3px solid var(--deep-green);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 5px 5px 0px var(--bright-green);
    width: 100%;
}

.guideline-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.guideline-table th, .guideline-table td {
    padding: 12px;
    border-bottom: 1px solid #e0eee0;
}

.guideline-table th {
    width: 130px;
    color: var(--deep-green);
    font-weight: 900;
    white-space: nowrap;
    text-align: left;
}

.map-box {
    text-align: center;
    margin-top: 15px;
}

.map-box img {
    max-width: 100%;
    max-height: 200px;
    border: 2px solid var(--deep-green);
    border-radius: 8px;
}

/* ルールとマナー */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-item {
    background-color: var(--white);
    border: 3px solid var(--deep-green);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 5px 5px 0px var(--bright-green);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.rule-icon {
    font-size: 1.5rem;
    color: var(--deep-green);
    background-color: var(--yellow);
    border: 2px solid var(--deep-green);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.rule-content h4 {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--deep-green);
    margin-bottom: 5px;
}

/* フッター */
footer {
    background-color: var(--deep-green);
    color: var(--white);
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    margin-top: auto;
    font-weight: 700;
}

/* アニメーション演出 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ライトボックスモーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 4px solid var(--white);
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* レスポンシブ */
@media (max-width: 768px) {
    #navbar {
        padding: 8px 10px;
        height: auto;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
    }
    
    .logo-box {
        font-size: 1.1rem;
    }
    
    .logo-box span {
        font-size: 0.75rem;
        padding: 1px 4px;
    }

    .nav-links {
        display: flex !important;
        flex-direction: row;
        position: static;
        width: 100%;
        justify-content: center;
        background-color: transparent;
        border-bottom: none;
        padding: 0;
        box-shadow: none;
        gap: 6px;
        flex-wrap: wrap;
    }

    .nav-links a {
        font-size: 0.75rem;
        padding: 4px 6px;
        font-weight: 700;
    }

    .menu-btn {
        display: none !important;
    }

    header.hero h1 {
        font-size: 1.6rem;
    }

    .flyer-display {
        gap: 10px;
    }

    .flyer-display img {
        max-width: 100%;
        max-height: 35vh;
    }

    .hero-message {
        font-size: 1.1rem;
        padding: 8px 15px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .guideline-table th {
        width: auto;
        display: block;
        padding-bottom: 2px;
    }

    .guideline-table td {
        display: block;
        padding-top: 2px;
        border-bottom: 2px solid #e0eee0;
    }
    
    /* スマホ時はスクロールスナップを無効化して見やすく */
    .snap-container {
        height: auto;
        overflow-y: visible;
    }
    
    section, header.hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 15px 30px;
    }
}

/* お申し込み赤ボタンの定義 */
.btn-red {
    background-color: var(--red) !important;
    color: var(--white) !important;
    transition: background-color 0.2s, opacity 0.2s;
}
.btn-red:hover {
    opacity: 0.9;
    color: var(--white) !important;
}

