@charset "UTF-8";

/* 基本リセットとフォント */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { opacity: 0.7; }
html { scroll-behavior: smooth; }

/* --- ヒーローセクション --- */
.hero {
    height: 100vh;
    width: 100%;
    background-image: url('/img/mra2026.png'); 
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

.scroll-down {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: bounce 2s infinite;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* --- メインコンテナ --- */
.main-container {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    padding: 40px 0;
    gap: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}
.main-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.left-col {
    flex: 0 0 33%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* --- 見出しデザイン --- */
.section-title {
    font-size: 1.4rem;
    font-weight: bold;
    border-left: 5px solid #2e7d32; 
    padding-left: 15px;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- 注目レース（修正：左右分割デザイン） --- */
.pickup-container {
    display: flex;
    flex-direction: column;
    gap: 20px; 
}

.race-card {
    background: #fff;
    border-radius: 6px;
    /* paddingはinnerで調整するため削除 */
    padding: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border-top: 4px solid #2e7d32; 
    position: relative;
    transition: transform 0.3s;
}

.race-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* カード内部のコンテナ（左右分割用） */
.race-card-inner {
    display: flex;
    align-items: center; /* 垂直方向中央揃え */
    padding: 20px 25px;
}

.race-link-cover {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

/* --- 左側：レース基本情報 --- */
.race-info-left {
    flex: 1; /* 残りの幅を全部使う */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.race-title-row {
    display: flex;
    align-items: center; /* レース名とランクの高さを合わせる */
    margin-bottom: 10px;
}

.race-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: #333;
    line-height: 1.1;
    margin-right: 15px; /* ランクとの距離 */
}

.race-rank {
    background: linear-gradient(45deg, #FFD700, #FDB931);
    color: #000;
    font-weight: bold;
    font-style: italic;
    font-size: 1.1rem;
    padding: 2px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    /* 左詰め要望に対応 */
    margin-left: 0; 
}

.race-meta-row {
    font-size: 0.95rem;
    color: #555;
    display: flex;
    gap: 15px;
    font-weight: bold;
}

.race-horses-right {
    width: 20%; /* 右側の幅を少し減らしてバランスを取る */
    border-left: 1px solid #eee; /* 縦線 */
    
    /* 修正: 線を右に移動させるために、ここの数値を大きくする */
    margin-left: 100px; 
    
    /* 線の内側の文字の余白 */
    padding-left: 30px; 
    
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.horses-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.horses-list li {
    font-size: 0.95rem;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 長い名前は...にする */
}


.no-horses {
    font-size: 0.8rem;
    color: #ccc;
}


/* --- ニュースエリア --- */
.news-box {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.news-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}
.news-item:last-child { border-bottom: none; }

.news-main .news-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2e7d32; 
    margin-bottom: 5px;
    display: block;
}
.news-main .news-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}
.news-list-item .news-title {
    font-size: 1rem;
    display: block;
}
.news-date {
    font-size: 0.8rem;
    color: #999;
    margin-right: 10px;
}

/* --- YouTubeスライダー --- */
.youtube-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
}
.slide-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}
.slide-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
.slide-item iframe {
    width: 100%; height: 100%; border: none;
}

/* --- 競馬場ロゴブロックエリア --- */
.track-info-area {
    display: flex;
    flex-direction: row; 
    justify-content: space-between; 
    gap: 10px;
    margin-bottom: 10px; 
}

.track-card {
    background: #fff;
    border-radius: 4px;
    padding: 15px 5px;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.3s;
    width: 32%; 
    text-align: center;
}

.track-card:hover {
    transform: translateY(-2px);
    background-color: #f9f9f9;
}

.track-logo {
    width: 100%;
    height: 60px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px; 
    margin-right: 0; 
}

.track-logo img {
    max-width: 80%;
    max-height: 100%;
    object-fit: contain;
}

.track-text {
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    border-left: none; 
    padding-left: 0;
}

/* --- Discordボタン --- */
.discord-area {
    margin-bottom: 25px;
}
.discord-btn {
    display: block;
    background-color: #5865F2; 
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 0 #4752c4; 
    transition: transform 0.1s, box-shadow 0.1s;
}
.discord-btn:hover {
    background-color: #4752c4;
    opacity: 1; 
    color: #fff;
}
.discord-btn:active {
    transform: translateY(4px); 
    box-shadow: none;
}
.discord-icon {
    margin-right: 5px;
    font-size: 1.2em;
    vertical-align: middle;
}

/* --- リンクメニュー --- */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.menu-btn {
    display: block;
    background: #fff;
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    color: #444;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
}
.menu-btn:hover {
    background: #2e7d32; 
    color: #fff;
    border-color: #2e7d32;
}
.menu-btn.admin {
    grid-column: 1 / -1;
    background: #333;
    color: #fff;
}

/* フッター */
footer { margin-top: 50px; }