﻿/* =====================================================
   ひごのおと 統合スタイルシート
   - index系（index.html, contact.html, references.html, privacypolicy.html, 404.html）
   - 札所系（aso33, yamaga33, kikuchi33, koushi33, higo33, ashikita33 等）
   ===================================================== */

/* ==================
   カラーパレット（和紙風・全サイト共通）
   ================== */
:root {
  --white: #fffdf7;       /* カード・コンテンツ背景（和紙風） */
  --bg: #f5f1e8;          /* 和紙ベージュ（ページ背景） */
  --bg-card: #fffdf7;     /* 札所系：カード背景（=--whiteと同じ） */
  --light: #f5f1e8;
  --border: #d6cdb8;      /* 細い罫線 */
  --rule: #d6cdb8;        /* 札所系エイリアス */
  --line: #b89d6f;        /* やや濃い罫線 */
  --text-main: #000000;
  --text-sub: #6b6259;
  --text-light: #b0ada8;
  --ink: #000000;         /* 札所系エイリアス */
  --ink-soft: #6b6259;    /* 札所系エイリアス */
  --accent: #8b3a2f;      /* 臙脂 */
  --accent-soft: #c08574; /* 柔らかい臙脂 */
  --shadow: 0 1px 2px rgba(60,45,30,.06), 0 4px 12px rgba(60,45,30,.05);
}

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

html { font-size: 18px; }

/* ==================
   body（共通土台）
   ================== */
body {
  font-family: 'Meiryo', 'メイリオ', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-weight: 400;
  line-height: 1.9;
}

/* =====================================================
   index系（index.html, contact.html, references.html,
              privacypolicy.html, 404.html）専用
   ===================================================== */

/* ヘッダー */
header {
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  position: sticky;
  top: 0;
  background: rgba(245, 241, 232, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}

  /* ヘッダーh1 → page-headingに移動したため不要だが残す */
  .site-h1 {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-main);
    letter-spacing: 0.05em;
    margin-top: 4px;
    text-align: center;
  }

/* 404ページはstickyなし */
header.static {
  position: static;
  background: var(--bg);
}

/* h1 + nav のスクロールエリア */
.page-heading {
  text-align: center;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  margin-bottom: 12px;
}

.site-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-decoration: none;
}

.site-subtitle {
  font-family: 'Shippori Mincho', serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

nav a {
  font-size: 0.85rem;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

nav a:hover { opacity: 0.6; }

/* フッター */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .foot-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 0.88rem;
  color: var(--text-main);
}

footer nav { gap: 24px; }

/* コンテンツ共通（index系 main内のみ） */
main .content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 52px 40px 80px;
}

main .page-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding-bottom: 16px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

main h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding-bottom: 10px;
  margin-top: 48px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

main p {
  font-size: 0.88rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

main a {
  color: var(--text-main);
}

main a:hover { opacity: 0.6; }

main ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

main ul li {
  font-size: 0.88rem;
  line-height: 1.8;
  padding-left: 1em;
  position: relative;
}

main ul li::before {
  content: '・';
  position: absolute;
  left: 0;
}

/* ==================
   index.html 専用
   ================== */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px 72px;
}

.section:first-child {
  padding-top: 52px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-bottom: none;
  margin: 0;
  padding: 0;
}

.section-header span {
  font-size: 0.75rem;
  color: var(--text-main);
  letter-spacing: 0.1em;
}

.section-summary {
  margin-bottom: 20px;
  font-size: 1.00rem;
}

/* 観音グリッド */
.kannon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* やまがあいグリッド */
.yamagai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
  justify-content: center;
}

/* カード共通 */
.card {
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  background: var(--white);
}

.card:hover {
  box-shadow: 0 4px 20px rgba(60,45,30,0.12);
  transform: translateY(-2px);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--light);
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb.aso      { background: #f0e6d8; }
.card-thumb.yamaga   { background: #e8e6d0; }
.card-thumb.kikuchi  { background: #dfd8c4; }
.card-thumb.ashikita { background: #ead6cc; }
.card-thumb.db       { background: #e2d8c8; }
.card-thumb.blog     { background: #d8e0d4; }

.card-body {
  padding: 16px 18px 20px;
}

.card-label {
  font-size: 0.78rem;
  color: var(--text-main);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.card-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.8;
}

/* サイト概要 */
.site-commentary {
  margin-top: 30px;
}

.site-commentary h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding-bottom: 12px;
  margin-bottom: 16px;
  margin-top: 0;
  border-bottom: 1px solid var(--border);
}

.site-commentary p {
  font-size: 1.00rem;
  line-height: 1.9;
  margin-bottom: 12px;
}

.site-commentary ul li {
  font-size: 1.00rem;
}

.site-commentary ul li::before {
  content: '・';
}

/* ==================
   contact.html 専用
   ================== */

.site-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.site-info-table tr {
  border-bottom: 1px solid var(--border);
}

.site-info-table th {
  text-align: left;
  font-weight: 400;
  padding: 12px 16px 12px 0;
  width: 160px;
  vertical-align: top;
}

.site-info-table td {
  padding: 12px 0;
  line-height: 1.8;
}

.form-wrap {
  margin-top: 32px;
}

.form-wrap iframe {
  width: 100%;
  height: 1000px;
  border: none;
  display: block;
}

.form-link {
  margin-top: 24px;
  font-size: 0.85rem;
}

/* ==================
   references.html 専用
   ================== */

.lead {
  font-size: 0.88rem;
  line-height: 1.9;
  margin-bottom: 48px;
}

/* ==================
   404.html 専用
   ================== */

.error-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 40px 100px;
  text-align: center;
}

.error-code {
  font-family: 'Shippori Mincho', serif;
  font-size: 5rem;
  font-weight: 400;
  color: var(--border);
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 32px;
}

.error-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.error-desc {
  font-size: 0.88rem;
  line-height: 1.9;
  margin-bottom: 40px;
}

.back-link {
  display: inline-block;
  font-family: 'Shippori Mincho', serif;
  font-size: 0.9rem;
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 12px 32px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  transition: box-shadow 0.2s;
}

.back-link:hover {
  box-shadow: 0 2px 12px rgba(60,45,30,0.12);
}

/* ==================
   レスポンシブ（index系）
   ================== */

@media (max-width: 640px) {
  header { padding: 0 16px; height: 40px; }
  .site-h1 { font-size: 0.95rem; }
  .page-heading { padding: 20px 16px 16px; }
  .page-heading nav { gap: 20px; flex-wrap: wrap; margin-top: 10px; }
  .section { padding: 0 16px 52px; }
  .kannon-grid { grid-template-columns: 1fr; gap: 12px; }
  .yamagai-grid { grid-template-columns: 1fr; max-width: 100%; gap: 12px; }
  main .content-wrap { padding: 36px 20px 60px; }
  .error-wrap { padding: 60px 20px 80px; }
  .error-code { font-size: 3.5rem; }
  .form-wrap iframe { height: 1200px; }
  footer { padding: 24px 20px; flex-direction: column; gap: 16px; align-items: flex-start; }
  footer nav { gap: 20px; }
  .card-title { font-size: 1.2rem; }
  .card-desc { font-size: 1rem; }
  .card-body { padding: 14px 16px 18px; }
}

/* =====================================================
   札所系（三十三観音テンプレート）専用
   #container 配下に限定して index系と干渉を防ぐ
   ===================================================== */

/* 札所ページ全体（containerの基本スタイル） */
#container {
  margin: 0 auto;
  padding: 0 0 0 1%;
  max-width: 900px;
  color: var(--ink);
  font-size: 19px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "MS PMincho",
               Verdana, Arial, "メイリオ", "ヒラギノ角ゴ Pro W3",
               "ＭＳ Ｐゴシック", serif;
}

#container p {
  line-height: 2em;
  margin-bottom: 25px;
  font-size: inherit;
}

/* 札所ページのサイトタイトル枠 */
#container #header {
  width: 98%;
  margin: 30px 0;
  text-align: center;
  background: transparent;
  border: none;
  height: auto;
  position: static;
  display: block;
  padding: 0;
  z-index: auto;
  backdrop-filter: none;
  border-bottom: none;
  justify-content: initial;
  align-items: initial;
}

#container #header a {
  text-decoration: none;
  color: var(--ink);
}

/* サイトタイトル（札所ページではh1がサイトタイトル） */
#container h1,
#container h1 a:link,
#container h1 a:visited,
#container h1 a:hover,
#container h1 a:active {
  font-family: 'Shippori Mincho', 'Bitter', serif;
  margin: 1px 0 10px;
  font-weight: normal;
  font-size: xx-large;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
}

/* コンテンツ */
#container .content {
  background: var(--bg-card);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
}

/* 写真関連 */
#container img { width: 100%; max-width: 100%; height: auto; }
#container figcaption {
  font: smaller sans-serif;
  padding: 3px;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 0px;
  font-size: 20px;
}
#container figure { margin-bottom: 25px; }

/* ページトップ画像 */
#container .img-pagetop {
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
}

/* コンテンツ2 幅広に使う時用 */
#container .content2 {
  padding: 20px 0;
  margin-bottom: 30px;
}

/* サムネイル 2列リスト */
#container .fudathumblist {
  display: flex;
  flex-wrap: wrap;
  min-width: 100%;
}
#container .fudathumblist > div {
  width: 50%;
  max-width: 50%;
  text-align: center;
  font-size: 0.9em;
  background-color: var(--bg-card);
  padding: 10px 2px;
}
#container .imglist {
  width: 100%;
  margin-bottom: 8px;
}

/* リストデザイン */
#container .list-2 { padding: 0; margin: 0; }
#container .list-2 li {
  list-style: none;
  border-bottom: 1px dashed var(--rule);
  position: relative;
  margin: 0.5em 0 !important;
  padding: 0 0 0.5em;
}
#container .list-2 li:last-child { border: none; }

/* パンくずリスト */
#container nav[aria-label="パンくずリスト"] ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 10px 0;
  font-size: 1.01rem;
  color: var(--ink-soft);
}
#container nav[aria-label="パンくずリスト"] li {
  display: flex;
  align-items: center;
}
#container nav[aria-label="パンくずリスト"] a {
  text-decoration: none;
  color: var(--accent);
  transition: color 0.2s;
}
#container nav[aria-label="パンくずリスト"] a:hover {
  text-decoration: underline;
  color: var(--accent-soft);
}
#container nav[aria-label="パンくずリスト"] span[aria-hidden="true"] {
  margin: 0 8px;
  color: var(--rule);
  user-select: none;
}
#container nav[aria-label="パンくずリスト"] li:last-child {
  color: var(--ink);
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 見出しなど */
#container .h1span { font-size: 18px; }

/* 札所名見出し（札所ページではh2が札所名・大見出し） */
#container h2 {
  border-bottom: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  color: var(--accent);
  font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  font-weight: bold;
  font-size: 21px;
  padding-bottom: 5px;
  margin-top: 50px;
  margin-bottom: 25px;
  letter-spacing: 0.05em;
  background: none;
}
#container .h2-pagetop { margin-top: 20px; }

#container h3 {
  font-weight: bold;
  font-size: 19px;
  padding: 0 0 4px;
  margin-top: 40px;
  margin-bottom: 15px;
  border-left: 4px solid var(--accent-soft);
  padding-left: 10px;
  color: var(--accent);
  background: none;
}

#container em {
  font-style: normal;
  font-weight: bold;
  color: var(--ink);
}

#container hr {
  border: none;
  border-bottom: 1px dotted var(--line);
  margin: 10px;
}

/* リンク設定 */
#container a {
  color: var(--accent);
}
#container a:hover,
#container a:active {
  opacity: 0.6;
  color: var(--accent-soft);
}
#container .h3link { text-decoration: none; }
#container .GuideLink { color: var(--accent); }

#container .go-top {
  margin-top: 30px;
  margin-bottom: 15px;
}
#container .go-top a {
  color: var(--ink-soft);
  text-decoration: none;
}

/* テーブル 札所画像一覧 */
#container .imglitable { text-align: center; }
#container .imglitd { width: 50%; padding-bottom: 10px; }

/* テーブル 札所一覧 */
#container .tdcell {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-right: 5px;
  white-space: nowrap;
}

/* 目次デザイン */
#container div.menue-box {
  display: inline-block;
  padding-top: 1em;
  padding-bottom: 1em;
  padding-left: 1em;
  padding-right: calc(1em + 12px);
  margin-top: 50px;
  border-left: solid 12px var(--accent-soft);
  background: var(--bg-card);
}
#container .menue-list {
  list-style: none;
  line-height: 2.5em;
}

/* 探訪記 */
#container .tanbouki-text {
  line-height: 2em;
  margin-bottom: 25px;
}

/* Google Map レスポンシブ */
#container .map-wrap { max-width: 100%; }
#container .map {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
}
#container .map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

/* 枠組み レスポンシブ対応 */
#container .onerow {
  clear: both;
  padding: 0 10px;
}
#container .onerow::after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}
#container .col7 {
  float: left;
  margin: 0 3% 0 0;
}
#container .last,
#container .col12 {
  margin: 0;
}

/* フッター（札所ページ用） */
#container .footer {
  max-width: 900px;
  color: var(--ink-soft);
}
#container .footer a {
  color: var(--accent);
}

/* スマホ用 文字サイズ調整（札所系） */
@media screen and (max-width: 600px) {
  #container { font-size: 18px; }
  #container .fudathumblist > div {
    width: 50%;
    max-width: 50%;
  }
}

/* ==================
   sticky ヘッダー（札所ページ用）
   ================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 232, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: 0 1rem;
  height: 44px;
  display: flex;
  align-items: center;
}

#site-header-link {
  font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho',
               'Times New Roman', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.08em;
}

#site-header-link:hover {
  opacity: 0.6;
}
