/* =====================================================
   デジタル資格ナビ カスタムCSS
   テーマカラー: ブルー系（#1a73e8）
   ===================================================== */

:root {
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4285f4;
  --accent-color: #34a853;
  --text-dark: #202124;
  --text-light: #5f6368;
  --bg-light: #f8f9fa;
  --white: #ffffff;
}

/* =====================================================
   ヘッダー
   ===================================================== */

/* ヘッダー全体 */
.header {
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
  background-position: top center;
  background-size: cover;
}

/* ヘッダーコンテナ */
.header-in {
  padding: 0;
}

/* サイトロゴ・タイトルエリア */
.logo-header {
  padding: 20px 0;
}

/* サイトタイトル */
.site-name-text,
.site-name-text-link {
  color: var(--white) !important;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* サイトタイトルの前にアイコンを追加 */
.site-name-text::before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a73e8'%3E%3Cpath d='M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px;
  flex-shrink: 0;
}

/* キャッチフレーズ */
.tagline {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.85rem;
  font-weight: 400;
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* ヘッダーがセンタリングの場合 */
.header-container-center .site-name-text::before,
.header-container-center .site-name-text-link::before {
  margin-right: 0;
}

/* =====================================================
   グローバルナビ（メニュー）
   ===================================================== */

/* ナビゲーション全体 */
.navi {
  background: var(--white);
  border-bottom: 1px solid #e0e0e0;
}

.navi-in > ul {
  justify-content: center;
}

.navi-in > ul > li {
  border-right: none;
}

.navi-in > ul > li > a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 15px 20px;
  transition: all 0.2s ease;
}

.navi-in > ul > li > a:hover {
  color: var(--primary-color);
  background: var(--bg-light);
}

/* 現在のページ */
.navi-in > ul > .current-menu-item > a,
.navi-in > ul > .current_page_item > a {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* =====================================================
   モバイルヘッダー
   ===================================================== */

@media screen and (max-width: 1023px) {
  /* タブレット以下: 背景画像全体を表示、テキストは非表示 */
  .header {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center top;
  }

  .site-name-text,
  .site-name-text-link,
  .tagline {
    display: none !important;
  }

  /* モバイルメニューボタン */
  .mobile-menu-buttons .menu-button {
    color: var(--white);
  }
}

/* =====================================================
   ボタン・リンク
   ===================================================== */

/* 主要ボタン */
.btn,
.btn-wrap a,
.wp-block-button__link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.2s ease;
}

.btn:hover,
.btn-wrap a:hover,
.wp-block-button__link:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* テキストリンク */
.entry-content a {
  color: var(--primary-color);
}

.entry-content a:hover {
  color: var(--primary-dark);
}

/* =====================================================
   カテゴリー・タグ
   ===================================================== */

.cat-label {
  background: var(--primary-color);
}

.tag-link {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tag-link:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* =====================================================
   サイドバー
   ===================================================== */

.sidebar h2,
.sidebar h3 {
  border-left: 4px solid var(--primary-color);
  padding-left: 12px;
}

/* =====================================================
   フッター
   ===================================================== */

.footer {
  background: var(--primary-dark);
}

.footer,
.footer .copyright {
  color: rgba(255, 255, 255, 0.9);
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
}

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

/* フッターナビ */
.footer-bottom-menu a {
  color: rgba(255, 255, 255, 0.9);
}

/* =====================================================
   その他の調整
   ===================================================== */

/* 目次 */
.toc-title {
  color: var(--primary-color);
}

.toc a {
  color: var(--text-dark);
}

.toc a:hover {
  color: var(--primary-color);
}

/* 引用 */
blockquote {
  border-left-color: var(--primary-color);
  background: var(--bg-light);
}

/* ページネーション */
.page-numbers.current {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* 検索ボタン */
.search-submit {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.search-submit:hover {
  background: var(--primary-dark);
}

/* =====================================================
   フロントページ（トップページ固定ページ）
   ===================================================== */

/* --- ヒーローセクション --- */
.home-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d47a1 100%);
  color: var(--white);
  text-align: center;
  padding: 60px 20px 50px;
  margin: -20px -20px 0;
  border-radius: 0 0 16px 16px;
}

.home-hero__title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: 0.04em;
}

.home-hero__subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 16px;
  opacity: 0.95;
}

.home-hero__desc {
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.9;
  margin: 0;
}

/* --- セクション共通 --- */
.home-section {
  margin: 40px 0;
}

.home-section__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 10px;
  margin-bottom: 24px;
}

.home-subsection__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

/* --- プラットフォーム紹介カード --- */
.home-platforms {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

a.home-platform-card {
  flex: 1 1 280px;
  border-radius: 12px;
  padding: 24px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #ccc;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: block;
  color: inherit;
}

a.home-platform-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: inherit;
}

a.home-platform-card--onsuku {
  border-top-color: #e65100;
}

a.home-platform-card--shikakusq {
  border-top-color: var(--primary-color);
}

.home-platform-card__header h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

.home-platform-card__body {
  padding: 0;
}

.home-platform-card__catch {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 12px;
}

.home-platform-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.home-platform-card__features li {
  padding: 4px 0 4px 22px;
  position: relative;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.home-platform-card__features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
}

.home-platform-card__btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
}

.home-platform-card--onsuku .home-platform-card__btn {
  background: #e65100;
}

.home-platform-card--shikakusq .home-platform-card__btn {
  background: var(--primary-color);
}

/* --- 資格ジャンル別ナビ --- */
.home-nav-category {
  margin-bottom: 28px;
}

.home-nav-category__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-nav-category__icon {
  font-size: 1.3rem;
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.home-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  text-align: center;
}

.home-nav-item__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}

.home-nav-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

a.home-nav-item__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: #fff3e0;
  color: #e65100;
  text-decoration: none;
  transition: all 0.15s ease;
}

a.home-nav-item__tag:hover {
  opacity: 0.8;
  text-decoration: none;
}

a.home-nav-item__tag--sq {
  background: #e3f2fd;
  color: #1565c0;
}

/* --- フロントページ レスポンシブ --- */
@media screen and (max-width: 768px) {
  .home-hero {
    padding: 40px 16px 36px;
    margin: -16px -16px 0;
    border-radius: 0 0 12px 12px;
  }

  .home-hero__title {
    font-size: 1.6rem;
  }

  .home-hero__subtitle {
    font-size: 1rem;
  }

  .home-hero__desc {
    font-size: 0.85rem;
  }

  .home-platforms {
    flex-direction: column;
  }

  .home-nav-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .home-nav-item {
    padding: 12px 8px;
  }

  .home-nav-item__name {
    font-size: 0.8rem;
  }

  a.home-nav-item__tag {
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .home-section {
    margin: 28px 0;
  }

  .home-section__title {
    font-size: 1.2rem;
  }
}

/* SMART合格講座 */
a.home-platform-card--smart {
  border-top-color: #2e7d32;
}

.home-platform-card--smart .home-platform-card__btn {
  background: #2e7d32;
}

a.home-nav-item__tag--smart {
  background: #e8f5e9;
  color: #2e7d32;
}

/* =====================================================
   トップページ リニューアル（2026-08-30）
   ・モバイル72%を前提に、ファーストビューの重複を排除
   ・カード／注目記事／ジャンル折りたたみを追加
   ===================================================== */

/* --- 1. トップページのみ：重複要素を隠す --- */
/* トップページをSNSシェアする人はいないため、一等地を空ける */
body.home .sns-share,
body.home .sns-share-message,
body.home .date-tags,
body.home .article-header .entry-title {
  display: none !important;
}

/* --- 2. ヒーロー（コンパクト化＋価値提案） --- */
.home-hero {
  padding: 44px 20px 40px;
}

.home-hero__title {
  font-size: 2.1rem;
  margin-bottom: 10px;
}

.home-hero__subtitle {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.home-hero__desc {
  font-size: 0.9rem;
  max-width: 640px;
  margin: 0 auto;
}

.home-hero__meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.home-hero__badge {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- 3. プラットフォームカード（6社・情報量を増やす） --- */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.pf-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-top: 4px solid #ccc;
  border-radius: 14px;
  padding: 22px 20px 20px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
}

.pf-card__name {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 4px;
  color: #1a1a2e;
}

.pf-card__price {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 6px 0 2px;
}

.pf-card__unit {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 14px;
}

.pf-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 0.84rem;
  line-height: 1.75;
  color: #4b5563;
  flex-grow: 1;
}

.pf-card__features li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 3px;
}

.pf-card__features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #9aa3af;
}

.pf-card__btn {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  transition: filter 0.18s ease;
}

.pf-card__btn:hover {
  filter: brightness(1.1);
}

/* --- 4. 注目記事カード --- */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

a.pick-card {
  display: block;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.pick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
}

.pick-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: #f3f4f6;
}

.pick-card__body {
  display: block;
  padding: 14px 16px 18px;
}

.pick-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  color: #fff;
}

.pick-card__title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.6;
  color: #1a1a2e;
  margin: 0;
}

/* --- 5. ジャンル折りたたみ --- */
.genre-more {
  margin-top: 8px;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.genre-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 700;
  color: #1a73e8;
  background: #f7f9fc;
  transition: background 0.18s ease;
}

.genre-more > summary::-webkit-details-marker {
  display: none;
}

.genre-more > summary::after {
  content: "\25BC";
  float: right;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.genre-more[open] > summary::after {
  transform: rotate(180deg);
}

.genre-more > summary:hover {
  background: #eef4ff;
}

.genre-more__inner {
  padding: 8px 18px 18px;
}

/* --- 6. タグの視認性（小さすぎる問題の解消） --- */
a.home-nav-item__tag {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.home-nav-item {
  padding: 14px 12px;
}

.home-nav-item__name {
  font-size: 0.9rem;
}

/* --- 7. レスポンシブ --- */
@media screen and (max-width: 980px) {
  .pf-grid,
  .pick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .home-hero {
    padding: 32px 16px 30px;
  }

  .home-hero__title {
    font-size: 1.55rem;
  }

  .home-hero__badge {
    font-size: 0.72rem;
    padding: 5px 12px;
  }

  .pf-grid,
  .pick-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pf-card {
    padding: 18px 16px 16px;
  }

  .pf-card__btn {
    padding: 13px 14px;
    font-size: 0.9rem;
  }

  .pick-card__title {
    font-size: 0.95rem;
  }

  .genre-more > summary {
    padding: 16px 18px;
    font-size: 0.92rem;
  }

  .genre-more__inner {
    padding: 6px 10px 14px;
  }
}

/* --- 8. トップページ：ヒーロー上の余白を詰める --- */
body.home .entry-content {
  margin-top: 0;
}

body.home .home-hero {
  margin-top: -20px;
}

body.home .article-header {
  margin-bottom: 0;
  padding-bottom: 0;
}

@media screen and (max-width: 768px) {
  body.home .home-hero {
    margin-top: -16px;
  }
}

/* --- 9. wpautop が挿入する <br> がグリッドアイテムになるのを防ぐ --- */
.pick-grid > br,
.pf-grid > br {
  display: none;
}

/* --- 10. ヒーロー：見出しを価値提案にしたことによる調整 --- */
.home-hero__title {
  font-size: 1.85rem;
  line-height: 1.45;
}

.home-hero__subtitle {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.9;
}

.home-hero__br {
  display: none;
}

@media screen and (max-width: 768px) {
  .home-hero__title {
    font-size: 1.32rem;
    line-height: 1.5;
  }

  .home-hero__br {
    display: inline;
  }

  .home-hero__subtitle {
    font-size: 0.78rem;
    line-height: 1.7;
  }

  .home-hero__desc {
    font-size: 0.8rem;
    line-height: 1.7;
  }
}

/* --- 11. トップページ：ヘッダー直下の余白を詰める --- */
body.home .main {
  padding-top: 0 !important;
}

body.home .content {
  margin-top: 0 !important;
}

@media screen and (max-width: 768px) {
  body.home .main,
  body.home .content-in {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .home-hero__meta {
    gap: 6px;
    margin-top: 16px;
  }

  .home-hero__badge {
    font-size: 0.68rem;
    padding: 4px 10px;
  }
}

/* =====================================================
   資格ジャンル：カード配置 → 行リストへ変更（2026-08-30）
   ・資格ごとのタグ数が0〜3とバラつくためカードだと空白と高さの差が出る
   ・1行1資格にすると視線が縦に流れ、走査しやすい
   ===================================================== */

/* --- カテゴリ見出しを控えめに（中身より目立たせない） --- */
.home-nav-category {
  margin-bottom: 26px;
}

.entry-content h3.home-nav-category__title,
.home-nav-category__title {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem !important;
  font-weight: 700;
  color: #1a1a2e;
  background: transparent !important;
  border: 0 !important;
  border-left: 4px solid var(--primary-color, #1a73e8) !important;
  border-radius: 0 !important;
  padding: 2px 0 2px 12px !important;
  margin: 0 0 8px !important;
  box-shadow: none !important;
}

.home-nav-category__icon {
  font-size: 1.05rem;
  line-height: 1;
}

/* --- グリッド → 行リスト --- */
.home-nav-grid {
  display: block !important;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.home-nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 12px 16px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  transition: background 0.15s ease;
}

.home-nav-item:last-child {
  border-bottom: 0;
}

.home-nav-item:hover {
  background: #f7f9fc;
}

.home-nav-item__name {
  flex: 0 0 auto;
  width: 200px;
  font-size: 0.93rem;
  font-weight: 700;
  color: #1f2430;
  text-align: left;
  margin: 0;
  line-height: 1.5;
}

.home-nav-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  justify-content: flex-start;
}

/* --- タグ：配色を統一し、ブランドは文字色と左線で示す --- */
a.home-nav-item__tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 13px 5px 11px;
  border: 1px solid #e2e6ec;
  border-left: 3px solid #9aa3af;
  border-radius: 7px;
  background: #f8f9fb !important;
  color: #46506b !important;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

a.home-nav-item__tag:hover {
  background: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.09);
}

a.home-nav-item__tag                      { border-left-color: #e65100; }
a.home-nav-item__tag--sq                  { border-left-color: #1a73e8; }
a.home-nav-item__tag--smart               { border-left-color: #2e7d32; }
a.home-nav-item__tag--sara                { border-left-color: #d81b60; }
a.home-nav-item__tag--ryosekkei           { border-left-color: #6a1b9a; }
a.home-nav-item__tag--recurrent           { border-left-color: #d6000f; }

/* --- モバイル：資格名を上、タグを下に --- */
@media screen and (max-width: 768px) {
  .home-nav-grid {
    grid-template-columns: none !important;
    gap: 0 !important;
  }

  .home-nav-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }

  .home-nav-item__name {
    width: 38%;
    min-width: 0;
    margin-bottom: 0;
    padding-top: 5px;
    font-size: 0.83rem;
    line-height: 1.45;
  }

  .home-nav-item__links {
    flex: 1 1 0;
    min-width: 0;
    gap: 6px;
  }

  a.home-nav-item__tag {
    min-height: 32px;
    font-size: 0.72rem;
    padding: 5px 10px 5px 8px;
  }

  .home-nav-category__title {
    font-size: 0.96rem;
  }
}

/* wpautop が差し込む <br> がフレックスアイテムになるのを防ぐ */
.home-nav-item__links > br,
.home-nav-item > br {
  display: none;
}
