/* --- Base Styles --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Lato', sans-serif; font-size: 16px; line-height: 1.7; color: #333; background-color: #fdfdfd; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html { scroll-behavior: smooth; }
main { position: relative; z-index: 10; background-color: #fdfdfd; }
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; font-weight: 700; margin-top: 0; margin-bottom: 0.75em; line-height: 1.2; color: #111; }
p { margin-top: 0; margin-bottom: 1.5em; }
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: #111; text-decoration: none; }
section { padding: 80px 0; }
.container { max-width: 1100px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
/* Google Icons (Material Symbols) の基本設定 */
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48; font-size: 24px; display: inline-block; vertical-align: middle; }
.br-mobile { display: none; }

/* --- Utility (Fade-in Animation) --- */
.fade-in { opacity: 0; transform: translateY(30px) scale(0.95); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* --- Hero Section --- */
.hero { display: flex; align-items: center; justify-content: center; height: 100vh; position: sticky; top: 0; z-index: 1; text-align: center; color: #fff; background-color: #222; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url('../img/2.jpg'); background-size: cover; background-position: center center; opacity: 1; animation: zoom-ken-burns 12s ease-in-out infinite alternate; }
.hero-content { position: relative; z-index: 2; padding: 20px; }
.hero-title { font-size: calc(3.2rem + 4.2vw); font-weight: 800; margin: 0; letter-spacing: 0.05em; line-height: 1.1; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7); display: inline-block; white-space: nowrap; }
@media (max-width: 768px) {
    .hero-title { font-size: calc(3.6rem + 4.2vw); }
    .hero { height: 54vh; }
    .hero-content {  padding: 20px; padding-top: 65px;}
}
.hero-subtitle { font-size: calc(1.1rem + 1.2vw); font-family: 'Lato', sans-serif; font-weight: 700; letter-spacing: 0.1em; margin-top: 10px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }

/* 左上タイトル */
.header-info { position: absolute; top: 20px; left: 20px; z-index: 3; text-align: left; color: #fff; padding: 10px 15px; border-radius: 5px; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.header-info p { margin: 0; line-height: 1.3; }
.header-info-ja { font-size: 1.4rem; font-weight: 700; font-family: 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif; color: #990000; } 
.header-info-en { font-size: 0.85rem; font-weight: 300; opacity: 0.8; font-family: 'Lato', sans-serif; }
@media (max-width: 768px) {
    .header-info { top: 15px; left: 15px; padding: 8px 12px; }
    .header-info-ja { font-size: 1.2rem; }
    .header-info-en { font-size: 0.75rem; }
}


/* 個別アニメーション用のスタイル */
.color-animated { display: inline; animation: rainbow-text-flow 10s linear infinite; filter: hue-rotate(var(--start-hue, 0deg)); }

@keyframes zoom-ken-burns { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }
@keyframes rainbow-text-flow {
    0% { color: #d90429; }
    14% { color: #f77f00; }
    28% { color: #fcc201; }
    42% { color: #8ac926; }
    57% { color: #1982c4; }
    71% { color: #6a4c93; }
    85% { color: #ffffff; }
    100% { color: #d90429; }
}


/* --- Section Titles --- */
.section-title { font-size: 3.5rem; text-align: left; margin-bottom: 60px; letter-spacing: 0.05em; font-weight: 700; position: relative; padding-bottom: 15px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; transform: none; width: 60px; height: 2px; background-color: #aaa; }

/* --- Info Section --- */
.info { background-color: #f9f9f9; padding-top: 120px; padding-bottom: 120px; overflow: hidden; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 900px; margin: 0 auto; }
.info-item { background-color: #fff; padding: 50px 40px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); border-radius: 8px; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-item:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08); }
#address-card-trigger { cursor: pointer; }
.info-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; color: #333; }
.info-label { font-family: 'Lato', sans-serif; font-size: 1.5rem; font-weight: 700; color: #555; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; }
.info-text { font-size: 2.0rem; color: #111; line-height: 1.7; margin: 0; }
/* Infoカードのアニメーション (PC: 左右から) */
.info-item.fade-in { opacity: 0; transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.info-item.fade-in:nth-child(odd) { transform: translateX(-100px); }
.info-item.fade-in:nth-child(even) { transform: translateX(100px); }
.info-item.fade-in.is-visible { opacity: 1; transform: translateX(0); }
.info-grid .info-item.fade-in:nth-child(1) { transition-delay: 0.1s; }
.info-grid .info-item.fade-in:nth-child(2) { transition-delay: 0.1s; }
.info-grid .info-item.fade-in:nth-child(3) { transition-delay: 0.3s; }
.info-grid .info-item.fade-in:nth-child(4) { transition-delay: 0.3s; }
/* Infoカードの個別カラー設定 */
.info-grid .info-item:nth-child(1) .info-icon, .info-grid .info-item:nth-child(1) .info-label { color: #0d4a60; } 
.info-grid .info-item:nth-child(2) .info-icon, .info-grid .info-item:nth-child(2) .info-label { color: #b5651d; } 
.info-grid .info-item:nth-child(3) .info-icon, .info-grid .info-item:nth-child(3) .info-label { color: #4a572c; } 
.info-grid .info-item:nth-child(4) .info-icon, .info-grid .info-item:nth-child(4) .info-label { color: #8c3b3b; } 


/* --- Greeting Section --- */
.greeting { background-color: #fff; }
.greeting-flex { display: flex; gap: 40px; align-items: flex-start; }
.greeting-image-wrapper { flex: 0 0 400px; max-width: 400px; }
.greeting-image { width: 100%; object-fit: cover; }
.greeting-text { flex: 1; position: relative; }
.greeting-text p { font-size: 1.05rem; }
.greeting-thanks { font-size: 0.95rem; line-height: 1.8; margin-top: 30px; font-style: italic; color: #444; }
@media (max-width: 768px) {
     .greeting-flex { flex-direction: column; } .greeting-image-wrapper { max-width: 100%; margin-bottom: 30px; } .greeting-text .section-title { text-align: center; } .greeting-text .section-title::after { left: 50%; transform: translateX(-50%); } 
     /* ご挨拶セクションの順番を入れ替え */
    .greeting-flex { flex-direction: column; }
    .greeting-text { order: 1; }
    .greeting-image-wrapper { order: 2; }
}

/* --- Language Toggle Styles --- */
.lang-toggle { position: absolute; top: 0; right: 0; z-index: 10; }
.lang-btn { background: none; border: none; padding: 5px 10px; cursor: pointer; font-family: 'Lato', sans-serif; font-size: 0.9rem; font-weight: 700; color: #aaa; }
.lang-btn.is-active { color: #333; text-decoration: underline; }
.lang-content { display: none; }
.greeting-text.show-ja .lang-content[lang="ja"] { display: block; }
.greeting-text.show-en .lang-content[lang="en"] { display: block; }
.greeting-text.show-da .lang-content[lang="da"] { display: block; }

/* --- Story Section Styles --- */
.story { background-color: #f9f9f9; }
.story-content { max-width: 1100px; margin: 0 auto; }
.story-content h3 { font-size: 2.2rem; text-align: left; margin-bottom: 60px; font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: 0.05em; }
.story-block { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; margin-bottom: 80px; }
.story-block.reverse .story-images { order: -1; }
.story-text h4 { font-size: 1.5rem; margin-top: 0; margin-bottom: 25px; font-family: 'Noto Serif JP', serif; }
.story-text p { font-size: 1.05rem; line-height: 1.8; }
.story-images { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: center; }
.story-image img { box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 200px; height: auto; }
.story-image.portrait img { height: 200px; width: auto; }
.story-signature { margin-top: 80px; text-align: right; font-family: 'Noto Serif JP', serif; }
.story-signature p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 0; }
.story-content .lang-content { display: none; }
.story-content.show-ja .lang-content[lang="ja"] { display: block; }
.story-content.show-en .lang-content[lang="en"] { display: block; }
.story-content.show-da .lang-content[lang="da"] { display: block; }
.story .lang-toggle { position: relative; text-align: right; margin-bottom: 10px; }
@media (max-width: 1024px) {
    .story-content h3{font-size: 1.6rem;}
 }

/* --- Gallery Section (Grid Layout) --- */
.gallery { background-color: #fff; padding: 120px 0; overflow: hidden; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.gallery-item { margin: 0; background-color: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.05); cursor: pointer; 
    opacity: 0; 
    transition: transform 0.8s ease-out, opacity 0.8s ease-out, box-shadow 0.3s ease; 
}
.gallery-item.is-visible { 
    opacity: 1; 
    transform: translateX(0) translateY(0) rotate(0deg) scale(1); 
}
.gallery-item:hover { transform: translateY(-8px); box-shadow: 0 15px 45px rgba(0,0,0,0.12); }
.gallery-image-wrapper { aspect-ratio: 1 / 1; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease-out; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-title { padding: 15px 20px; text-align: left; font-size: 0.9rem; color: #333; font-family: 'Lato', sans-serif; font-weight: 400; }
.gallery-item-title p { margin: 0; }


@media (max-width: 1024px) { 
    .gallery-grid { grid-template-columns: repeat(3, 1fr); } 
    .story-block { gap: 30px; }
}
@media (max-width: 768px) { 
    section { padding: 50px 0; }
    .section-title { font-size: 2.6rem; text-align: center; } 
    .section-title::after { left: 50%; transform: translateX(-50%); } 
    .gallery-grid { grid-template-columns: repeat(2, 1fr); } 
    .gallery { padding-left: 10px; padding-right: 10px; }
    .info-grid { grid-template-columns: 1fr; gap: 30px; } 
    .info-label { font-size: 1.1rem; } 
    .info-text { font-size: 1.4rem; } 
    .info-item.fade-in, .info-item.fade-in:nth-child(odd), .info-item.fade-in:nth-child(even) { opacity: 0; transform: translateY(50px); }
    .info-item.fade-in.is-visible { transform: translateY(0); opacity: 1; }
    .info-grid .info-item.fade-in:nth-child(1) { transition-delay: 0.1s; }
    .info-grid .info-item.fade-in:nth-child(2) { transition-delay: 0.2s; }
    .info-grid .info-item.fade-in:nth-child(3) { transition-delay: 0.3s; }
    .info-grid .info-item.fade-in:nth-child(4) { transition-delay: 0.4s; }
    .lang-toggle { position: static; text-align: center; margin-bottom: 20px; }
    .br-mobile { display: block; }
    .story-block, .story-block.reverse { grid-template-columns: 1fr; }
    .story-block .story-images { order: initial; }
    .story-images .story-image {flex: 1 1 100%;max-width: 100%;  }
    .story-image:only-child {max-width: 250px;margin: 0 auto;}
    .story-content h4 {margin-top: 40px; margin-bottom: 15px; text-align: left; }
    .story-content h4:first-of-type {margin-top: 20px;}
    .story-images { text-align: center; }
    .story .story-block.fade-in { transition-delay: 0.2s; }
    /* --- Mobile Animation Adjustments --- */
    /* 全てのフェードインアニメーションを高速化 */
    .fade-in { transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
    /* Infoカードの出現遅延をなくす */
    .info-grid .info-item.fade-in { transition-delay: 0s !important; }
    /* ギャラリーはシンプルなフェードインに */
    .gallery-item { transform: translateY(20px); }
    .gallery-item.is-visible { transform: translateY(0); }
    .greeting .section-title { text-align: center; margin-bottom: 20px; }
    .greeting .section-title::after { left: 50%; transform: translateX(-50%); }
    .greeting-flex { flex-direction: column; align-items: center; } /* これを追加 */
    .greeting-image-wrapper { order: 1; max-width: 80%; margin: 0 auto 15px auto; flex: initial; }
    .greeting-image-wrapper img { height: auto; object-fit: contain; } /* 画像自体も高さを自動調整 */
    .greeting-text { order: 2; }
}

/* --- Footer --- */
.footer { position: relative; z-index: 20; padding: 40px 20px; background-color: #111; color: #aaa; text-align: center; font-size: 0.85rem; }
.footer p { margin: 0; }

/* --- Modal Styles --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s 0.4s; }
.modal-overlay.is-visible { opacity: 1; visibility: visible; transition-delay: 0s; }
.modal-content { max-width: 90%; max-height: 90vh; transform: scale(0.7); opacity: 0; transition: transform 0.4s ease-out, opacity 0.4s ease-out; }
.modal-overlay.is-visible .modal-content { transform: scale(1); opacity: 1; }
.modal-content img { width: auto; height: auto; max-width: 100%; max-height: 90vh; object-fit: contain; }
.modal-close { position: absolute; top: 20px; right: 30px; font-size: 2.5rem; color: #fff; cursor: pointer; line-height: 1; }
.modal-content-map { width: 90%; max-width: 900px; background: #333; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; }
.modal-content-map iframe { width: 100%; height: 100%; border: 0; }


/* --- Page Top Button Styles --- */
#page-top-btn { display: block; position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; background-color: rgba(0, 0, 0, 0.6); border-radius: 50%; z-index: 900; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
#page-top-btn.is-visible { opacity: 1; visibility: visible; }
#page-top-btn::before { content: ''; display: block; width: 10px; height: 10px; border-top: 2px solid #fff; border-left: 2px solid #fff; position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%) rotate(45deg); }
#page-top-btn:hover { background-color: rgba(0, 0, 0, 0.8); }