/* ==========================================
   CSS Variables
========================================== */
:root {
  --color-navy:      #1E3A5F;
  --color-white:     #FFFFFF;
  --color-gold:      #C9A84C;
  --color-bg-light:  #F7F8FA;
  --color-text:      #1A1A2E;
  --color-text-sub:  #5A6A7A;
  --color-border:    #E0E5ED;

  --font-base: 'Noto Sans JP', sans-serif;
  --font-en:   'Inter', sans-serif;

  --max-width:        1100px;
  --section-padding:  64px 16px;
  --transition:       0.2s ease;
  --radius:           8px;
  --shadow:           0 2px 12px rgba(30, 58, 95, 0.08);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
}

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

/* ==========================================
   Typography
========================================== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--color-text-sub);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.8;
}

/* ==========================================
   Buttons
========================================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn--accent {
  background-color: var(--color-gold);
  color: var(--color-navy);
}

.btn--outline {
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
  background: transparent;
}

.btn--outline:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
  opacity: 1;
}

/* ==========================================
   Badges
========================================== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.badge--asset   { background-color: #E8F0FE; color: #1E3A5F; }
.badge--compare { background-color: #FFF3E0; color: #B35C00; }
.badge--tax     { background-color: #E8F5E9; color: #2E7D32; }
.badge--crypto  { background-color: #F3E5F5; color: #6A1B9A; }

/* ==========================================
   Card Grid（共通）
========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ==========================================
   Feature Cards
========================================== */
.card--feature {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card--feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.14);
}

.card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}

.card__icon svg {
  display: block;
  width: 48px;
  height: 48px;
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.card__text {
  font-size: 0.875rem;
  color: var(--color-text-sub);
  line-height: 1.7;
}

/* ==========================================
   Category Cards
========================================== */
.card--category {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card--category:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.14);
  border-color: var(--color-gold);
}

.card__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-gold);
}

/* ==========================================
   Hero Section
========================================== */
.hero {
  background:
    linear-gradient(rgba(30, 58, 95, 0.72), rgba(30, 58, 95, 0.72)),
    url('/images/hero-bg.png') center / cover no-repeat;
  padding: 80px 0 72px;
  text-align: center;
}

.hero__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.4;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.9;
  margin-bottom: 36px;
}

/* ==========================================
   Features Section
========================================== */
.features {
  background: var(--color-white);
  padding: var(--section-padding);
}

/* ==========================================
   Categories Section
========================================== */
.categories {
  background: var(--color-bg-light);
  padding: var(--section-padding);
}

/* ==========================================
   Latest Articles Section
========================================== */
.latest {
  background: var(--color-white);
  padding: var(--section-padding);
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.article-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.14);
}

.article-card__link {
  display: block;
}

.article-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-card__body {
  padding: 16px 16px 8px;
}

.article-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 8px;
  /* 2行で切る */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__date {
  font-size: 0.8rem;
  color: var(--color-text-sub);
  font-family: var(--font-en);
}

.article-card__footer {
  padding: 8px 16px 16px;
}

.article-card__more {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-gold);
  transition: opacity var(--transition);
}

.article-card__more:hover {
  opacity: 0.75;
}

.latest__more {
  text-align: right;
}

/* ==========================================
   Header
========================================== */
.site-header {
  background-color: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-logo__name {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.03em;
}

.site-logo__tagline {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
  margin-top: 2px;
}

/* PC グローバルナビ（スマホでは非表示） */
.global-nav {
  display: none;
}

.global-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.global-nav__item > a {
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.global-nav__item > a:hover {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}

/* カテゴリ ドロップダウン */
.dropdown {
  position: relative;
}

.dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;          /* 隙間をなくして hover が切れないようにする */
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: 16px 0 8px; /* 上パディングで視覚的な余白を確保 */
  z-index: 200;
}

.dropdown:hover .dropdown__menu {
  display: block;
}

.dropdown__menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: var(--color-text);
  transition: background var(--transition);
}

.dropdown__menu a:hover {
  background: var(--color-bg-light);
  color: var(--color-navy);
}

/* ハンバーガーボタン */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* モバイルメニュー */
.mobile-nav {
  display: none;
  background: var(--color-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__list {
  padding: 12px 0;
}

.mobile-nav__item a {
  display: block;
  padding: 12px 24px;
  color: var(--color-white);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background var(--transition);
}

.mobile-nav__item a:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================
   Footer
========================================== */
.site-footer {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 48px 16px 24px;
  text-align: center;
}

.footer-tagline {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 24px;
}

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

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-en);
}

/* ==========================================
   PC Layout（768px 以上）
========================================== */
@media (min-width: 768px) {

  /* Hero */
  .hero__title {
    font-size: 2.8rem;
  }

  .hero__sub {
    font-size: 1rem;
  }

  /* Section */
  .section-title {
    font-size: 1.8rem;
  }

  /* Card Grid → 4列 */
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  /* Article Grid → 3列 */
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-card__img {
    height: 200px;
  }

  /* Header: ハンバーガー非表示 → PC ナビ表示 */
  .hamburger {
    display: none;
  }

  .global-nav {
    display: flex;
  }
}

/* ==========================================
   Page Hero（一覧・カテゴリ共通）
========================================== */
.page-hero {
  background: linear-gradient(135deg, #1E3A5F 0%, #2a5080 100%);
  padding: 48px 0;
  text-align: center;
  color: #FFFFFF;
}

.page-hero__label {
  display: inline-block;
  margin-bottom: 12px;
}

.page-hero__title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.page-hero__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.9;
  max-width: 560px;
  margin: 0 auto;
}

/* ==========================================
   Filter Tabs
========================================== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #E0E5ED;
  background: #FFFFFF;
  color: #5A6A7A;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-tab:hover {
  border-color: #1E3A5F;
  color: #1E3A5F;
}

.filter-tab.is-active {
  background: #1E3A5F;
  color: #FFFFFF;
  border-color: #1E3A5F;
}

/* ==========================================
   Article List Section
========================================== */
.article-list-section {
  background: #F7F8FA;
  padding: 64px 16px;
}

.article-card__excerpt {
  font-size: 0.85rem;
  color: #5A6A7A;
  line-height: 1.7;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   Article Page（記事詳細ページ）
========================================== */
.article-page {
  background: #F7F8FA;
  padding: 48px 0 64px;
}

.article-header {
  margin-bottom: 32px;
}

.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1E3A5F;
  line-height: 1.5;
  margin: 12px 0 16px;
}

.article-meta {
  font-size: 0.85rem;
  color: #5A6A7A;
  font-family: 'Inter', sans-serif;
}

.article-eyecatch {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
  display: block;
}

.article-lead {
  font-size: 1rem;
  line-height: 1.9;
  background: #E8F0FE;
  border-left: 4px solid #1E3A5F;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 32px;
}

.article-body {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 28px 20px;
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
}

.article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1E3A5F;
  border-bottom: 3px solid #C9A84C;
  padding-bottom: 8px;
  margin: 40px 0 16px;
}

.article-body h2:first-of-type {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1E3A5F;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid #C9A84C;
}

.article-body p {
  margin-bottom: 20px;
  line-height: 1.9;
}

.article-body ul,
.article-body ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 400px;
}

.data-table th {
  background: #1E3A5F;
  color: #FFFFFF;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #E0E5ED;
  line-height: 1.6;
}

.data-table tr:nth-child(even) td {
  background: #F7F8FA;
}

.article-disclaimer {
  background: #F7F8FA;
  border: 1px solid #E0E5ED;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 32px;
  font-size: 0.8rem;
  color: #5A6A7A;
  line-height: 1.8;
}

.related-articles {
  margin-top: 32px;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
}

.related-articles__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E0E5ED;
}

.related-articles__list {
  list-style: none;
  padding: 0;
}

.related-articles__list li {
  border-bottom: 1px solid #E0E5ED;
}

.related-articles__list li:last-child {
  border-bottom: none;
}

.related-articles__list a {
  display: block;
  padding: 12px 0;
  font-size: 0.9rem;
  color: #1E3A5F;
  font-weight: 500;
  transition: color 0.2s ease;
}

.related-articles__list a:hover {
  color: #C9A84C;
}

/* ==========================================
   PC（768px 以上）追加
========================================== */
@media (min-width: 768px) {
  .page-hero__title { font-size: 2rem; }
  .article-title    { font-size: 1.8rem; }
  .article-body     { padding: 48px 40px; }
  .related-articles { padding: 32px 40px; }
}

/* ==========================================
   Article 2-Column Layout（記事+サイドバー）
========================================== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
  }
}

/* ==========================================
   Sidebar
========================================== */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 900px) {
  .article-sidebar {
    position: sticky;
    top: 88px; /* ヘッダー高さ＋余白 */
  }
}

.sidebar-widget {
  background: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar-widget__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  background: #1E3A5F;
  padding: 10px 16px;
  margin: 0;
  letter-spacing: 0.05em;
}

/* 目次（TOC） */
.toc-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.toc-item {
  border-bottom: 1px solid #F0F3F7;
}

.toc-item:last-child {
  border-bottom: none;
}

.toc-link {
  display: block;
  padding: 10px 16px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #1E3A5F;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.toc-link:hover {
  background: #F7F8FA;
  color: #C9A84C;
}

.toc-link::before {
  content: '▸ ';
  color: #C9A84C;
  font-size: 0.7rem;
}

/* サイドバー広告 */
.sidebar-ad {
  text-align: center;
}

.ad-label {
  font-size: 0.7rem;
  color: #9AA6B4;
  text-align: center;
  padding: 6px 0 2px;
  margin: 0;
  letter-spacing: 0.08em;
}

/* AdSense 本番コードと差し替える */
.adsense-box {
  width: 300px;
  height: 250px;
  background: #F7F8FA;
  border: 1px dashed #C8D0DC;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: #9AA6B4;
  font-size: 0.78rem;
}

/* ==========================================
   In-Article Ad（記事内広告）
========================================== */
.in-article-ad {
  margin: 32px 0;
  text-align: center;
}

/* AdSense 本番コードと差し替える */
.adsense-inline {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: #F7F8FA;
  border: 1px dashed #C8D0DC;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #9AA6B4;
  font-size: 0.78rem;
}

@media (max-width: 767px) {
  .adsense-inline {
    max-width: 100%;
    height: 100px;
  }
}
