/*
Theme Name: 願誓寺テーマ
Theme URI:
Author: 願誓寺
Author URI:
Description: 願誓寺（浄土真宗本願寺派）の公式テーマ。明朝体中心、余白を重視した格式あるデザイン。
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ganseiji
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* モバイル専用表示 */
.sp-only {
    display: none;
}

@media (max-width: 768px) {
    .sp-only {
        display: inline;
    }
}

::selection {
    background: rgba(212, 165, 116, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif JP', 'Yu Mincho', '游明朝', 'Hiragino Mincho ProN', 'ヒラギノ明朝 ProN', serif;
    font-weight: 300;
    color: #1C1C1C;
    background: #FFFFFF;
    line-height: 2;
    letter-spacing: 0.1em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 和紙テクスチャ 1: 雲龍紙風（繊維が流れる模様） */
body.washi-unryu {
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(139, 119, 101, 0.03) 2px,
            rgba(139, 119, 101, 0.03) 4px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 3px,
            rgba(160, 140, 120, 0.02) 3px,
            rgba(160, 140, 120, 0.02) 6px
        ),
        linear-gradient(180deg, #FEFDFB 0%, #FBF9F5 100%);
}

/* タイポグラフィ */
h1, h2, h3 {
    font-weight: 500;
    line-height: 1.5;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.3em;
}

h2 {
    font-size: clamp(1.15rem, 3vw, 1.8rem);
    letter-spacing: 0.2em;
}

p {
    font-size: 1rem;
    line-height: 2;
    color: #1C1C1C;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.5s ease;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: none;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: all 0.3s ease;
}

header .container {
    padding: 0;
    max-width: none;
}

/* スクロール時のヘッダー縮小効果 */
header.scrolled {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 229, 229, 0.3);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

header.scrolled .site-name {
    color: #1C1C1C;
    text-shadow: none;
}

header.scrolled .site-name a {
    color: #1C1C1C;
    text-shadow: none;
}

header.scrolled .main-nav a {
    color: #1C1C1C;
    text-shadow: none;
}

header.scrolled .main-nav a:hover {
    color: #666666;
}

header.scrolled .hamburger span {
    background: #1C1C1C;
}

.header-inner {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

a.site-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
}

a.site-identity:hover .temple-crest {
    transform: scale(1.05);
}

a.site-identity:hover .site-name {
    opacity: 0.9;
}

.temple-crest {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.temple-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-name {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-sect {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.1em;
}

.site-name a {
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* ナビゲーション（ヘッダー内） */
.main-nav {
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
}

.main-nav a {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    position: relative;
    color: #FFFFFF;
    padding: 5px 0;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #A087BD;
    transition: width 0.5s ease;
}

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

.main-nav a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ヘッダーお問い合わせボタン */
.header-contact-btn {
    display: inline-block;
    background: #8B7CB6;  /* 藤紫色 */
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.header-contact-btn:hover {
    background: #7A6BA5;
    opacity: 0.9;
}

/* スクロール時のボタンスタイル */
header.scrolled .header-contact-btn {
    background: #8B7CB6;
}

/* セクションタイトルを太字に */
.section-title {
    text-align: center;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    letter-spacing: 0.3em;
    margin-left: 0.3em;
    margin-bottom: clamp(40px, 5vw, 60px);
    font-weight: 600;
    color: #1C1C1C;
    padding-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleY(3);
    width: 60px;
    height: 1px;
    background-color: #A087BD;
}

/* カードの後の見出しに余白追加 */
.history-section + .section-title {
    margin-top: 80px;
}

/* メインビジュアル */
.hero {
    height: 100vh;
    min-height: 600px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0;
    margin-bottom: clamp(60px, 10vw, 120px);
    overflow: hidden;
}

/* モバイル対応 - トップページスライダー */
@media (max-width: 768px) {
    .hero {
        height: 40vh;
        min-height: 200px;
        margin-top: 80px;
    }
}

/* 背景画像 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-background-1 {
    z-index: 1;
}

.hero-background-2 {
    z-index: 2;
    opacity: 0;
}

/* 扉のオーバーレイ */
.hero-doors-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}

/* 見開きの扉（左右） */
.hero-door {
    width: 50%;
    height: 100%;
    background: #fff;
}

.hero-door-left {
    animation: fadeOutDoor 2s ease-in-out forwards;
}

.hero-door-right {
    animation: fadeOutDoor 2s ease-in-out forwards;
}

/* フェードアウトアニメーション */
@keyframes fadeOutDoor {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        pointer-events: none;
    }
}

/* 矢印ボタン */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.hero-arrow-prev {
    left: 30px;
}

.hero-arrow-next {
    right: 30px;
}

/* ページネーション（ドット） */
.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.hero-dot.active {
    background: #A087BD;
    transform: scale(1.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* セクション共通 */
section {
    margin-bottom: clamp(80px, 10vw, 120px);
}

/* 寺院紹介 */
.intro {
    text-align: center;
    margin-bottom: clamp(100px, 12vw, 160px);
}

.intro-text {
    max-width: 600px;
    margin: 0 auto 80px;
    font-size: 1rem;
    line-height: 2.5;
    color: #666666;
}

/* 寺院紹介のアニメーション */
.intro-title-animate {
    opacity: 0;
}

.intro-title-animate.animate-active {
    animation: slideDown 1.5s ease forwards;
}

.intro-text-animate {
    opacity: 0;
}

.intro-text-animate.animate-active {
    animation: simpleFadeIn 1.5s ease forwards;
    animation-delay: 0.5s;
}

/* 上から降りてくるアニメーション */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* シンプルなフェードインアニメーション */
@keyframes simpleFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 左から右に現れるアニメーション */
.text-reveal-animate {
    opacity: 0;
}

.text-reveal-animate.animate-active {
    animation: revealFromLeft 3s ease forwards;
    animation-delay: 0.3s;
}

@keyframes revealFromLeft {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* フェードインアニメーション */
.float-up-animate {
    opacity: 0;
}

.float-up-animate.animate-active {
    animation: fadeIn 3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.service-link {
    font-size: 0.85rem;
    color: #A087BD;
    letter-spacing: 0.1em;
    display: inline-block;
    position: relative;
}

.service-link::after {
    content: '→';
    margin-left: 0.5em;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* ご案内グリッド */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
    margin-top: 60px;
}

/* 上段3つ（各4列分） */
.guide-grid .guide-item:nth-child(1),
.guide-grid .guide-item:nth-child(2),
.guide-grid .guide-item:nth-child(3) {
    grid-column: span 4;
}

/* 下段4つ（各3列分） */
.guide-grid .guide-item:nth-child(n+4) {
    grid-column: span 3;
}

.guide-item {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 4/3;
}

.guide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #888;
    transition: transform 0.4s ease;
    filter: brightness(0.6);
}

.guide-item:hover .guide-image {
    transform: scale(1.1);
}

.guide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.guide-title {
    font-size: clamp(0.8rem, 1.8vw, 1.2rem);
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: 0.2em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
    writing-mode: vertical-rl;
}

.guide-title::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 1px;
    height: 0;
    background: #FFFFFF;
    transition: height 0.3s ease;
    transform: scaleX(2);
}

.guide-item:hover .guide-title {
    color: #FFFFFF;
}

.guide-item:hover .guide-title::after {
    height: 100%;
}


.service-link:hover {
    color: #F8B500;
}

.service-link:hover::after {
    transform: translateX(5px);
}

/* お知らせ */
.news {
    margin-bottom: clamp(100px, 12vw, 160px);
}

.news-list {
    max-width: min(100%, 700px);
    margin: 0 auto;
}

.news-item {
    padding: 25px 0;
    border-bottom: 1px solid #CCCCCC;
    display: flex;
    gap: 40px;
    align-items: baseline;
}

.news-date {
    font-size: 0.85rem;
    color: #999;
    font-family: 'Crimson Text', serif;
    min-width: 100px;
}

.news-title {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    color: #1C1C1C;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.news-item a:hover .news-title {
    text-decoration: underline;
}

.news-more {
    text-align: center;
    margin-top: 50px;
}

.news-more a {
    font-size: 0.9rem;
    color: #666666;
    letter-spacing: 0.1em;
}

.news-more a:hover {
    color: #F8B500;
}

/* アクセス */
.access {
    margin-bottom: 120px;
}

.access-content {
    text-align: center;
}

.map-container {
    width: 100%;
    margin: 60px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    display: block;
    width: 100%;
}

/* フッター */
footer {
    background: #8B7CB6;
    border-top: none;
}

/* ナビゲーションセクション（上部） */
.footer-nav-section {
    padding: 40px 0;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 40px;
    max-width: min(100%, 800px);
    margin: 0 auto;
}

.footer-nav a {
    font-size: 0.95rem;
    color: #FFFFFF;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
    padding-left: 18px;
    justify-self: start;
}

.footer-nav a::before {
    content: '>';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #F8B500;
}

.footer-nav a:hover::before {
    color: #F8B500;
}

/* ブランドセクション（下部） */
.footer-brand-section {
    padding: 0 0 30px;
}

.footer-brand-section .container {
    position: relative;
}

.footer-brand-section .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.footer-brand-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.footer-brand-left {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.footer-logo {
    width: 60px;
    height: auto;
}

.footer-temple-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-temple-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.1em;
}

.footer-temple-sect {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.1em;
}

.footer-temple-main {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.15em;
    margin-top: -8px;
}

.footer-address {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.05em;
    margin-top: 10px;
}

.footer-brand-right {
    text-align: right;
}

.footer-tel {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.footer-tel:hover {
    color: #F8B500;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    text-align: center;
    margin-top: 25px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    p, .history-text, .access-method, .qa-answer {
        font-size: 0.9rem;
    }

    /* モバイルヘッダー：常に白背景・黒文字 */
    header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(229, 229, 229, 0.5);
    }

    .header-inner {
        height: 80px;
        flex-wrap: wrap;
        padding: 0 20px;
    }

    .site-name {
        color: #1C1C1C;
        text-shadow: none;
    }

    .site-name a {
        color: #1C1C1C;
        text-shadow: none;
    }

    .main-nav {
        display: none;
    }

    .hero {
        height: 40vh;
        min-height: 200px;
        margin-top: 80px;
        margin-bottom: 80px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
    }

    .hero-arrow-prev {
        left: 15px;
    }

    .hero-arrow-next {
        right: 15px;
    }

    .hero-arrow svg {
        width: 20px;
        height: 20px;
    }

    .hero-dots {
        bottom: 20px;
        gap: 10px;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
    }

    .service-cards {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 40px;
    }

    .guide-grid .guide-item:nth-child(1),
    .guide-grid .guide-item:nth-child(2),
    .guide-grid .guide-item:nth-child(3),
    .guide-grid .guide-item:nth-child(n+4) {
        grid-column: span 1;
    }

    .guide-item {
        aspect-ratio: 2/1;
        opacity: 0;
    }

    .guide-item.animate-active {
        animation: fadeIn 1.5s ease forwards;
    }

    .guide-grid .guide-item:first-child .guide-image {
        background-position: center bottom;
    }

    .guide-title {
        font-size: 5vw;
        writing-mode: horizontal-tb;
    }

    .guide-title::after {
        display: none;
    }

    .guide-overlay {
        padding: 10px 15px;
    }

    .guide-overlay::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.8);
        pointer-events: none;
    }

    .news-item {
        flex-direction: row;
        gap: 20px;
    }

    .map-container {
        width: 100%;
        margin: 40px 0;
        margin-left: 0;
    }

    .map-container iframe {
        height: 300px;
    }

    .header-background-image {
        object-position: center 37.5%;
    }

    .history-header-with-image {
        height: 40vh;
        min-height: 200px;
        margin-top: 80px;
    }

    .history-header-with-image .page-title {
        font-size: 1.25rem;
    }

    .footer-nav-section {
        padding: 30px 0;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 30px;
    }

    .footer-nav a {
        font-size: 0.85rem;
    }

    .footer-brand-section {
        padding: 0 0 20px;
    }

    .footer-brand-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding-top: 30px;
    }

    .footer-brand-left {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .footer-temple-info {
        text-align: left;
    }

    .footer-logo {
        width: 50px;
    }

    .footer-temple-sub {
        font-size: 0.75rem;
    }

    .footer-address {
        font-size: 0.8rem;
        margin-top: 5px;
    }

    .footer-brand-right {
        text-align: left;
    }

    .footer-copyright {
        font-size: 0.75rem;
        margin-top: 20px;
    }
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.hamburger.active span {
    background: #1C1C1C;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* モバイル用ハンバーガーメニュー */
@media (max-width: 768px) {
    .hamburger {
        width: 24px;
        height: 18px;
    }

    .hamburger span {
        background: #1C1C1C;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* モバイルナビゲーション */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-inner {
    padding: 100px 30px 30px;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    border-bottom: 1px solid #E5E5E5;
}

.mobile-nav a {
    display: block;
    padding: 20px 0;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: #1C1C1C;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.mobile-nav a:hover {
    color: #A087BD;
}

/* モバイル対応の追加設定 */
@media (max-width: 1150px) {
    .hamburger {
        display: flex;
    }

    .main-nav {
        display: none !important;
    }

    .header-contact-btn {
        display: none;
    }

    .header-inner {
        justify-content: space-between;
    }
}

/* ページヘッダー */
.page-header {
    margin-top: 0;
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid #E5E5E5;
}

/* 画像背景付きヘッダー */
.history-header-with-image {
    position: relative;
    height: calc(75vh + 75px);
    min-height: 450px;
    padding: 0;
    border-bottom: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 37.5%;
    z-index: 1;
    filter: brightness(1);
}

.page-template-page-news .header-background-image {
    object-position: center 48%;
}

.header-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20%;
}

.history-header-with-image .page-title {
    background: rgba(255, 255, 255, 0.75);
    color: #1C1C1C;
    font-size: clamp(1.25rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: clamp(0.15em, 0.5vw, 0.3em);
    width: clamp(220px, 35vw, 470px);
    height: clamp(100px, 17vw, 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: none;
}

/* 浄土真宗本願寺派ページ - 縦書き中央配置 */
.about-header-vertical {
    justify-content: center;
}

.about-header-vertical .header-overlay {
    position: static;
    margin-right: 0;
}

.about-header-vertical .header-overlay .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-header-vertical .page-title {
    writing-mode: vertical-rl;
    background: transparent;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    width: auto;
    height: auto;
    font-size: clamp(1.2rem, 4vw, 3.5rem);
    font-weight: 500;
    letter-spacing: 0.3em;
    white-space: nowrap;
}

/* 縦長黒背景タイトル */
.about-header-vertical .page-title.title-dark-bg {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    text-shadow: none;
    padding: 8vh 10px;
}

/* 縦書きテキスト - 上から下へ現れるアニメーション */
.text-reveal-vertical {
    opacity: 0;
}

.text-reveal-vertical.animate-active {
    animation: revealFromTop 2s ease forwards;
    animation-delay: 0s;
}

@keyframes revealFromTop {
    from {
        opacity: 0;
        clip-path: inset(0 0 100% 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* モバイル対応 - ページヘッダー画像 */
@media (max-width: 768px) {
    .history-header-with-image {
        height: 40vh;
        min-height: 200px;
        margin-top: 80px;
    }

    .history-header-with-image .header-overlay {
        position: absolute;
        right: 0;
        margin-right: 0;
    }

    .history-header-with-image .header-overlay .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    /* 縦書きページ - モバイル中央配置 */
    .about-header-vertical {
        justify-content: center;
    }

    .about-header-vertical .header-overlay {
        position: static;
        right: auto;
    }

    .about-header-vertical .header-overlay .container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .about-header-vertical .page-title {
        width: auto;
        height: auto;
        background: transparent;
        color: #ffffff;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        letter-spacing: 0.15em;
    }
}

.page-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.3em;
    margin-left: 0.3em;
    font-weight: 500;
    color: #1C1C1C;
}

/* 歴史コンテンツ */
.history-content {
    padding: 80px 0 80px;
}

.history-inner {
    max-width: 1000px;
    margin: 0 auto;
}

/* ルビ（ふりがな）のスタイリング */
ruby {
    ruby-align: center;
}

rt {
    font-size: 0.6em;
    color: #999;
}

.history-section {
    margin-bottom: 60px;
    background: #FFFFFF;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.history-section:last-of-type {
    margin-bottom: 80px;
}

/* アクセスページはカードスタイル除外 */
.page-template-page-access .history-section,
.page-template-page-access-php .history-section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 100px;
}

.history-title {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    margin-left: 0;
    margin-bottom: 40px;
    font-weight: 600;
    color: #1C1C1C;
    padding-left: 20px;
    padding-bottom: 20px;
    position: relative;
}

.history-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    height: 1.2em;
    width: 4px;
    background-color: #A087BD;
}

.history-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-bottom: 2px dotted #E5E5E5;
}

.news-post-date {
    font-size: 0.9rem;
    color: #888;
    margin-top: -30px;
    margin-bottom: 30px;
}

.history-text {
    font-size: 1rem;
    line-height: 2.2;
    color: #1C1C1C;
    margin-bottom: 40px;
    padding-left: 15px;
}

.history-text p {
    margin-bottom: 20px;
}

.history-text p:last-child {
    margin-bottom: 0;
}

.history-section > .history-text:last-child {
    margin-bottom: 15px;
}

/* お墓ページ電話番号 */
.cemetery-tel {
    color: #E8A735;
    text-decoration: underline;
}

.cemetery-tel:hover {
    color: #D4952A;
}

/* 歴史画像（セクション内） */
.history-section-image .history-image {
    width: 100%;
    height: auto;
    display: block;
}

.history-section-image {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* 歴史ページ画像グリッド */
.history-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.history-grid-item img {
    width: 100%;
    height: auto;
    display: block;
}

.history-image-caption {
    margin-top: 15px;
    text-align: center;
    font-size: 1rem;
    color: #333;
    letter-spacing: 0.05em;
    font-weight: 500;
}

@media (max-width: 768px) {
    .history-images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .history-image-caption {
        font-size: 0.9rem;
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .page-header {
        margin-top: 80px;
        padding: 60px 0 40px;
    }

    .page-header.history-header-with-image {
        margin-top: 80px;
        padding: 0;
    }

    .history-content {
        padding: 40px 0 60px;
    }

    .history-section {
        margin-bottom: 30px;
        padding: 25px 20px;
    }

    .history-title {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .history-text {
        font-size: 1rem;
        line-height: 2;
    }
}

/* 年間行事ページ */
.events-list {
    margin-top: 0;
}

.event-item {
    display: flex;
    gap: 40px;
    padding: 30px 0 30px 15px;
    border-bottom: 1px solid #E5E5E5;
}

.event-item:first-child {
    padding-top: 0;
}

.event-item:last-child {
    border-bottom: none;
}

.event-date {
    font-size: 0.9rem;
    color: #999;
    font-family: 'Crimson Text', serif;
    letter-spacing: 0.05em;
    min-width: 180px;
    flex-shrink: 0;
    padding-top: 2px;
}

.event-details {
    flex: 1;
}

.event-name {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    margin-left: 0.15em;
    font-weight: 500;
    color: #1C1C1C;
    margin-bottom: 0;
}

.event-desc {
    font-size: 0.9rem;
    line-height: 2;
    color: #666666;
    margin-top: 12px;
}

/* その他の活動 */
.activities-list {
    margin-top: 0;
}

.activity-item {
    padding: 25px 0 25px 15px;
    border-bottom: 1px solid #E5E5E5;
}

.activity-item:first-child {
    padding-top: 0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-name {
    font-size: 1.05rem;
    letter-spacing: 0.15em;
    margin-left: 0.15em;
    font-weight: 500;
    color: #1C1C1C;
    margin-bottom: 12px;
}

.activity-desc {
    font-size: 0.9rem;
    line-height: 2;
    color: #666666;
    margin-top: 10px;
}

/* Q&Aページ */
.qa-list {
    margin-top: 40px;
}

.qa-item {
    background: #FFFFFF;
    padding: 30px 40px;
    margin-bottom: 35px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qa-item:last-child {
    margin-bottom: 0;
}

.qa-question {
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    margin-left: 0.1em;
    font-weight: 600;
    color: #1C1C1C;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #E5E5E5;
}

.qa-answer {
    font-size: 0.95rem;
    line-height: 2;
    color: #666666;
    padding-left: 15px;
}

.qa-answer p {
    margin-bottom: 10px;
}

.qa-answer p:last-child {
    margin-bottom: 0;
}

/* お知らせ一覧ページ */
.news-archive-list {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.news-archive-list.no-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: 40px;
}

.news-archive-item {
    display: flex;
    align-items: baseline;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px solid #E5E5E5;
}

.news-archive-item:first-child {
    padding-top: 0;
}

.news-archive-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-archive-date {
    font-size: 0.85rem;
    color: #999;
    font-family: 'Crimson Text', serif;
    letter-spacing: 0.05em;
    min-width: 80px;
    flex-shrink: 0;
}

.news-archive-link {
    text-decoration: none;
}

.news-archive-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #1C1C1C;
    transition: text-decoration 0.3s ease;
}

.news-archive-link:hover .news-archive-title {
    text-decoration: underline;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: none;
}

.news-pagination a,
.news-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #1C1C1C;
    border: 1px solid #E5E5E5;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.news-pagination a:hover {
    background: #F5F5F5;
    border-color: #CCCCCC;
}

.news-pagination .current {
    background: #A087BD;
    border-color: #A087BD;
    color: #FFFFFF;
}

.news-pagination .dots {
    border: none;
    background: transparent;
}

.no-posts {
    text-align: center;
    color: #999;
    padding: 60px 0;
}

.back-to-list {
    margin-top: 30px;
    text-align: left;
}

.back-to-list a {
    font-size: 0.9rem;
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-list a:hover {
    color: #A087BD;
}

/* トップページへ戻るリンク */
.back-to-top {
    margin-top: 30px;
    text-align: left;
}

.back-to-top a {
    font-size: 0.9rem;
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-top a:hover {
    color: #F8B500;
}

/* 投稿個別ページ（ヘッダー画像なし） */
.single-post-content {
    padding-top: 150px;
}

.qa-link {
    color: #F8B500;
    text-decoration: none;
    border-bottom: 1px solid #F8B500;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.qa-link:hover {
    color: #D69E00;
    border-bottom-color: #D69E00;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .event-item {
        flex-direction: column;
        gap: 10px;
        padding: 20px 0;
    }

    .event-date {
        min-width: auto;
        font-size: 0.85rem;
    }

    .event-name {
        font-size: 1rem;
    }

    .event-desc {
        font-size: 0.85rem;
    }

    .activity-name {
        font-size: 0.95rem;
    }

    .activity-desc {
        font-size: 0.9rem;
    }

    .qa-item {
        padding: 20px 25px;
        margin-bottom: 20px;
    }

    .qa-question {
        font-size: 1rem;
    }

    .qa-answer {
        font-size: 0.9rem;
        padding-left: 10px;
    }

    /* 投稿個別ページモバイル */
    .single-post-content {
        padding-top: 100px;
    }

    /* お知らせ一覧モバイル */
    .news-archive-list {
        padding: 25px 20px;
    }

    .news-archive-item {
        padding: 20px 0;
        gap: 20px;
    }

    .news-archive-date {
        min-width: 70px;
        font-size: 0.8rem;
    }

    .news-archive-title {
        font-size: 0.95rem;
    }

    .news-pagination {
        margin-top: 30px;
        padding-top: 20px;
        flex-wrap: wrap;
    }

    .news-pagination a,
    .news-pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* アクセスページ */
.access-map {
    margin-bottom: 80px;
}

.access-info {
    font-size: 1rem;
    line-height: 2;
    color: #1C1C1C;
    text-align: center;
}

.address-postal {
    font-size: 0.9rem;
    color: #999;
    font-family: 'Crimson Text', serif;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.address-main {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    margin-left: 0.15em;
    color: #1C1C1C;
}

.access-method {
    font-size: 1rem;
    line-height: 2.2;
    color: #1C1C1C;
    padding-left: 15px;
}

.access-method p {
    margin-bottom: 15px;
}

.access-method p:last-child {
    margin-bottom: 0;
}

.method-detail {
    margin-top: 20px;
    color: #666666;
}

.route-list {
    list-style: none;
    padding: 0;
}

.route-list li {
    padding: 8px 0;
}

.route-list li:first-child {
    padding-top: 0;
}

.route-list li:last-child {
    padding-bottom: 0;
}

/* 駐車場ギャラリー */
.parking-gallery {
    margin-top: 30px;
}

.parking-main-image {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
}

.parking-main-image img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    display: block;
    background: #f5f5f5;
    border: 1px solid #E5E5E5;
}

.parking-main-caption {
    margin-top: 15px;
    text-align: center;
    font-size: 1rem;
    color: #333;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.parking-thumbnails {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.parking-thumb {
    width: 150px;
    height: 100px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.parking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.parking-thumb:hover {
    border-color: #A087BD;
}

.parking-thumb:hover img {
    transform: scale(1.05);
}

.parking-thumb.active {
    border-color: #8B7CB6;
}

.parking-thumb.active img {
    opacity: 0.8;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .access-map {
        margin-bottom: 40px;
    }

    .address-postal {
        font-size: 0.85rem;
    }

    .address-main {
        font-size: 1rem;
    }

    .access-method {
        font-size: 0.9rem;
    }

    .method-detail {
        padding: 10px 15px;
    }

    .parking-main-image img {
        height: 300px;
    }

    .parking-thumbnails {
        gap: 10px;
        justify-content: center;
    }

    .parking-thumb {
        width: 70px;
        height: 50px;
    }

    /* 上段：簡易地図を中央に配置 */
    .parking-thumbnails::before {
        content: '';
        flex-basis: 100%;
        order: 1;
    }

    .parking-thumb:first-child {
        order: 0;
        width: 100px;
        height: 70px;
    }

    .parking-thumb:not(:first-child) {
        order: 2;
    }

    .parking-main-caption {
        font-size: 0.9rem;
    }
}
