/* ==========================================================================
   彩塾 リニューアル版 共通スタイル
   2026-05
   ========================================================================== */

:root {
  --sai-primary: #2F7D74;
  --sai-primary-dark: #246058;
  --sai-accent: #E25F3D;
  --sai-accent-soft: #F4B266;
  --sai-success: #7AB04A;
  --sai-line: #06C755;
  --sai-base: #FBFAF5;
  --sai-grad-start: #E0EACE;
  --sai-grad-end: #F3F0D1;
  --sai-text: #1F2937;
  --sai-text-muted: #6B7280;
  --sai-card-shadow: 0 4px 12px rgba(31, 41, 55, 0.06);
  --sai-card-shadow-hover: 0 12px 30px rgba(31, 41, 55, 0.10);
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--sai-base);
  color: var(--sai-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: normal;
  overflow-wrap: break-word;
  font-feature-settings: "palt";
  letter-spacing: 0.02em;
  font-size: 16px;
  line-height: 1.8;
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  body {
    font-size: 17px;
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6, .logo-font {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  letter-spacing: 0.03em;
  color: var(--sai-text);
}

h1, h2 { line-height: 1.4; }
h3, h4 { line-height: 1.5; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sai-accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Hero gradient background block */
.hero-gradient {
  background-image: linear-gradient(135deg, var(--sai-grad-start) 0%, var(--sai-grad-end) 100%);
}

/* ==========================================================================
   Hero (フルビジュアル型・教室写真背景)
   ========================================================================== */
.hero-photo {
  /* sticky ヘッダー(モバイル h-16=64px)分を差し引いて画面いっぱいに */
  min-height: calc(100svh - 64px);
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
  /* 背景はページ直下の .hero-fixed-bg（position:fixed）が担当。
     section 自体は透明にして、その固定背景を覗かせる。 */
  background: transparent;
}
@media (min-width: 768px) {
  .hero-photo {
    /* md ヘッダー h-20=80px */
    min-height: calc(100vh - 80px);
    padding-top: 4rem;
    padding-bottom: 5rem;
  }
}

/* 教室写真の固定背景レイヤー（PC・スマホ共通で確実に固定）。
   background-attachment:fixed は iOS 非対応のため position:fixed で実装。
   z-index:-1 でページ最背面に置き、ヒーロー以外の不透明セクションが上をスクロールして隠す。 */
.hero-fixed-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #111827;          /* 画像読込前/余白のフォールバック */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 可読性オーバーレイ：明るいトーン用に軽量化。
   文字周辺だけ中央スクリムで暗くし、全体は写真を活かして明るく。 */
.hero-photo__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* テキスト周辺を集中的に暗くして文字を浮かせる（視認性の主役） */
    radial-gradient(ellipse 80% 62% at 50% 46%,
      rgba(13, 20, 28, .46) 0%,
      rgba(13, 20, 28, .20) 55%,
      rgba(13, 20, 28, 0) 85%),
    /* 上下端の軽い暗がり（下部の受付情報を最低限読みやすく） */
    linear-gradient(to bottom,
      rgba(17, 24, 33, .18) 0%,
      rgba(17, 24, 33, .04) 32%,
      rgba(17, 24, 33, .10) 68%,
      rgba(17, 24, 33, .44) 100%),
    /* ブランド色の淡いティント（薄め＝写真が明るく抜ける） */
    linear-gradient(135deg,
      rgba(36, 96, 88, .42) 0%,
      rgba(31, 41, 55, .26) 52%,
      rgba(226, 95, 61, .22) 100%),
    /* 最下層：写真のシャドウを持ち上げる白ウォッシュ（明るく爽やかに） */
    linear-gradient(180deg,
      rgba(255, 255, 255, .12) 0%,
      rgba(255, 255, 255, .05) 100%);
}

/* コンテンツの文字を読みやすく（影を強化） */
.hero-photo__content {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .60), 0 1px 3px rgba(0, 0, 0, .50);
}
.hero-photo__content .btn-primary,
.hero-photo__content .btn-line {
  text-shadow: none;
}

/* キャッチの強調部分 */
.hero-photo__accent {
  color: var(--sai-accent-soft);
}

/* 写真上に置くピル（ブランド色の半透明＝明るい写真でも白文字が映える）
   ※ 基底 .pill が後方で定義されるため .pill.pill-on-photo で詳細度を上げて確実に上書き */
.pill.pill-on-photo {
  background: rgba(36, 96, 88, .58);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(15, 23, 30, .25);
  text-shadow: none;
}

/* スクロール誘導シェブロン */
.hero-photo__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  animation: hero-bounce 2s ease-in-out infinite;
  transition: background-color .2s ease;
}
.hero-photo__scroll:hover {
  background: rgba(255, 255, 255, .28);
}
@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo__scroll { animation: none; }
}

/* Section spacing utility */
.section-pad { padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) {
  .section-pad { padding-top: 6rem; padding-bottom: 6rem; }
}

/* Cards */
.sai-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--sai-card-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.sai-card:hover {
  box-shadow: var(--sai-card-shadow-hover);
  transform: translateY(-2px);
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--sai-accent);
  color: #fff;
  font-weight: 700;
  padding: .9rem 1.6rem;
  border-radius: .75rem;
  min-height: 48px;
  box-shadow: 0 4px 12px rgba(226, 95, 61, .25);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.btn-primary:hover { background: #c84f31; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 6px rgba(226, 95, 61, .25); }

/* Secondary button (outline primary color) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #fff;
  color: var(--sai-primary);
  border: 2px solid var(--sai-primary);
  font-weight: 700;
  padding: .85rem 1.6rem;
  border-radius: .75rem;
  min-height: 48px;
  transition: background-color .2s ease, color .2s ease;
}
.btn-secondary:hover { background: var(--sai-primary); color: #fff; }

/* LINE button */
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--sai-line);
  color: #fff;
  font-weight: 700;
  padding: .9rem 1.6rem;
  border-radius: .75rem;
  min-height: 48px;
  box-shadow: 0 4px 12px rgba(6, 199, 85, .25);
  transition: transform .15s ease, background-color .2s ease;
}
.btn-line:hover { background: #05a849; }
.btn-line:active { transform: translateY(2px); }

/* Tag pill */
.pill {
  display: inline-block;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 9999px;
  background: rgba(47, 125, 116, .1);
  color: var(--sai-primary);
}
.pill-accent { background: rgba(226, 95, 61, .1); color: var(--sai-accent); }
.pill-soft { background: rgba(244, 178, 102, .15); color: #b87a2a; }

/* Section heading */
.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: .5rem;
}
.section-title-en {
  display: block;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: .75rem;
  letter-spacing: .25em;
  color: var(--sai-primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.section-sub {
  text-align: center;
  color: var(--sai-text-muted);
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .section-title { font-size: 2.25rem; }
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31, 41, 55, .06);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 10px rgba(31, 41, 55, .06);
}
.site-nav a {
  color: var(--sai-text);
  font-weight: 500;
  font-size: .875rem;
  letter-spacing: .05em;
  transition: color .2s ease;
  position: relative;
}
.site-nav a:hover { color: var(--sai-primary); }
.site-nav a.is-active {
  color: var(--sai-primary);
  font-weight: 700;
}
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--sai-accent);
  border-radius: 2px;
}

/* Mobile bottom CTA bar */
.mobile-bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 0;
  background: #fff;
  border-top: 1px solid rgba(31,41,55,.08);
  box-shadow: 0 -4px 12px rgba(31,41,55,.06);
  z-index: 40;
}
.mobile-bottom-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .6rem .25rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--sai-text);
  text-align: center;
  line-height: 1.2;
  gap: .2rem;
}
.mobile-bottom-bar a ion-icon { font-size: 1.5rem; }
.mobile-bottom-bar a.bb-line { background: var(--sai-line); color: #fff; }
.mobile-bottom-bar a.bb-cta { background: var(--sai-accent); color: #fff; }
@media (min-width: 1024px) {
  .mobile-bottom-bar { display: none; }
  body { padding-bottom: 0; }
}

/* Floating contact (desktop) */
.float-contact {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 30;
  display: none;
}
@media (min-width: 1024px) {
  .float-contact { display: block; }
}
.float-contact a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--sai-accent);
  color: #fff;
  font-weight: 700;
  padding: 1rem 1.4rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(226,95,61,.35);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.165, .84, .44, 1), transform .8s cubic-bezier(.165, .84, .44, 1);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { transition: none; opacity: 1; transform: none; }
}

/* FAQ accordion */
.faq-item { border-radius: .75rem; background: #fff; box-shadow: var(--sai-card-shadow); overflow: hidden; }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 1.2rem 1.4rem;
  font-weight: 700;
  color: var(--sai-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #fff;
  transition: background-color .2s ease;
}
.faq-q:hover { background: #F7FBFA; }
.faq-q::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: 9999px;
  background: rgba(47,125,116,.1);
  color: var(--sai-primary);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform .25s ease, background-color .2s ease;
}
.faq-q.is-open::after {
  content: '−';
  background: var(--sai-primary);
  color: #fff;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.faq-a > div {
  padding: 0 1.4rem 1.2rem 1.4rem;
  color: var(--sai-text);
  border-top: 1px solid rgba(31,41,55,.06);
  padding-top: 1rem;
  margin-top: .2rem;
}

/* Step list (入塾までの流れ) */
.flow-step {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--sai-card-shadow);
}
.flow-step .step-num {
  position: absolute;
  top: -16px;
  left: 1.25rem;
  width: 40px; height: 40px;
  border-radius: 9999px;
  background: var(--sai-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(47,125,116,.25);
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--sai-card-shadow);
}
.compare-table th,
.compare-table td {
  padding: 1rem 1.2rem;
  text-align: center;
  border-bottom: 1px solid rgba(31,41,55,.06);
}
.compare-table th {
  background: rgba(47,125,116,.08);
  font-weight: 700;
  color: var(--sai-primary);
  font-size: .875rem;
}
.compare-table td.label {
  text-align: left;
  font-weight: 700;
  background: rgba(47,125,116,.04);
  color: var(--sai-text);
}
.compare-table tr:last-child td,
.compare-table tr:last-child th { border-bottom: 0; }

/* Voice card */
.voice-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--sai-card-shadow);
  position: relative;
}
.voice-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem; left: 1rem;
  font-size: 4rem;
  color: rgba(47,125,116,.12);
  font-family: serif;
  line-height: 1;
}
.voice-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--sai-text-muted);
}

/* Footer */
.site-footer {
  background: var(--sai-primary-dark);
  color: #fff;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }

/* 可読性修正：暗い背景の上の見出しを白に。
   グローバルの h1〜h6{color:濃色} がフッターやソリッドな
   bg-sai-primary セクション内の見出しを上書きして読みにくくなる問題への対策。
   （bg-sai-primary/10 等の半透明クラスは別トークンのため影響しない） */
.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer h5, .site-footer h6,
.bg-sai-primary h1, .bg-sai-primary h2, .bg-sai-primary h3,
.bg-sai-primary h4, .bg-sai-primary h5, .bg-sai-primary h6 {
  color: #fff;
}


/* Helpers */
.text-primary { color: var(--sai-primary); }
.text-accent { color: var(--sai-accent); }
.bg-primary { background-color: var(--sai-primary); }
.bg-accent { background-color: var(--sai-accent); }
.bg-soft { background: linear-gradient(135deg, var(--sai-grad-start) 0%, var(--sai-grad-end) 100%); }

/* Breadcrumb */
.breadcrumb {
  font-size: .8rem;
  color: var(--sai-text-muted);
  padding: 1rem 0;
}
.breadcrumb a { color: var(--sai-primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 .5rem; color: rgba(31,41,55,.3); }

/* Anchor scroll offset for sticky header */
:target {
  scroll-margin-top: 96px;
}

/* Mobile menu */
.mobile-menu {
  display: none;
}
.mobile-menu.is-open {
  display: block;
}
.mobile-menu a {
  display: block;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(31,41,55,.06);
  color: var(--sai-text);
  font-weight: 500;
}
.mobile-menu a.is-active {
  color: var(--sai-primary);
  font-weight: 700;
}

/* Helper: hide-on-pdf for print */
@media print {
  .mobile-bottom-bar, .float-contact { display: none !important; }
}
