/* --- 変数設定 & 基本設定 --- */
:root {
  --color-shinto: #8B0000;  /* 深紅・朱色 */
  --color-gold: #C5A059;    /* 金箔色 */
  --color-bg: #FAF8F5;      /* 落ち着いた和紙風の背景 */
  --font-mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --font-gothic: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: #333333;
  line-height: 1.8;
}

/* 全ての画像を画面幅内に収める設定 */
img {
  max-width: 100%;
  height: auto;
}

/* ===================================================
   ⛩️ ヘッダー上部（ロゴ & 電話番号エリア）
=================================================== */
.site-header {
    width: 100%;
    background-color: #ffffff;
    font-family: var(--font-gothic);
}

.header-top {
    padding: 16px 20px;
    background: #ffffff;
}

.header-top-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* 左側：神社名ロゴ */
.header-logo .logo-link {
    text-decoration: none;
    color: #1a1a1a;
}

.header-logo .logo-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 2px;
    color: #222;
}

/* 右側：お問い合わせ・電話番号 */
.header-contact {
    text-align: right;
    line-height: 1.15;
}

.header-contact .contact-lead {
    font-size: 0.8rem;
    color: #555;
    margin: 0 0 1px 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.header-contact .contact-tel {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    color: #3b200b;
}

.header-contact .tel-label {
    font-size: 1.15rem;
    font-weight: 700;
    margin-right: 6px;
}

.header-contact .tel-number {
    color: inherit;
    text-decoration: none;
    letter-spacing: 1px;
}

.header-contact .contact-time {
    font-size: 0.75rem;
    color: #666;
    margin: 2px 0 0 0;
    letter-spacing: 0.8px;
}

/* スマホ表示対応（画面幅が狭い場合） */
@media (max-width: 768px) {
    .header-top {
        padding: 12px 16px;
    }
    .header-top-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .header-logo .logo-title {
        font-size: 1.6rem;
    }
    .header-contact {
        text-align: center;
    }
    .header-contact .contact-tel {
        font-size: 1.35rem;
    }
}

/* ===================================================
   ⛩️ ナビゲーション共通・PC表示（11項目1行収容）
=================================================== */
.main-navigation {
    width: 100%;
    background-color: #880000;
    position: relative;
    z-index: 999;
}

.main-navigation .nav-inner {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    display: block;
}

.main-navigation ul {
    display: flex;
    justify-content: center;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap !important;
    width: 100%;
}

.main-navigation ul li {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.main-navigation ul li a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 4px;
    font-size: 0.85rem;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s ease;
    letter-spacing: 0.2px;
}

.main-navigation ul li a:hover,
.main-navigation ul li a.active {
    background-color: #8b0000;
    color: #F8B400;
    font-weight: bold;
}

/* ハンバーガーボタン（PC時は非表示） */
.hamburger-btn {
    display: none;
}

/* ===================================================
   📱 画面幅 1024px 以下：スマホ・タブレット表示
=================================================== */
@media screen and (max-width: 1024px) {
    .main-navigation {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 48px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 44px;
        height: 38px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px 4px;
        box-sizing: border-box;
        z-index: 1002;
    }

    .hamburger-btn span {
        display: block;
        width: 28px;
        height: 3px;
        background-color: #ffffff !important;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    .hamburger-btn.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .main-navigation .nav-inner {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #3b200b;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
        z-index: 1001;
        padding: 0;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation .nav-inner.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column !important;
        width: 100%;
    }

    .main-navigation ul li {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }

    .main-navigation ul li a {
        display: block;
        padding: 14px 20px;
        font-size: 0.95rem;
        justify-content: flex-start;
    }
}

/* ===================================================
   テーブル & 祖霊殿・施設案内 dl リスト
=================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.price-table th,
.price-table td {
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
  font-size: 0.95rem;
  word-break: keep-all; 
}

.info-list {
  margin: 1.5rem 0;
  padding: 0;
  border-top: 1px solid #e2e8f0;
}

.info-item {
  display: flex;
  align-items: baseline;
  padding: 12px 8px;
  border-bottom: 1px solid #e2e8f0;
}

.info-item dt {
  width: 130px;
  flex-shrink: 0;
  font-weight: bold;
  color: #333333;
}

.info-item dd {
  margin: 0;
  flex-grow: 1;
  color: #555555;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .info-item {
    flex-direction: column;
    gap: 4px;
  }
  .info-item dt {
    width: 100%;
    color: #8b0000;
  }
}

/* ===================================================
   フッターエリア
=================================================== */
footer, .footer-bg {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  box-sizing: border-box;
  background-color: #111111;
  color: #ffffff;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-title {
  font-family: var(--font-mincho);
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: -10px;
  letter-spacing: 0.1rem;
}

.footer-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 20px;
}

.footer-address p {
  margin: 2px 0;
  line-height: 1.4;
  font-size: 0.85rem;
  color: #cccccc;
}

.footer-sns {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sns-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 20px;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.sns-btn svg {
  display: block;
  fill: currentColor;
}

.sns-btn.facebook {
  background-color: #1877F2;
  border: 1px solid #2b84f9;
}

.sns-btn.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border: 1px solid #f09433;
}

.sns-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  filter: brightness(1.1);
}

.footer-bottom {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 15px;
  text-align: center;
  font-size: 0.8rem;
  color: #888888;
}

/* 下部ナビゲーション */
.bottom-nav-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px dashed #e0d5c1;
  flex-wrap: wrap;
}

.btn-bottom-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background-color: #ffffff;
  color: var(--color-shinto);
  border: 1px solid var(--color-shinto);
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-bottom-nav.primary {
  background-color: var(--color-shinto);
  color: #ffffff;
}

.btn-bottom-nav:hover {
  background-color: #6d1313;
  color: #ffffff;
  transform: translateY(-2px);
}

/* ===================================================
   📱 画面幅 1024px 以下：スマホ・タブレット表示（2列グリッド）
=================================================== */
@media screen and (max-width: 1024px) {
    .main-navigation {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 48px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* 🍔 ハンバーガーボタン */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 44px;
        height: 38px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px 4px;
        box-sizing: border-box;
        z-index: 1002;
    }

    .hamburger-btn span {
        display: block;
        width: 28px;
        height: 3px;
        background-color: #ffffff !important;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    .hamburger-btn.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* スマホメニュー本体 */
    .main-navigation .nav-inner {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #3b200b;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
        z-index: 1001;
        padding: 8px;
        box-sizing: border-box;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation .nav-inner.is-open {
        display: block;
    }

    /* ★ リストを2列グリッド（横2分割）に変更 */
    .main-navigation ul {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .main-navigation ul li {
        width: 100%;
        border: none;
    }

    /* ボタン状のリンクスタイル */
    .main-navigation ul li a {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 12px 6px;
        font-size: 0.88rem;
        background-color: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 4px;
        white-space: normal;
        min-height: 44px;
        box-sizing: border-box;
    }

    /* 11項目目（オンライン予約など最後の奇数項目）を全幅で強調 */
    .main-navigation ul li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .main-navigation ul li:last-child:nth-child(odd) a {
      /* 他の項目と同じ背景・フォント設定を引き継ぐ */
        background-color: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        font-weight: normal;
    }
}
/* ===================================================
   📱 スマホ表示時のお知らせリスト（カード型・縦積み）
=================================================== */
@media screen and (max-width: 768px) {
  /* 各お知らせ行をカード化 */
  .news-list li,
  .information-list li {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    align-items: flex-start;
    padding: 12px 10px;
    border-bottom: 1px solid #e5dfd5;
    gap: 6px; /* 上下のすき間 */
  }

  /* 上段（日付とカテゴリを横並びに） */
  .news-list .news-meta,
  .information-list .meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
  }

  /* 日付の折り返しを防ぐ */
  .news-list .news-date,
  .information-list .date {
    white-space: nowrap;
    color: #666;
  }

  /* カテゴリバッジ（縦長にならず横長で綺麗に保つ） */
  .news-list .news-category,
  .information-list .category {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 3px;
    background-color: #8b0000;
    color: #ffffff;
    line-height: 1.4;
  }

  /* 下段：タイトル（全幅を使ってゆったり表示） */
  .news-list .news-title,
  .information-list .title {
    width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
  }
}
/* ===================================================
   ⛩️ ヘッダーの横並び＆高さ圧縮設定（スマホ横向き対応）
=================================================== */

/* 1. 基本の横並びレイアウト（PC・スマホ横向き共通） */
.header-top-inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 8px 16px;
  box-sizing: border-box;
}

.header-logo {
  flex-shrink: 0;
}

.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

/* 2. スマホ横向き（画面高さが低く、横幅がある状態）の最適化 */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .header-top {
    padding: 2px 0; /* 上下の無駄な余白を削減 */
  }

  .header-top-inner {
    flex-direction: row !important; /* 横並びを強制 */
    padding: 4px 12px !important;
  }

  .logo-title {
    font-size: 1.2rem !important; /* 神社名フォントを少し小さく */
  }

  .header-contact {
    align-items: flex-end;
  }

  /* 高さ削減のため、横向き時は補足文を非表示またはコンパクト化 */
  .contact-lead,
  .contact-time {
    display: none !important; /* リード文と受付時間を隠してスッキリ */
  }

  .contact-tel {
    margin: 0 !important;
    font-size: 0.95rem !important;
  }

  .tel-number {
    font-size: 1rem !important;
  }
}

/* 3. スマホ縦向き（画面幅 576px 未満かつ縦向き）の時 */
@media screen and (max-width: 576px) and (orientation: portrait) {
  .header-top-inner {
    flex-direction: column; /* 縦向きは中央・縦並び */
    text-align: center;
    gap: 6px;
    padding: 10px 12px;
  }

  .header-contact {
    align-items: center;
    text-align: center;
  }
}