.video {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.videoMobile {
    display: none;

}

.video video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}


.video .title {
    position: absolute;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    writing-mode: vertical-rl;
    font-size: 45px;
    font-weight: 700;
    color: white;
    text-shadow: 10px 10px 30px black;

    letter-spacing: 1em;
    text-align: center;
    margin: 0;
    z-index: 1;
}




.textSection {
    writing-mode: vertical-rl;
    text-align: justify;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 160px 0;
    white-space: normal;
    line-break: strict;
    width: 100%;
    height: auto;
    max-height: 450px;
    margin-top: 200px;
    gap: 120px;
}

.textSection h2 {
    font-size: 36px;
    margin: 0;
    letter-spacing: 0.3em;
}

.textSection p {
    font-size: 18px;
    margin: 0;
    letter-spacing: 0.2em;
    line-height: 2.5em;

}

.link {
    padding-top: 40%;
    position: relative;
    display: inline-block;
    color: #333;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}


.link:hover {
    transform: translateY(10px);
    color: #874897;
}


/* イメージセクション */
.imgSection img {
    margin-top: 200px;
    width: 100%;

}

.imgSectionWrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.imgSection h3 {
    position: relative;
    font-size: 36px;
    text-align: center;
    color: var(--main-color);
    text-shadow: 3px 3px 50px var(--main-color);
    margin: 450px auto;
    z-index: 2;
}

.imgSectionWrapper img {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30vw;
    height: auto;
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
}



/* 紹介 */
.dateSection {
    margin: 60px auto;
    display: flex;
    justify-content: center;
    max-width: 960px;
    width: 100%;
    max-height: 380px;
    flex-direction: row-reverse;
}

.dateImg {
    position: relative;
    display: flex;
    width: 660px;
    height: 100%;
    overflow: hidden;
}

.dateImg img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.dateImg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.dateImg:hover img {
    transform: scale(1.05);
}

.dateImg:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

.dateImg h2 {
    position: absolute;
    display: inline-block;
    top: 30px;
    right: 40px;
    writing-mode: vertical-rl;
    text-align: justify;
    flex-direction: column;
    font-size: 34px;
    background-color: #874897;
    color: white;
    padding: 10px;
    z-index: 2;
    outline: 3px solid #874897;
    outline-offset: 5px;
}

.dateText {
    display: block;
    writing-mode: vertical-rl;
    flex-direction: column;
    letter-spacing: 0.1em;
    line-height: 2;
    height: 377px;
    width: 300px;
    background-color: #f9f9f9;
    padding: 30px 15px;
}

.dateText p {
    font-size: 16px;
    line-break: auto;
    margin: 0 10px;

}

.dateTextWrapper {
    display: block;
    padding: 4px;
    color: #874897;
    border: 4px double #874897;
}

.dateTextWrapper a {
    width: 50px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    writing-mode: horizontal-tb;
    justify-content: space-between;
    height: 100%;
}

.dateTextWrapper a p {
    writing-mode: vertical-rl;
    margin-top: 30px;
    font-size: 18px;
    display: block;
}

.dateTextWrapper svg {
    margin-top: 5px;
    display: block;
    margin-bottom: 30px;
}

.dateTextWrapper:hover {
    background-color: #874897;
    color: white;
}

.dateTextWrapper:hover a,
.dateTextWrapper:hover p {
    color: white;
}

.dateTextWrapper:hover svg {
    fill: white;
}

/* 授与品 */

.itemSection {
    display: flex;
    margin: 100px auto 300px auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    max-width: 960px;
    width: 100%;
}


.itemImg {
    position: relative;
    display: flex;
    overflow: hidden;
    height: 380px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.itemImg a {
    display: block;
    width: 100%;
    height: 100%;
}

.itemImg img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}


.itemImg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.itemImg:hover img {
    transform: scale(1.05);
}

.itemImg:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

.itemImg h2 {
    position: absolute;
    display: inline-block;
    top: 30px;
    right: 40px;
    writing-mode: vertical-rl;
    text-align: justify;
    flex-direction: column;
    font-size: 34px;
    background-color: #874897;
    color: white;
    padding: 10px;
    z-index: 2;
    outline: 3px solid #874897;
    outline-offset: 5px;
    letter-spacing: 0.2em;
}

.itemText {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    gap: 20px;
    align-items: center;
    background-color: #f9f9f9;
    width: 960px;
    margin: 20px auto;
}

.itemText h2 {
    writing-mode: vertical-rl;
    font-size: 14px;
    z-index: 2;
}

.itemWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 200px;
    height: 200px;
}

.itemWrapper img {
    display: block;
    width: 100%;
    height: auto;
    z-index: 1;
}

.itemWrapper p {
    position: absolute;
    writing-mode: vertical-rl;
    text-orientation: upright;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 2;
}

.itemWrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 0;
}

.itemWrapper:hover img {
    transform: scale(1.05);
}

.itemWrapper:hover::before {
    opacity: 0;
    transform: scale(1.05);
}




/* インスタ */

.instagramSection {
    width: 100%;
    padding: 10%;
}

.instagramSection img {
    display: block;
    width: 25%;
    place-items: center;
    margin: 0 auto 60px;

}

.instagramLogo {
    width: 100px;
}

/* ギャラリー周り */
.instaWrapper {
    position: relative;
    width: 100%;
}

.instaOverlay {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 10;
    cursor: pointer;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal.open {
    display: flex;
}

.modalContent {
    position: relative;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 90%;
    width: 320px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.modalClose {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.gotoInsta {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: var(--main-color);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.gotoInsta:hover {
    opacity: 0.85;
}


.instagramSection .instagramLogo {
    margin-bottom: 20px;
}



.sns {
    margin: 40px 0;
    font-size: 24px;
    text-align: center;
    border-bottom: #874897;
}

.snsIconWrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.snsIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 60px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.snsIcon img {
    width: 30px;
    height: 30px;
    margin: 0 auto;
}

.snsIcon:hover {
    transform: scale(1.5);
}


/* FAQ */

.faq {
    margin: auto;
    padding: 20%;
    width: 100%;

}

.faqItem {
    margin-bottom: 40px;

}

.faq h2 {
    text-align: center;
    font-size: 36px;
    margin: 80px;
}

.question {
    display: flex;
    margin: 40px auto;
    font-size: 18px;
    justify-content: space-between;
    align-items: center;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.questionQ {
    font-size: 30px;
    margin-right: 18px;
    font-weight: bold;
}

.answerA {
    font-size: 30px;
    color: #874897;
    margin-right: 18px;
    font-weight: bold;
}

.answer {
    max-height: 0;
    overflow: hidden;
    font-size: 18px;
    display: flex;
    justify-content: flex-start;
    align-items: center;

}

.answer.open {
    max-height: 400px;
    padding-bottom: 30px;
}

.faqToggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #c44f77;
    cursor: pointer;
    padding: 0 5%;
    margin-left: auto;
}

.faqHr {
    border: none;
    height: 2px;
    background-color: #874897;
    width: 100%;
    margin: 0;
}


@media (max-width: 1024px) {

    .videoMobile .title {
        position: absolute;
        height: 100%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        writing-mode: vertical-rl;
        font-size: 32px;
        font-weight: 700;
        color: white;
        letter-spacing: 1em;
        text-align: center;
        margin: 0;
        z-index: 1;
    }

    .textSection {
        gap: 80px;
        padding: 0 10%;
    }

    .textSection h2 {
        font-size: 34px;
    }

    .textSection p {
        font-size: 20px;
    }




    .imgSection img {
        margin-top: 250px;
    }

    .imgSection h3 {
        position: relative;
        font-size: 1.5rem;
        text-align: center;
        margin: 300px auto;
        text-shadow: 3px 3px 100px var(--main-color);

    }




    /* ご祈祷セクション */

    .dateSection {
        width: 100%;
        flex-direction: column;
        align-items: center;
        max-height: none;
        padding: 0 10%;
    }

    .dateImg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }


    .dateImg h2 {
        font-size: 30px;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        outline: 1px solid #874897;

    }

    .dateText {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        height: auto;
        writing-mode: horizontal-tb;
        margin: 0 auto;

    }

    .dateText p {
        padding: 20px;
        text-align: center;
        width: 100%;
        height: auto;
        font-size: 18px;
        padding: 0;
        margin: 10px auto;

    }

    .dateTextWrapper {
        width: 100%;
        margin: 0;
        min-height: 40px;
    }

    .dateTextWrapper a {
        width: 100%;
        display: flex;
        position: relative;
        flex-direction: row;
        align-items: center;
        text-align: center;
        writing-mode: horizontal-tb;
        justify-content: center;
        box-sizing: border-box;
    }


    .dateTextWrapper a p {
        writing-mode: horizontal-tb;
        font-size: 18px;
        width: auto;
        display: block;
        box-sizing: border-box;
        text-align: center;
        align-items: center;
        margin: 0;
    }

    .dateTextWrapper svg {
        width: 14px;
        height: 14px;
        position: absolute;
        top: 50%;
        right: 20px;
        display: inline-block;
        transform: translateY(-50%) rotate(-90deg);
        transform-origin: center center;
        margin: 0;
    }

    .itemSection {
        width: 100%;
        align-items: center;
        max-height: none;
        margin-bottom: 200px;
        padding: 0 10%;

    }


    .itemImg {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .itemImg h2 {
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        font-size: 30px;
        padding: 6px 10px;
        outline: 2px solid #874897;
        outline-offset: 4px;
    }



    .itemText {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: auto;
        justify-content: stretch;
        align-items: stretch;
        width: 100%;
        margin: 0 auto;
        padding: 30px 15px;
    }

    .itemWrapper {
        width: 100%;
        height: auto;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }



    .itemWrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .itemWrapper p {
        font-size: 18px;
    }

    .dateTextWrapper {
        grid-column: 1 / -1;
    }

    /* インスタ */
    .instagramSection {
        width: 100%;
        height: auto;
    }

    .instagramSection .instagramLogo {
        height: 60px;
        width: auto;
        margin-bottom: 20px;
    }


    .instagramGrid {
        padding: 20px 20%;
        margin: 0;
        gap: 10px;
    }

    .sns {
        font-size: 10px;
        margin: 15px;
    }

    .snsIconWrapper {
        margin-top: 0;
    }

    .snsIcon {
        height: 30px;
        width: auto;
    }

    .snsIcon img {
        width: 15px;
        height: auto;
    }



    /* faq */
    .faq {
        width: 100%;
        padding: 20% 10%;
    }

    .faq h2 {
        font-size: 36px;
        margin: 100px auto 30px 0;
    }

    .faqItem {
        width: 100%;
    }

    .question {
        width: 100%;
        font-size: 18px;
        margin: 20px auto;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .questionQ {
        font-size: 22px;
    }

    .faqToggle {
        font-size: 22px;
    }

    .answer {
        font-size: 18px;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .answerA {
        font-size: 22px;
        padding: 0 0 20px 0;
    }

}



@media (max-width: 600px) {

    .videoMobile {
        position: relative;
        width: 100%;
        height: 100vh;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .video {
        display: none;

    }

    .videoMobile video {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: -1;
    }

    .videoMobile .title {
        position: absolute;
        height: 100%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        writing-mode: vertical-rl;
        font-size: 32px;
        font-weight: 700;
        color: white;
        letter-spacing: 1em;
        text-align: center;
        margin: 0;
        z-index: 1;
    }

    .textSection {
        max-width: 100%;
        margin-top: 250px;
        gap: 15px;
        padding: 0 10%;
        height: 300px;
        width: 100%;
    }

    .textSection h2 {
        font-size: 18px;
        text-align: center;
    }

    .textSection p {
        font-size: 12px;
    }




    .dateSection {
        width: 100vw;
        flex-direction: column;
        align-items: center;
        max-height: none;
    }

    .dateImg {
        width: 100%;
        height: auto;
    }

    .dateImg h2 {
        font-size: 14px;
    }

    .dateText p {
        padding: 20px;
        text-align: center;
        width: 100%;
        height: auto;
        font-size: 12px;
        padding: 0;
        margin: 10px auto;

    }

    .dateTextWrapper {
        width: 100%;
        margin: 0;
        min-height: 40px;
    }

    .dateTextWrapper a p {
        font-size: 12px;

    }

    .itemImg h2 {
        font-size: 18px;
        padding: 6px 10px;

    }



    .itemText {
        padding: 30px 15px;
    }


    .itemWrapper p {
        font-size: 12px;
    }


    /* インスタ */



    .instagramSection .instagramLogo {
        height: 40px;

    }

    /* faq */

    .faq h2 {
        font-size: 26px;
        margin: 100px auto 30px 0;
    }

    .question {
        width: 100%;
        font-size: 16px;
        margin: 20px auto;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .questionQ {
        font-size: 22px;
    }

    .faqToggle {
        font-size: 22px;
    }

    .answer {
        font-size: 16px;
    }

    .answerA {
        font-size: 22px;
        padding: 0 0 20px 0;
    }

}