/* =====================================================================
   YADOKARI 用語集 スタイル
   ===================================================================== */

/* テーマのproducts_naviマージンをリセット */
.products_navi { margin-bottom: 0 !important; }


:root {
  --gl-primary:    #222222;
  --gl-accent:     #c82506;
  --gl-accent-lt:  #f2f2f2;
  --gl-text:       #000000;
  --gl-text-light: #666;
  --gl-border:     #e0e0e0;
  --gl-bg:         #f7f7f7;
  --gl-white:      #fff;
  --gl-radius:     8px;
  --gl-shadow:     0 2px 12px rgba(0,0,0,.08);
  --gl-max-w:      1100px;
}

/* ── ラッパー ─────────────────── */
.gl-wrap {
  max-width: var(--gl-max-w);
  margin: 0 auto;
  padding: 0 20px 60px;
  color: var(--gl-text);
}

/* ── ヒーロー ─────────────────── */
.gl-hero {
  background:
    radial-gradient(ellipse at 8% 65%,  rgba(105, 30, 215, .88) 0%, transparent 45%),
    radial-gradient(ellipse at 88% 18%, rgba(228, 75, 30,  .85) 0%, transparent 45%),
    radial-gradient(ellipse at 72% 92%, rgba(40,  195, 100, .8) 0%, transparent 42%),
    radial-gradient(ellipse at 38% 28%, rgba(255, 255, 255, .35) 0%, transparent 42%),
    #e8b090;
  color: #fff;
  padding: 60px 20px 50px;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gl-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.gl-hero__inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.gl-hero__label {
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}
.gl-hero__title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
  color: #fff;
}
.gl-hero__sub {
  font-size: 14px;
  color: rgba(255,255,255,.85);
  margin-bottom: 32px;
  line-height: 2;
}
.gl-hero__sub-count {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  line-height: 1;
}

/* ── 検索 ─────────────────────── */
.gl-search {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}
.gl-search__input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  box-sizing: border-box;
  outline: none;
}
.gl-search__input:focus { box-shadow: 0 0 0 3px rgba(200,37,6,.4); }
.gl-search__icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}

/* ── CTA 共通 ─────────────────── */
.gl-cta {
  border-radius: var(--gl-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.gl-cta--top {
  background: var(--gl-accent-lt);
  border: 1px solid #e0e0e0;
  margin: 24px 0;
}
.gl-cta--inline {
  background: var(--gl-accent-lt);
  border-left: 4px solid var(--gl-accent);
  margin: 32px 0;
}
.gl-cta--banner {
  background:
    linear-gradient(to right, #1a1a1a 0%, #1a1a1a 42%, rgba(20,20,20,.08) 78%, transparent 100%),
    url('cta-bg.jpg') calc(100% + 40px) -130px / 70% auto no-repeat,
    #1a1a1a;
  color: #fff;
  margin-top: 48px;
  border-radius: var(--gl-radius);
  padding: 72px 32px;
  position: relative;
  cursor: pointer;
}
.gl-cta__cover-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--gl-radius);
}
.gl-cta--banner .gl-cta__banner-inner {
  position: relative;
  z-index: 1;
}
.gl-cta__banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}
.gl-cta__banner-text strong { display: block; font-size: 16px; margin-bottom: 6px; color: #fff; }
.gl-cta__banner-text p { font-size: 14px; opacity: .8; margin: 0; color: #fff; }
.gl-cta__text { font-size: 14px; margin: 0; flex: 1; }
.gl-cta__btn {
  display: inline-block;
  background: var(--gl-accent);
  color: #fff !important;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity .2s;
}
.gl-cta__btn:hover { opacity: .85; }
.gl-cta__btn--full { display: block; text-align: center; }

/* ── カテゴリータブ ────────────── */
.gl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.gl-tab {
  background: var(--gl-white);
  border: 1px solid var(--gl-border);
  border-radius: 50px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  color: var(--gl-text);
}
.gl-tab--active,
.gl-tab:hover {
  background: var(--gl-primary);
  color: #fff;
  border-color: var(--gl-primary);
}

/* ── 件数表示 ─────────────────── */
.gl-count {
  font-size: 13px;
  color: var(--gl-text-light);
  margin-bottom: 16px;
}

/* ── 用語グリッド ──────────────── */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── 用語カード ───────────────── */
.gl-card {
  background: var(--gl-white);
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
  padding: 20px;
  text-decoration: none;
  color: var(--gl-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--gl-shadow);
  transition: transform .2s, box-shadow .2s;
}
.gl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  border-color: var(--gl-accent);
}
.gl-card--hidden { display: none; }
.gl-card__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.gl-card__cat {
  font-size: 10px;
  background: #fff;
  color: #222;
  border: 1px solid #d0d0d0;
  padding: 2px 8px;
  border-radius: 4px;
}
.gl-card__subcat {
  font-size: 10px;
  background: #ececec;
  color: var(--gl-text-light);
  padding: 2px 8px;
  border-radius: 4px;
}
.gl-card__term {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 6px;
}
.gl-card__def {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.gl-card__more {
  font-size: 12px;
  color: #777;
  font-weight: 600;
  margin-top: auto;
  transition: color .2s;
}
.gl-card:hover .gl-card__more {
  color: var(--gl-accent);
}

/* ── ページネーション ──────────── */
.gl-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 32px 0 16px;
  flex-wrap: wrap;
}
.gl-page-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 16px;
  cursor: pointer;
  color: #bbb;
  transition: color .2s;
  font-weight: 400;
  line-height: 1;
}
.gl-page-btn:hover:not(:disabled) {
  color: #000;
}
.gl-page-btn--active {
  color: #000 !important;
  font-weight: 700;
}
.gl-page-btn:disabled {
  opacity: .3;
  cursor: default;
}
.gl-page-ellipsis {
  padding: 8px 4px;
  color: #bbb;
  font-size: 16px;
}

/* ── ゼロ件メッセージ ──────────── */
.gl-empty {
  text-align: center;
  color: var(--gl-text-light);
  padding: 40px;
  font-size: 15px;
}

/* =====================================================================
   個別ページ
   ===================================================================== */

/* ── パンくず ─────────────────── */
.gl-breadcrumb {
  margin: 24px 0 16px;
  font-size: 13px;
  color: var(--gl-text-light);
}
.gl-breadcrumb__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.gl-breadcrumb__list li + li::before {
  content: '›';
  margin-right: 4px;
  color: var(--gl-border);
}
.gl-breadcrumb__list a {
  color: var(--gl-text-light);
  text-decoration: none;
}
.gl-breadcrumb__list a:hover { color: var(--gl-accent); }

/* ── 2カラムレイアウト ─────────── */
.gl-single {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ── メインコンテンツ ──────────── */
.gl-single__badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.gl-badge {
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 4px;
  text-decoration: none;
}
.gl-badge--cat {
  background: #fff;
  color: #222;
  border: 1px solid #d0d0d0;
}
.gl-badge--subcat {
  background: #ececec;
  color: var(--gl-text-light);
  border: 1px solid var(--gl-border);
}
.gl-single__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 24px;
  color: var(--gl-primary);
}
.gl-single__def {
  background: var(--gl-white);
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
  padding: 28px;
  font-size: 16px;
  line-height: 1.9;
  box-shadow: var(--gl-shadow);
}

/* ── 関連用語 ─────────────────── */
.gl-related {
  margin: 36px 0;
  background: var(--gl-bg);
  border-radius: var(--gl-radius);
  padding: 24px;
}
.gl-related__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--gl-primary);
}
.gl-related__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gl-related__list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: var(--gl-white);
  border-radius: 6px;
  text-decoration: none;
  color: var(--gl-text);
  border: 1px solid var(--gl-border);
  font-weight: 600;
  font-size: 14px;
  transition: border-color .2s;
}
.gl-related__list a:hover { border-color: var(--gl-accent); }
.gl-related__def {
  font-size: 12px;
  color: var(--gl-text-light);
  font-weight: 400;
}

/* ── 前後ナビ ─────────────────── */
.gl-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gl-border);
}
.gl-nav__prev { text-align: left; }
.gl-nav__next { text-align: right; }
.gl-nav__index a {
  font-size: 13px;
  color: var(--gl-text-light);
  text-decoration: none;
  white-space: nowrap;
}
.gl-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--gl-text);
  padding: 10px 14px;
  border-radius: var(--gl-radius);
  border: 1px solid var(--gl-border);
  transition: border-color .2s;
}
.gl-nav a:hover { border-color: var(--gl-accent); }
.gl-nav__label { font-size: 11px; color: var(--gl-text-light); }
.gl-nav__term { font-size: 14px; font-weight: 600; }

/* ── サイドバー ───────────────── */
.gl-single__sidebar { position: sticky; top: 100px; }

.gl-sidebar-cta {
  background: var(--gl-primary);
  color: #fff;
  border-radius: var(--gl-radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}
.gl-sidebar-cta__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  color: #fff;
}
.gl-sidebar-cta__sub {
  font-size: 13px;
  opacity: .75;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #fff;
}
.gl-sidebar-cats {
  background: var(--gl-bg);
  border-radius: var(--gl-radius);
  padding: 20px;
}
.gl-sidebar-cats__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gl-text-light);
  margin: 0 0 12px;
}
.gl-sidebar-cats ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gl-sidebar-cats a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gl-text);
  text-decoration: none;
  border-radius: 4px;
  transition: background .15s;
}
.gl-sidebar-cats a:hover {
  background: var(--gl-white);
  color: var(--gl-accent);
}

/* =====================================================================
   モバイル対応
   ===================================================================== */

@media (max-width: 768px) {
  .gl-hero { padding: 40px 16px 36px; }
  .gl-grid { grid-template-columns: 1fr 1fr; }
  .gl-cta { flex-direction: column; text-align: center; }
  .gl-cta__banner-inner { flex-direction: column; text-align: center; }

  /* バナー：モバイルは薄い黒オーバーレイ＋写真をcoverで表示 */
  .gl-cta--banner {
    background:
      linear-gradient(rgba(20,20,20,.72), rgba(20,20,20,.72)),
      url('cta-bg.jpg') center 15% / cover no-repeat;
    padding: 40px 20px;
  }

  /* 個別ページ：1カラム */
  .gl-single {
    grid-template-columns: 1fr;
  }
  .gl-single__sidebar {
    position: static;
  }
  .gl-sidebar-cta { display: none; } /* PC版サイドバーCTAは非表示→代わりに下部バナー */
  .gl-nav {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .gl-nav__index {
    grid-column: 1 / -1;
    text-align: center;
    order: -1;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .gl-grid { grid-template-columns: 1fr; }
  .gl-wrap { padding: 0 14px 40px; }
  .gl-single__def { padding: 20px; }
}
