/*
Theme Name:  神社仏閣パワースポット
Description: 血液型・生年月日からあなたにあった神社を提案するサイト
Author:      ソウリン
Version:     1.1.0
*/

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

/* ============================================
   リセット・基本
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
  background: #fff;
  font-size: 16px;
  line-height: 1.8;
}
h1,h2,h3,h4 { font-family: 'Noto Serif JP', serif; letter-spacing: 0.05em; line-height: 1.5; }
a { color: #9B2335; text-decoration: none; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   ヘッダー（透過・固定）
   ============================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#site-header .site-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
}
.header-logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
}
.header-torii {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}
.header-site-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: #fff;
}
#site-header nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  margin-left: 1.5rem;
  letter-spacing: 0.08em;
}
#site-header nav a:hover { color: #fff; opacity: 1; }

/* ============================================
   トップページ：フルスクリーンヒーロー
   ============================================ */
.hero-fullscreen {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.hero-swiper,
.hero-swiper .swiper-slide { width: 100%; height: 100%; }
.hero-swiper .swiper-slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* 暗幕 */
.hero-fullscreen::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 1;
}

/* ============================================
   ヒーロー オーバーレイ（フォーム全体）上寄せ
   ============================================ */
.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -63%);   /* 上寄せ */
  z-index: 10;
  text-align: center;
  color: #fff;
  width: 90%;
  max-width: 500px;
}

/* 鳥居SVGロゴ */
.hero-logo {
  margin-bottom: 0.6rem;
}
.torii-svg {
  width: 140px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* 装飾ライン */
.hero-divider {
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  margin: 0.9rem 0;
  font-family: 'Noto Serif JP', serif;
}

/* タイトル */
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 2.4rem;
  letter-spacing: 0.55em;
  color: #fff;
  margin: 0.2rem 0 0.1rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
  font-weight: 400;
}
.hero-subtitle {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.78rem;
  letter-spacing: 0.5em;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.1rem;
  text-transform: uppercase;
}

/* ============================================
   フォーム要素（全て明朝体）
   ============================================ */
.match-form { margin-top: 0.5rem; }

/* 血液型ラジオボタン */
.bt-radio-group {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.2rem;
}
.bt-radio-group label {
  color: #fff;
  font-size: 1.05rem;
  font-family: 'Noto Serif JP', serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.1em;
}
.bt-radio-group input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: #e8b4b8;
  cursor: pointer;
}

/* 生年月日 行 */
.form-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.form-row label {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-family: 'Noto Serif JP', serif;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

/* 生年月日 3つのセレクト */
.bday-selects {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.bday-selects select {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff;
  padding: 0.5rem 0.5rem;
  border-radius: 2px;
  font-size: 1rem;
  font-family: 'Noto Serif JP', serif;
  outline: none;
  transition: border-color 0.2s;
  cursor: pointer;
}
.bday-selects select:focus { border-color: rgba(255,255,255,0.85); }
.bday-selects select option { color: #333; background: #fff; }
#bday-year  { width: 90px; }
#bday-month { width: 68px; }
#bday-day   { width: 68px; }

/* CTAボタン */
.search-btn {
  margin-top: 1.2rem;
  padding: 0.9rem 3rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 2px;
  font-size: 1.05rem;
  font-family: 'Noto Serif JP', serif;
  letter-spacing: 0.4em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.search-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ============================================
   新月情報（フォーム下・オーバーレイ内）
   ============================================ */
.moon-info-inner {
  margin-top: 4.5rem;   /* ボタンとの間をさらに広げる */
  text-align: center;
}
.moon-date-line {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.moon-quote-line {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ============================================
   結果ページ
   ============================================ */
.page-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
}
.results-header { text-align: center; margin-bottom: 2.5rem; }
.results-header h1 { font-size: 1.6rem; color: #222; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.results-header p { color: #888; font-size: 0.9rem; }

/* 神社・寺院 セクションタイトル */
.results-section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  color: #9B2335;
  text-align: center;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #e8e0d8;
}

/* シェアボタン */
#share-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.82; }
.share-x    { background: #000; color: #fff; }
.share-line { background: #06c755; color: #fff; }

/* モーダル内広告枠（楽天トラベル） */
#shrine-modal-ad {
  margin-top: 1.2rem;
}
#shrine-modal-rakuten {
  display: block;
  background: #2c2c2c;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  transition: background 0.2s;
}
#shrine-modal-rakuten:hover { background: #111; }

/* 5列グリッド（10地方 × 2行） */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* カード */
.shrine-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
  cursor: pointer;
}
.shrine-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.15); transform: translateY(-4px); }
.shrine-card:hover .card-hover-hint { opacity: 1; }
.shrine-card img { width: 100%; height: 160px; object-fit: cover; }
.card-body { padding: 0.8rem 0.9rem 1rem; position: relative; }
.region-label { display: block; font-size: 0.7rem; color: #9B2335; letter-spacing: 0.12em; margin-bottom: 0.25rem; }
.shrine-card h3 { font-size: 0.95rem; color: #222; margin-bottom: 0.35rem; font-family: 'Noto Serif JP', serif; }
.card-goriyaku { font-size: 0.75rem; color: #888; }
.card-hover-hint {
  position: absolute;
  bottom: 0.5rem; right: 0.6rem;
  font-size: 0.65rem; color: #9B2335;
  opacity: 0; transition: opacity 0.2s;
  letter-spacing: 0.05em;
}

/* ============================================
   神社詳細モーダル
   ============================================ */
#shrine-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#shrine-modal-overlay.is-open {
  display: flex;
}
#shrine-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
#shrine-modal-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}
#shrine-modal-body {
  padding: 1.4rem 1.6rem 1.8rem;
}
#shrine-modal-region {
  font-size: 0.72rem;
  color: #9B2335;
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
  display: block;
}
#shrine-modal-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  color: #111;
  margin: 0 0 0.8rem;
}
#shrine-modal-goriyaku {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
#shrine-modal-goriyaku span {
  border: 1px solid #9B2335;
  color: #9B2335;
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
#shrine-modal-desc {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
#shrine-modal-gogyou-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}
.gogyou-木 { background: #e8f5e9; color: #2e7d32; }
.gogyou-火 { background: #fff3e0; color: #e65100; }
.gogyou-土 { background: #fdf3dc; color: #7c5c00; }
.gogyou-金 { background: #f3f0ff; color: #4527a0; }
.gogyou-水 { background: #e3f2fd; color: #01579b; }
#shrine-modal-map-btn {
  display: inline-block;
  background: transparent;
  color: #2c2c2c;
  border: 1.5px solid #2c2c2c;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: background 0.15s, color 0.15s;
}
#shrine-modal-map-btn:hover { background: #2c2c2c; color: #fff; }
#shrine-modal-close {
  position: absolute;
  top: 0.75rem; right: 0.85rem;
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#shrine-modal-close:hover { background: rgba(0,0,0,0.7); }

/* 広告枠 */
.ad-slot {
  width: 100%;
  min-height: 100px;
  background: #f9f6f0;
  border: 1px dashed #d4c9b8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  position: relative;
}
.ad-slot--middle { min-height: 90px; }
.ad-slot--bottom { min-height: 120px; margin-bottom: 0; }
.ad-label {
  font-size: 0.72rem;
  color: #bbb;
  letter-spacing: 0.15em;
  position: absolute;
  top: 0.4rem;
  left: 0.7rem;
}

/* ============================================
   神社詳細ページ
   ============================================ */
.shrine-hero { width: 100%; height: 460px; object-fit: cover; }
.shrine-detail-wrap { max-width: 860px; margin: 3rem auto; padding: 0 1.5rem 4rem; }
.shrine-title-area { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #ececec; }
.shrine-title-area h1 { font-size: 2rem; color: #222; margin-bottom: 0.5rem; }
.shrine-address { font-size: 0.9rem; color: #999; margin-bottom: 1rem; }
.goriyaku-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.goriyaku-tag { display: inline-block; padding: 0.25rem 0.8rem; border: 1px solid #9B2335; color: #9B2335; font-size: 0.78rem; border-radius: 20px; letter-spacing: 0.05em; }
.shrine-info-table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9rem; }
.shrine-info-table th, .shrine-info-table td { padding: 0.8rem 1rem; border-bottom: 1px solid #f0f0f0; text-align: left; }
.shrine-info-table th { width: 140px; color: #999; font-weight: 500; }
.shrine-map { width: 100%; height: 320px; border: 0; border-radius: 4px; margin: 2rem 0; }
.section-divider { border: none; border-top: 1px solid #ececec; margin: 2.5rem 0; }

/* ============================================
   フッター（プライバシーポリシーのみ）
   ============================================ */
#site-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
#site-footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#site-footer a:hover { color: rgba(255,255,255,0.8); }

/* ============================================
   通常ページ
   ============================================ */
.general-page { max-width: 800px; margin: 0 auto; padding: 8rem 1.5rem 4rem; }
.general-page h1 { font-size: 1.8rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid #9B2335; }

/* ============================================
   スマホ対応
   ============================================ */
@media (max-width: 768px) {
  #site-header nav { display: none; }
  .hero-title { font-size: 1.5rem; letter-spacing: 0.3em; }
  .bt-radio-group { gap: 1rem; }
  .form-row { flex-direction: column; gap: 0.4rem; }
  .form-row label { text-align: center; }
  .form-row select, .form-row input[type="date"] { width: 240px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .shrine-hero { height: 260px; }
  .page-content { padding: 5rem 1rem 3rem; }
  .moon-bottom-bar { font-size: 0.75rem; padding: 0.7rem 1rem; }
}
@media (max-width: 480px) {
  .bt-radio-group { flex-wrap: wrap; justify-content: center; }
  .search-btn { padding: 0.85rem 2rem; letter-spacing: 0.2em; }
  #shrine-modal-img { height: 160px; }
  #shrine-modal-body { padding: 1rem 1.1rem 1.4rem; }
  #shrine-modal-name { font-size: 1.2rem; }
}
