/* ============================================================
   design-system.css
   スクール比較ナビ デザインシステム（共通定義）
   全ページで最初に読み込む共通CSS。
   カラー・タイポグラフィ・共通コンポーネント・レイアウトを集約。
   個別ページの専用スタイルは style.css / 各ページ用CSSに記述する。
   ============================================================ */

/* ------------------------------------------------------------
   Design Tokens
   ------------------------------------------------------------ */
:root {
  --color-primary: #2E7BE0;
  --color-primary-dark: #1E5BB8;
  --color-primary-light: #60A5FA;
  --color-accent-blue: #BAE0FB;
  --color-navy: #1E3A5F;
  --color-bg-light: #EEF3FB;
  --color-bg-faint: #F8FAFE;
  --color-white: #FFFFFF;
  --color-gray-light: #F5F7FA;
  --color-text: #1A1A1A;
  --color-text-sub: #64748B;
  --color-text-muted: #4B5563;
  --color-text-mute: #94A3B8;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;
  --color-border-blue: #BFDBFE;
  --color-accent: #F59E0B;
  --color-medal-gold: #F59E0B;
  --color-medal-silver: #9CA3AF;
  --color-medal-bronze: #B45309;

  --gradient-blue-light: linear-gradient(135deg, #1E5BB8 0%, #2E7BE0 100%);
  --gradient-voice-header: linear-gradient(135deg, #2E7BE0 0%, #60A5FA 100%);
  --gradient-fv-bg: linear-gradient(180deg, #FFFFFF 0%, #F8FAFE 30%, #EEF3FB 60%, #DBEAFE 100%);
  --gradient-title-bar: linear-gradient(90deg, #2E7BE0 0%, #60A5FA 100%);

  --radius-card: 16px;
  --radius-card-sm: 12px;
  --radius-button: 8px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 28px rgba(37, 99, 235, 0.12);
  --shadow-flat: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-btn: 0 4px 12px rgba(59, 130, 246, 0.35);
  --shadow-btn-hover: 0 6px 18px rgba(59, 130, 246, 0.45);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 28px rgba(37, 99, 235, 0.12);

  --transition: all 0.25s ease;

  --max-width: 1200px;

  --section-gap-sp: 60px;
  --section-gap-pc: 80px;
}

/* ------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.9;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.sp-only {
  display: inline;
}
@media (min-width: 640px) {
  .sp-only {
    display: none;
  }
}

.pc-only {
  display: none;
}
@media (min-width: 1024px) {
  .pc-only {
    display: inline;
  }
}

/* ------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 40px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 60px;
  }
}

/* 汎用セクション余白（個別ページではセクション固有クラスに置き換え可） */
.section {
  padding: var(--section-gap-sp) 0;
}

@media (min-width: 1024px) {
  .section {
    padding: var(--section-gap-pc) 0;
  }
}

/* グリッドユーティリティ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

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

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

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

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

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

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* ------------------------------------------------------------
   Section headings
   ------------------------------------------------------------ */
.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--color-navy);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  white-space: normal;
  line-height: 1.5;
}

.section-title__decoration {
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-title-bar);
  border-radius: 2px;
  margin: 16px auto 48px;
}

.section-subtitle {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-top: 8px;
}

.section-lead {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-sub);
  margin: -32px 0 32px;
}

@media (min-width: 1024px) {
  .section-lead {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------
   Fade-in (IntersectionObserver併用)
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------
   Buttons / CTA
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  padding: 13px 32px;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

/* .btn-primary は新規ページ用の名称。.btn--secondary（トップページ既存）と同一見た目 */
.btn--secondary,
.btn-primary {
  background: var(--gradient-blue-light);
  color: var(--color-white);
  box-shadow: var(--shadow-btn);
}

.btn--secondary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #1A4FA0 0%, #2563EB 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn--secondary::after,
.btn-primary::after {
  content: "\2197";
  font-size: 16px;
  margin-left: 4px;
}

/* .btn-outline は新規ページ用の名称。.btn--outline（トップページ既存）と同一見た目 */
.btn--outline,
.btn-outline {
  background-color: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-border-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn--outline:hover,
.btn-outline:hover {
  background-color: var(--color-bg-light);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card-base {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-flat);
  transition: var(--transition);
}

.card-base:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-blue);
}

/* ------------------------------------------------------------
   Badges / Pills / Text gradient
   ------------------------------------------------------------ */
.badge-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-bg-light);
  padding: 4px 10px;
  border-radius: 50px;
}

.text-gradient-blue {
  background: var(--gradient-blue-light);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-primary);
}

/* ------------------------------------------------------------
   Star ratings
   ------------------------------------------------------------ */
.rating-stars {
  color: var(--color-medal-gold);
  font-size: 16px;
  letter-spacing: 1px;
}

.rating-num {
  color: var(--color-navy);
  font-weight: 700;
  margin-left: 4px;
  font-size: 14px;
}

/* ------------------------------------------------------------
   Form elements
   ------------------------------------------------------------ */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 123, 224, 0.12);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748B' d='M8 11 3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

/* ------------------------------------------------------------
   Chart container（Chart.js等のレーダー/バーチャート用）
   ------------------------------------------------------------ */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

/* ============================================================
   Header / Footer（共通）
   ============================================================ */
.preview-banner {
  background-color: var(--color-navy);
  color: var(--color-white);
  text-align: center;
  font-size: 12px;
  padding: 8px 16px;
  line-height: 1.6;
}

.preview-banner strong {
  color: var(--color-accent);
}

.site-header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  display: block;
  height: 30px;
  width: auto;
}

.site-header__cta {
  min-width: 0;
  padding: 10px 20px;
  font-size: 13px;
}

.site-header__cta::after {
  font-size: 14px;
}

.site-footer {
  background: linear-gradient(180deg, #1E3A5F 0%, #0F2540 100%);
  color: var(--color-white);
  padding: 64px 0 0;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

@media (min-width: 1024px) {
  .site-footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
  }
}

.site-footer__brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-footer__brand-accent {
  color: var(--color-primary-light);
}

.site-footer__desc {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  line-height: 1.8;
}

.site-footer__heading {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--color-white);
}

.site-footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__list a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__list a:hover {
  color: var(--color-white);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   パンくず
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  font-size: 12px;
  color: var(--color-text-sub);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb__separator {
  color: var(--color-text-mute);
}

.breadcrumb__current {
  color: var(--color-text);
  font-weight: 700;
}

/* ============================================================
   ページネーション
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination__item {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-button);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
}

.pagination__item:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination__item.is-active {
  background: var(--gradient-blue-light);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pagination__item.is-disabled {
  color: var(--color-text-mute);
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================================
   タブUI
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 32px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs__item {
  flex-shrink: 0;
  padding: 16px 24px;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text-sub);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

.tabs__item.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tabs__item:hover:not(.is-active) {
  color: var(--color-navy);
}

/* ============================================================
   CTAバナー（編集部おすすめへの導線等）
   ============================================================ */
.cta-banner {
  background: var(--gradient-blue-light);
  color: var(--color-white);
  padding: 24px 32px;
  border-radius: var(--radius-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transition: var(--transition);
}

.cta-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.cta-banner__text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.cta-banner__arrow {
  font-size: 24px;
  flex-shrink: 0;
}

/* ============================================================
   SP（モバイル）共通調整
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .section-subtitle {
    font-size: 12px;
  }

  .section-title__decoration {
    margin: 12px auto 32px;
  }

  /* ヘッダー */
  .site-header__inner {
    height: 56px;
    padding: 0;
  }

  .site-header__logo {
    font-size: 16px;
  }

  .site-header__cta {
    min-width: 120px;
    padding: 10px 16px;
  }

  /* フッター */
  .site-footer {
    padding: 56px 0 0;
  }

  .site-footer__top {
    gap: 32px;
    padding-bottom: 32px;
  }

  .site-footer__heading {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .site-footer__list {
    gap: 10px;
  }

  /* パンくず */
  .breadcrumb {
    font-size: 11px;
    padding: 12px 0;
  }

  /* CTAバナー */
  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }

  /* ページネーション */
  .pagination {
    gap: 6px;
  }

  .pagination__item {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  /* タブ */
  .tabs__item {
    padding: 12px 16px;
    font-size: 14px;
  }
}
