/* ============================================================================
 * 慈恩寺テラス（jionji-terrace） Layer 2 スタイル
 * 旧 samidare 2026-11 現行 UI 踏襲
 *   ヘッダー: 白背景 + logo.png + title.png + 右上 MENU
 *   グロナビ: 濃紺帯で横並び
 *   本文: 白背景
 *   見出し: 山形（屋根）装飾ライン
 * 配色: 濃紺#172042 + 金茶#c3925c + 淡灰#F6F6F6
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Kiwi+Maru:wght@400;500&display=swap');

[data-template="custom-jionji-terrace"] {
  --jt-navy:         #172042;
  --jt-navy-ink:     #0e1530;
  --jt-gold:         #c3925c;
  --jt-gold-dark:    #a07a44;
  --jt-brown:        #7A5A2B;
  --jt-paper:        #ffffff;
  --jt-paper-alt:    #F6F6F6;
  --jt-cream:        #FFF8E7;
  --jt-lemon:        #FFF26C;
  --jt-ink:          #222;
  --jt-mute:         #6b6b6b;
  --jt-line:         #E3E3E3;
  --jt-maxw:         1456px;

  --jt-font-sans:    'Noto Sans JP', 'ヒラギノ角ゴシック','Hiragino Sans', YuGothic, 'Yu Gothic','メイリオ', Meiryo, sans-serif;
  --jt-font-head:    'Kiwi Maru', 'Noto Sans JP', serif;
}

body:has([data-jionji-root]) {
  font-family: var(--jt-font-sans);
  color: var(--jt-ink);
  background: #fff;
}
[data-jionji-root], [data-template="custom-jionji-terrace"] {
  font-family: var(--jt-font-sans);
}
[data-template="custom-jionji-terrace"] h1,
[data-template="custom-jionji-terrace"] h2,
[data-template="custom-jionji-terrace"] h3,
[data-template="custom-jionji-terrace"] h4 {
  font-family: var(--jt-font-head);
  color: var(--jt-navy);
}

/* ============================================================================
 * フローティング固定ラッパー（ヘッダー+グロナビをスクロール追従させる）
 * ========================================================================== */
.jt-sticky {
  position: sticky; top: 0; z-index: 70;
  box-shadow: 0 2px 10px rgba(23,32,66,0.08);
}

/* ============================================================================
 * ヘッダー（白背景・ロゴ画像・右上MENU）
 * ========================================================================== */
.jt-header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--jt-line);
}
.jt-header__inner {
  max-width: 100%;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.jt-header__brand {
  display: flex; align-items: center; gap: 24px;
  text-decoration: none;
}
.jt-header__logo { display: block; height: 80px; width: auto; }
.jt-header__subtitle { display: block; height: 16px; width: auto; }
@media (max-width: 720px) {
  .jt-header__inner { padding: 12px 16px; gap: 12px; }
  .jt-header__logo { height: 58px; }
  .jt-header__subtitle { display: none; }
}

.jt-header__hamburger {
  position: relative;
  width: 84px; height: 72px; border: none; background: transparent;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer;
  padding: 6px 0 12px;
}
.jt-header__hamburger span {
  display: block; width: 36px; height: 3px; background: var(--jt-navy);
  transition: transform .25s, opacity .25s;
}
.jt-header__hamburger small {
  font-size: 13px; letter-spacing: 0.18em; color: var(--jt-navy);
  margin-top: 3px;
}
.jt-header__hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.jt-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.jt-header__hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* ハンバーガーはデスクトップでも常時表示（旧 samidare UI 準拠：右上に MENU） */
.jt-header__hamburger { display: flex !important; }

/* ============================================================================
 * グロナビ帯（濃紺・デスクトップ用）
 * デフォルト表示にして、モバイルでのみ非表示＝ドロワーに任せる
 * （デフォルト none + media query で block だと override が効かずに消えるケースあり）
 * ========================================================================== */
.jt-globalnav {
  display: block !important;
  background: var(--jt-navy) !important;
}
.jt-globalnav ul {
  max-width: var(--jt-maxw);
  margin: 0 auto; padding: 0;
  list-style: none;
  display: flex; justify-content: center; align-items: stretch;
  gap: 0;
}
/* flex: 1 均等割りをやめて、項目幅はコンテンツに合わせる（長短アンバランス解消） */
.jt-globalnav li {
  flex: 0 0 auto;
  text-align: center;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.jt-globalnav li:last-child { border-right: 1px solid rgba(255,255,255,0.1); }
.jt-globalnav a {
  display: block;
  color: #fff !important;
  text-decoration: none;
  /* 項目間隔は左右 padding で確保。短い項目にも最低幅を与えて見た目を揃える */
  padding: 22px 28px;
  min-width: 88px;
  font-size: 16px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.jt-globalnav a:hover,
.jt-globalnav a[aria-current="page"] {
  background: var(--jt-navy-ink);
  color: var(--jt-gold) !important;
}
@media (max-width: 899px) {
  .jt-globalnav { display: none !important; }
}

/* ============================================================================
 * ドロワー（モバイル専用）
 * ========================================================================== */
.jt-drawer-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(23, 32, 66, 0.55);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.jt-drawer-modal.is-open { opacity: 1; pointer-events: auto; }

.jt-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(360px, 85vw);
  z-index: 85;
  background: var(--jt-navy);
  color: #fff;
  padding: 24px 24px 40px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.22,.9,.3,1);
  overflow-y: auto;
}
.jt-drawer.is-open { transform: translateX(0); }
.jt-drawer__close {
  background: transparent; border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; margin-bottom: 20px;
}
.jt-drawer__list { list-style: none; padding: 0; margin: 0 0 24px; }
.jt-drawer__list li { border-bottom: 1px solid rgba(255,255,255,0.15); }
.jt-drawer__list a {
  display: block; padding: 14px 2px;
  color: #fff; text-decoration: none;
  font-family: var(--jt-font-head);
  font-size: 16px; letter-spacing: 0.08em;
}
.jt-drawer__list a::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; margin-right: 10px;
  border-top: 1.5px solid var(--jt-gold); border-right: 1.5px solid var(--jt-gold);
  transform: rotate(45deg); vertical-align: middle;
}
.jt-drawer__list a:hover { color: var(--jt-gold); }
.jt-drawer__sns {
  display: flex; gap: 16px;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.2);
}
.jt-drawer__sns a { color: #fff; display: inline-flex; }
.jt-drawer__sns a:hover { color: var(--jt-gold); }

/* ============================================================================
 * ページヒーロー（下層ページ共通：画像背景 + 中央タイトル）
 * ========================================================================== */
.jt-page-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: var(--jt-navy);
}
@media (max-width: 720px) { .jt-page-hero { height: 280px; } }
.jt-page-hero__image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.jt-page-hero__overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
}
.jt-page-hero__title {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.jt-page-hero__title::before,
.jt-page-hero__title::after {
  content: '';
  display: block;
  width: min(640px, 60vw);
  height: 1px;
  background: #fff;
  opacity: 0.9;
}
.jt-page-hero__title::before { margin-bottom: 24px; }
.jt-page-hero__title::after  { margin-top: 24px; }
.jt-page-hero__title h1 {
  color: #fff !important;
  font-family: var(--jt-font-head);
  font-size: clamp(26px, 4.5vw, 40px);
  letter-spacing: 0.14em;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* ============================================================================
 * TOP ヒーロー（施設外観 1枚）
 * ========================================================================== */
.jt-top { background: #fff; }
.jt-hero {
  position: relative;
  width: 100%; height: 72vh; min-height: 440px; max-height: 720px;
  overflow: hidden; background: #000;
}
.jt-hero__image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: jt-hero-zoom 18s ease-out forwards;
}
.jt-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,32,66,0.1) 0%, rgba(23,32,66,0.45) 70%, rgba(23,32,66,0.65) 100%);
}
.jt-hero__caption {
  position: absolute; left: 0; right: 0; bottom: 80px;
  text-align: center; color: #fff;
}
.jt-hero__caption h1 {
  font-family: var(--jt-font-head);
  color: #fff !important;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.jt-hero__caption p {
  font-size: clamp(13px, 2vw, 16px);
  letter-spacing: 0.14em;
  opacity: 0.95;
  margin: 0;
}
@keyframes jt-hero-zoom { from { transform: scale(1.0); } to { transform: scale(1.08); } }

/* ============================================================================
 * TOP アンカーメニュー
 * ========================================================================== */
.jt-anchors {
  max-width: var(--jt-maxw);
  margin: 48px auto 0;
  padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.jt-anchors__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 22px 10px;
  background: #fff;
  border: 1px solid var(--jt-line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--jt-navy);
  font-family: var(--jt-font-head);
  font-size: 15px;
  letter-spacing: 0.08em;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.jt-anchors__item:hover {
  border-color: var(--jt-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(23,32,66,0.08);
  color: var(--jt-gold-dark);
}
.jt-anchors__kicker {
  font-size: 11px; letter-spacing: 0.15em; color: var(--jt-gold); font-family: var(--jt-font-sans);
}
@media (max-width: 720px) {
  .jt-anchors { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .jt-anchors__item { padding: 16px 8px; font-size: 14px; }
}

/* ============================================================================
 * 共通セクション見出し（山形=屋根型装飾）
 * ========================================================================== */
.jt-section {
  max-width: var(--jt-maxw);
  margin: 72px auto 0;
  padding: 0 20px;
}
.jt-section--pb { padding-bottom: 72px; }
.jt-head {
  font-family: var(--jt-font-head);
  color: var(--jt-navy);
  text-align: center;
  font-size: clamp(22px, 3.5vw, 28px);
  letter-spacing: 0.14em;
  margin: 0 0 36px;
  position: relative;
  padding-top: 56px;
}
/* 山形（屋根）装飾：旧 samidare arrow_top.png を踏襲 */
.jt-head::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 180px; height: 44px;
  transform: translateX(-50%);
  background: url('/jionji-terrace/images/head-arrow.png') no-repeat center top / contain;
}
.jt-head::after {
  content: ''; display: block;
  width: 48px; height: 2px; background: var(--jt-gold);
  margin: 14px auto 0;
}

/* ============================================================================
 * 新着記事リスト
 * ========================================================================== */
.jt-news__list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--jt-line);
}
.jt-news__row { border-bottom: 1px solid var(--jt-line); }
.jt-news__row-link {
  display: grid; grid-template-columns: 110px 90px 1fr; align-items: center;
  gap: 14px;
  padding: 18px 10px;
  text-decoration: none; color: var(--jt-ink);
  transition: background .15s;
}
.jt-news__row-link:hover { background: var(--jt-paper-alt); color: var(--jt-navy); }
.jt-news__row-date {
  color: var(--jt-gold-dark);
  font-size: 13px; letter-spacing: 0.08em;
}
.jt-news__row-cat {
  font-size: 11px; letter-spacing: 0.12em;
  padding: 3px 10px;
  border: 1px solid var(--jt-navy);
  color: var(--jt-navy);
  text-align: center;
  border-radius: 3px;
}
.jt-news__row-title { font-size: 15px; font-weight: 500; }
@media (max-width: 640px) {
  .jt-news__row-link { grid-template-columns: 1fr; gap: 4px; padding: 14px 6px; }
  .jt-news__row-cat { justify-self: start; }
}
.jt-news__more { text-align: center; margin-top: 28px; }
.jt-news__more a {
  display: inline-block; padding: 10px 36px;
  background: var(--jt-navy); color: #fff;
  text-decoration: none;
  font-size: 14px; letter-spacing: 0.1em;
  border-radius: 2px;
  transition: background .2s;
}
.jt-news__more a:hover { background: var(--jt-gold); color: #fff; }

/* ============================================================================
 * 寺そば・寺カフェ カード（TOP）
 * ========================================================================== */
.jt-food-highlight {
  max-width: var(--jt-maxw);
  margin: 72px auto 0;
  padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.jt-food-highlight__card {
  position: relative; display: block;
  border-radius: 10px; overflow: hidden;
  text-decoration: none;
  color: #fff; background: #000;
  min-height: 220px;
}
.jt-food-highlight__card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.jt-food-highlight__card:hover img { transform: scale(1.05); }
.jt-food-highlight__caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(23,32,66,0) 20%, rgba(23,32,66,0.6) 100%);
  color: #fff;
  padding: 20px;
}
.jt-food-highlight__caption h3 {
  color: #fff !important;
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: 0.1em;
  margin: 0 0 6px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.jt-food-highlight__caption p { font-size: 13px; letter-spacing: 0.12em; margin: 0; opacity: 0.95; }
@media (max-width: 720px) { .jt-food-highlight { grid-template-columns: 1fr; } }

/* ============================================================================
 * 外部バナー（全ページ共通・フッター直前）
 * ========================================================================== */
.jt-banners-section {
  background: #fff;
  padding: 48px 20px;
  border-top: 1px solid var(--jt-line);
}
.jt-banners {
  max-width: var(--jt-maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.jt-banners a {
  display: block; background: #fff; padding: 14px;
  border: 1px solid var(--jt-line); border-radius: 6px;
  transition: border-color .2s, transform .2s;
}
.jt-banners a:hover { border-color: var(--jt-gold); transform: translateY(-2px); }
.jt-banners img { width: 100%; height: auto; display: block; }
@media (max-width: 720px) { .jt-banners { grid-template-columns: 1fr; } }

/* ============================================================================
 * Main (下層ページ共通コンテナ)
 * ========================================================================== */
.jt-main { min-height: calc(100vh - 400px); background: #fff; }
.jt-main .l-main,
.jt-main > div > div:not(.jt-page-hero):not(.jt-globalnav):not(.jt-header):not(.jt-footer) {
  /* tenant_pages で入っている旧samidareの l-* / p-* は旧CSSに依存 */
}
.jt-main img { max-width: 100%; height: auto; }
.jt-main h2 { font-family: var(--jt-font-head); color: var(--jt-navy); font-size: 22px; margin: 32px 0 12px; letter-spacing: 0.1em; }
.jt-main h3 { font-family: var(--jt-font-head); color: var(--jt-navy); font-size: 18px; margin: 24px 0 10px; letter-spacing: 0.08em; }
.jt-main p { line-height: 1.9; margin: 10px 0; }
.jt-main a { color: var(--jt-navy); text-decoration: underline; text-underline-offset: 2px; }
.jt-main a:hover { color: var(--jt-gold); }

/* 下層ページ本文の中央寄せ（tenant_pages 用） */
.jt-page-body {
  max-width: var(--jt-maxw);
  margin: 0 auto;
  padding: 56px 20px 72px;
}

/* ============================================================================
 * /contact 慈恩寺テラス専用
 * ========================================================================== */
.jt-contact {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}
.jt-contact .jt-head { margin-bottom: 24px; }
.jt-contact__lead {
  text-align: center;
  font-size: 15px;
  line-height: 2;
  color: var(--jt-ink);
  margin: 0 0 32px;
}
.jt-contact__info {
  background: var(--jt-paper-alt);
  border: 1px solid var(--jt-line);
  border-left: 3px solid var(--jt-gold);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 0 0 40px;
}
.jt-contact__info dl { margin: 0; }
.jt-contact__info dl > div {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--jt-line);
}
.jt-contact__info dl > div:last-child { border-bottom: none; }
.jt-contact__info dt {
  font-family: var(--jt-font-head);
  color: var(--jt-navy);
  font-size: 13px; letter-spacing: 0.1em;
  padding-top: 2px;
}
.jt-contact__info dd { margin: 0; font-size: 14px; color: var(--jt-ink); }
.jt-contact__info a { color: var(--jt-navy); text-decoration: underline; }
.jt-contact__info a:hover { color: var(--jt-gold); }

.jt-contact__form {
  background: #fff;
  border: 1px solid var(--jt-line);
  border-radius: 4px;
  padding: 32px 28px;
}
.jt-contact__ssl {
  text-align: center;
  font-size: 12px; color: var(--jt-mute);
  margin: 20px 0 0;
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .jt-contact { padding: 40px 16px 56px; }
  .jt-contact__info { padding: 18px 18px; }
  .jt-contact__info dl > div { grid-template-columns: 86px 1fr; }
  .jt-contact__form { padding: 24px 18px; }
}

/* ============================================================================
 * Footer（旧 samidare 準拠：淡灰背景・左に施設情報・右に SNS/TOP）
 * ========================================================================== */
.jt-footer {
  position: relative;
  background: var(--jt-paper-alt);
  color: var(--jt-ink);
  margin-top: 0;
  padding: 48px 20px 48px;
}
.jt-footer__inner {
  max-width: var(--jt-maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .jt-footer__inner { grid-template-columns: 1fr; }
}

.jt-footer__title { margin: 0 0 20px; }
.jt-footer__title .name {
  display: block;
  font-family: var(--jt-font-head);
  font-size: 22px;
  letter-spacing: 0.1em;
  color: var(--jt-ink);
}
.jt-footer__title .sub {
  display: block;
  font-family: var(--jt-font-head);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--jt-ink);
  margin-top: 4px;
}
.jt-footer__address {
  margin: 10px 0;
  font-size: 15px;
  color: var(--jt-ink);
  line-height: 1.9;
}
.jt-footer__contact {
  margin: 10px 0;
  font-size: 15px;
  color: var(--jt-ink);
}
.jt-footer__contact a {
  color: var(--jt-ink); text-decoration: none;
}
.jt-footer__contact a:hover { color: var(--jt-navy); text-decoration: underline; }
.jt-footer__copy {
  margin: 32px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--jt-mute);
}

.jt-footer__side {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
  gap: 32px;
  min-height: 180px;
}
@media (max-width: 720px) {
  .jt-footer__side { align-items: flex-start; margin-top: 16px; min-height: 0; }
}

.jt-footer__sns {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 14px;
}
.jt-footer__sns a {
  color: var(--jt-navy);
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: #fff;
  border: 1.5px solid var(--jt-navy);
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.jt-footer__sns a:hover { background: var(--jt-navy); color: #fff; }

.jt-footer__totop {
  display: inline-flex; flex-direction: column; align-items: center;
  color: var(--jt-navy); text-decoration: none;
  gap: 2px;
  transition: color .2s;
  font-size: 13px; letter-spacing: 0.1em;
}
.jt-footer__totop:hover { color: var(--jt-gold); }
