/* ================================
   Schedule Page Styles
   File: css/schedule-page.css
================================ */

/* ================================
   CSS変数定義
================================ */
:root {
    --primary-blue: #0E5FD8;
    --secondary-blue: #1976D2;
    --dark-bg: #0a0a0a;
    --light-gray: #f5f5f5;
}

/* ================================
   ページヒーロー（マシンページと同じ）
================================ */
.page-hero {
    margin-top: 80px;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../images/schedule/schedule-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6));
}

/* ================================
   スケジュールセクション
================================ */
.schedule-section {
    padding: 0;
    background: white;
}

.schedule-section .section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-blue);
    margin-bottom: 0;
    padding: 3rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    text-align: center;
    background: white;
}

.schedule-section .section-title span {
    position: relative;
    display: inline-block;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    z-index: 2;
}

.schedule-section .section-title::before {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(150px, 40vw, 300px);
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(14, 95, 216, 0.3) 20%,
        rgba(14, 95, 216, 0.8) 50%,
        rgba(14, 95, 216, 0.3) 80%,
        transparent 100%
    );
}

.schedule-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow: 
        0 0 0 3px rgba(14, 95, 216, 0.3),
        0 0 20px rgba(14, 95, 216, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

/* ================================
   コンテナ
================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ================================
   カテゴリータブ
================================ */
.schedule-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.tab-btn.active {
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 5px 20px rgba(14, 95, 216, 0.3);
}

.tab-btn.active::before {
    left: 0;
}

.tab-btn:hover:not(.active) {
    background: #f8f8f8;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ================================
   スケジュールコンテナ
================================ */
.schedule-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ================================
   スケジュールアイテム
================================ */
.schedule-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    align-items: center;
}

.schedule-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(14, 95, 216, 0.15);
    border-color: var(--primary-blue);
}

/* 特別なレース（鈴鹿8耐） */
.schedule-item.featured {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    border: 2px solid var(--primary-blue);
}

/* 日付表示 */
.schedule-date {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 8px;
    color: white;
}

.schedule-date .month {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    opacity: 0.9;
}

.schedule-date .day {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* レース情報 */
.schedule-info {
    flex: 1;
}

.race-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.race-circuit {
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 0.3rem 0;
}

.race-circuit i {
    color: var(--primary-blue);
    margin-right: 0.5rem;
}

.race-class {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

/* ステータス */
.schedule-status {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: #e8e8e8;
    color: #999;
}

.status-upcoming {
    background: #e8f5e9;
    color: #4caf50;
}

.status-special {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ff6b35;
    font-weight: 700;
}

/* ================================
   凡例
================================ */
.schedule-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 10px;
    margin-top: 3rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.legend-color.status-completed {
    background: #e8e8e8;
}

.legend-color.status-upcoming {
    background: #4caf50;
}

.legend-color.status-special {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

/* ================================
   縦書きタイトル（TOPページと同じ）
================================ */
.page-hero .particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.page-hero .vertical-text-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-hero .vertical-text {
    -webkit-writing-mode: vertical-rl;
    -ms-writing-mode: tb-rl;
    writing-mode: vertical-rl;
    -webkit-text-orientation: upright;
    -ms-text-orientation: upright;
    text-orientation: upright;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.8rem;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 
        0 0 20px rgba(14, 95, 216, 0.8),
        0 0 40px rgba(14, 95, 216, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 1.5s ease-out forwards;
    animation-delay: 0.5s;
    margin: 0 auto;
}

.page-hero .english-subtitle {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--primary-blue);
    letter-spacing: 0.5rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 1.5s;
    text-shadow: 0 0 10px rgba(14, 95, 216, 0.6);
}

.page-hero .decoration-line {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary-blue), transparent);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: expandLine 1.5s ease-out forwards;
}

.page-hero .line-top {
    top: -100px;
    height: 80px;
    animation-delay: 0.3s;
}

.page-hero .line-bottom {
    bottom: -100px;
    height: 80px;
    animation-delay: 0.8s;
}

.page-hero .particle {
    position: absolute;
    background: var(--primary-blue);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 
        0 0 6px var(--primary-blue),
        0 0 12px rgba(14, 95, 216, 0.5);
}

.page-hero .spark {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, #66a3ff, var(--primary-blue), transparent);
    border-radius: 2px;
    pointer-events: none;
    box-shadow: 0 0 4px var(--primary-blue);
}

/* ================================
   アニメーション
================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes expandLine {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 80px;
        opacity: 0.8;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 
            0 0 0 3px rgba(14, 95, 216, 0.3),
            0 0 20px rgba(14, 95, 216, 0.5);
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        box-shadow: 
            0 0 0 5px rgba(14, 95, 216, 0.2),
            0 0 30px rgba(14, 95, 216, 0.7);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 1.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }

/* ================================
   レスポンシブ - タブレット
================================ */
@media (max-width: 768px) {
    .page-hero {
        margin-top: 60px;
        height: 60vh;
        min-height: 400px;
    }
    
    .schedule-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-btn {
        justify-content: center;
    }
    
    .schedule-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }
    
    .schedule-status {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 1rem;
    }
    
    .schedule-date .day {
        font-size: 1.5rem;
    }
    
    .race-title {
        font-size: 1.1rem;
    }
    
    .page-hero .vertical-text {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
        letter-spacing: 0.5rem;
    }
    
    .page-hero .english-subtitle {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        margin-top: 1.5rem;
    }
    
    .page-hero .line-top,
    .page-hero .line-bottom {
        height: 60px;
    }
}

/* ================================
   レスポンシブ - スマートフォン
================================ */
@media (max-width: 480px) {
    .page-hero {
        margin-top: 60px;
        height: 50vh;
        min-height: 350px;
    }
    
    .schedule-section .section-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
        padding: 1.5rem 0;
    }
    
    .container {
        padding: 0 15px 40px;
    }
    
    .schedule-item {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .schedule-date {
        display: flex;
        justify-content: center;
        gap: 1rem;
        padding: 0.8rem;
    }
    
    .schedule-date .month,
    .schedule-date .day {
        font-size: 1rem;
    }
    
    .race-title {
        font-size: 1rem;
    }
    
    .race-circuit,
    .race-class {
        font-size: 0.85rem;
    }
    
    .schedule-legend {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .page-hero .vertical-text {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }
    
    .page-hero .english-subtitle {
        font-size: 1.2rem;
        letter-spacing: 0.3rem;
    }
}


/* ================================
   モバイル版 スケジュール日付表示の修正
================================ */

@media (max-width: 480px) {
    /* 他の既存のスタイルは変更なし */
    
    /* ========== 修正箇所ここから ========== */
    .schedule-date {
        display: flex;
        justify-content: center;
        align-items: center;  /* 垂直方向の中央揃えを追加 */
        gap: 0.5rem;          /* 月と日付の間隔を狭く（1rem → 0.5rem） */
        padding: 0.8rem;
    }
    
    .schedule-date .month {
        font-size: 1.1rem !important;  /* 1.4rem → 1.1rem に縮小 */
        font-weight: 500 !important;   /* 600 → 500 に調整 */
        margin-bottom: 0;              /* 下マージンを削除 */
        opacity: 0.9;
        line-height: 1;                /* 行高さを調整 */
    }
    
    .schedule-date .day {
        font-family: 'Bebas Neue', sans-serif;
        font-size: 1.8rem !important;  /* 2.5rem → 1.8rem に縮小 */
        font-weight: 700 !important;
        letter-spacing: 0.5px;         /* 文字間隔を狭く */
        line-height: 1;                /* 行高さを調整 */
    }
    /* ========== 修正箇所ここまで ========== */
}