/* 全体のリセットとフォント指定 */

body {
    font-family: 'Times New Roman', serif;
    line-height: 1.8;
    color: var(--primary-text-color);
    background-color: var(--main-white);
    margin: 0;
    padding: 0;
    transition: opacity 0.5s;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
    scrollbar-width: none;
}


/* ===================================== */


/* --- 12. ローダー表示中のスクロール禁止 --- */


/* ===================================== */

body.no-scroll {
    overflow: hidden;
}


/* アクセントカラー定義 */

:root {
    --main-white: #fff;
    --accent-gold: #C0A04C;
    --primary-text-color: #2C3E50;
    --section-bg-light: #FDF9F3;
    --section-bg-dark: #E9EFF4;
    --accent-rose: #D1A3B4;
}


/* ===================================== */


/* --- 11. ローディング画面スタイル --- */


/* ===================================== */

#loader-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--section-bg-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader {
    width: 100%;
    max-width: 700px;
    height: auto;
    background-color: transparent;
}


/* SVGファイル内の全パスの初期状態を定義 */

#loader svg path[id="wedding-path"] {
    stroke: var(--accent-gold);
    stroke-width: 2px;
    fill: var(--accent-gold);
    fill-opacity: 0;
    /* opacity と transition を削除 */
}


/* ... */

#loader.animate-svg svg path[id="wedding-path"] {
    /* opacity: 1; を削除 */
    animation-name: draw-svg, fill-svg;
    animation-duration: 1500ms, 500ms;
    animation-timing-function: ease-in-out, ease-in-out;
    animation-fill-mode: forwards, forwards;
}


/* ▼▼▼ アニメーションの定義 ▼▼▼ */

@keyframes draw-svg {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fill-svg {
    from {
        fill-opacity: 0;
    }
    to {
        fill-opacity: 1;
    }
}


/* 読み込み完了後にJSから付与されるクラス */

#loader-bg.fade-out {
    opacity: 0;
    visibility: hidden;
}


/* ===================================== */


/* --- (セクション・タイトル・ヒーロー等) --- */


/* ===================================== */


/* セクションの基本スタイル */

.section-light-bg {
    background-color: var(--section-bg-light);
    padding: 80px 5%;
    text-align: center;
}

.section-dark-bg {
    background-color: var(--section-bg-dark);
    padding: 80px 5%;
    text-align: center;
}


/* --- タイトル共通スタイル --- */

h1 {
    font-size: 4em;
    color: var(--accent-gold);
    font-weight: 300;
    margin: 0;
    letter-spacing: 5px;
}

h2 {
    font-size: 2em;
    color: var(--primary-text-color);
    margin-bottom: 40px;
    border-bottom: 1px solid var(--accent-gold);
    display: inline-block;
    padding-bottom: 10px;
}


/* --- 1. ヒーローセクション --- */

.hero {
    height: 100vh;
    color: var(--main-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-color: var(--accent-rose);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.hero h1 {
    color: var(--accent-gold);
    font-size: 5em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px white;
}

.hero .date {
    font-size: 1.8em;
    color: var(--main-white);
    font-weight: 300;
    letter-spacing: 5px;
    margin: 5px 0 20px 0;
}

.hero .venue {
    font-size: 1.2em;
    color: var(--main-white);
    letter-spacing: 3px;
    font-style: italic;
}


/* --- スライドショー専用のスタイル --- */

.hero-slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.0s ease-in-out;
    z-index: 2;
}

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

.slide.current-slide {
    opacity: 1;
    z-index: 3;
}


/* --- (古い .message-body は 14. に移動) --- */


/* --- 3. 詳細セクション --- */

.detail-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.detail-block {
    flex-basis: 300px;
    padding: 20px;
    background-color: var(--main-white);
    border: 1px solid #E0E0E0;
    border-radius: 5px;
    text-align: center;
    box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.33);
}

.detail-block h3 {
    color: var(--accent-gold);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px dotted #CCC;
    padding-bottom: 10px;
}

.main-date {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-text-color);
    margin: 10px 0;
}

.schedule dl {
    text-align: left;
    display: inline-block;
    margin: 0;
    padding: 0;
}

.schedule dt,
.schedule dd {
    margin: 5px 0;
    font-size: 1.1em;
}

.schedule dt {
    font-weight: bold;
    color: var(--primary-text-color);
    width: 120px;
}

.schedule dd {
    margin-left: 10px;
    color: var(--primary-text-color);
}


/* --- 4. アクセスセクション --- */

.access-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
}

.transport-info {
    flex-basis: 40%;
    padding-right: 20px;
}

.map-placeholder {
    flex-basis: 55%;
    height: 350px;
    display: flex;
    border-radius: 5px;
    overflow: hidden;
}

#custom-map {
    width: 100%;
    height: 100%;
}

.transport-info h3 {
    color: var(--accent-gold);
    font-size: 1.5em;
    border-bottom: 1px dotted #CCC;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.transport-info .caution {
    color: #A00;
    font-size: 0.9em;
    margin-top: 20px;
}

.map-placeholder .map-link a {
    color: var(--accent-gold);
    text-decoration: underline;
    margin-top: 10px;
}


/* ===================================== */


/* --- 5. ギャラリーセクション (横スクロール) --- */


/* ===================================== */

#gallery-container {
    height: 300vh;
    background-color: var(--section-bg-dark);
    padding: 0;
    position: relative;
}

.gallery-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
}

.gallery-scroller {
    display: flex;
    height: 100%;
    align-items: center;
    transition: transform 0.1s linear;
}

.gallery-slide {
    flex-shrink: 0;
    height: 80vh;
    margin: 0 2vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-title-slide {
    width: 80vw;
    text-align: center;
}

.gallery-item {
    width: 60vw;
    background-color: var(--main-white);
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: auto;
    max-height: 80vh;
}

.gallery-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item .caption {
    padding: 15px;
    font-size: 1em;
    color: var(--primary-text-color);
    font-style: italic;
    text-align: center;
}

.gallery-end-slide {
    width: 40vw;
    color: var(--primary-text-color);
    font-size: 1.2em;
    opacity: 0.7;
}


/* --- (古い .fade-section, .fade-up は 13. に統合) --- */

@keyframes fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- 6. Q&Aセクション --- */

.faq-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.accordion-item {
    border: 1px solid var(--section-bg-dark);
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: var(--main-white);
    transition: box-shadow 0.3s;
}

.accordion-item[open] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-rose);
}

.accordion-title {
    display: block;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary-text-color);
    list-style: none;
    position: relative;
}

.accordion-title::after {
    content: '+';
    font-size: 1.5em;
    color: var(--accent-gold);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    transition: transform 0.3s;
}

.accordion-item[open] .accordion-title {
    border-bottom: 1px solid var(--section-bg-dark);
    color: var(--accent-rose);
}

.accordion-item[open] .accordion-title::after {
    content: '-';
    transform: translateY(-50%);
    color: var(--accent-rose);
}

.accordion-content {
    padding: 10px 20px 20px;
    font-size: 1em;
    color: var(--primary-text-color);
    line-height: 1.6;
    overflow: hidden;
}

.accordion-content p {
    margin: 5px 0;
}


/* --- 7. RSVP 出欠確認セクション --- */

.rsvp-content {
    max-width: 600px;
    margin: 0 auto;
    padding-top: 20px;
}

.contact-form-placeholder {
    margin: 40px 0;
    padding: 30px;
    border: 2px dashed var(--accent-rose);
    background-color: var(--main-white);
    font-style: italic;
    color: var(--primary-text-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.deadline {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 5px;
    color: var(--primary-text-color);
}

.gold-text {
    color: var(--accent-gold);
    font-weight: bold;
}

.small-text {
    font-size: 0.9em;
    color: #777;
    line-height: 1.5;
}


/* --- カウントダウンタイマーのスタイル --- */

.countdown-timer {
    margin-top: 30px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.countdown-label {
    font-size: 1.1em;
    color: var(--main-white);
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 300;
}

.countdown-units {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.unit-box {
    text-align: center;
    line-height: 1.2;
}

.unit-box span:first-child {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: var(--accent-gold);
    text-shadow: 1px 1px 5px white;
}

.unit-label {
    display: block;
    font-size: 0.8em;
    color: var(--main-white);
    font-weight: 500;
    margin-top: 5px;
}


/* --- フッターのスタイル --- */

footer.section-dark-bg {
    background-color: var(--section-bg-dark);
    color: var(--primary-text-color);
    padding: 30px 5%;
    font-size: 0.9em;
    margin-top: 0;
}


/* ===================================== */


/* --- レスポンシブ対応 (モバイル向け) --- */


/* ===================================== */

@media (max-width: 768px) {
    .section-light-bg,
    .section-dark-bg {
        padding: 50px 3%;
    }
    h1 {
        font-size: 3em;
        letter-spacing: 3px;
    }
    h2 {
        font-size: 1.6em;
    }
    .hero .date {
        font-size: 1.5em;
        letter-spacing: 3px;
    }
    .detail-container {
        gap: 20px;
    }
    .detail-block {
        flex-basis: 100%;
        margin-bottom: 10px;
    }
    .access-content {
        flex-direction: column;
        text-align: center;
        margin: 0 auto;
    }
    .transport-info,
    .map-placeholder {
        flex-basis: 100%;
        padding: 0;
        margin: 0 auto 30px;
    }
    .countdown-timer {
        padding: 10px 15px;
    }
    .unit-box span:first-child {
        font-size: 2em;
    }
}


/* ===================================== */


/* --- 8. ナビゲーションメニュー スタイル --- */


/* ===================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: transparent;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    box-sizing: border-box;
}

nav.nav-scrolled {
    background-color: var(--main-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--main-white);
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    transition: color 0.4s ease;
}

nav.nav-scrolled .nav-logo {
    color: var(--accent-gold);
    text-shadow: none;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--main-white);
    font-size: 1.1em;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    position: relative;
    padding-bottom: 5px;
    transition: color 0.4s ease;
}

nav.nav-scrolled .nav-links a {
    color: var(--primary-text-color);
    text-shadow: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

nav.nav-scrolled .nav-links a:hover {
    color: var(--accent-gold);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu .line {
    width: 28px;
    height: 3px;
    background-color: var(--main-white);
    margin: 5px 0;
    transition: all 0.4s ease;
}

nav.nav-scrolled .hamburger-menu .line {
    background-color: var(--primary-text-color);
}


/* ===================================== */


/* --- 9. ナビゲーション (レスポンシブ) --- */


/* ===================================== */

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(253, 249, 243, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
    }
    .nav-links.nav-active {
        transform: translateX(0);
    }
    .nav-links a {
        color: var(--primary-text-color);
        text-shadow: none;
        font-size: 1.5em;
    }
    .nav-links a:hover {
        color: var(--accent-gold);
    }
    .nav-links a::after {
        display: none;
    }
    .nav-logo {
        color: var(--accent-gold);
        text-shadow: none;
    }
    nav.nav-scrolled .nav-logo {
        color: var(--accent-gold);
    }
    .hamburger-menu .line {
        background-color: var(--primary-text-color);
    }
    nav.nav-scrolled .hamburger-menu .line {
        background-color: var(--primary-text-color);
    }
    nav.nav-open .hamburger-menu .line1 {
        transform: rotate(-45deg) translate(-6px, 6px);
    }
    nav.nav-open .hamburger-menu .line2 {
        opacity: 0;
    }
    nav.nav-open .hamburger-menu .line3 {
        transform: rotate(45deg) translate(-6px, -6px);
    }
    nav.nav-open .nav-logo {
        color: var(--accent-gold);
    }
}


/* ===================================== */


/* --- 10. ヒーロー演出強化 (Ken Burns / Text Anim) --- */


/* ===================================== */

.hero-slideshow-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 65%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 5;
}

.slide:nth-child(1) img {
    animation: kenburns-zoom-in 15s ease-in-out infinite alternate;
}

.slide:nth-child(2) img {
    animation: kenburns-pan-left 15s ease-in-out infinite alternate;
}

.slide:nth-child(3) img {
    animation: kenburns-zoom-out 15s ease-in-out infinite alternate;
}

@keyframes kenburns-zoom-in {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.55);
    }
}

@keyframes kenburns-pan-left {
    from {
        transform: scale(1.35) translate(3%, 5%);
    }
    to {
        transform: scale(1.15) translate(-5%, -3%);
    }
}

@keyframes kenburns-zoom-out {
    from {
        transform: scale(1.45);
    }
    to {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-anim-1,
.hero-anim-2,
.hero-anim-3,
.hero-anim-4 {
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-anim-2 {
    animation-delay: 0.5s;
}

.hero-anim-3 {
    animation-delay: 0.8s;
}

.hero-anim-4 {
    animation-delay: 1.1s;
}


/* ===================================== */


/* --- 13. 汎用スクロールアニメーション --- */


/* ===================================== */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--delay, 0s);
}

.anim-fade-in-up {
    transform: translateY(50px);
}

.anim-fade-in-left {
    transform: translateX(-50px);
}

.anim-fade-in-right {
    transform: translateX(50px);
}

.anim-zoom-in {
    transform: scale(0.9);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}


/* ===================================== */


/* --- 14. Messageセクション (JSパララックス版) --- */


/* ===================================== */

#message.parallax-section-wrapper {
    padding: 120px 5%;
    position: relative;
    overflow: hidden;
    /* ▼▼▼ 修正 ▼▼▼ */
    background-color: transparent;
    /* z-index:-1 を活かすため透明に */
    isolation: isolate;
}


/* ▼▼▼ 修正 ▼▼▼ */


/* オーバーレイは .parallax-bg の ::before に移動 */


/*
#message.parallax-section-wrapper::before {
    ...
}
*/

.parallax-bg {
    /* background-image: url('../img/message-bg3.webp'); */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 140%;
    width: 100%;
    position: absolute;
    top: -20%;
    left: 0;
    /* z-index: -1; */
    /* ← ユーザーの要望通り -1 を維持 */
    /* transition: transform 0.05s linear; (削除) */
}


/* ▼▼▼ 修正 ▼▼▼ */


/* 黒オーバーレイを背景画像(.parallax-bg)の「上」に配置 */

.parallax-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 0;
    /* z-index: -1 の親より手前 */
    pointer-events: none;
}

.message-content-wrapper {
    max-width: 400px;
    margin: 100px auto 70px;
    padding: 60px;
    background-color: rgba(253, 249, 243, 0.8);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    text-align: center;
    /* z-index: 2; (isolation のため不要) */
}

.message-content-wrapper h2 {
    text-align: center;
}

.message-content-wrapper .message-body {
    text-align: left;
    font-size: 1.1em;
    color: var(--primary-text-color);
}

.message-content-wrapper .signature {
    margin-top: 30px;
    font-size: 1.3em;
    color: var(--accent-gold);
    letter-spacing: 2px;
    text-align: right;
}


/* ===================================== */


/* --- 15. Details スクラブアニメーション --- */


/* ===================================== */


/* JSでアニメーションさせるため、なめらかにする */

#details .detail-block {
    transition: transform 0.1s linear, opacity 0.1s linear;
}