/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro', 'メイリオ', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ヘッダー */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-spacer {
    height: 140px;
}

/* 上部ヘッダー */
.header-top {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo a {
    display: block;
    line-height: 0;
}

.site-logo svg {
    height: 50px;
    width: auto;
}

/* モバイル検索ボタン */
.mobile-search-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #0066cc;
}

.mobile-search-toggle svg {
    display: block;
}

/* モバイル検索パネル */
.mobile-search-panel {
    display: none;
    background: #f5f5f5;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.mobile-search-panel.active {
    display: block;
}

/* デスクトップ表示制御 */
.desktop-only {
    display: flex;
}

.desktop-search {
    display: block;
}

.mobile-only {
    display: none;
}

/* ヘッダー検索 */
.header-search {
    flex: 1;
    max-width: 400px;
}

.header-search-form {
    display: flex;
    border: 2px solid #0066cc;
    border-radius: 25px;
    overflow: hidden;
}

.header-search-form input[type="text"] {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.header-search-form button {
    padding: 10px 20px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-form button:hover {
    background-color: #0052a3;
}

/* 電話番号 */
.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.header-phone a {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

.header-phone a:hover {
    text-decoration: underline;
}

/* お問い合わせボタン */
.contact-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #ff6600;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.contact-button:hover {
    background-color: #e55a00;
}

/* 下部ナビゲーション */
.header-nav {
    background-color: #0066cc;
    position: relative;
}

/* ハンバーガーメニューボタン */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: #0066cc;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #0052a3;
}

/* モバイルメニュー内の連絡情報 */
.mobile-contact-info {
    display: none;
    padding: 20px;
    background-color: #0052a3;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #fff;
}

.mobile-phone svg {
    color: #fff;
}

.mobile-phone a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.mobile-contact-btn .contact-button {
    display: block;
    text-align: center;
    width: 100%;
}

.site-title {
    text-align: center;
    font-size: 28px;
    color: #0066cc;
    margin: 0;
}

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

/* 検索フォーム */
.search-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-form button {
    padding: 12px 30px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-form button:hover {
    background-color: #0052a3;
}

/* 運営会社リスト */
.company-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.company-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.company-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 路線リスト */
.rosen-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.rosen-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rosen-item a {
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
}

/* 駅リスト（路線図スタイル - 水平配置） */
.eki-line-map {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.station-line-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.station-item-horizontal {
    display: flex;
    align-items: center;
}

.station-box {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,102,204,0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.station-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,102,204,0.4);
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
}

.station-name {
    display: block;
}

.station-number {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.station-connector-horizontal {
    width: 40px;
    height: 4px;
    background: #0066cc;
    margin: 0 10px;
    flex-shrink: 0;
}

/* 分岐対応のグラフ表示 */
.station-line-graph {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.station-graph-info {
    width: 100%;
    background: #f0f8ff;
    border-left: 4px solid #0066cc;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
}

.station-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.station-item-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
}

.station-item {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 分岐コンテナ - Grid布局で厳密な対齐 */
.station-branch-container {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 20px 40px;
    width: 100%;
    padding: 10px 0;
    position: relative;
}

.station-branch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
}

.station-branch-item .station-item {
    margin-bottom: 10px;
}

.station-branch-item .station-connector {
    margin: 10px 0;
}

/* 垂直コネクタ（単一駅から駅への線） */
.station-connector {
    width: 2px;
    height: 20px;
    background: #0066cc;
    margin: 0 auto;
}

/* 分岐線（複数駅が並ぶ場合の接続線） */
.station-branch-line {
    width: 90%;
    height: 2px;
    background: #0066cc;
    position: relative;
    margin: 10px auto;
}

/* 路線ごとの色バリエーション（例） */
.station-box.line-red {
    background: linear-gradient(135deg, #dc143c 0%, #b22222 100%);
}

.station-box.line-green {
    background: linear-gradient(135deg, #228b22 0%, #006400 100%);
}

.station-box.line-orange {
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
}

.station-box.line-purple {
    background: linear-gradient(135deg, #9370db 0%, #663399 100%);
}

/* 旧駅リストスタイル（互換性のため保持） */
.eki-list {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eki-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.eki-item:last-child {
    border-bottom: none;
}

.eki-item a {
    text-decoration: none;
    color: #0066cc;
    font-size: 18px;
}

.eki-item a:hover {
    text-decoration: underline;
}

/* 看板リスト */
.kanban-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kanban-table table {
    width: 100%;
    border-collapse: collapse;
}

.kanban-table th {
    background-color: #0066cc;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: normal;
}

.kanban-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.kanban-table tr:last-child td {
    border-bottom: none;
}

.kanban-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.detail-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.detail-button:hover {
    background-color: #0052a3;
}

/* 看板詳細 */
.kanban-detail {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.kanban-detail h2 {
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.detail-info {
    margin-bottom: 20px;
}

.detail-info dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px;
}

.detail-info dt {
    font-weight: bold;
    background: #f5f5f5;
    padding: 10px;
}

.detail-info dd {
    padding: 10px;
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-images img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* サービス紹介 */
.service-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-section h2 {
    color: #0066cc;
    margin-bottom: 15px;
}

/* ニュースリスト */
.news-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-section h2 {
    color: #0066cc;
    margin-bottom: 15px;
}

.news-list {
    list-style: none;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item a {
    text-decoration: none;
    color: #333;
}

.news-item a:hover {
    color: #0066cc;
}

.news-date {
    color: #999;
    font-size: 14px;
    margin-right: 10px;
}

/* フッター */
.site-footer {
    background-color: #333;
    color: #fff;
    margin-top: 60px;
}

/* フッター上部 */
.footer-top {
    background-color: #444;
    padding: 30px 0;
    border-bottom: 1px solid #555;
}

.footer-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-phone {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-phone svg {
    color: #ff6600;
}

.footer-phone a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.footer-phone a:hover {
    color: #ff6600;
}

.footer-contact-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff6600;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.footer-contact-button:hover {
    background-color: #e55a00;
}

/* フッターメニュー */
.footer-menu {
    padding: 40px 0;
}

.footer-navigation {
    display: flex;
    justify-content: center;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
    margin: 0;
    padding: 0;
}

.footer-nav li {
    margin: 0;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #fff;
}

/* フッター下部 */
.footer-bottom {
    background-color: #222;
    padding: 20px 0;
    border-top: 1px solid #444;
}

.footer-bottom p {
    text-align: center;
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .header-top-content {
        flex-wrap: nowrap;
        gap: 15px;
    }
    
    /* 中画面では検索フォームをボタンに変更 */
    .desktop-search {
        display: none !important;
    }
    
    .mobile-search-toggle {
        display: block;
        flex: 0 0 auto;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 0;
    }
    
    .main-nav a {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .header-spacer {
        height: 60px;
    }
    
    /* モバイルでヘッダーを上下分けず1行に */
    .site-header {
        position: fixed;
    }
    
    .header-top {
        padding: 10px 0;
    }
    
    .header-nav {
        position: static;
        background: transparent;
    }
    
    .header-nav .container {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0;
    }
    
    .header-top-content {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .site-logo {
        flex: 0 0 auto;
    }
    
    .site-logo svg {
        height: 40px;
    }
    
    /* デスクトップ要素を非表示 */
    .desktop-only,
    .desktop-search {
        display: none !important;
    }
    
    /* モバイル要素を表示 */
    .mobile-only {
        display: flex !important;
    }
    
    /* モバイル検索・メニューボタンを表示 */
    .mobile-search-toggle {
        display: block;
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    .mobile-menu-toggle {
        flex: 0 0 auto;
        margin-left: 10px;
    }
    
    /* モバイルメニューの位置調整 */
    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #0066cc;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.active {
        max-height: 600px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .main-nav.active .mobile-contact-info {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    /* モバイル検索パネルの位置調整 */
    .mobile-search-panel {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 999;
    }
    
    /* フッターレスポンシブ */
    .footer-top-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-phone {
        justify-content: center;
    }
    
    .footer-phone a {
        font-size: 20px;
    }
    
    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .company-list,
    .rosen-list {
        grid-template-columns: 1fr;
    }
    
    /* 駅路線図のレスポンシブ */
    .eki-line-map {
        padding: 20px;
    }
    
    .station-box {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .station-connector-horizontal {
        width: 30px;
        margin: 0 8px;
    }
    
    .kanban-table {
        overflow-x: auto;
    }
    
    .detail-info dl {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-spacer {
        height: 60px;
    }
    
    .header-top {
        padding: 8px 0;
    }
    
    .site-logo svg {
        height: 35px;
    }
    
    .mobile-search-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-menu-toggle {
        width: 25px;
        height: 20px;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
    }
    
    .mobile-phone a {
        font-size: 18px;
    }
}
