/* ==========================================================
   common.css — 全ページ共通スタイル
   ヤマハジュニアゴルフスクール
   ========================================================== */

/* ---------- 1. CSS変数(カラー・サイズ) ---------- */
/* どこからでも参照できるテーマカラー。値はここを変えれば全ページ反映される。 */
:root {
  /* ブランドカラー */
  --color-mind:   #EA5A8F;   /* 心(ピンク) */
  --color-skill:  #5BB85B;   /* 技(グリーン) */
  --color-body:   #3DB7C9;   /* 体(ティール) */

  /* アクセント・補助色 */
  --color-accent: #FFD23F;   /* イエロー */
  --color-step1:  #5BA8E0;   /* STEP1ブルー */
  --color-step2:  #FFB84A;   /* STEP2オレンジ */
  --color-step3:  #EA5A8F;   /* STEP3ピンク */

  /* ベース色 */
  --bg-base:      #FFFFFF;
  --bg-soft:      #F5F7F5;
  --text-dark:    #333333;
  --text-mid:     #666666;
  --text-light:   #999999;
  --border:       #E0E0E0;

  /* レイアウト */
  --container:    1080px;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* フォント */
  --font-main:    'Noto Sans JP', sans-serif;
}

/* ---------- 2. リセット ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* スティッキーヘッダー分のオフセット */
}

/* 個別セクションのスクロール位置調整(ヘッダーに隠れないよう) */
section[id] {
  scroll-margin-top: 80px;
}

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

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- 3. レイアウト用ユーティリティ ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-dark);
  position: relative;
}

.section-title::before,
.section-title::after {
  content: "";
  display: inline-block;
  width: 30px;
  height: 2px;
  background: var(--color-skill);
  vertical-align: middle;
  margin: 0 16px;
}

/* ---------- 4. ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 20px;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}
/* ロゴ画像 */
.site-header .logo-img {
  height: 44px;        /* ヘッダー内で収まる高さ */
  width: auto;
  display: block;
}
.site-header .logo small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0;
  white-space: nowrap;
}

/* スマホでは説明テキストを隠してロゴだけに */
@media (max-width: 600px) {
  .site-header .logo small { display: none; }
  .site-header .logo-img { height: 38px; }
}

/* NEWバッジ(新規開校など) */
.badge-new {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: var(--color-accent);
  color: var(--text-dark);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 1px;
}

.global-nav {
  display: flex;
  flex-wrap: nowrap;          /* 折り返しを禁止 */
  gap: 18px;                  /* 24px → 18px(項目間を詰める) */
  align-items: center;
}

.global-nav a {
  font-size: 13px;            /* 14px → 13px(全項目1行に収まるよう微調整) */
  font-weight: 500;
  color: var(--text-dark);
  transition: color .2s ease;
  white-space: nowrap;        /* リンク内文字の折り返しを禁止 */
}

/* やや広い画面では余裕を持って表示 */
@media (min-width: 1200px) {
  .global-nav { gap: 22px; }
  .global-nav a { font-size: 14px; }
}

.global-nav a:hover { color: var(--color-skill); }

.global-nav .cta-btn {
  padding: 8px 18px;
  background: var(--color-skill);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
}

.global-nav .cta-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- 5. ハンバーガーメニュー ---------- */
.hamburger {
  display: none;
  width: 28px;
  height: 22px;
  position: relative;
  cursor: pointer;
  background: transparent;
  border: none;
}
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-skill);
  border-radius: 3px;
  transition: .3s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

/* ---------- 6. フッター ---------- */
.site-footer {
  background: var(--color-skill);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

.site-footer a { color: #fff; }

.back-to-top {
  display: inline-block;
  margin-bottom: 20px;
  padding: 12px 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  font-weight: 700;
  transition: background .2s;
}
.back-to-top:hover { background: rgba(255,255,255,0.3); }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 14px;
}

.copyright {
  font-size: 12px;
  opacity: 0.8;
}

/* ---------- 7. レスポンシブ ---------- */
@media (max-width: 767px) {
  .section { padding: 40px 0; }

  .global-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #fff;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform .3s;
  }
  .global-nav.open { transform: translateY(0); }

  .hamburger { display: block; }
}

/* ==========================================================
   8. フローティング CTA(常時表示の申込みボタン)
   ========================================================== */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: stretch;
  /* ボタン本体の角丸・背景・影 */
  transition: transform .3s, opacity .3s;
  animation: floatPulse 2.4s ease-in-out infinite;
  /* ×ボタンが切れないよう overflow は外す */
}

@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.floating-cta.hidden {
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
}

.floating-cta-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 40px;
  color: #fff;
  text-decoration: none;
  background: var(--color-skill);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(91, 184, 91, 0.45),
              0 4px 10px rgba(0, 0, 0, 0.18);
  transition: filter .2s, transform .2s;
}
.floating-cta-link:hover {
  filter: brightness(0.95);
  color: #fff;
}

.floating-cta-main {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.floating-cta-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #fff;
  color: var(--color-skill);
  font-size: 14px;
  font-weight: 900;
  border-radius: 5px;
  letter-spacing: 1px;
}

.floating-cta-sub {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.95;
  border-top: 1px dashed rgba(255, 255, 255, 0.4);
  padding-top: 6px;
  width: 100%;
  text-align: center;
}

/* 閉じる × ボタン */
.floating-cta-close {
  width: 32px;
  height: 32px;
  position: absolute;
  top: -12px;
  right: -12px;
  background: #333;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform .2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-cta-close:hover {
  transform: rotate(90deg) scale(1.1);
}

/* スマホ:画面下に横長で固定表示 */
@media (max-width: 600px) {
  .floating-cta {
    bottom: 12px;
    right: 12px;
    left: 12px;
    border-radius: 14px;
  }
  .floating-cta-link {
    flex: 1;
    padding: 12px 16px;
  }
  .floating-cta-main {
    font-size: 16px;
  }
  .floating-cta-sub {
    font-size: 11px;
  }
  .floating-cta-close {
    width: 26px;
    height: 26px;
    top: -8px;
    right: -8px;
  }
}
