/*
Theme Name: 秦野道院テーマ
Theme URI: https://hadano.shorinjikempo-kanagawa.com/
Author: 秦野道院
Description: 少林寺拳法 秦野道院サイト用のワンページ構成オリジナルテーマ。トップページを縦スクロールで読み進めればブログを除きほぼ全情報が閲覧できる構成。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hadano-dojo
*/

/* ==========================================================================
   0. 変数・リセット
   ========================================================================== */
:root {
  --color-navy: #17233f;
  --color-navy-light: #24365f;
  --color-gold: #c9a227;
  --color-gold-light: #e2c766;
  --color-bg: #ffffff;
  --color-bg-soft: #f6f5f1;
  --color-text: #2a2a2a;
  --color-text-soft: #5c5c5c;
  --color-border: #e2e0d8;
  --header-height: 64px;
  --max-width: 1080px;
  --radius: 8px;
  --font-base: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

/* 固定ヘッダー分のスクロールオフセット */
section[id],
#top {
  scroll-margin-top: var(--header-height);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}

.section--soft { background: var(--color-bg-soft); }

.section__head {
  text-align: center;
  margin-bottom: 40px;
}

.section__label {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  font-weight: bold;
  margin-bottom: 8px;
}

.section__title {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-navy);
}

.section__lead {
  margin-top: 12px;
  color: var(--color-text-soft);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: bold;
  background: var(--color-gold);
  color: #fff;
  transition: transform .2s ease, background .2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--color-gold-light); transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
}

.btn--outline:hover { background: var(--color-navy); color: #fff; }

.to-top {
  display: block;
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: var(--color-text-soft);
}

.to-top:hover { color: var(--color-gold); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 10000;
}

.skip-link:focus { left: 10px; top: 10px; }

/* ==========================================================================
   1. ヘッダー・ナビゲーション
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 20px;
}

.site-branding {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--color-navy);
  font-weight: bold;
  font-size: 15px;
}

.site-branding a,
.site-branding .custom-logo-link {
  display: flex;
  align-items: center;
  height: 100%;
}

.site-branding img { height: 100%; max-height: none; width: auto; display: block; }

.main-navigation { display: none; }

.main-navigation ul {
  display: flex;
  gap: 24px;
}

.main-navigation a {
  color: var(--color-navy);
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.main-navigation a:hover { color: var(--color-gold); }

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-navy);
  transition: transform .25s ease, opacity .25s ease;
}

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

.mobile-navigation {
  position: fixed;
  top: var(--header-height);
  right: 0;
  left: auto;
  width: min(280px, 80vw);
  background: var(--color-navy);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  box-shadow: -4px 8px 16px rgba(0,0,0,.15);
  z-index: 999;
}

.mobile-navigation.is-open {
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.mobile-navigation ul { padding: 24px; }

.mobile-navigation li { border-bottom: 1px solid rgba(255,255,255,.1); }

.mobile-navigation a {
  display: block;
  padding: 16px 4px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

@media (min-width: 900px) {
  .main-navigation { display: block; }
  .menu-toggle, .mobile-navigation { display: none; }
}

/* ==========================================================================
   2. ヒーロー
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: var(--color-navy);
  padding: var(--header-height) 20px 60px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(23,35,63,var(--hero-overlay-top, .75)), rgba(23,35,63,var(--hero-overlay-bottom, .6)));
}

.hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
}

.hero__bg-slide {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero__bg-slide.is-active { opacity: 1; }

.hero__inner { position: relative; z-index: 2; max-width: 760px; }

.hero__catch {
  font-size: 28px;
  font-weight: bold;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.hero__sub {
  margin-top: 16px;
  font-size: 15px;
  opacity: .9;
}

.hero__cta { margin-top: 32px; }

.hero__cta .btn { font-size: 16px; padding: 16px 40px; }

@media (min-width: 700px) {
  .hero__catch { font-size: 38px; }
}

/* ==========================================================================
   3. お知らせ（ニュース）
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 700px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

.news-card {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.news-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-3px); }

.news-card__thumb {
  aspect-ratio: 16/9;
  background: var(--color-bg-soft);
  overflow: hidden;
}

.news-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.news-card__body { padding: 16px; }

.news-card__date {
  font-size: 12px;
  color: var(--color-gold);
  font-weight: bold;
}

.news-card__title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.6;
}

.news-empty {
  text-align: center;
  color: var(--color-text-soft);
  padding: 20px 0;
}

.section__more {
  text-align: center;
  margin-top: 32px;
}

/* ==========================================================================
   4. 道院について
   ========================================================================== */
.history-list {
  max-width: 640px;
  margin: 0 auto 32px;
}

.history-list li {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-border);
}

.history-list .year {
  flex: none;
  width: 90px;
  font-weight: bold;
  color: var(--color-navy);
}

.policy-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--color-bg-soft);
  border-left: 4px solid var(--color-gold);
  padding: 24px;
  border-radius: var(--radius);
}

.policy-box h3 {
  font-size: 16px;
  color: var(--color-navy);
  margin-bottom: 12px;
}

/* ==========================================================================
   5. 少林寺拳法とは（アコーディオン）
   ========================================================================== */
.accordion { max-width: 760px; margin: 0 auto; }

.accordion + .accordion { margin-top: 12px; }

details.accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
}

details.accordion-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: bold;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.accordion-item summary::-webkit-details-marker { display: none; }

details.accordion-item summary::after {
  content: "＋";
  color: var(--color-gold);
  font-size: 18px;
  flex: none;
}

details.accordion-item[open] summary::after { content: "－"; }

.accordion-item__body {
  padding: 0 20px 20px;
  color: var(--color-text-soft);
}

.accordion-item__more {
  display: inline-block;
  margin-top: 12px;
  font-weight: bold;
  color: var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
}

/* ==========================================================================
   6. 稽古案内
   ========================================================================== */
.keiko-table-wrap { overflow-x: auto; margin-bottom: 32px; }

table.keiko-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

table.keiko-table th, table.keiko-table td {
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
}

table.keiko-table thead th {
  background: var(--color-navy);
  color: #fff;
}

table.keiko-table tbody tr:nth-child(even) { background: var(--color-bg-soft); }

.keiko-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 700px) {
  .keiko-columns { grid-template-columns: 1fr 1fr; }
}

.keiko-columns h3 {
  color: var(--color-navy);
  font-size: 16px;
  margin-bottom: 10px;
}

.keiko-columns ul li {
  padding-left: 1.2em;
  position: relative;
  margin-bottom: 6px;
  color: var(--color-text-soft);
}

.keiko-columns ul li::before {
  content: "・";
  position: absolute;
  left: 0;
}

/* ==========================================================================
   6.5 活動予定（Googleカレンダー）
   ========================================================================== */
.calendar-embed {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 auto;
  text-align: center;
}

.calendar-embed iframe {
  max-width: 100%;
}

/* ==========================================================================
   7. 道場・アクセス
   ========================================================================== */
.dojo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .dojo-grid { grid-template-columns: 1fr 1fr; }
}

.dojo-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  row-gap: 10px;
  column-gap: 12px;
  margin-bottom: 24px;
}

.dojo-info dt { font-weight: bold; color: var(--color-navy); }
.dojo-info dd { color: var(--color-text-soft); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.gallery-grid img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-bg-soft);
}

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-soft);
}

.map-embed iframe { width: 100%; height: 100%; border: 0; }

.map-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-soft);
}

/* ==========================================================================
   8. 入門・見学案内
   ========================================================================== */
.nyumon { background: var(--color-navy); color: #fff; }

.nyumon .section__title { color: #fff; }
.nyumon .section__lead { color: rgba(255,255,255,.8); }

.nyumon-info {
  max-width: 700px;
  margin: 0 auto 40px;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 24px;
}

.nyumon-info dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 14px;
  column-gap: 12px;
}

.nyumon-info dt { font-weight: bold; color: var(--color-gold-light); }
.nyumon-info dd { color: rgba(255,255,255,.9); }

.flow-steps {
  max-width: 760px;
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .flow-steps { grid-template-columns: repeat(4, 1fr); }
}

.flow-step {
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  position: relative;
}

.flow-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-navy);
  font-weight: bold;
  margin-bottom: 10px;
}

.flow-step p { font-size: 13px; color: rgba(255,255,255,.85); }

.nyumon-cta { text-align: center; }

.nyumon-cta .btn { font-size: 14px; }

.nyumon-cta .contact-line {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255,255,255,.8);
}

.nyumon .to-top { color: rgba(255,255,255,.6); }

/* ==========================================================================
   9. FAQ
   ========================================================================== */

/* accordion クラスを共用 */

/* ==========================================================================
   10. フッター
   ========================================================================== */
.site-footer {
  background: #101a30;
  color: rgba(255,255,255,.8);
  padding: 48px 0 24px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

.footer-grid h3 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
  letter-spacing: .05em;
}

.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--color-gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* ==========================================================================
   11. 追従CTAボタン
   ========================================================================== */
.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 900;
  background: var(--color-gold);
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .2s ease, background .2s ease;
}

.floating-cta:hover { background: var(--color-gold-light); transform: translateX(-50%) translateY(-2px); }

/* ==========================================================================
   12. ブログ（一覧・単体・固定ページ）共通
   ========================================================================== */
.page-hero {
  padding: calc(var(--header-height) + 40px) 0 40px;
  background: var(--color-bg-soft);
  text-align: center;
}

.page-hero h1 {
  font-size: 24px;
  color: var(--color-navy);
  font-weight: bold;
}

.content-area {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px;
}

.post-list { display: grid; gap: 32px; }

.post-list article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .post-list article { grid-template-columns: 200px 1fr; }
}

.post-list .thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-bg-soft);
}

.post-list .thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-list h2 { font-size: 18px; margin-bottom: 8px; }

.post-list .meta { font-size: 12px; color: var(--color-gold); font-weight: bold; margin-bottom: 8px; }

.single-post .entry-header { text-align: center; margin-bottom: 32px; }
.single-post .entry-header h1 { font-size: 26px; color: var(--color-navy); }
.single-post .entry-meta { margin-top: 8px; font-size: 13px; color: var(--color-text-soft); }
.single-post .entry-thumb { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.single-post .entry-content { font-size: 16px; }
.single-post .entry-content p { margin-bottom: 1.4em; }
.single-post .entry-content img { border-radius: var(--radius); }
.single-post .entry-content h2 { font-size: 20px; margin: 2em 0 1em; color: var(--color-navy); }
.single-post .entry-content h3 { font-size: 17px; margin: 1.6em 0 .8em; color: var(--color-navy); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
}
.pagination .current { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.back-link { margin-top: 40px; text-align: center; }

/* comments */
.comments-area { margin-top: 48px; }
.comments-area .comment-list { list-style: none; padding: 0; }
