@charset "UTF-8";

/* ==========================================================================
   ウィルテニスアカデミー サイトスタイル
   外部の CSS フレームワークやフォントは読み込まない（表示速度と保守のため）
   ========================================================================== */

:root {
  --brand: #5f8f2a;
  --brand-dark: #446a1c;
  --brand-light: #9bc25b;
  --brand-pale: #f1f7e8;
  --accent: #f2ee71;

  --text: #262a25;
  --text-muted: #5f6860;
  --line: #dfe4da;
  --bg: #ffffff;
  --bg-tint: #f6f8f3;

  --alert: #b4451f;
  --alert-bg: #fdf3ee;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .06);

  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
          "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   ベース
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

h1, h2, h3, h4 {
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 .6em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--brand-dark);
  color: #fff;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   ヘッダー / ナビゲーション
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
.site-logo img { width: 44px; height: 44px; }
.site-logo__text { display: flex; flex-direction: column; line-height: 1.25; }
.site-logo__name { font-weight: 700; font-size: .98rem; }
.site-logo__sub { font-size: .72rem; color: var(--text-muted); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  font: inherit;
  font-size: .85rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top:  6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

.global-nav__list {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-nav__list a {
  display: block;
  padding: .55rem .7rem;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.global-nav__list a:hover { background: var(--brand-pale); color: var(--brand-dark); }
.global-nav__list a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-pale); }

.global-nav__tel a {
  margin-left: .4rem;
  color: #fff;
  background: var(--brand);
  white-space: nowrap;
}
.global-nav__tel a:hover { background: var(--brand-dark); color: #fff; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .global-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .global-nav.is-open { display: block; }

  .global-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1rem;
  }
  .global-nav__list a {
    padding: .85rem .5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .global-nav__tel a {
    margin: .75rem 0 0;
    border-radius: var(--radius-sm);
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   ボタン / リンク
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  padding: .7rem 1.4rem;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }

.btn--ghost {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--brand-light);
}
.btn--ghost:hover { background: var(--brand-pale); color: var(--brand-dark); }

.btn--sm { padding: .4rem 1rem; font-size: .85rem; }
.btn--lg { padding: .9rem 1.9rem; font-size: 1.02rem; }

.btn__meta {
  font-size: .72rem;
  font-weight: 600;
  opacity: .85;
  letter-spacing: .04em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover::after { transform: translateX(3px); }

.note {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .75rem;
}

/* --------------------------------------------------------------------------
   セクション共通
   -------------------------------------------------------------------------- */

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tint { background: var(--bg-tint); }
.section--cta { background: var(--brand-dark); color: #fff; text-align: center; }
.section--cta .section__title { color: #fff; }
.section--cta a { color: #fff; }

.section__title {
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  margin-bottom: .8rem;
}
.section__lead { color: var(--text-muted); max-width: 62ch; }
.section--cta .section__lead { color: rgba(255, 255, 255, .85); margin-inline: auto; }
.section__note { font-size: .9rem; opacity: .85; }

.page-head {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1.25rem, 3vw, 2rem);
  background: var(--brand-pale);
  border-bottom: 1px solid var(--line);
}
.page-head__title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin-bottom: .35rem;
}
.page-head__lead { color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   トップページ
   -------------------------------------------------------------------------- */

.hero { position: relative; color: #fff; }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 60, 15, .55), rgba(35, 60, 15, .72));
}

.hero__body {
  position: relative;
  padding: clamp(3.5rem, 12vw, 7rem) var(--gutter);
  text-align: center;
}
.hero__title {
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  margin-bottom: .5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.hero__lead {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  margin-bottom: 2rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: center;
  margin: 0;
}

.notice-bar { background: var(--alert-bg); border-bottom: 1px solid #f0d9cd; }
.notice-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  padding-block: .9rem;
}
.notice-bar__label {
  margin: 0;
  padding: .15rem .6rem;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: var(--alert);
  border-radius: 999px;
}
.notice-bar__text { margin: 0; font-weight: 600; color: var(--alert); margin-right: auto; }

.feature-grid,
.article-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card,
.article-card {
  padding: clamp(1.25rem, 3vw, 1.9rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.feature-card--accent { border-color: var(--brand-light); background: var(--brand-pale); }
.feature-card__title,
.article-card__title { font-size: 1.2rem; }
.feature-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.25rem 0 0;
}

.spec-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1.75rem;
}
.spec-card { text-align: center; }
.spec-card img { margin: 0 auto .75rem; width: 72px; height: 72px; }
.spec-card h3 { font-size: 1.05rem; }
.spec-card p { color: var(--text-muted); font-size: .92rem; }

.contact-tel {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: .02em;
  margin: .5rem 0;
}
.contact-tel a { text-decoration: none; }

/* --------------------------------------------------------------------------
   会員様向けページ（管理画面から編集する 4 つのカード）
   -------------------------------------------------------------------------- */

.member-grid {
  display: grid;
  gap: 1.25rem;
  /* 4 枚がきれいに 1 行へ並ぶ幅にしておく（狭い画面では自動的に折り返す） */
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.member-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.member-card.is-alert { border-color: #eccdbe; background: var(--alert-bg); }

.member-card__icon img { margin: 0 auto .75rem; width: 64px; height: 64px; }
.member-card__title { font-size: 1.1rem; margin-bottom: .5rem; }
.member-card__lead { font-size: .88rem; color: var(--text-muted); }

.member-card__body { font-size: .95rem; }
.member-card__body--none { color: var(--text-muted); font-size: .9rem; }

.member-card .btn { align-self: center; margin-top: auto; }

.member-card__updated {
  margin: .9rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
}

/* 管理画面で入力された本文 */
.notice-body {
  margin-top: .75rem;
  padding: .9rem 1rem;
  text-align: left;
  background: #fff;
  border: 1px solid #eccdbe;
  border-radius: var(--radius-sm);
  white-space: normal;
}
.notice-body p { margin-bottom: .8em; }
.notice-body p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   表
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
.data-table caption {
  padding: .9rem 1rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.data-table th,
.data-table td {
  padding: .8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.data-table thead th {
  font-size: .85rem;
  color: #fff;
  background: var(--brand);
  white-space: nowrap;
}
.data-table tbody th { font-weight: 700; white-space: nowrap; background: var(--bg-tint); }
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table--kv tbody th { width: 30%; min-width: 12rem; }

@media (max-width: 720px) {
  .table-scroll { border: 0; background: transparent; }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td { display: block; width: auto; }

  .data-table thead { display: none; }

  /* table のレイアウトを解除したので caption も block に戻す
     （table-caption のままだと文字が縦に潰れてしまう） */
  .data-table caption {
    display: block;
    padding-inline: 0;
    border-bottom: 0;
  }

  .data-table tbody tr {
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .data-table tbody th {
    background: var(--brand-pale);
    white-space: normal;
  }
  .data-table--kv tbody th { width: auto; min-width: 0; }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
  }
  .data-table td:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   コーチ / お問い合せ / タイムテーブル
   -------------------------------------------------------------------------- */

.coach-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.coach-card,
.contact-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.coach-card { text-align: center; }
.coach-card__photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
}
.coach-card__name { font-size: 1.15rem; margin-bottom: .2rem; }
.coach-card__role { font-size: .85rem; color: var(--brand-dark); font-weight: 700; }
.coach-card__career {
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  list-style: none;
  font-size: .88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}

.contact-card__title { font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   埋め込み（Google マップ / Instagram）
   -------------------------------------------------------------------------- */

/* ページ内リンクで飛んだとき、固定ヘッダーに見出しが隠れないようにする */
section[id] { scroll-margin-top: 84px; }

/* セクション見出しの右にリンクを置くための行 */
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.5rem;
}
.section__head .section__title { margin-bottom: .4rem; }

.map-embed {
  margin-top: 1.5rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-tint);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* お問い合せページでは地図を大きめに見せる */
.map-embed--tall { aspect-ratio: 16 / 10; }

/* 地図と施設情報を横に並べる */
.access-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
}
.access-layout .map-embed { margin-top: 0; }

.access-info {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.access-info__title { font-size: 1.1rem; margin-bottom: 1rem; }

.access-info__list { margin: 0; font-size: .92rem; }
.access-info__list dt {
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: .04em;
}
.access-info__list dd {
  margin: .15rem 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.access-info__list dd:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }

@media (max-width: 860px) {
  .access-layout { grid-template-columns: 1fr; }
}

/* Instagram の投稿を並べる */
.embed-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.embed-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.embed-card__frame {
  display: block;
  width: 100%;
  /* Instagram の埋め込みは自前で高さを決められないため、余裕をもたせる */
  height: 640px;
  border: 0;
}

/* 投稿が 1 件だけのときに横いっぱいへ伸びないようにする */
.embed-grid--instagram { justify-content: center; }
.embed-grid--instagram .embed-card { max-width: 420px; width: 100%; margin-inline: auto; }

/* 投稿が未設定のときの案内 */
.embed-placeholder {
  margin-top: 1.5rem;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--brand-light);
  border-radius: var(--radius);
}
.embed-placeholder__text { color: var(--text-muted); }

/* PDF から作った時間割の画像 */
.schedule-sheets {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.schedule-sheet { margin: 0; }

.schedule-sheet__link {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.schedule-sheet__link:hover { border-color: var(--brand-light); }
.schedule-sheet__link img { width: 100%; height: auto; display: block; }

.schedule-sheet__caption {
  margin-top: .5rem;
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  /* 画面いっぱいに近づけて、少しでも大きく見せる */
  .schedule-sheets { margin-inline: calc(var(--gutter) * -0.5); }
  .schedule-sheet__link { border-radius: var(--radius-sm); }

  /* 横長の時間割は縮小すると文字が読めないため、
     高さを画面に合わせて横スクロールで読めるようにする */
  .schedule-sheet__link {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .schedule-sheet__link img {
    width: auto;
    max-width: none;
    height: 68vh;
  }
}

.pdf-viewer {
  margin-top: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-tint);
}
.pdf-viewer__frame { width: 100%; height: min(80vh, 900px); display: block; border: 0; }
.pdf-viewer__fallback { padding: 2rem; text-align: center; }

@media (max-width: 720px) {
  /* スマートフォンでは PDF の埋め込み表示が扱いにくいので隠す */
  .pdf-viewer { display: none; }
}

/* --------------------------------------------------------------------------
   フッター
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 0;
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 1.5rem;
  background: #2c3327;
  color: #d7ded1;
  font-size: .92rem;
}
.site-footer a { color: #d7ded1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.site-footer__brand img { margin-bottom: .75rem; }
.site-footer__name { font-weight: 700; color: #fff; margin-bottom: .25rem; }
.site-footer__address,
.site-footer__tel { margin-bottom: .25rem; }
.site-footer__tel a { font-size: 1.15rem; font-weight: 700; color: #fff; }

.site-footer__heading {
  font-size: .82rem;
  letter-spacing: .08em;
  color: #9db08c;
  margin-bottom: .75rem;
}
.site-footer__nav ul,
.site-footer__social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.site-footer__copyright {
  max-width: var(--container);
  margin: 2.5rem auto 0;
  padding: 1.25rem var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8rem;
  color: #9db08c;
}

/* --------------------------------------------------------------------------
   印刷
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .nav-toggle, .btn-row, .hero__actions { display: none; }
  body { font-size: 12pt; }
}

/* --------------------------------------------------------------------------
   テスト環境の帯（config.php の is_staging が true のときだけ出る）
   -------------------------------------------------------------------------- */

.staging-bar {
  margin: 0;
  padding: .6rem var(--gutter);
  font-size: .85rem;
  text-align: center;
  color: #3d2c00;
  background: repeating-linear-gradient(
    45deg, #ffe9a8, #ffe9a8 12px, #ffdf85 12px, #ffdf85 24px
  );
  border-bottom: 1px solid #e0c46a;
}
.staging-bar strong {
  display: inline-block;
  margin-right: .5rem;
  padding: .1rem .55rem;
  color: #fff;
  background: #a8761b;
  border-radius: 999px;
  font-size: .78rem;
}
.staging-bar a { color: #6b4d0f; }
