/*全ての要素で、paddingとborderを幅の内側で計算するようにする */
*, *::before, *::after {
    box-sizing: border-box;
}

/* =============================================== */
/* ===== メインスタイルシート（最適化・統合版） ===== */
/* =============================================== */

/* --- bodyの基本設定 & 基本フォント --- */
body {
  font-family: 'Noto Sans', sans-serif; /* 本文のフォントをNoto Sansに設定 */
  margin: 0;
  padding: 0;
  padding-top: 115px; /* Toptの高さ分 */
  background-color: #ffffff;
  color: #4f4f4f;
}

/* --- Topt (上部固定ヘッダー) --- */
.Topt {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1003;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}
.header-center-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.Topt a {
  font-family: 'Noto Sans', sans-serif; /* ヘッダー内のリンクテキスト */
}

/* --- レイアウトの基本 --- */
.main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- 汎用スタイル (セクション、フッター、見出しなど) --- */
footer,
.footerl,
.verde {
  background-color: #3a5a40;
  color: #f0f0f0;
  text-align: center;
  padding: 20px;
}

section {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

/* 全ての見出しにPlayfair Displayを適用 */
h1, h2, h3, h4, h5, h11 {
  margin: 0;
  padding: 10px 0;
  font-family: 'Playfair Display', serif;
  font-weight: bold;
}

h1 {
  font-size: 26px;
  text-align: center;
  color: #3a5a40;
  padding: 15px 10px;
  border-top: 2px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
}

/* h11は非標準タグです。セマンティックなh2などへの変更を推奨します */
h11 {
  font-size: 26px;
  text-align: center;
  color: #fff;
  padding: 15px 10px;
  border-top: 2px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
}

h2 {
  font-size: 24px;
  text-align: center;
  color: #3a5a40;
  border-bottom: 2px solid #dcdcdc;
  padding-bottom: 8px;
  text-decoration: none;
}

h3 {
  font-size: 22px;
  color: #5d7052;
  border-bottom: 1px solid #e0e0e0;
  text-decoration: none;
}

h4 {
  font-size: 20px;
  text-align: left;
  padding: 3px 0;
  color: #3a5a40;
  text-decoration: none;
}

/* 本文・一般テキストのフォント設定 */
p, cite, span, div, li, td, th, label, summary, details, .link-text {
  font-family: 'Noto Sans', sans-serif;
}

/* ドロップキャップ用スタイル（適用したい段落に <p class="dropcap-paragraph"> のようにクラスを追加） */
.dropcap-paragraph::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 3em;
    line-height: 1;
    float: left;
    margin-right: 0.1em;
    margin-top: 0.05em;
    color: #3a5a40;
    font-weight: normal;
}

.float {
  padding: 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.about, about2, about3 {
  padding: 10px;
  text-align: left;
}
.about, about2, about3 p {
  display: block;
  width: auto;
  margin: 0 0 1em 0;
  text-align: left;
}

/* --- ボタン風スタイル --- */
.puti, .putiin, .putice a {
    font-family: 'Noto Sans', sans-serif;
}
.puti {
  display: inline-block;
  margin: 10px;
  padding: 10px 15px;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  background-color: #b5986d;
  border: none;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.puti:hover {
  background-color: #a1855a;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
}
.putiin {
  display: inline-block;
  margin: 5px;
  padding: 5px 10px;
  font-weight: bold;
  text-decoration: none;
  color: #7a6a5a;
  border: 1px solid #d4c4b3;
  background-color: transparent;
  border-radius: 5px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.putiin:hover {
  background-color: #f7f2ec;
  border-color: #c4b09a;
}
.putice {
  font-size: 14px;
  color: #5c8037;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
  display: block;
}
.putice a {
  text-decoration: none;
  color: inherit;
}

/* --- 画像クリック/タップ時のインタラクション効果 --- */
a img, .icon-container img, .gallery-item img, .image-container img, section img {
  transition: transform 0.2s ease-out;
  cursor: pointer;
}
a:active img, .icon-container a:active img, .gallery-item:active img, .image-container:active img, section img:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

/* --- アンカーリンクのヘッダー隠れ対策 --- */
[id] {
  scroll-margin-top: 120px;
}

/* --- ページトップへ戻るボタン --- */
#page-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 900;
}

/* =============================================== */
/* ===== ナビゲーションメニュー スタイル ===== */
/* =============================================== */
#pc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
#pc-nav ul li a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #4f4f4f;
}
#pc-nav ul li.has-dropdown {
  position: relative;
}
#pc-nav ul .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  min-width: 220px;
  z-index: 1005;
}
#pc-nav ul .dropdown-menu li a {
  padding: 8px 15px;
  white-space: nowrap;
  transition: background-color 0.2s;
}
#pc-nav ul .dropdown-menu li a:hover {
  background-color: #f7f2ec;
}

@media (min-width: 768px) {
  #pc-nav ul li.has-dropdown:hover > .dropdown-menu { display: block; }
  #pc-nav > ul > li:first-child > .dropdown-menu { left: 0; transform: none; }
  #pc-nav > ul > li:last-child > .dropdown-menu { left: auto; right: 0; transform: none; }
}
@media (max-width: 767px) {
  #pc-nav > ul > li:first-child > .dropdown-menu { left: 0; transform: none; }
  #pc-nav > ul > li:last-child > .dropdown-menu { left: auto; right: 0; transform: none; }
}


/* =============================================== */
/* ===== 各種コンポーネントとページ専用スタイル ===== */
/* =============================================== */

/* --- ヒーローイメージ（CSSクロスフェード） --- */
.image-container {
  position: relative;
  overflow: hidden;
  background-color: #fff;
}
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation-duration: 54s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
.hero-img-day { animation-name: anim-day; }
.hero-img-evening { animation-name: anim-evening; }
.hero-img-night { animation-name: anim-night; }
.text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  z-index: 4;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  animation: overlay-cycle 54s infinite linear;
}
.text-overlay p {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 2.2em;
  font-weight: normal;
}
/* キーフレーム */
@keyframes anim-day { 0%{opacity:1;} 27.77%{opacity:1;} 33.33%{opacity:0;} 94.44%{opacity:0;} 100%{opacity:1;} }
@keyframes anim-evening { 27.77%{opacity:0;} 33.33%{opacity:1;} 61.11%{opacity:1;} 66.66%{opacity:0;} }
@keyframes anim-night { 61.11%{opacity:0;} 66.66%{opacity:1;} 94.44%{opacity:1;} 100%{opacity:0;} }
@keyframes overlay-cycle { 0%{background-color:rgba(0,0,0,0.2);} 27.77%{background-color:rgba(0,0,0,0.2);} 33.33%{background-color:rgba(0,0,0,0.15);} 61.11%{background-color:rgba(0,0,0,0.15);} 66.66%{background-color:rgba(0,0,0,0);} 94.44%{background-color:rgba(0,0,0,0);} 100%{background-color:rgba(0,0,0,0.2);} }


/* --- トップページ 新レイアウト用スタイル --- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
}
.home-grid > section {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.grid-hero { padding: 0 !important; overflow: hidden; }
.grid-hero .image-container { height: 300px; }
.grid-houwa .monthly-motto { margin: 0; padding: 20px; border: none; }
.grid-oshie { text-align: center; }
.grid-oshie h3 { border-bottom: none; color: #3a5a40; }
.grid-oshie p { margin: 15px 0; line-height: 1.8; }
.grid-events .event-image { width: 100%; height: auto; border-radius: 4px; margin-bottom: 15px; }
.grid-events p { margin-bottom: 15px; }
.grid-links .icon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: center; }
.grid-links .icon-link { padding: 10px; border-radius: 8px; transition: background-color 0.2s; }
.grid-links .icon-link:hover { background-color: #f7f2ec; }

@media (min-width: 500px) { .grid-links .icon-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "hero hero" "funeral-link funeral-link" "houwa oshie" "avi aco" "news events" "links links" "extra extra";
  }
  .grid-hero { grid-area: hero; }
  .grid-funeral-link { grid-area: funeral-link; }
  .grid-houwa { grid-area: houwa; }
  .grid-oshie { grid-area: oshie; }
  .grid-avi { grid-area: avi; }
  .grid-aco { grid-area: aco; }
  .grid-news { grid-area: news; }
  .grid-events { grid-area: events; }
  .grid-links { grid-area: links; }
  .grid-extra { grid-area: extra; }
  .grid-hero .image-container { height: 350px; }
}
@media (min-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "hero hero hero" "funeral-link funeral-link funeral-link" "houwa houwa news" "oshie oshie news" "avi avi aco" "events events links" "extra extra extra";
  }
  .grid-links .icon-grid { grid-template-columns: repeat(6, 1fr); }
}


/* --- 葬儀・セレモニーへのリンク (トップページ) --- */
.grid-funeral-link {
    margin-bottom: 30px;
}
.funeral-link-container {
    display: flex;
    justify-content: center;
    gap: 15px; /* 隙間を少し狭く調整 */
    flex-wrap: nowrap; /* 折り返さずに横並びを維持 */
}
.funeral-link {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    text-align: center;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}
.funeral-link:hover {
    transform: scale(1.02);
}
#funeral-service { background-image: url('../img/afuneral.png'); }
#cermonia-service { background-image: url('../img/acer.png'); }

.funeral-text-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.3s ease;
}
.funeral-link:hover .funeral-text-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}
.funeral-text-overlay h2 { /* h11の代わりにh2を使用 */
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}
.funeral-text-overlay p {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.1em;
    margin: 0;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}


/* --- お知らせセクション --- */
.news-container { margin-top: 15px; }
.news-list { margin-top: 15px; }
.news-item { display: flex; border-bottom: 1px dotted #ccc; padding: 10px 0; }
.news-item:last-child { border-bottom: none; }
.news-date { flex-shrink: 0; margin-right: 15px; font-size: 0.9em; color: #888; }
.news-title { text-decoration: none; color: #4f4f4f; font-family: 'Noto Sans', sans-serif; }
.news-title:hover { color: #3a5a40; }
.read-more-link { text-align: right; margin-top: 10px; }
@media (min-width: 768px) {
  .news-container { display: flex; gap: 20px; align-items: flex-start; }
  .news-list-wrapper { flex: 2; min-width: 0; }
  .news-container .latest-flower-widget { flex: 1; min-width: 0; }
}

/* --- 今週の花ウィジェット --- */
.latest-flower-widget { padding: 10px; border: 1px solid #ddd; background-color: #f9f9f9; border-radius: 4px; }
.latest-flower-widget h4 { margin-top: 0; margin-bottom: 10px; font-size: 1.0em; color: #333; text-align: center; border-bottom: 1px solid #eee; padding-bottom: 4px; }
.latest-flower-widget .latest-flower-caption { text-align: center; font-size: 0.8em; color: #555; margin: 0; line-height: 1.3; }
.flower-widget-images-container { display: flex; gap: 5px; margin-bottom: 5px; }
.flower-widget-image-link { flex: 1; display: block; border: 1px solid #ccc; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.flower-widget-image-link:hover { transform: scale(1.05); box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2); z-index: 10; }
.flower-widget-image { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

/* --- Memorial スタイル（today_memorial.php用） --- */

.today-memorial-section, .monthly-memorial-section { background-color: #f5f5f0; border: 1px solid #e0e0d0; border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.today-memorial-section h3, .monthly-memorial-section h2 { text-align: center; color: #4a4a4a; margin: 0 0 5px 0; font-size: 1.4em; }
.memorial-date { text-align: center; color: #777; font-size: 1em; margin-bottom: 15px; }
.monthly-memorial-section .day-heading { font-size: 1.2em; color: #666; margin-top: 25px; margin-bottom: 10px; border-bottom: 1px solid #e0e0d0; padding-bottom: 5px; text-align: left; }
.memorial-message, .offering-invitation { text-align: center; color: #666; font-size: 1em; margin-bottom: 20px; }
.memorial-names-container { display: flex; flex-wrap: wrap; gap: 15px; justify-content: flex-start; }
.name-container { background-color: #FFFFF0; border: 1px solid #e0e0d0; border-radius: 3px; padding: 10px; width: calc(33.333% - 10px); min-width: 100px; text-align: center; position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 130px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); }
.name-text { font-family: 'Playfair Display', serif; font-size: 1.0em; color: #5D4037; flex-grow: 1; word-wrap: break-word; padding-bottom: 30px; margin-bottom: 0; position: relative; z-index: 1; }
.flower-area { min-height: 28px; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; gap: 1px; margin-top: -25px; margin-bottom: 6px; position: relative; z-index: 2; }
.flower-area img.flower-offering { opacity: 0; transform: scale(0.5) translateY(10px); transition: opacity 0.3s ease-out, transform 0.3s ease-out, width 0.3s ease-out, height 0.3s ease-out; margin: 0 1px; }
.flower-area img.flower-offering.show { opacity: 1; transform: scale(1) translateY(0); }
.flower-area img.flower-offering.size-s { width: 10px; height: 10px; } .flower-area img.flower-offering.size-m { width: 18px; height: 18px; } .flower-area img.flower-offering.size-l { width: 26px; height: 28px; } .flower-area img.flower-offering.size-xl { width: 32px; height: 28px; }
.dedicate-button { font-family: 'Lato', sans-serif; background-color: #5D4037; color: white; border: none; padding: 4px 5px; border-radius: 2px; cursor: pointer; font-size: 0.75em; transition: background-color 0.2s ease, transform 0.1s ease; margin-top: auto; align-self: center; width: 95%; max-width: 100px; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dedicate-button:hover { background-color: #4E342E; } .dedicate-button:active { transform: scale(0.98); }
.flower-limit-notice { text-align: center; font-size: 1em; color: #888; margin-top: -15px; margin-bottom: 20px; }


/*
.today-memorial-section, .monthly-memorial-section { background-color: #f5f5f0; border: 1px solid #e0e0d0; border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.today-memorial-section h3, .monthly-memorial-section h2 { text-align: center; color: #4a4a4a; margin: 0 0 5px 0; font-size: 1.4em; }
.memorial-date { text-align: center; color: #777; font-size: 1em; margin-bottom: 15px; }
.monthly-memorial-section .day-heading { font-size: 1.2em; color: #666; margin-top: 25px; margin-bottom: 10px; border-bottom: 1px solid #e0e0d0; padding-bottom: 5px; text-align: left; }
.memorial-message, .offering-invitation { text-align: center; color: #666; font-size: 1em; margin-bottom: 20px; }
.memorial-names-container { display: flex; flex-wrap: wrap; gap: 15px; justify-content: flex-start; }
.name-container { background: linear-gradient(135deg, #FFFFF0 0%, #FFFAF0 100%); border: 1px solid #d4c4a8; border-radius: 8px; padding: 10px; width: calc(33.333% - 10px); min-width: 100px; text-align: center; position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 130px; box-shadow: 0 4px 12px rgba(93, 64, 55, 0.08); transition: all 0.3s ease; }
.name-container:hover { transform: translateY(-3px); border-color: #bc9b6a; box-shadow: 0 6px 16px rgba(93, 64, 55, 0.12); }
.name-text { font-family: 'Playfair Display', serif; font-size: 1.0em; color: #3e2723; font-weight: 500; letter-spacing: 0.02em; flex-grow: 1; word-wrap: break-word; padding-bottom: 30px; margin-bottom: 0; position: relative; z-index: 1; }
.flower-area { min-height: 28px; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; gap: 1px; margin-top: -25px; margin-bottom: 6px; position: relative; z-index: 2; }
.flower-area img.flower-offering { opacity: 0; transform: scale(0.5) translateY(10px); transition: opacity 0.3s ease-out, transform 0.3s ease-out, width 0.3s ease-out, height 0.3s ease-out; margin: 0 1px; }
.flower-area img.flower-offering.show { opacity: 1; transform: scale(1) translateY(0); }
.flower-area img.flower-offering.size-s { width: 10px; height: 10px; } .flower-area img.flower-offering.size-m { width: 18px; height: 18px; } .flower-area img.flower-offering.size-l { width: 26px; height: 28px; } .flower-area img.flower-offering.size-xl { width: 32px; height: 28px; }
.dedicate-button { font-family: 'Lato', sans-serif; background-color: #5D4037; color: white; border: none; padding: 6px 5px; border-radius: 20px; cursor: pointer; font-size: 0.75em; transition: background-color 0.2s ease, transform 0.1s ease; margin-top: auto; align-self: center; width: 95%; max-width: 100px; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.dedicate-button:hover { background-color: #4E342E; } .dedicate-button:active { transform: scale(0.98); }
.flower-limit-notice { text-align: center; font-size: 1em; color: #888; margin-top: -15px; margin-bottom: 20px; }



.today-memorial-section, .monthly-memorial-section { background-color: #f8f8f4; border-radius: 24px; padding: 40px; margin-bottom: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.05); position: relative; overflow: hidden; }
.today-memorial-section h3, .monthly-memorial-section h2 { text-align: center; color: #2d1b18; margin: 0 0 15px 0; font-size: 2em; font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; background: linear-gradient(45deg, #5d4037, #d4c4a8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.memorial-date { text-align: center; color: #a1887f; font-size: 1.2em; margin-bottom: 40px; font-family: 'Lato', sans-serif; letter-spacing: 0.3em; }
.monthly-memorial-section .day-heading { font-size: 1.5em; color: #5d4037; margin-top: 50px; margin-bottom: 20px; border-bottom: 2px solid #d4c4a8; display: inline-block; padding-bottom: 8px; font-family: 'Playfair Display', serif; }
.memorial-message, .offering-invitation { text-align: center; color: #8d6e63; font-size: 1.1em; margin-bottom: 30px; font-weight: 300; line-height: 1.8; }
.memorial-names-container { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; perspective: 1000px; }
.name-container { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 20px; padding: 25px; width: calc(33.333% - 30px); min-width: 160px; text-align: center; position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); cursor: pointer; }
.name-container::after { content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 2px; background: linear-gradient(135deg, #fff, rgba(212, 196, 168, 0.5), transparent); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.name-container:hover { transform: scale(1.05) rotateX(5deg) rotateY(-5deg); box-shadow: 0 30px 60px rgba(93, 64, 55, 0.15); background: rgba(255, 255, 255, 0.9); }
.name-text { font-family: 'Playfair Display', serif; font-size: 1.4em; color: #3e2723; font-weight: 700; letter-spacing: 0.08em; flex-grow: 1; word-wrap: break-word; padding: 20px 0 40px 0; margin-bottom: 0; position: relative; z-index: 1; transition: color 0.3s ease; }
.name-container:hover .name-text { color: #8d6e63; }
.flower-area { min-height: 45px; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; gap: 4px; margin-top: -40px; margin-bottom: 15px; position: relative; z-index: 2; }
.flower-area img.flower-offering { opacity: 0; transform: translateY(-50px) rotate(360deg) scale(0); transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
.flower-area img.flower-offering.show { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
.flower-area img.flower-offering.size-s { width: 14px; height: 14px; } .flower-area img.flower-offering.size-m { width: 24px; height: 24px; } .flower-area img.flower-offering.size-l { width: 34px; height: 36px; } .flower-area img.flower-offering.size-xl { width: 42px; height: 40px; }
.dedicate-button { font-family: 'Lato', sans-serif; background: #5d4037; color: #fff; border: none; padding: 12px 20px; border-radius: 50px; cursor: pointer; font-size: 0.85em; transition: all 0.4s ease; margin-top: auto; align-self: center; width: 100%; max-width: 140px; z-index: 1; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(93, 64, 55, 0.3); }
.dedicate-button::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent); transition: 0.6s; }
.dedicate-button:hover { background: #3e2723; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(93, 64, 55, 0.4); }
.dedicate-button:hover::before { left: 100%; }
.flower-limit-notice { text-align: center; font-size: 0.85em; color: #d4c4a8; margin-top: 20px; text-transform: uppercase; letter-spacing: 0.1em; }
*/



/* --- 盆提灯用スタイル --- */
.sectionbon-container { display: flex; flex-wrap: wrap; justify-content: space-around; padding: 0 5px; }
.sectionbon { background: url("../img/tiotin.png") center/contain no-repeat; text-align: center; color: black; width: calc(33.333% - 10px); height: 250px; font-size: 0.8em; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0 5px 5px 0; overflow: hidden; }
.sectionbon p { margin: 0; padding: 5px; word-break: break-word; }
@media (max-width: 600px) { .sectionbon { width: calc(33.333% - 5px); margin-right: 2.5px; } }

/* --- アイコンリンクとアニメーション --- */
.icon-link { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #3a5a40; }
.icon-container { text-align: center; margin-bottom: 10px; }
.icon-container img { width: 40px; height: 40px; }
.link-text { text-align: center; }
.text-line1 { color: #3a5a40; font-weight: bold; }
.text-line2 { color: #555; font-size: 0.9em; }
@keyframes random-bounce { 0%,100%{transform:translateY(0) rotate(0)} 25%{transform:translateY(-5px) rotate(2deg)} 50%{transform:translateY(3px) rotate(-3deg)} 75%{transform:translateY(-2px) rotate(1deg)} }
@keyframes random-sway { 0%,100%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} }
@keyframes random-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
@keyframes random-rotate-subtle { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-5deg)} 75%{transform:rotate(5deg)} }
.anim-bounce, .anim-sway, .anim-pulse, .anim-rotate-subtle { animation-iteration-count: infinite; animation-direction: alternate; }
.anim-bounce { animation-name: random-bounce; animation-timing-function: linear; }
.anim-sway { animation-name: random-sway; animation-timing-function: ease-in-out; }
.anim-pulse { animation-name: random-pulse; animation-timing-function: ease-in-out; }
.anim-rotate-subtle { animation-name: random-rotate-subtle; animation-timing-function: ease-in-out; }


/* --- テーブル、detailsなど --- */
#memorial-table { border-collapse: collapse; width: 90%; margin: 10px auto; }
#memorial-table th, #memorial-table td { border: 1px solid #ddd; padding: 4px; text-align: center; font-family: 'Noto Sans', sans-serif; }
#memorial-table th { background-color: #f2f2f2; }
summary { cursor: pointer; }
details[open] { background-color: #ffffff; font-size: 1.2em; }


/* --- monthly-motto (枠飾り) --- */
.monthly-motto { position: relative; padding: 30px; text-align: left; background-color: #ffffff; border: 1px solid #eee; margin: 10px; }
.corner { position: absolute; width: 95px; height: 95px; background-size: cover; }
.top-left { top: 0; left: 0; background-image: url('../img/wk1.png'); }
.top-right { top: 0; right: 0; background-image: url('../img/wk2.png'); }
.bottom-left { bottom: 0; left: 0; background-image: url('../img/wk3.png'); }
.bottom-right { bottom: 0; right: 0; background-image: url('../img/wk4.png'); }
.motto, .author { position: relative; z-index: 1; }
.motto { overflow-wrap: break-word; line-height: 1.7; font-family: 'Noto Sans', sans-serif; }
@media (max-width: 600px) {
  .monthly-motto { padding: 25px; margin: 10px 5px; }
  .corner { width: 60px; height: 60px; }
  .monthly-motto h3 { font-size: 1.1em; }
  .motto { font-size: 0.95em; }
}


/* --- Palavras do Mes ページ専用レイアウト --- */
.palavras-container { display: block; width: 100%; max-width: 1200px; margin: 0 auto; padding: 10px; }
.palavras-item .monthly-motto,
.page-palavras .about .monthly-motto {
  display: block !important; width: 90% !important; max-width: 800px !important; margin: 20px auto !important; padding: 30px !important; vertical-align: baseline !important; text-align: left !important;
}
.palavras-item .motto,
.page-palavras .about .monthly-motto .motto {
  word-wrap: normal !important; overflow-wrap: break-word !important; white-space: normal !important; word-break: normal !important;
}
@media (max-width: 600px) {
  .palavras-item .monthly-motto, .page-palavras .about .monthly-motto { width: 95% !important; padding: 25px !important; }
}


/* --- Funeral & Cerimonia ページ専用スタイル --- */
.funeral-container {
    max-width: 960px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}
.main-visual, .main-visual2 {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}
.main-visual { background-image: url('../img/funeral_main_visual.png'); }
.main-visual2 { background-image: url('../img/cerimonia_main_visual.png'); }

.main-visual-overlay {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 10px;
}
.main-visual h2, .main-visual2 h2 { /* h11の代わりにh2を使用 */
    font-size: 2.5em;
    margin: 0;
    padding: 0;
    border: none;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}
.main-visual p, .main-visual2 p {
    font-size: 1.5em;
    margin-top: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.accordion-item, .expandable-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}
.accordion-header, .expandable-header {
    background-color: #f0f0f0;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #555;
    transition: background-color 0.2s;
}
.accordion-header:hover, .expandable-header:hover {
    background-color: #e0e0e0;
}
.accordion-header::after, .expandable-header::after {
    content: '+';
    font-size: 1.5em;
    transition: transform 0.3s ease;
}
.accordion-header.active::after, .expandable-header.active::after {
    content: '−'; /* マイナス記号を修正 */
    transform: rotate(180deg);
}
.accordion-content, .expandable-content {
    padding: 15px 20px;
    background-color: #fdfdfd;
    display: none;
    border-top: 1px solid #eee;
}

.contact-info {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: #f0f7ff;
    border-radius: 8px;
}
.contact-info p { font-size: 1.2em; margin-bottom: 10px; }
.contact-info a { color: #007bff; text-decoration: none; font-weight: bold; }
.contact-info a:hover { text-decoration: underline; }
.contact-info .phone-number { font-size: 1.8em; color: #d9534f; font-weight: bold; margin-bottom: 15px; }

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .funeral-container { margin: 20px auto; padding: 15px; }
    .main-visual, .main-visual2 { height: 300px; }
    .main-visual h2, .main-visual2 h2 { font-size: 2.2em; }
    .main-visual p, .main-visual2 p { font-size: 1.2em; }
    .accordion-header, .expandable-header { padding: 12px 15px; }
    .accordion-content, .expandable-content { padding: 12px 15px; }
}
@media (max-width: 480px) {
    .funeral-container { margin: 10px auto; padding: 10px; }
    .main-visual, .main-visual2 { height: 250px; }
    .main-visual h2, .main-visual2 h2 { font-size: 1.8em; }
    .main-visual p, .main-visual2 p { font-size: 1em; }
    .accordion-header, .expandable-header { font-size: 0.9em; padding: 10px 12px; }
    .accordion-content, .expandable-content { font-size: 0.9em; padding: 10px 12px; }
    /* .funeral-link-container { flex-direction: column; } /* 縦積みにする */

    /* トップページの葬儀・法事リンクの高さを調整 */
    .funeral-link {
        height: 180px; /* 高さを220pxから180pxに縮小 */
    }
}