/* ベースリセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    /* 和紙風テクスチャ背景 */
    background-color: #faf7f2;
    background-image: 
        radial-gradient(rgba(240, 230, 210, 0.5) 15%, transparent 16%),
        radial-gradient(rgba(230, 220, 200, 0.4) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

/* 全体の基本コンテンツ幅設定 */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 行書体クラス */
.gyosho {
    font-family: "Klee One", "Yu Mincho", "MS Mincho", serif;
    font-weight: 600;
}

/* ヘッダー */
header {
    background-color: #2c3539; /* 深い墨色 */
    color: #fff;
    padding: 20px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    min-height: 80px;
}

/* 1. 左側ロゴ＆紋エリア */
.sect-logo-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.sect-logo {
    height: auto;
    max-height: 65px;
    width: auto;
    object-fit: contain;
    filter: invert(1);
}

.crest {
    height: auto;
    max-height: 68px; 
    width: auto;
    object-fit: contain;
}

/* 2. 中央のタイトルエリア */
.title-area {
    flex: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3.6rem;
    letter-spacing: 0.2em;
    line-height: 1.2;
}

.title-text {
    padding-left: 0.2em;
}

.subtitle {
    font-size: 0.9rem;
    color: #bfa480;
    letter-spacing: 0.15em;
    margin-top: 6px;
    line-height: 1;
    white-space: nowrap;
}

/* 3. 右側のスペーサー */
.header-spacer {
    flex: 1;
    display: block;
}

/* メインビジュアル（スライドショー） */
.hero-slider {
    position: relative;
    width: calc(100% - 40px);
    max-width: 960px;
    height: 380px;
    margin: 30px auto 0;
    overflow: hidden;
    background-color: #333;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: sliderAnime 15s infinite ease-in-out;
}

.slide1 {
    background-image: url('image1.jpg');
    background-color: #556b2f; 
    animation-delay: 0s;
}
.slide2 {
    background-image: url('image2.jpg');
    background-color: #8b4513;
    animation-delay: 5s;
}
.slide3 {
    background-image: url('image3.jpg');
    background-color: #2f4f4f;
    animation-delay: 10s;
}

@keyframes sliderAnime {
    0% { opacity: 0; transform: scale(1.0); }
    10% { opacity: 1; }
    33.3% { opacity: 1; }
    43.3% { opacity: 0; transform: scale(1.03); }
    100% { opacity: 0; }
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    text-align: center;
    z-index: 10;
    width: 90%;
}

.hero-text h2 {
    font-family: "Klee One", "Yu Mincho", serif;
    font-size: 3.6rem;
    color: #fff;
    margin-bottom: 0;
    letter-spacing: 0.15em;
    border: none;
    padding: 0;
}

/* 各セクション共通スタイル */
h2 {
    font-size: 1.5rem;
    color: #2c3539;
    border-bottom: 2px solid #bfa480;
    padding-bottom: 8px;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
}

.about, .info, .access {
    background: rgba(255, 255, 255, 0.75);
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

/* お寺について */
.about-intro {
    margin-bottom: 30px;
}
.about-intro p {
    margin-bottom: 10px;
}

.about-grid-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.history-block {
    flex: 1.2;
    min-width: 300px;
}
.history-block h3 {
    font-size: 1.2rem;
    color: #2c3539;
    margin-bottom: 15px;
    padding-left: 8px;
    border-left: 4px solid #bfa480;
}
.history-block p {
    margin-bottom: 12px;
}

/* 霊場会公式HPへのリンクボタン */
.link-btn-area {
    margin-top: 20px;
}
.btn-link {
    display: inline-block;
    background-color: #f5f0e6;
    color: #8b4513;
    border: 1px solid #bfa480;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.btn-link:hover {
    background-color: #8b4513;
    color: #fff;
    border-color: #8b4513;
}
.btn-link span {
    margin-left: 5px;
}

/* 基本情報テーブル */
.spec-block {
    flex: 0.8;
    min-width: 280px;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0dcd5;
}
.spec-table th, .spec-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #e0dcd5;
}
.spec-table th {
    background-color: #f5f0e6;
    color: #4a4238;
    width: 35%;
    text-align: left;
    font-weight: bold;
}
.spec-table td {
    color: #333;
}

/* 年中行事エリア */
.event-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.event-list li {
    display: flex;
    border-bottom: 1px dashed #e0dcd5;
    padding-bottom: 15px;
}
.event-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.event-date {
    width: 160px;
    font-weight: bold;
    color: #8b4513;
    font-size: 1.05rem;
    padding-top: 2px;
    flex-shrink: 0;
    white-space: nowrap;
}
.event-body {
    flex: 1;
}
.event-body h4 {
    font-size: 1.1rem;
    color: #2c3539;
    margin-bottom: 5px;
}
.event-body p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* アクセス */
.access-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.details { 
    flex: 1; 
    min-width: 280px; 
}
.details h3 { 
    margin-bottom: 15px; 
    color: #2c3539; 
    font-size: 1.2rem; 
}
.details p { 
    margin-bottom: 12px; 
}

/* 地図画像エリア */
.map-image-area {
    flex: 1;
    min-width: 280px;
    height: 280px;
    position: relative;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.custom-map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-backup-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    padding: 20px;
    text-align: center;
}

/* フッター */
footer {
    background-color: #2c3539;
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
    font-size: 0.85rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header { 
        padding: 15px 0; 
    }
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    .sect-logo-area, .header-spacer { 
        display: none; 
    }
    .title-area { 
        flex: none; 
        width: 100%; 
    }