@charset "utf-8";

/* 共通レイアウト幅 */
.section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 共通 */
.guide_sec {
    width: 100%;
    max-width: 144rem;
    padding: 0 8%;
    margin: 0 auto;
    margin-bottom: 8rem;
}

.map_inner {
    display: flex;
    position: relative;
    justify-content: center;
    gap: 2rem;
    margin-top: 10rem;
}

.map_head {
    flex: 0 0 20%;
    display: flex;
    justify-content: center;
}

.m_head {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: .16em;
    padding: 2.4rem 1rem 0 0;
    writing-mode: vertical-rl;
    position: relative;
}

.m_head::before {
    content: "";
    display: block;
    position: absolute;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    top: .9rem;
    left: .6rem;
    background-color: #E94709;
}

.map_image {
    width: calc(50vw + 32.8%);
    overflow: hidden;
}

.map_image img {
    object-fit: cover;
}

/*地図*/

.grounds {
    margin-top: 8rem;
    margin-left: 5rem;
}

.grounds-map-wrap {
    position: relative;
    width: 100%;
}

.grounds-map-wrap>img,
.grounds-map-wrap .grounds_map {
    width: 100%;
    height: auto;
    display: block;
}


.grounds_text_item {
    text-shadow: 0px 0px 3px rgba(255, 255, 255, 0.8);
}


/* 共通スポット */
.spot {
    position: absolute;
    top: calc(var(--y) * 1%);
    left: calc(var(--x) * 1%);
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spot .label {
    writing-mode: vertical-rl;
    font-size: clamp(14px, 2vw, 24px);
    letter-spacing: 0.2em;
}

.spot .icon {
    margin-top: 0.3em;
    /* ← 文字基準で安全 */
}

.guide_btn {
    width: clamp(16px, 2.5vw, 25px);
    height: auto;
    max-width: none;
}

/*モーダル用*/
.guide-modal {
    position: fixed;
    inset: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.guide-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.guide-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.guide-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.guide-modal__inner {
    background: #f7f7f7;
    padding: 1.2rem;
    max-width: 90%;
    max-height: 90%;
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity 0.45s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 3;
}

.guide-modal.is-open .guide-modal__inner {
    opacity: 1;
    transform: scale(1);
}


.guide-modal__content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.guide-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;

    width: 2.5rem;
    height: 2.5rem;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 2rem;
    line-height: 1;

    padding: 0;
    margin: 0;

    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}


.guide_btn {
    cursor: pointer;
}

.guide-modal__title {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.guide-modal__overlay {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.guide-modal.is-open .guide-modal__overlay {
    opacity: 1;
}

.guide-modal__title {
    opacity: 0;
    transform: translateY(8px);
    transition: 0.4s ease 0.15s;
}

.guide-modal.is-open .guide-modal__title {
    opacity: 1;
    transform: translateY(0);
}

.guide-modal__content img {
    touch-action: pan-y;
    user-select: none;
}

.guide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.guide-arrow:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.guide-arrow--prev {
    left: -1.5rem;
}

.guide-arrow--next {
    right: -1.5rem;
}

/*地図2*/

.shrine {
    margin-top: 8rem;
    margin-left: 5rem;
}

.shrine-map-wrap {
    position: relative;
    width: 100%;
}

.shrine-map-wrap>img,
.shrine-map-wrap .shrine_map {
    width: 100%;
    height: auto;
    display: block;
}


.shrine_text_item {
    text-shadow: 0px 0px 3px rgba(255, 255, 255, 0.8);
}

.shrine_spot {
    position: absolute;
    top: calc(var(--y) * 1%);
    left: calc(var(--x) * 1%);
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shrine_spot .label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: clamp(14px, 2vw, 24px);
    letter-spacing: 0.2em;
}

/*ご参拝の方へのお願い*/

.guidelines {
    margin-top: 15rem;
}

.guidelines_inner {
    margin-top: 400px;
    display: flex;
    position: relative;
    justify-content: center;
    gap: 4rem;
}

.guidelines_catch {
    font-size: 20px;
    border-bottom: 1px dashed;
    padding-bottom: 10px;
    font-weight: bold;
    line-height: 1.5;
    margin-top: 2rem;
}

.guidelines_list {
    margin-top: 20px;
    margin-left: 20px;
}

.guidelines_list li {
    list-style: disc;
    margin: 0.5em;
    font-size: 16px;
    font-weight: normal;
}

.guidelines_icon {
    display: flex;
    justify-content: left;
    gap: 1rem;
    margin-top: 30px;
}

.guidelines_icon img {
    width: 100px;
}

.guidelines_offset {
    margin-top: 8rem;
}



/*===========JS用==========*/

/* タイトル・キャッチ用 */
.m_head,
.guidelines_catch {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(12px);
    transition:
        opacity 1.1s ease,
        filter 1.1s ease,
        transform 1.1s ease;
}

.m_head.is-show,
.guidelines_catch.is-show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* 画像用（左から右にマスク） */
.map_image {
    position: relative;
    overflow: hidden;
}

.map_image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #f7f7f7;
    transform: translateX(0);
    transition: transform 1.2s ease;
    z-index: 2;
}

.map_image img {
    display: block;
    width: 100%;
    height: auto;
    transform: scale(1.05);
    transition: transform 1.2s ease;
}

.map_image.is-show::before {
    transform: translateX(100%);
}

.map_image.is-show img {
    transform: scale(1);
}


/*===========レスポンシブ==========*/

@media screen and (max-width: 800px) {

    /* 共通レイアウト幅 */
    .section-inner {
        max-width: 800px;
        margin: 0 auto;
        padding: 0 1rem;
    }

    .map_inner {
        flex-direction: column;
        margin-top: 4rem;
    }

    .map_head {
        justify-content: flex-start;
        margin-bottom: 1.5rem;
    }

    .m_head {
        writing-mode: horizontal-tb;
        padding: 0;
        font-size: 1.6rem;
    }

    .m_head::before {
        top: 50%;
        left: -1rem;
        transform: translateY(-50%);
    }

    .map_image {
        width: 100%;
    }

    /* 地図 */

    .grounds {
        margin-left: 0;
        margin-top: 4rem;
    }

    .grounds-map-wrap {
        width: 100%;
    }

    .spot .label {
        font-size: 12px;
        letter-spacing: 0.1em;
    }

    .guide_btn {
        width: 18px;
    }

    /* モーダル */

    .guide-modal__inner {
        width: 92vw;
        max-width: none;
        max-height: 90svh;
        padding: 0.8rem;
        transform: translateY(-4%);
    }

    .guide-modal__content {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .guide-modal__content img {
        max-height: 65vh;
    }

    .guide-modal__close {
        width: 3rem;
        height: 3rem;
        font-size: 2.2rem;
    }

    .guide-arrow {
        width: 3rem;
        height: 3rem;
        font-size: 2.4rem;
    }

    .shrine {
        margin-left: 0;
        margin-top: 4rem;
    }

    .shrine-map-wrap {
        width: 100%;
    }

    .shrine_spot .label {
        font-size: 12px;
    }

    .guidelines {
        margin-top: 6rem;
    }

    .guidelines_catch {
        font-size: 16px;
        line-height: 1.7;
    }

    .guidelines_list li {
        font-size: 14px;
        margin: 0.8em 0;
    }

    .guidelines_icon {
        flex-wrap: wrap;
    }

    .guidelines_icon img {
        width: 64px;
    }

    .guide-modal__title {
        text-align: center;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }

}