* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Shippori Mincho, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* メインコンテンツ */
main {
}

/* アクセス概要セクション */
.train-access-map{
    text-align: center;
    margin: 70px auto;
    width: 50rem;
}
.access-overview {
    background-color: #fff;
    padding: 60px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.access-intro {
    text-align: center;
    margin-bottom: 50px;
}

.access-intro h2 {
    font-size: 3.2rem;
    color: #005A8B;
    margin-bottom: 20px;
}

.access-intro p {
    font-size: 1.6rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}
/* アクセス方法タブ */
.access-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-button {
    padding: 15px 40px;
    border: 2px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.6rem;
    font-weight: 500;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-button:hover {
    border-color: #005A8B;
    color: #005A8B;
}

.tab-button.active {
    background-color: #005A8B;
    color: #fff;
    border-color: #005A8B;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 路線情報 */
.train-access-section{
    padding: 2rem 0;
}
.train-routes {
    border-radius: 10px;
    margin-bottom: 40px;
    width: 1270px;
    margin: 0 auto;
    padding: 4rem 15rem;
    background: url('../images/access/back_green.svg') bottom center / contain no-repeat;
}

.route-header {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2.4rem;
    position: relative;
    padding: 2rem 0 2.5rem 0;
}
.route-header::before{
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    content: '';
    width: 3.8rem;
    height: 1.5px;
    background: rgba(0, 116, 144, 1);
}
.route-header.right{
    justify-content: flex-end;
}
.route-header.right::before{
    left: unset;
    right: 0;
}

.route-line {
    color: rgba(0, 116, 144, 1);
    border-radius: 20px;
    letter-spacing: .3rem;
}

.station-grid {
    display: flex;
    gap: 30px;
}

.station-card {
    width: 30rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
.station-card img{
    width: 100%;
    aspect-ratio: 1.5329;
    object-fit: cover;
}

.station-card:hover {
    transform: translateY(-5px);
}
.figure{
    position: relative;

}
.label-text{
    display: flex;
    align-items: center;
    font-family: Cinzel;
    font-size: 2.4rem;
    line-height: 1.3;
    color: #fff;
    position: absolute;
    top: 0;
    right: -.2rem;
    width: 5rem;
    height: 16rem;
    padding: 1rem .3rem 1rem 0;
    background: url('../images/access/label_img.svg') top center / contain no-repeat;
    writing-mode: vertical-rl; /* 右から左に縦書き */
    text-orientation: mixed;  /* 漢字などを正しい方向で表示 */
}
.label-text.br{
    font-size: 1.4rem;
}

.figcaption{
    position: absolute;
    bottom: 0;
    left: 0;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 100;
    padding: .5rem;
    letter-spacing: .1rem;
    text-shadow: 0 0 3px rgba(0,0,0,1);
}
.figcaption div{
    display: inline;
}
.station-name {
    font-size: 1.6rem;
}
.travel-time{
    letter-spacing: 0;
}
.time-number {
    font-size: 2.4rem;
}

.time-direct {
    font-size: 1rem;
}

.route-details {
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 1rem;
}
.all-image-photo{
    position: absolute;
    bottom: 1rem;
    right: 16rem;
}
.train-access-wrap .caution{
    margin: 10px auto 0;
    text-align: left;
    width: 1270px;
    padding: 0 15rem;
}

/* 人気路線セクション */
.train-access-ranking{
    width: 965px;
    margin: 0 auto;
    background: rgba(233, 225, 208, 1);
}
.train-access-container{
    display: flex;
    padding: 7rem 5rem 5rem 5rem;
}
.popular-text{
    width: 55%;
    text-align: center;
    position: relative;
}
.popular-text > div{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36rem;
    transform: translate(-50%, -50%);
}
.popular-text h3{
    font-size: 2.8rem;
    margin: 2rem 0;
}
.popular-text p{
    font-size: 1.4rem;
    line-height: 2;
    text-align: left;
    margin-top: 2rem;
}
.popular-line {
    color: #fff;
    padding: 0 4rem;
    border-radius: 10px;
    text-align: center;
    width: 45%;
}

.popular-line h3 {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

.popular-line p {
    font-size: 1.6rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}
.ranking-image{
    width: 7rem;
    margin: 0 auto;
}

.caption {
    font-size: 1.0rem;
    color: #666;
    text-align: right;
    padding-bottom: 2rem;
    padding-right: 2rem;
}
.caption.left {
    text-align: left;
}

/* 地図セクション */
.map-section {
    margin: 60px 0;
}

.map-container {
    background-color: #e0e0e0;
    height: 500px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #666;
    position: relative;
    overflow: hidden;
}

/* 新幹線セクション */
.bullet-train-sub{
    position: relative;
   width: 69rem;;
   margin: 5rem auto;
}
.bullet-train-content{
    width: 127rem;
    margin: 0 auto;
}
.shinkansen-section {
    padding: 60px 0;
    display: flex;
}
.bullet-train-map{
    position: relative;
    width: 58rem;
}
.bullet-train-map img{
    max-width: 100%;
    height: auto;
}
.bullet-train-map span{
    color: #231823;
    bottom: 70px;
    right: 85px;
}
.bullet-container{
    position: relative;
    width: 60rem;
    padding-top: 5rem;
    margin-left: 3rem;
}
.bullet-container span {
    bottom: 180px;
}

.shinkansen-content {
    text-align: center;
    margin-bottom: 40px;
}

.shinkansen-content h3 {
    font-size: 2.4rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.shinkansen-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: #333;
}

/* カーアクセスセクション */
.car-access-section {
    background-color: #fff;
}

.car-access-content {
    position: relative;
    text-align: center;
}

.car-access-content h3 {
    font-size: 2.4rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.car-access-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: #333;
}
.sub_content .car-access-content span {
    color: #231823;
    bottom: 0;
}
.car-access-sub{
    position: relative;
   width: 69rem;;
   margin: 5rem auto;
}
.sub_content{
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 7rem 0 12rem 0;
}
.sub_content span {
    color: #231823;
    bottom: 36px;
}
.travel-time span {
    color: #fff;
}

/* スポットカード */
.spot-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 40px;
    align-content: center;
}
.spot-cards.cont{
    width: 60rem;
    margin: 0;
}
.spot-card {
    text-align: center;
    transition: transform 0.3s;
}
.spot-card img{
    width: 100%;
    aspect-ratio: 1.5329;
    object-fit: cover;
    vertical-align: bottom;
}

.spot-card h4 {
    font-size: 2.0rem;
    margin-bottom: 10px;
}

.spot-card .time {
    font-size: 2.4rem;
}

.spot-card .unit {
    font-size: 1.2rem;
}

.spot-card .label-text {
    background: url('../images/access/label_img_black.svg') top center / contain no-repeat;
}
.spot-card .name{
    font-size: 1.6rem;
}
.bullet-train-wrap .spot-cards + .image-caption{
    margin-top: 5px;
    position: static;
    display: block;
    text-align: right;
    color: #000;
}

/* レスポンシブ */
.mobile-menu {
    display: none;
    cursor: pointer;
}

.mobile-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    /* Font size adjustment for mobile */
    .caption {
        font-size: 1.2rem;
    }
    main{margin: 0;}
    .header-content {
        flex-wrap: wrap;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 20px;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .nav-buttons {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .access-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        max-width: 300px;
    }

    .station-grid {
        grid-template-columns: 1fr;
    }

    .time-number {
        font-size: 36px;
    }

    .map-container {
        height: 300px;
    }

    .spot-cards {
        grid-template-columns: 1fr 1fr;
    }
    .label-text{
        width: 2rem;
        height: 100%;
        font-size: 12px;
        right: 0;
    }
    .label-text.br{
        width: 3.5rem;
    }
    .spot-card .unit,
    .spot-card .name{
        font-size: 1rem;
    }
    .spot-card .time {
        font-size: 1.5rem;
    }
    .train-routes{
        width: 100%;
        padding: 100px 5%;
        background: url('../images/access/back_green.svg') center bottom /  auto 40vw  no-repeat;
    }
    .all-image-photo{
        right: 5%;
    }
    .route-header{
        font-size: 1.6rem;
        padding: 36px 0 20px;
    }
    .route-header > *{
        width: 100%;
    }
    .station-grid{
    flex-wrap: wrap;
    }
    .station-card img,
    .station-card{
        width: 100%;
    }
    .station-name {
        display: block !important;
    }
    .figcaption{
        line-height: 1.2;
    }
    .train-access-map{
        width: 90%;
    }
    .train-access-container{
        padding: 9rem 5%;
        flex-wrap: wrap;
        gap: 30px 0;
    }
    .train-access-container h3 + div:has(img[src$="popular.svg"]){
        width: 90%;
    }
    .car-access-sub,
    .bullet-train-content,
    .bullet-container,
    .bullet-train-map,
    .bullet-train-sub,
    .popular-text p,
    .popular-text h3,
    .ranking-image,
    .train-access-ranking,
    .popular-text,
    .popular-line{
        width: 100%;
    }
    .popular-text > div{
        width: 100%;
        position: static;
        transform: unset;
    }
    .shinkansen-section{
        width: 100%;
        flex-wrap: wrap;
    }
    .bullet-container{
        margin: 0;
        padding: 0 5%;
    }
    .spot-card img{
        width: 100%;
    }
    .sub_content{
        flex-wrap: wrap;
        gap: 30px;
    }
    .route-header::before{
        height: 30px;
        width: 2px;
        left: 5px;
    }
    .route-header.right::before{
        right: 5px;
    }
    .route-header.right .route-line{
        text-align: right;
    }
    .popular-line{
        padding: 0 10px;
    }
    .shinkansen-content h3{
        font-size: 2rem;
    }
    .bullet-train-map span {
        bottom: 25px;
        right: 25px;
    }
    .bullet-container span {
        bottom: -45px;
        right: calc(50% - 35px);
    }
    .sub_content span {
        bottom: -45px;
        right: calc(50% - 35px);
    }
    .sub_content .car-access-content span {
        bottom: -12px;
        right: 4px;
    }

    .train-access-wrap .caution{
        width: 90%;
        padding: 0;
    }

}

/* アニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
