/* ====================================
   Achievement Page Styles - Complete Version
   ==================================== */

/* Page Hero - 背景画像対応 */
.page-hero {
    position: relative;
    height: 500px;
    margin-top: 70px;
    overflow: hidden;
}

.page-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.1);
    transform: scale(1.1);
}

.page-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.8) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

.page-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.page-hero__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.page-hero__title .title-en {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 0.02em;
    text-shadow: 
        0 0 40px rgba(255, 255, 255, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.8);
}

.page-hero__title .title-jp {
    font-size: 20px;
    color: var(--pale-gray);
    letter-spacing: 0.4em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.page-hero__subtitle {
    margin-top: 25px;
    font-size: 18px;
    color: var(--off-white);
    letter-spacing: 0.1em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Stats Summary */
.stats-summary {
    padding: 60px 0;
    background: var(--dark-gray);
    border-bottom: 1px solid var(--medium-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card__number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.stat-card__label {
    font-size: 14px;
    color: var(--light-gray);
    letter-spacing: 0.1em;
}

.stat-card.highlight {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(184, 148, 31, 0.1) 0%, transparent 100%);
    border-color: var(--gold);
}

.stat-card.highlight .stat-card__number {
    color: var(--gold-light);
}

/* Race Timeline */
.race-timeline {
    padding: 80px 0;
    background: var(--black);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.section-title .title-en {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--white);
    margin-bottom: 10px;
}

.section-title .title-jp {
    font-size: 14px;
    color: var(--light-gray);
    letter-spacing: 0.2em;
}

/* Year Section */
.year-section {
    margin-bottom: 80px;
}

.year-section.highlight-year {
    padding: 40px;
    background: linear-gradient(135deg, rgba(184, 148, 31, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(184, 148, 31, 0.2);
}

.year-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 900;
    color: var(--gray);
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--medium-gray);
}

.highlight-year .year-title {
    color: var(--gold-light);
    border-color: var(--gold);
}

/* Race List - 見やすく修正 */
.race-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.race-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    padding: 35px;
    background: var(--dark-gray);
    border-left: 5px solid var(--medium-gray);
    transition: all 0.3s;
}

.race-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.race-item.win {
    border-left-color: var(--gold);
    border-left-width: 5px;
}

.race-item.g1 {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.race-item.triple-crown {
    background: linear-gradient(90deg, rgba(184, 148, 31, 0.12) 0%, transparent 100%);
}

.race-item.overseas {
    border-left-style: dashed;
}

/* 日付 */
.race-date {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--gray);
    display: flex;
    align-items: center;
}

/* レース情報 */
.race-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* レース名 */
.race-name {
    font-size: 24px;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 8px;
}

/* レース詳細 - 大きく見やすく */
.race-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.race-details span {
    font-size: 16px;
    color: var(--pale-gray);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ラベルを追加 */
.race-details span::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.race-details .place::before { content: 'COURSE'; }
.race-details .result::before { content: 'RESULT'; }
.race-details .time::before { content: 'TIME'; }
.race-details .jockey::before { content: 'JOCKEY'; }

/* 着順の強調 */
.race-details .result {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.race-item.win .race-details .result {
    color: var(--gold-light);
    font-size: 22px;
}

/* コース情報 */
.race-details .place {
    font-size: 16px;
    letter-spacing: 0.02em;
}

/* タイム */
.race-details .time {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--off-white);
}

/* 騎手名 */
.race-details .jockey {
    font-size: 16px;
    font-weight: 500;
    color: var(--off-white);
}

/* レースメモ */
.race-note {
    font-size: 15px;
    color: var(--pale-gray);
    font-style: italic;
    margin-top: 12px;
    padding-left: 20px;
    position: relative;
}

.race-note::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
}

/* G1レースの特別スタイル */
.race-item.g1 .race-name::after {
    content: 'Grade 1';
    display: inline-block;
    margin-left: 15px;
    padding: 4px 12px;
    background: rgba(184, 148, 31, 0.2);
    border: 1px solid var(--gold);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--gold-light);
    vertical-align: middle;
}

/* 海外レースの特別スタイル */
.race-item.overseas .race-name::after {
    content: 'International';
    display: inline-block;
    margin-left: 15px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--gray);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--pale-gray);
    vertical-align: middle;
}

/* 三冠レースの特別スタイル */
.race-item.triple-crown .race-name::after {
    content: 'Triple Crown';
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border: none;
    color: var(--black);
    font-weight: 600;
}

/* Special Records - シンプル&スタイリッシュ */
.special-records {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(180deg, var(--black) 0%, var(--dark-gray) 50%, var(--black) 100%);
}

.special-records::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--medium-gray), transparent);
}

.special-records::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--medium-gray), transparent);
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 2;
}

.record-card {
    text-align: center;
    padding: 60px 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* ホバー時のグラデーションライン */
.record-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.record-card:hover::before {
    transform: translateX(0);
}

.record-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: translateX(100%);
    transition: transform 0.6s;
}

.record-card:hover::after {
    transform: translateX(0);
}

.record-card:hover {
    transform: translateY(-15px);
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(184, 148, 31, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(184, 148, 31, 0.1);
}

/* 大きな数字 */
.record-number {
    font-family: 'Playfair Display', serif;
    font-size: 80px;
    font-weight: 900;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    line-height: 1;
    transition: all 0.4s;
}

.record-card:hover .record-number {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.1);
}

.record-card h3 {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* インライン数字 */
.record-card h3 .large-num {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    display: inline-block;
    transition: color 0.3s;
}

.record-card:hover h3 .large-num {
    color: var(--gold-light);
}

.record-card p {
    font-size: 13px;
    color: var(--light-gray);
    line-height: 1.8;
    letter-spacing: 0.02em;
}

/* 特別な演出（1番目と4番目のカードを強調） */
.record-card:nth-child(1),
.record-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(184, 148, 31, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* Current Navigation */
.header__nav-link.current {
    color: var(--gold-light);
}

.header__nav-link.current::after {
    width: 100%;
    background: var(--gold-light);
}

/* ========================================
   Responsive - スマホ対応
   ======================================== */

@media (max-width: 768px) {
    /* Page Hero */
    .page-hero {
        height: 350px;
        margin-top: 60px;
    }
    
    .page-hero__title .title-en {
        font-size: 48px;
    }
    
    .page-hero__title .title-jp {
        font-size: 16px;
        letter-spacing: 0.3em;
    }
    
    .page-hero__subtitle {
        font-size: 14px;
    }
    
    /* Container */
    .container {
        padding: 0 20px;
    }
    
    /* Stats Summary */
    .stats-summary {
        padding: 40px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-card__number {
        font-size: 32px;
    }
    
    .stat-card__label {
        font-size: 12px;
    }
    
    .stat-card.highlight {
        grid-column: span 2;
    }
    
    /* Race Timeline */
    .race-timeline {
        padding: 50px 0;
    }
    
    .section-title .title-en {
        font-size: 28px;
    }
    
    .section-title .title-jp {
        font-size: 12px;
    }
    
    /* Year Section */
    .year-section {
        margin-bottom: 50px;
    }
    
    .year-section.highlight-year {
        padding: 20px;
    }
    
    .year-title {
        font-size: 32px;
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    /* Race List */
    .race-list {
        gap: 15px;
    }
    
    .race-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .race-date {
        font-size: 24px;
        color: var(--gold);
        margin-bottom: 10px;
    }
    
    .race-name {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .race-details {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 10px 0;
    }
    
    .race-details span {
        font-size: 14px;
    }
    
    .race-details span::before {
        font-size: 10px;
    }
    
    .race-details .result {
        font-size: 18px;
    }
    
    .race-item.win .race-details .result {
        font-size: 20px;
    }
    
    .race-details .time {
        font-size: 16px;
    }
    
    .race-details .jockey {
        font-size: 14px;
    }
    
    .race-note {
        font-size: 13px;
        margin-top: 10px;
    }
    
    /* バッジの調整 */
    .race-item.g1 .race-name::after,
    .race-item.overseas .race-name::after,
    .race-item.triple-crown .race-name::after {
        display: block;
        margin-left: 0;
        margin-top: 8px;
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Special Records */
    .special-records {
        padding: 60px 0;
    }
    
    .records-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .record-card {
        padding: 40px 20px;
    }
    
    .record-number {
        font-size: 60px;
    }
    
    .record-card h3 {
        font-size: 16px;
    }
    
    .record-card h3 .large-num {
        font-size: 20px;
    }
    
    .record-card p {
        font-size: 12px;
    }
    
    /* ホバーエフェクトをタップ用に調整 */
    .record-card:active {
        transform: translateY(-5px);
    }
}

/* さらに小さい画面用 */
@media (max-width: 480px) {
    .page-hero__title .title-en {
        font-size: 36px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card.highlight {
        grid-column: span 1;
    }
    
    .race-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .record-number {
        font-size: 48px;
    }
}

/* ====================================
   Year Navigation Tabs
   ==================================== */

.year-navigation {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(26, 26, 26, 0.95) 100%
    );
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--medium-gray);
    padding: 20px 0;
    margin-bottom: -20px;
}

.year-tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.year-tab {
    position: relative;
    background: transparent;
    border: 1px solid var(--medium-gray);
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 120px;
    overflow: hidden;
}

/* ホバーエフェクト用の背景 */
.year-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.05), 
        transparent
    );
    transition: left 0.5s;
}

.year-tab:hover::before {
    left: 100%;
}

/* 年度表示 */
.year-tab__year {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gray);
    transition: all 0.3s;
    line-height: 1;
}

/* ラベル */
.year-tab__label {
    font-size: 11px;
    color: var(--light-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.3s;
}

/* 戦績 */
.year-tab__stats {
    font-size: 12px;
    color: var(--gray);
    margin-top: 3px;
    opacity: 0.7;
    transition: all 0.3s;
}

/* ホバー時 */
.year-tab:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.year-tab:hover .year-tab__year {
    color: var(--off-white);
}

.year-tab:hover .year-tab__label {
    color: var(--pale-gray);
}

.year-tab:hover .year-tab__stats {
    opacity: 1;
    color: var(--light-gray);
}

/* アクティブ状態 */
.year-tab.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold);
    pointer-events: none;
}

.year-tab.active .year-tab__year {
    color: var(--gold-light);
}

.year-tab.active .year-tab__label {
    color: var(--gold);
}

.year-tab.active .year-tab__stats {
    color: var(--gold);
    opacity: 1;
}

/* アクティブタブの下線 */
.year-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--gold), 
        transparent
    );
    animation: slideGlow 2s ease-in-out infinite;
}

/* 三冠年の特別スタイル */
.year-tab.highlight {
    background: linear-gradient(135deg, 
        rgba(184, 148, 31, 0.05) 0%, 
        transparent 100%
    );
}

.year-tab.highlight:hover {
    background: linear-gradient(135deg, 
        rgba(184, 148, 31, 0.1) 0%, 
        rgba(255, 255, 255, 0.03) 100%
    );
    border-color: rgba(184, 148, 31, 0.5);
}

.year-tab.highlight .year-tab__label {
    color: var(--gold);
    font-weight: 600;
}

/* グローアニメーション */
@keyframes slideGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .year-navigation {
        top: 60px;
        padding: 15px 0;
    }
    
    .year-tabs {
        gap: 10px;
        padding: 0 10px;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .year-tab {
        padding: 12px 20px;
        min-width: 100px;
        flex-shrink: 0;
    }
    
    .year-tab__year {
        font-size: 22px;
    }
    
    .year-tab__label {
        font-size: 10px;
    }
    
    .year-tab__stats {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .year-tabs {
        gap: 8px;
    }
    
    .year-tab {
        padding: 10px 15px;
        min-width: 85px;
    }
    
    .year-tab__year {
        font-size: 20px;
    }
    
    .year-tab__label {
        font-size: 9px;
    }
    
    .year-tab__stats {
        font-size: 10px;
    }
}
