/* =========================================================
   FDE Japan - 共通レイアウトスタイル
   ヘッダー・フッター・基本スタイル（トップ・セミナー共通）
   body に .fde-layout クラスを付けたページで適用される
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f7;
  --color-text: #111111;
  --color-text-sub: #4a4a4a;
  --color-border: #e2e2e2;
  --color-accent: #111111;
  --color-accent-soft: #f0f0f0;
  --max-width: 1080px;
  --header-height: 72px;
  --transition: 0.25s ease;
}

body.fde-layout {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* :where() で詳細度を上げずにリセット（後続のコンポーネント定義が勝てるように） */
.fde-layout :where(*) {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

.fde-layout :where(a) {
  color: inherit;
  text-decoration: none;
}

.fde-layout :where(ul, ol) {
  list-style: none;
}

.fde-layout :where(img) {
  max-width: 100%;
  display: block;
}

.fde-layout :where(button) {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== ヘッダー ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

/* 管理バー表示時のずれ防止 */
body.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  /* SWELL側のリンク色設定に上書きされないよう明示指定 */
  color: var(--color-text);
}

.logo:hover {
  color: var(--color-text);
}

.logo span {
  font-weight: 400;
  margin-left: 2px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 10px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-sub);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-link:not(.nav-link-cta):hover {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.nav-link-cta {
  background: var(--color-text);
  color: #fff !important;
  padding: 10px 16px;
  margin-left: 6px;
}

.nav-link-cta:hover {
  background: #333;
  color: #fff !important;
}

/* ===== ナビ開閉ボタン（幅の狭い画面のみ表示） ===== */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  font-size: 1.15rem;
  color: var(--color-text);
  border-radius: 6px;
  transition: background var(--transition);
}

.nav-toggle:hover {
  background: var(--color-accent-soft);
}

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--color-text);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}

.btn-primary {
  background: var(--color-text);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.82;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
}

.btn-outline:hover {
  background: var(--color-accent-soft);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  border: none;
}

/* ===== セクションタグ（共通ラベル） ===== */
.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-text-sub);
  margin-bottom: 12px;
}

/* ===== フッター ===== */
.site-footer {
  background: #111111;
  color: #f2f2f2;
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.footer-logo span {
  font-weight: 400;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: #cccccc;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.8rem;
  color: #888;
}

/* ===== トップへ戻るボタン ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== レスポンシブ =====
   ナビ全項目が横並びで収まらない幅では、ドロワー表示に切り替える */
@media (max-width: 1100px) {
  .nav-toggle {
    display: flex;
  }

  /* ヘッダー（position: fixed）を基準にヘッダー直下へ展開する */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8px 24px 24px;
  }

  .nav-link {
    display: block;
    padding: 15px 4px;
    font-size: 0.95rem;
    color: var(--color-text);
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
    white-space: normal;
  }

  .nav-link-cta {
    margin: 20px 0 0;
    padding: 15px;
    text-align: center;
    border-bottom: none;
    border-radius: 6px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}
