/* temple-info.css */

/* ヘッダー背景だけ平塚市用の写真に差し替えたい場合 */
header {
    background-image: url("");
}

/* ==============================
   <main>（コンテンツ本体）
   - .bg-image 背景画像エリア
   - .content 本文ブロック
============================== */

/* 通常時（PC・iPadなど） */
main .bg-image {
    position: relative;
    width: 100%;
    height: 80vh;
    background: url("../imgs/top/odawara_kusatsu.jpg") no-repeat center center /
        cover;
    background-attachment: scroll;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: translateZ(0); /* iOSのちらつき対策 */
    will-change: background-position;
    background-color: black;
}

/* 📱 スマホ・タブレット（768px未満）の場合は高さを少し低く */
@media (max-width: 767px) {
    main .bg-image {
        height: 60vh;
    }
}

/* 本文を囲むセクション */
.content {
    position: relative;
    padding: 4rem var(--content-padding-left);
    background: #f9f9f7;
}

/* パンくず */
.temple-breadcrumb {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.temple-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.temple-breadcrumb li::after {
    content: ">";
    margin: 0 0.25rem;
    color: #aaa;
}

.temple-breadcrumb li:last-child::after {
    content: "";
    margin: 0;
}

.temple-breadcrumb a {
    text-decoration: none;
    color: #14285a;
}

.temple-breadcrumb li[aria-current="page"] {
    color: #222;
}

/* ページヘッダーエリア */
.temple-page-header {
    background-color: #f9f9f7;
}

.temple-page-title-block {
    max-width: 720px;
}

.temple-page-title {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.temple-page-lead {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* お寺一覧セクション */
.temple-list-section {
    background-color: #fff;
}

.temple-list-heading {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

/* カードレイアウト */
.temple-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.temple-card {
    background-color: #f9f9f7;
    border-radius: 10px;
    border: 1px solid #e0e0dd;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.temple-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.temple-rubi {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

/* 寺院のメタ情報 (住所/電話など) */
.temple-meta {
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
}

.temple-meta > div {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    column-gap: 0.5rem;
    row-gap: 0.3rem;
    margin-bottom: 0.25rem;
}

.temple-meta dt {
    color: #666;
}

.temple-meta dd {
    margin: 0;
}

/* リンクボタン */
.temple-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.temple-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid #14285a;
    color: #14285a;
    background-color: #ffffff;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease, box-shadow 0.2s ease;
}

.temple-link-btn:hover,
.temple-link-btn:focus-visible {
    background-color: #14285a;
    color: #ffffff;
    border-color: #14285a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* サブボタン（公式サイトなど） */
.temple-link-btn.secondary {
    border-color: #999;
    color: #444;
}

.temple-link-btn.secondary:hover,
.temple-link-btn.secondary:focus-visible {
    background-color: #444;
    color: #ffffff;
    border-color: #444;
}

/* 戻るリンク */
.temple-back-link {
    margin-top: 2rem;
}

.temple-back-link a {
    font-size: 0.9rem;
    text-decoration: none;
    color: #14285a;
}

.temple-back-link a:hover,
.temple-back-link a:focus-visible {
    text-decoration: underline;
}

/* スマホ向け微調整 */
@media (max-width: 767px) {
    .temple-page-title {
        font-size: 1.35rem;
    }

    .temple-card {
        padding: 1.2rem 1.25rem;
    }
}

/* カード全体をリンクにした場合の調整 */
.temple-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.temple-card-link:hover,
.temple-card-link:focus-visible {
    text-decoration: none;
}

:root {
    /* 全体の共通パディング基準（縦書きタイトルと揃える） */
    --content-padding-left: 2rem;
}

/* ------------------------------
   基本リセット・初期化設定
------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Serif JP", serif;
    background: #f9f9f7;
    color: #222;
    position: relative;
}

/* ------------------------------
   汎用型
------------------------------ */
.mt-1 {
    margin-top: 1rem;
}

.mt-12 {
    margin-top: 1.2rem;
}

.mb-12 {
    margin-bottom: 1.2rem;
}

/* ==============================
   <header>（ヘッダー部分）
   - タイトル（縦書き）
   - 説明文（英語）
============================== */
/* ==============================
   <header>（ヘッダー部分）
   - タイトル（縦書き）
   - 説明文（英語）
   - 背景画像つき
============================== */
/* タイトルと説明文はオーバーレイの上に表示 */
header .logo-title,
header .description {
    position: relative;
    z-index: 1;
}

/* 縦書きタイトルブロック */
.logo-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

/* 日本語：縦書きタイトル文字 */
.title {
    writing-mode: vertical-rl;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.1em;

    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInSlideVertical 1.8s ease-out forwards;
    animation-delay: 0.5s;
}

/* 英語：横書き説明文（右→左） */
.description {
    margin-top: 1rem;
    max-width: 200px;
    font-size: 0.85rem;
    line-height: 1.6;

    opacity: 0;
    transform: translateX(30px); /* 右から左へ */
    animation: fadeInSlideHorizontal 1.8s ease-out forwards;
    animation-delay: 0.5s; /* 同時に始まる */
}

/* 上からフェードイン */
@keyframes fadeInSlideVertical {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 右からフェードイン */
@keyframes fadeInSlideHorizontal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==============================
   <nav>（右上の縦書きナビ）
============================== */
.vertical-nav {
    position: absolute;
    top: 2rem;
    right: 2rem;
    writing-mode: vertical-rl;
    font-size: 0.9rem;
    color: #ccc;
}

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

/* ==============================
   固定ヘッダーナビゲーション
============================== */
.site-nav {
    position: fixed; /* ← ここで画面に固定しています */
    top: 1rem;
    right: 1.5rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    background: transparent;
    display: flex;
    align-items: center;
}

/* 右上固定のハンバーガー（外枠なし） */
.menu-toggle {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1100;
    appearance: none;
    background: transparent;
    border: none;
    padding: 0.25rem;
    margin: 0;
    cursor: pointer;
    line-height: 1;
}

@media (min-width: 1024px) {
    .menu-toggle {
        right: 3rem; /* お好みで 3rem, 4rem などに調整 */
    }
}

.menu-toggle:focus-visible {
    outline: 2px solid #14285a;
    outline-offset: 2px;
}

/* 3本線アイコン */
.menu-toggle .menu-bar {
    display: block;
    width: 26px;
    height: 2px;
    background: #222; /* ★ ここを #222 → #ffffff に変更 */
    margin: 6px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}

/* greeting より下ではハンバーガーの線を黒にする */
.site-nav.nav-dark .menu-toggle .menu-bar {
    background: #222222;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== すべての画面幅で：右側 70% のサイドメニュー ===== */
.site-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* 画面右側 70% 幅のパネルにする */
    width: 70vw;

    z-index: 1090;
    background: #ffffff;
    overflow-y: auto;

    /* 上から縦並び */
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 4rem 1.25rem 2rem;

    /* アニメーション用：右からスッと出てくるイメージ */
    opacity: 0;
    transform: translateX(20px); /* 右側から少しだけスライドイン */
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;

    /* お好みで、左側の境界に影を付ける */
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
}

.site-nav .menu.is-open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}

/* メニュー内リンクのスタイルはそのまま流用 */
.site-nav .menu a {
    position: relative;
    display: block;
    width: 100%;
    padding: 1rem 0.25rem 1.1rem; /* 下線スペース */
    text-decoration: none;
    color: #222;
    font-size: 1.1rem;
    line-height: 1.6;
}

.site-nav .menu a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background-color: #ddd;
}

/* 低モーション設定の配慮 */
@media (prefers-reduced-motion: reduce) {
    .menu-toggle .menu-bar {
        transition: none !important;
    }
}

/* ==============================
   <footer>（フッター）
   ※ バナー画像サイズは変更しない
============================== */
.site-footer {
    background-color: #f9f9f7;
    padding: 2rem var(--content-padding-left);
    text-align: start;
    font-size: 1rem; /* ベース */
}

/* 住所・電話など、通常のテキスト */
.site-footer p {
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
}

/* ★ サイト名だけ少し大きく（← .site-footer p の後に書くこと） */
.site-footer p.footer-logo {
    font-weight: bold;
    font-size: 1.2rem; /* 他より「気持ち」大きめ */
    margin-bottom: 1.5rem;
}

/* コピーライト行だけ少し控えめに */
.footer-copy {
    color: #888;
    font-size: 0.9rem;
}

/* ===== バナー関連はそのまま ===== */
.footer-banners {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.footer-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
}

.footer-banner img {
    display: block;
    height: 80px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .footer-banners {
        justify-content: center;
    }
}

/* ===== バナー関連はそのまま（サイズ変更なし） ===== */
.footer-banners {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.footer-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
}

.footer-banner img {
    display: block;
    height: 80px; /* ★ ここは現状維持 */
    width: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .footer-banners {
        justify-content: center;
    }
}

.back-to-list {
    position: relative;
    padding: 2rem var(--content-padding-left);
    background: #f9f9f7;
}

/* ==============================
   お知らせ詳細ページ用
   （既存クラスは変更せず、新規クラスのみ追加）
============================== */

.news-page-header {
    background-color: #f9f9f7;
}

.news-page-title-block {
    max-width: 720px;
}

.news-page-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.news-page-lead {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 0.75rem;
}

/* 日付・タグ行 */
.news-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.news-meta .news-date {
    margin-right: 0.75rem;
}

.news-meta .news-tag {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: 0.8rem;
}

/* 本文セクション */
.news-article-section {
    background-color: #fff;
}

/* メイン画像 */
.news-main-image {
    max-width: 720px;
    margin: 0 auto 2rem;
}

.news-main-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* 本文テキスト */
.news-body {
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.9;
    color: #444;
}

.news-body p + p {
    margin-top: 1rem;
}

/* 戻るリンク（すでに .back-to-list は定義済みなので、ボタンだけ軽く調整したい場合） */
.temple-back-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid #14285a;
    color: #14285a;
    background-color: #ffffff;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease, box-shadow 0.2s ease;
}

.temple-back-link-btn:hover,
.temple-back-link-btn:focus-visible {
    background-color: #14285a;
    color: #ffffff;
    border-color: #14285a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
