/* ==========================================================================
   School Page Styles (芸術鑑賞会・学校公演)
   ========================================================================== */

/* --- 1. 共通レイアウト・パーツ --- */
.section-padding { padding: 100px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.relative-container { position: relative; z-index: 10; }

/* 全コンテンツの基本幅（620px）を統一 */
.unified-content-width {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.section-title { 
    text-align: center; font-size: 2.3rem; color: #D95F3B; 
    margin-bottom: 50px; font-weight: 800; 
    position: relative; z-index: 10; 
}

.white-card, .step-card, .letter-card {
    position: relative;
    z-index: 5;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* --- 2. ヒーローセクション --- */
.sub-hero-school { 
    position: relative; height: 60vh; min-height: 520px; 
    display: flex; align-items: center; justify-content: center; 
    overflow: hidden; background: #fff; 
}
.hero-bg-gym { position: absolute; inset: 0; z-index: 1; }
.gym-photo { width: 100%; height: 100%; object-fit: cover; }

.hero-shapes .shape { position: absolute; opacity: 0.6; z-index: 2; }
.circle.blue { width: 260px; height: 260px; background: #2887C6; border-radius: 50%; top: -50px; left: -50px; }
.triangle.yellow { width: 0; height: 0; border-left: 90px solid transparent; border-right: 90px solid transparent; border-bottom: 160px solid #E6B422; bottom: 10%; right: 5%; transform: rotate(15deg); }
.square.orange { width: 130px; height: 130px; background: #D95F3B; top: 10%; right: 18%; transform: rotate(-10deg); }

.hero-content-school { text-align: center; width: 100%; padding: 0 10px; position: relative; z-index: 10; }
.sub-tag { 
    font-weight: 800; color: #D95F3B; background: rgba(255,255,255,0.7); 
    padding: 6px 18px; border-radius: 20px; margin-bottom: 12px; display: inline-block;
    white-space: nowrap; font-size: clamp(0.8rem, 2vw, 1.1rem);
}
.hero-content-school h1 { 
    color: #333; text-shadow: 2px 2px 0 #fff; line-height: 1.3; font-weight: 800;
    white-space: nowrap; font-size: clamp(1.4rem, 4.5vw, 3rem); 
}

/* --- 3. メンバー写真（背面配置） --- */
.bg-member {
    position: absolute;
    z-index: 1; /* コンテンツより背面 */
    width: 420px; 
    filter: drop-shadow(10px 10px 20px rgba(0,0,0,0.15));
    pointer-events: none;
    transition: all 0.3s ease;
    display: block; /* 修正：表示を許可 */
}

.pos-flow-left { top: 0; left: -100px; }
.pos-flow-right { bottom: 0; right: -100px; }
.pos-outside-left { bottom: -20px; left: -180px; } /* 木村さん・秋場さん用 */
.pos-outside-right { bottom: -20px; right: -180px; }

/* --- 4. プログラム内容（タイムライン） --- */
.program-flow { background-color: #fffaf0; position: relative; overflow: hidden; }
.flow-timeline-path { max-width: 620px; margin: 0 auto; position: relative; }
.flow-timeline-path::before { content: ""; position: absolute; top: 0; left: 50%; width: 6px; height: 100%; border-left: 6px dashed #E6B422; transform: translateX(-50%); }

.flow-step-box { position: relative; margin-bottom: 40px; z-index: 5; }
.step-badge { width: 48px; height: 48px; background: #D95F3B; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 10px; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

.step-card { border-radius: 20px; border: 3px solid #E6B422; overflow: hidden; display: flex; }
.step-img-frame { flex: 0 0 200px; height: 160px; }
.step-img-frame img { width: 100%; height: 100%; object-fit: cover; }
.step-info { flex: 1; padding: 20px; text-align: left; }
.song-names { color: #2887C6; font-weight: 800; margin-bottom: 5px; }

.itteq-coin { 
    position: absolute; top: -15px; right: -15px; width: 85px; height: 85px; 
    border-radius: 50%; background: linear-gradient(135deg, #fff2ac, #e6b422, #b8860b); 
    color: #331a00; font-weight: 900; font-size: 0.8rem; display: flex; 
    align-items: center; justify-content: center; text-align: center; 
    transform: rotate(15deg); border: 3px double #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 15; 
}

/* --- 5. 実績・Pointセクション --- */
.highlight-main { border: 6px solid #E6B422; padding: 45px 50px; border-radius: 40px; text-align: center; }

.achievement-lead {
    font-size: 1.8rem; color: #ff0099; margin-bottom: 25px; font-weight: 900; text-align: center;
}
.achievement-text-body {
    max-width: 800px; margin: 0 auto 40px; line-height: 1.8; font-size: 1.1rem; color: #333;
}

.points-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; margin-top: 50px; border-top: 2px dashed #eee; padding-top: 40px;
}
.point-item { text-align: center; }
.point-item .p-num {
    display: inline-block; background: #ffcc00; color: #333; 
    padding: 2px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 900; margin-bottom: 10px;
}
.point-item h4 { font-size: 1.2rem; font-weight: 900; margin-bottom: 10px; }
.point-item p { font-size: 0.95rem; line-height: 1.6; }

/* --- 6. お手紙セクション --- */
.voice-section-letter { background-color: #f6f6f6; }
.letter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.letter-card { border-radius: 15px; overflow: hidden; height: 380px; }
.letter-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 1; }
.letter-content { 
    position: relative; z-index: 5; height: 100%; background: rgba(255, 255, 255, 0.9); 
    padding: 15px; display: flex; flex-direction: column; border: 3px solid transparent; 
}
.letter-card.primary .letter-content { border-color: #D95F3B; }
.letter-card.junior .letter-content { border-color: #2887C6; }
.letter-card.teacher .letter-content { border-color: #2ea76f; }
.letter-text { font-size: 0.85rem; line-height: 1.6; flex: 1; font-weight: 700; color: #333; }
.letter-author { font-size: 0.75rem; font-weight: 800; text-align: right; margin-top: 10px; }

/* --- 7. 想い (Mission) --- */
.mission-card { padding: 45px; border-radius: 30px; border: 3px solid #2887C6; }
.mission-story { font-size: 1.05rem; line-height: 1.8; color: #333; font-weight: 700; margin-bottom: 15px; }
.mission-footer { margin-top: 25px; text-align: center; font-size: 1.1rem; font-weight: 800; color: #D95F3B; }

/* --- 8. レスポンシブ対応 (1000px以下) --- */
@media (max-width: 1000px) {
    /* お手紙グリッドの調整 */
    .letter-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .letter-card:last-child { 
        grid-column: 1 / span 2; 
        max-width: 250px; 
        margin: 0 auto; 
    }

    /* --- メンバー写真の左右入れ替え --- */

    /* 1. 【蓮實さん】を右から「左」へ移動 (#voicesセクション) */
    #voices .pos-outside-right {
        right: auto;       /* 元の右固定を解除 */
        left: -120px;      /* 左側に配置 */
        transform: scaleX(-1); /* 必要に応じて向きを反転 */
    }

    /* 2. 【木村さん】と【秋場さん】を左から「右」へ移動 (#achievements と #mission) */
    #achievements .pos-outside-left,
    #mission .pos-outside-left {
        left: auto;        /* 元の左固定を解除 */
        right: -120px;     /* 右側に配置 */

    }

    /* 共通の不透明度設定 */
    .pos-outside-left, .pos-outside-right {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .bg-member { display: none; } /* スマホではカードを優先して非表示 */
    .hero-content-school h1 { font-size: 1.8rem; white-space: normal; }
    .step-card { flex-direction: column; }
    .step-img-frame { flex: 0 0 160px; width: 100%; }
    .highlight-main { padding: 30px; }
    .letter-grid { grid-template-columns: 1fr; }
    .letter-card:last-child { grid-column: auto; max-width: none; }
}