:root {
    --ser-blue: #003366;
    --ser-gold: #c5a059;
    --bg-gray: #f8f9fa;
}

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

/* =========================================
   フォント指定：MS Pゴシックを最優先
   Windows以外でも古めの雰囲気を出すため Osaka を追加
   ========================================= 
*/
body { 
    font-family: "MS PGothic", "ＭＳ Ｐゴシック", "MS P-Gothic", "Osaka", "MS Gothic", "ＭＳ ゴシック", sans-serif; 
    background-color: var(--bg-gray); 
    color: #333; 
    overflow-x: hidden; 
    -webkit-text-size-adjust: 100%;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   ヘッダー
   ========================================= */
header { background: #fff; border-bottom: 3px solid var(--ser-blue); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.header-flex { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.brand { display: flex; align-items: center; }
.ser-logo { background: var(--ser-blue); color: #fff; font-weight: 900; padding: 10px; font-size: 24px; border-radius: 4px; margin-right: 12px; line-height: 1; }
.brand-name h1 { font-size: 20px; color: var(--ser-blue); line-height: 1.2; font-weight: bold; }
.brand-name span { font-size: 10px; display: block; color: #666; font-weight: bold; }

nav ul { display: flex; list-style: none; }
nav ul li a { text-decoration: none; color: #333; font-weight: bold; margin-left: 25px; transition: 0.3s; font-size: 14px; }
nav ul li a:hover { color: var(--ser-blue); }
.menu-toggle { display: none; font-size: 24px; background: none; border: none; cursor: pointer; color: var(--ser-blue); }

/* =========================================
   メインビジュアル
   ========================================= */
.main-visual { height: 60vh; background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('./image/25237013_m.jpg'); background-size: cover; background-position: center; display: flex; align-items: center; text-align: center; color: #fff; }
.hero-overlay { width: 100%; }
.hero-overlay h2 { font-size: clamp(24px, 5vw, 42px); margin-bottom: 20px; font-weight: bold; }
.hero-btns .btn-primary { background: var(--ser-blue); color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 4px; margin: 10px; display: inline-block; font-weight: bold; }
.btn-primary2 { background: var(--bg-gray); color: var(--ser-blue); padding: 12px 30px; text-decoration: none; border-radius: 4px; margin: 10px; display: inline-block; font-weight: bold; }
.hero-btns .btn-secondary { background: rgba(255,255,255,0.95); color: var(--ser-blue); padding: 12px 30px; text-decoration: none; border-radius: 4px; margin: 10px; display: inline-block; border: 1px solid #fff; font-weight: bold; }

/* =========================================
   運行情報（テロップ）
   ========================================= */
.top-ticker { background: #222; color: #fff; padding: 10px 0; font-size: 13px; }
.ticker-flex { display: flex; align-items: center; position: relative; }
.badge { background: #28a745; padding: 4px 10px; border-radius: 3px; font-weight: bold; margin-right: 20px; white-space: nowrap; z-index: 5; }
.ticker-text { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.ticker-text p { display: inline-block; padding-left: 100%; animation: marquee 25s linear infinite; margin: 0; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-180%); } }
.update-time { color: #888; font-size: 11px; margin-left: 20px; white-space: nowrap; z-index: 5; background: #222; padding-left: 10px; }

/* =========================================
   ニュース欄
   ========================================= */
.section { padding: 60px 0; }
.section-title { border-left: 6px solid var(--ser-blue); padding-left: 15px; margin-bottom: 30px; font-size: 24px; font-weight: bold; }

.news-list { background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.news-item { display: flex; align-items: center; padding: 15px 25px; border-bottom: 1px solid #eee; }
.news-item:last-child { border-bottom: none; }
.news-date { color: #888; font-size: 14px; width: 100px; flex-shrink: 0; }
.news-category { font-size: 11px; font-weight: bold; color: #fff; padding: 3px 10px; border-radius: 3px; margin-right: 20px; width: 90px; text-align: center; flex-shrink: 0; }
.label-dia { background: #007bff; }
.label-event { background: #e83e8c; }
.label-ticket { background: #28a745; }
.label-other { background: #6c757d; }
.label-operation { background: #ff8800; }
.news-link { color: #333; text-decoration: none; font-weight: bold; flex: 1; }
.news-link:hover { color: var(--ser-blue); text-decoration: underline; }

/* =========================================
   路線図・車両カード
   ========================================= */
.routemap-image { width: 100%; height: auto; margin-bottom: 30px; border-radius: 4px; border: 1px solid #ddd; }
.routemap-image2 { width: 70%; height: auto; margin-bottom: 30px; border-radius: 4px; border: 1px solid #ddd; }
.train-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.train-card { background: #fff; padding: 30px; border-radius: 4px; border-bottom: 5px solid var(--ser-blue); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.train-tag { display: inline-block; padding: 3px 12px; background: var(--ser-blue); color: #fff; font-size: 11px; font-weight: bold; border-radius: 20px; margin-bottom: 15px; }
.train-tag.secondary { background: #666; }
.train-card h4 { margin-bottom: 10px; font-size: 1.3rem; font-weight: bold; }
.train-card p { font-size: 14px; color: #555; line-height: 1.6; }

/* =========================================
   フッター
   ========================================= */
footer { background: #222; color: #fff; padding: 50px 0 30px; margin-top: 80px; }
.copyright { font-size: 12px; color: #888; margin-top: 15px; }
.disclaimer { border-top: 1px solid #444; padding-top: 15px; margin-top: 20px; line-height: 1.8; }
.footer-link { color: #57b6ff; text-decoration: none; font-size: 13px; display: block; margin-top: 10px; }

/* スマホ対応 */
@media (max-width: 768px) {
    .header-flex { height: 60px; }
    nav { display: none; position: absolute; top: 60px; left: 0; width: 100%; background: #fff; border-bottom: 3px solid var(--ser-blue); }
    nav.active { display: block; }
    nav ul { flex-direction: column; padding: 20px; }
    nav ul li a { margin-left: 0; display: block; padding: 12px 0; border-bottom: 1px solid #eee; }
    .menu-toggle { display: block; }
    .train-grid { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; align-items: flex-start; }
    .news-date { margin-bottom: 5px; }
    .news-category { margin-bottom: 10px; }
}

/* =========================================
   乗換検索セクション
   ========================================= */
.search-section {
    position: relative;
    margin-top: -60px; /* メインビジュアルに重ねる */
    z-index: 50;
    margin-bottom: 40px;
}

.search-box-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-top: 4px solid var(--ser-gold);
}

.search-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--ser-blue);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.search-inputs {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.input-group select, .input-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: #fdfdfd;
}

.arrow-icon {
    font-size: 20px;
    color: #ccc;
    padding-bottom: 10px;
}

.btn-search {
    background: var(--ser-blue);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    width: 100%;
}

.btn-search:hover {
    background: #002244;
    box-shadow: 0 4px 10px rgba(0,51,102,0.3);
}

/* 検索結果カード */
.search-results {
    margin-top: 20px;
}

.result-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.result-header {
    background: #f0f4f8;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.route-summary {
    font-weight: bold;
    font-size: 18px;
    color: var(--ser-blue);
}

.route-meta {
    font-size: 12px;
    color: #666;
}

.result-body {
    padding: 20px;
}

.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 4px solid #ddd;
    margin-left: 10px;
}

.timeline-point {
    position: relative;
    margin-bottom: 20px;
}

.timeline-point::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid #666;
    border-radius: 50%;
}

.timeline-point.departure::before { border-color: var(--ser-blue); }
.timeline-point.arrival::before { border-color: var(--ser-blue); background: var(--ser-blue); }

.time { font-weight: bold; font-size: 18px; margin-right: 10px; display: inline-block; width: 60px; }
.station { font-weight: bold; font-size: 16px; }

.train-info {
    margin: 10px 0 10px 40px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    border-left: 3px solid var(--ser-gold);
}

.transfer-badge {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}
    .search-section { margin-top: 0; background: #fff; padding: 20px 0; }
    .search-box-wrapper { box-shadow: none; border: 1px solid #eee; }
    .arrow-icon { display: none; } /* スマホでは矢印を消す */
    .input-group { width: 100%; }

    /* おトクなきっぷページ専用スタイル */

/* 1. パンくずリスト */
.breadcrumb {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    color: #666;
}
.breadcrumb a {
    color: var(--ser-blue);
    text-decoration: none;
}
.breadcrumb i {
    margin: 0 8px;
    font-size: 10px;
    color: #ccc;
}

/* 2. ヒーローエリア */
.tickets-hero {
    background: linear-gradient(135deg, var(--ser-blue) 0%, #004080 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}
.hero-content h2 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}
.hero-content p {
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* 3. タブメニュー */
.ticket-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}
.tab-btn {
    padding: 12px 30px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    transition: 0.3s;
    border-radius: 4px;
}
.tab-btn.active {
    background: var(--ser-blue);
    color: #fff;
    border-color: var(--ser-blue);
}

/* 4. きっぷセクション表示切替 */
.ticket-section {
    display: none;
}
.ticket-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. きっぷカード */
.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.ticket-card {
    background: #fff;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    border-bottom: 4px solid var(--ser-gold);
}
.ticket-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}
.ticket-badge.web-only { background: #27ae60; }

.ticket-img {
    width: 180px;
    background-size: cover;
    background-position: center;
}
.ticket-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.line-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    background: #eee;
    margin-bottom: 10px;
    width: fit-content;
}
.line-tag.sm { border-left: 4px solid #f1c40f; }
.line-tag.sg { border-left: 4px solid #27ae60; }
.line-tag.all { border-left: 4px solid var(--ser-blue); }
.line-tag.ltd { border-left: 4px solid #e67e22; }

.ticket-body h4 {
    font-size: 18px;
    font-weight: bold;
    color: var(--ser-blue);
    margin-bottom: 8px;
}
.price {
    font-weight: bold;
    color: #d35400;
    font-size: 16px;
    margin-bottom: 10px;
}
.desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}
.btn-detail {
    text-decoration: none;
    background: var(--ser-blue);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
}

/* 6. ご利用ガイド */
.purchase-guide {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 60px;
}
.guide-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}
.guide-item {
    text-align: center;
}
.guide-item i {
    font-size: 40px;
    color: var(--ser-gold);
    margin-bottom: 15px;
}
.guide-item h5 {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}
.guide-item p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .ticket-grid { grid-template-columns: 1fr; }
    .ticket-card { flex-direction: column; }
    .ticket-img { width: 100%; height: 160px; }
    .guide-container { grid-template-columns: 1fr; }
}

/* ニュースページ専用スタイル */

/* パンくず */
.breadcrumb {
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}
.breadcrumb a { color: var(--ser-blue); text-decoration: none; }
.breadcrumb i { margin: 0 8px; color: #ccc; font-size: 10px; }

/* フィルターボタン */
.news-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.filter-btn {
    padding: 8px 18px;
    border: 1px solid #ddd;
    background: #fdfdfd;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    font-family: inherit;
    border-radius: 20px;
    transition: 0.3s;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: var(--ser-blue);
    color: #fff;
    border-color: var(--ser-blue);
}

/* --- ニュースアーカイブリスト（修正版） --- */
.news-archive-list {
    background: #fff;
    border-top: 2px solid var(--ser-blue);
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.news-item-full {
    display: flex;
    align-items: center; /* 横並びを中央に */
    padding: 18px 25px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease; /* 色の変化を滑らかに */
    text-decoration: none; /* 全体をリンクにする場合 */
    color: inherit;
}

/* ホバー（選択）した時に少しだけ暗くする */
.news-item-full:hover {
    background-color: #f5f5f5; /* 控えめなグレー */
}

.news-meta {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 日付とラベルの幅を固定 */
    width: 240px; /* デスクトップ表示での幅を確保 */
}

.news-date {
    font-size: 14px;
    color: #666;
    margin-right: 20px;
    font-family: "MS PGothic", sans-serif;
}

/* カテゴリーラベル（色分けはここだけに限定） */
.news-category {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    padding: 3px 10px;
    border-radius: 2px;
    width: 80px;
    text-align: center;
}

/* ラベルの色は維持 */
.label-dia { background: #007bff; }
.label-event { background: #e83e8c; }
.label-ticket { background: #28a745; }
.label-other { background: #6c757d; }

.news-title {
    font-size: 16px;
    color: #333;
    font-weight: bold;
    line-height: 1.4;
    flex: 1; /* 残りの幅をすべて使う */
}

/* スマホ対応：日付とタイトルを縦に並べる */
@media (max-width: 768px) {
    .news-item-full {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .news-meta {
        width: 100%;
        margin-bottom: 8px;
    }
    .news-title {
        font-size: 15px;
    }
}

/* カテゴリー別カラー (style.cssから継承・追加) */
.label-dia { background: #007bff; }
.label-event { background: #e83e8c; }
.label-ticket { background: #28a745; }
.label-other { background: #6c757d; }

.news-title {
    font-size: 17px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    line-height: 1.5;
}

.news-title:hover {
    color: var(--ser-blue);
    text-decoration: underline;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 8px;
}

.page-num, .page-next {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
}

.page-num.active {
    background: var(--ser-blue);
    color: #fff;
    border-color: var(--ser-blue);
}

.page-num:hover:not(.active), .page-next:hover {
    background: #f0f4f8;
}

.page-next {
    padding: 0 20px;
}

@media (max-width: 768px) {
    .news-item-full { padding: 15px; }
    .news-title { font-size: 15px; }
    .news-meta { flex-direction: column; align-items: flex-start; gap: 5px; }
}






/* =========================================
   乗換検索セクション
   ========================================= */
.search-section {
    position: relative;
    margin-top: -60px; /* メインビジュアルに重ねる */
    z-index: 50;
    margin-bottom: 40px;
}

.search-box-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-top: 4px solid var(--ser-gold);
}

.search-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--ser-blue);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.search-inputs {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.input-group select, .input-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: #fdfdfd;
}

.arrow-icon {
    font-size: 20px;
    color: #ccc;
    padding-bottom: 10px;
}

.btn-search {
    background: var(--ser-blue);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    width: 100%;
}

.btn-search:hover {
    background: #002244;
    box-shadow: 0 4px 10px rgba(0,51,102,0.3);
}

/* 検索結果カード */
.search-results {
    margin-top: 20px;
}

.result-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.result-header {
    background: #f0f4f8;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.route-summary {
    font-weight: bold;
    font-size: 18px;
    color: var(--ser-blue);
}

.route-meta {
    font-size: 12px;
    color: #666;
}

.result-body {
    padding: 20px;
}

.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 4px solid #ddd;
    margin-left: 10px;
}

.timeline-point {
    position: relative;
    margin-bottom: 20px;
}

.timeline-point::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid #666;
    border-radius: 50%;
}

.timeline-point.departure::before { border-color: var(--ser-blue); }
.timeline-point.arrival::before { border-color: var(--ser-blue); background: var(--ser-blue); }

.time { font-weight: bold; font-size: 18px; margin-right: 10px; display: inline-block; width: 60px; }
.station { font-weight: bold; font-size: 16px; }

.train-info {
    margin: 10px 0 10px 40px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    border-left: 3px solid var(--ser-gold);
}

.transfer-badge {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}

/* スマホ対応 */
    .search-section { margin-top: 0; background: #fff; padding: 20px 0; }
    .search-box-wrapper { box-shadow: none; border: 1px solid #eee; }
    .arrow-icon { display: none; } /* スマホでは矢印を消す */
    .input-group { width: 100%; }