@charset "utf-8";

/* =========================================================
    アクセス（page-access.php）
    ・見出し・白背景は style.css の「下層ページ 共通」。ここはアクセスだけの部品と間隔
    ・文字は rem（カンプ「標準」= 1rem 16px。コメントにカンプの px を併記）
    ・文字と文字まわりの余白は rem、ボタン・枠の padding は em（その要素の文字の大きさ基準）、画像・写真どうしの間・線・角丸は px（数字の横にカンプの px を併記）
    ・767px 以下が SP
========================================================= */
/* ページの見出しの後ろに和柄を敷かない（style.css の .sub-page の背景を消す） */
.access.sub-page {
    background: none;
}

/* ボタン（style.css の .btn）の角丸はカンプの 8.5px */
.access .btn {
    border-radius: 8.5px;
}

/* ---------- 地図・ホテルの基本情報 ---------- */
.access-top {
    margin-top: 5.875rem; /* 94px */
}

/* 地図（1200×500px） */
.access-map {
    overflow: hidden;
    border-radius: 30px;
    background: var(--sub-frame);
    aspect-ratio: 1200 / 500;
}

.access-map iframe,
.access-route-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.access-map-btn {
    margin-top: 3.25rem; /* 52px */
    text-align: center;
}

/* 左に写真（590×390px）、右に名前と基本情報 */
.access-hotel {
    display: grid;
    grid-template-columns: minmax(0, 590fr) minmax(0, 581fr);
    column-gap: 29px;
    align-items: start;
    margin-top: 5.0625rem; /* 81px */
}

.access-hotel-photo img {
    border-radius: 27.6px;
    background: var(--sub-frame);
    aspect-ratio: 590 / 390;
}

/* cqw：この欄の幅の 1%（名前を欄の幅に合わせて縮めるため） */
.access-hotel-info {
    padding-top: 1.25rem; /* 20px */
    container-type: inline-size;
}

/* 名前：ロゴマーク（60px）・阿蘇内牧温泉・阿蘇 五岳ホテルを横 1 行に並べる
    欄がカンプの幅（581px）より狭いときは、1 行のまま全体を同じ比率で縮める */
.access-hotel-name {
    display: flex;
    align-items: center;
    gap: 0 min(22px, 3.79cqw);
    margin-left: min(46px, 7.91cqw);
    font-family: var(--Mincho);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.access-hotel-name img {
    flex-shrink: 0;
    width: min(60px, 10.32cqw);
}

.access-hotel-name-sub {
    font-size: min(1.49rem, 4.1cqw); /* 23.85px */
    letter-spacing: 0.04em;
}

.access-hotel-name-main {
    font-size: min(2.033rem, 5.6cqw); /* 32.53px */
    letter-spacing: 0;
}

/* 基本情報：項目名｜区切り線｜内容（区切り線は枠の左から 186px） */
.access-hotel-table {
    /* 文字と枠内の余白は文字サイズ「大」（1rem = 20px）で止める */
    --hotel-info-unit: min(1rem, 20px);
    margin-top: calc(1.75 * var(--hotel-info-unit)); /* 28px */
    padding: 1.9444em 1.6667em 1.8333em 0; /* 35px 30px 33px 0 */
    border: 1px solid var(--sub-line);
    border-radius: 21.7px;
    font-size: calc(1.125 * var(--hotel-info-unit)); /* 18px */
    line-height: 1.75;
}

.access-hotel-table > div {
    display: grid;
    grid-template-columns: calc(43px + 8.875 * var(--hotel-info-unit)) minmax(0, 1fr);
    align-items: center;
}

.access-hotel-table > div + div {
    margin-top: calc(1.75 * var(--hotel-info-unit)); /* 28px */
}

.access-hotel-table dt {
    padding-left: calc(2.6875 * var(--hotel-info-unit)); /* 43px */
}

.access-hotel-table dd {
    position: relative;
    padding-left: calc(2.25 * var(--hotel-info-unit)); /* 36px */
}

.access-hotel-table dd::before {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    left: 0;
    width: 1px;
    background: var(--sub-line);
}

.access-address-break {
    display: none;
}

/* ---------- 交通アクセス ---------- */
.access-routes {
    margin-top: 8.75rem; /* 140px */
}

/* 左上の黄色い丸（110px）にアイコン。カードは丸の中心の右から始まり、丸は帯の上下からはみ出す */
.access-route {
    position: relative;
    margin: 4.3125rem 0 0 3.75rem; /* 69px 0 0 60px */
    padding-top: 1.25rem; /* 20px */
}

.access-route + .access-route {
    margin-top: 6.3125rem; /* 101px */
}

.access-route-icon {
    position: absolute;
    top: 0;
    left: -60px;
    z-index: 1;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--yellow);
}

/* アイコン（82×82px）を丸の中央に。SP は丸に合わせて縮める */
.access-route-icon img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74.5%;
    height: auto;
    transform: translate(-50%, -50%);
}

.access-route-card {
    overflow: hidden;
    border-radius: 27.6px;
    background: var(--white);
}

/* 黄色い帯（高さ 70px）に見出し */
.access-route-title {
    display: flex;
    align-items: center;
    min-height: 4.375rem; /* 70px */
    margin: 0;
    padding: 0.3em 1.25em 0.3em 2.5833em; /* 0.3em 30px 0.3em 62px */
    background: var(--yellow);
    font-family: var(--Mincho);
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    line-height: 1.4;
}

/* 左に説明（上）とボタン（下）、右に経路の地図（530×360px） */
.access-route-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(52%, 530px);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "text map"
        "btn map";
    column-gap: 50px;
    padding: 2.75rem 3.0625rem 2.625rem 3.875rem; /* 44px 49px 42px 62px */
}

/* 説明の 1 行目の文字の上端を、地図の上端にそろえる（行の高さの余白ぶん上げる） */
.access-route-text {
    grid-area: text;
    margin-top: -0.4375rem; /* -7px */
    font-size: 1rem; /* 16px */
    line-height: 1.75;
}

/* 項目の本文と補足を、折り返しても「・」の右にそろえる */
.access-route-text > li {
    position: relative;
    padding-inline-start: 1em;
}

.access-route-text > li::before {
    position: absolute;
    inset-inline-start: 0;
    content: "・";
}

.access-route-text-transit > li {
    margin-bottom: 0.5em;
}

.access-route-map {
    grid-area: map;
    overflow: hidden;
    background: var(--sub-frame);
    aspect-ratio: 530 / 360;
}

.access-route-btn {
    grid-area: btn;
    align-self: end;
    padding-top: 1.25rem; /* 20px */
}

.access-route-btn .btn {
    max-width: 100%;
    font-size: min(1.125rem, 22.5px); /* 文字サイズ「大」が上限 */
    white-space: normal;
}

/* ---------- 駐車場について ---------- */
.access-parking {
    margin-top: 8.5625rem; /* 137px */
}

.access-parking-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 3.75rem; /* 60px */
}

.access-parking-photos img {
    border-radius: 27.6px;
    background: var(--sub-frame);
    aspect-ratio: 590 / 390;
}

/* 段落の間は 1 行あける */
.access-parking-text {
    margin-top: 4.1875rem; /* 67px */
    font-size: 1.125rem; /* 18px */
    line-height: 1.75;
    text-align: center;
}

.access-parking-text > * + * {
    margin-top: 1.75em;
}

/* style.css の p（1rem）ではなく、上の文字の大きさにそろえる */
.access-parking-text p {
    font-size: inherit;
}

/* ---------- 周辺観光（白背景） ---------- */
.access .sub-white {
    margin-top: 8.375rem; /* 134px */
    padding-bottom: 6.6875rem; /* 107px */
}

.access-spots-text {
    margin-top: 3.125rem; /* 50px */
    font-size: 1.125rem; /* 18px */
    line-height: 1.75;
    text-align: center;
}

/* 種類ごとに 1 行（カード 380px を 3 つ） */
.access-spot-group {
    --spot-color: var(--green);
    margin-top: 1.875rem; /* 30px */
}

.access-spots-text + .access-spot-group {
    margin-top: 3.8125rem; /* 61px */
}

.access-spot-experience {
    --spot-color: #4561b0;
}

.access-spot-gourmet {
    --spot-color: #cc434c;
}

.access-spot-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

/* カード：写真（380×240px）→ 種類の帯（30px）→ 名前・時間・説明 */
.access-spot {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--sub-line);
    border-radius: 27px;
    background: var(--white);
}

.access-spot-photo img {
    background: var(--sub-frame);
    aspect-ratio: 380 / 240;
}

.access-spot-label {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.875rem; /* 30px */
    padding: 0 0.7143em; /* 0 10px */
    background: var(--spot-color);
    color: var(--white);
    font-size: 0.875rem; /* 14px */
    line-height: 1.4;
}

.access-spot-body {
    padding: 0.8125rem 1.8125rem 2.0625rem; /* 13px 29px 33px */
}

.access-spot-name {
    margin: 0;
    font-family: var(--Mincho);
    font-size: 1.375rem; /* 22px */
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.access-spot-time {
    margin-top: 0.125rem; /* 2px */
    padding-bottom: 0.75em; /* 12px */
    border-bottom: 1px solid var(--sub-line);
    font-size: 1rem; /* 16px */
    line-height: 1.5;
    letter-spacing: 0;
    text-align: center;
}

.access-spot-text {
    margin-top: 0.625rem; /* 10px */
    font-size: 1rem; /* 16px */
    line-height: 1.75;
    letter-spacing: 0;
}

.access .access-spot-time,
.access .access-spot-text {
    letter-spacing: inherit;
}

/* スライドのバーは SP だけ */
.access-spot-bars {
    display: none;
}

.access-spots-more {
    margin-top: 5rem; /* 80px */
    text-align: center;
}

/* ---------- PC（狭い画面）：写真の下に基本情報、カードの中は説明 → 地図 → ボタン ---------- */
@media (max-width: 1023px) {
    .access-hotel {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 1.875rem; /* 30px */
    }

    .access-route-body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "text"
            "map"
            "btn";
        row-gap: 1.875rem; /* 30px */
    }

    .access-route-text {
        margin-top: 0;
    }

    .access-route-btn {
        padding-top: 0;
    }
}

/* ---------- SP ---------- */
@media (max-width: 767px) {
    .access-address-space {
        display: none;
    }

    .access-address-break {
        display: initial;
    }


    .access .btn {
        width: min(312px, 100%);
    }

    .access-top {
        margin-top: 5.3125rem; /* 85px */
    }

    /* 地図（351×223.2px） */
    .access-map {
        border-radius: 10px;
        aspect-ratio: 351 / 223.2;
    }

    .access-map-btn {
        margin-top: 1.875rem; /* 30px */
    }

    .access-hotel {
        display: block;
        margin-top: 2.5625rem; /* 41px */
    }

    .access-hotel-photo img {
        border-radius: 10px;
    }

    .access-hotel-info {
        padding-top: 0;
    }

    /* 名前：ロゴマーク（43px）を上の中央に、その下に名前を 1 行で（文字が大きくて入りきらないときは 2 行） */
    .access-hotel-name {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1.0625rem; /* 8px 17px */
        margin: 1.625rem 0 0; /* 26px 0 0 */
    }

    .access-hotel-name img {
        width: 43px;
        margin-inline: calc(50% - 21.5px);
    }

    .access-hotel-name-sub {
        font-size: 1.146rem; /* 18.34px */
    }

    .access-hotel-name-main {
        font-size: 1.5625rem; /* 25px */
    }

    /* 基本情報（351px）：区切り線は枠の左から 134px。住所は 2 行 */
    .access-hotel-table {
        margin-top: calc(1.4375 * var(--hotel-info-unit)); /* 23px */
        padding: 1.125em 1.1875em 1.25em 0; /* 18px 19px 20px 0 */
        border-radius: 14.25px;
        font-size: var(--hotel-info-unit); /* 16px */
        line-height: 1.375;
    }

    .access-hotel-table > div {
        grid-template-columns: calc(18px + 7.25 * var(--hotel-info-unit)) minmax(0, 1fr);
    }

    .access-hotel-table > div + div {
        margin-top: calc(1.0625 * var(--hotel-info-unit)); /* 17px */
    }

    .access-hotel-table dt {
        padding-left: calc(1.125 * var(--hotel-info-unit)); /* 18px */
    }

    .access-hotel-table dd {
        padding-left: var(--hotel-info-unit); /* 16px */
    }

    .access-hotel-table dd::before {
        top: 2px;
        bottom: 2px;
    }

    .access-routes {
        margin-top: 4.375rem; /* 70px */
    }

    /* 丸（80px）は左端。帯は丸の中心から始まり、カードの白は帯の途中（丸の中心の高さ）から */
    .access-route {
        margin: 3.4375rem 0 0; /* 55px 0 0 */
        padding-top: 2.25rem; /* 36px */
    }

    .access-route + .access-route {
        margin-top: 4.375rem; /* 70px */
    }

    .access-route-icon {
        left: 0;
        width: 80px;
        height: 80px;
    }

    .access-route-card {
        overflow: visible;
        border-radius: 10px;
    }

    .access-route-title {
        min-height: 3.75rem; /* 60px */
        margin: -1.625rem 0 0 2.375rem; /* -26px 0 0 38px */
        padding: 0.3em 0.75em 0.3em 2.55em; /* 0.3em 15px 0.3em 51px */
        border-radius: 0 10px 0 0;
        font-size: 1.25rem; /* 20px */
    }

    /* 説明 → 地図（312×212px） → ボタン */
    .access-route-body {
        row-gap: 0;
        padding: 1.9375rem 1.2188rem 1.375rem; /* 31px 19.5px 22px */
    }

    .access-route-map {
        margin-top: 1.9375rem; /* 31px */
        aspect-ratio: 312 / 212;
    }

    .access-route-btn {
        margin-top: 2.0625rem; /* 33px */
    }

    .access-route-btn .btn {
        width: 100%;
    }

    .access-parking {
        margin-top: 4.375rem; /* 70px */
    }

    /* 写真 2 枚（172.6×114px）は横に並べたまま */
    .access-parking-photos {
        gap: 6px;
        margin-top: 2.6875rem; /* 43px */
    }

    .access-parking-photos img {
        border-radius: 8px;
    }

    .access-parking-text {
        margin-top: 2.3125rem; /* 37px */
        font-size: 1rem; /* 16px */
        text-align: left;
    }

    .access .sub-white {
        margin-top: 4rem; /* 64px */
        padding-bottom: 4.375rem; /* 70px */
    }

    .access-spots-text {
        margin-top: 2.3125rem; /* 37px */
        font-size: 1rem; /* 16px */
        text-align: left;
    }

    /* 種類ごとにスライド：カード（351px）を横に並べ、表示中の番号（--gallery-index：main.js）の分だけ横に流す */
    .access-spot-group {
        overflow: hidden;
        margin-top: 2.9375rem; /* 47px */
    }

    .access-spots-text + .access-spot-group {
        margin-top: 2.6875rem; /* 43px */
    }

    .access-spot-list {
        display: flex;
        gap: 20px;
        transform: translateX(calc(var(--gallery-index, 0) * (-100% - 20px)));
        transition: transform 0.6s ease;
    }

    .access-spot {
        flex: 0 0 100%;
        border-radius: 25px;
    }

    .access-spot-label {
        min-height: 1.7312rem; /* 27.7px */
        font-size: 0.8125rem; /* 13px */
    }

    .access-spot-body {
        padding: 0.75rem 1.6875rem 1.4375rem; /* 12px 27px 23px */
    }

    .access-spot-name {
        font-size: 1.25rem; /* 20px */
    }

    .access-spot-time {
        margin-top: 0;
        padding-bottom: 0.6875em; /* 11px */
    }

    .access-spot-text {
        margin-top: 0.5625rem; /* 9px */
    }

    /* スライドのバー（23.9×2px、間隔 15px、カードの下 17px）：表示中のバーが時間とともに黄色になる */
    .access-spot-bars {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 0.5rem; /* 8px */
    }

    .access-spot-bar {
        position: relative;
        width: 23.9px;
        height: 20px;
    }

    .access-spot-bar::before,
    .access-spot-bar::after {
        content: "";
        position: absolute;
        top: 9px;
        left: 0;
        width: 100%;
        height: 2px;
        background: #cccccc;
    }

    .access-spot-bar::after {
        background: var(--yellow);
        transform: scaleX(0);
        transform-origin: left;
    }

    .access-spot-bar.is-active::after {
        animation: access-bar-progress var(--gallery-interval, 5s) linear forwards;
    }

    .access-spots-more {
        margin-top: 3.5625rem; /* 57px */
    }
}

@keyframes access-bar-progress {
    to {
        transform: scaleX(1);
    }
}
