/* ============================================
   資格ナビ - Certification Navigator
   Academic Blue/Navy Professional Theme
   ============================================ */

:root {
  --navy: #1a2744;
  --navy-light: #2c3e6b;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #dbeafe;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--navy); }

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

/* --- Header --- */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}
.site-logo { font-size: 1.5rem; font-weight: 900; letter-spacing: .05em; }
.site-logo a { color: #fff; }
.site-logo span { color: var(--accent); }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.site-nav a { color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 500; }
.site-nav a:hover { color: #fff; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}
.hero h1 { font-size: 2.4rem; font-weight: 900; margin-bottom: .75rem; }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 640px; margin: 0 auto; }

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 1rem auto;
  padding: 0 1.5rem;
  font-size: .85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--blue); }
.breadcrumb span { margin: 0 .4rem; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* --- Category Filter --- */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.category-filter button,
.category-filter a {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: .5rem 1.2rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}
.category-filter button:hover,
.category-filter a:hover,
.category-filter .active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* --- Card Grid --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.cert-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
  border-top: 4px solid var(--blue);
  display: flex;
  flex-direction: column;
}
.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.cert-card .category-badge {
  display: inline-block;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 999px;
  margin-bottom: .75rem;
  align-self: flex-start;
}
.cert-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.cert-card h3 a { color: var(--text); }
.cert-card h3 a:hover { color: var(--blue); }
.cert-card .meta { font-size: .85rem; color: var(--text-light); margin-bottom: .75rem; }
.cert-card .stars { color: var(--accent); font-size: 1rem; letter-spacing: 2px; margin-bottom: .5rem; }
.cert-card .pass-rate {
  font-size: .85rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

/* --- Detail Page --- */
.cert-detail {
  max-width: 860px;
  margin: 0 auto;
}
.cert-detail h1 {
  font-size: 2rem;
  margin-bottom: .25rem;
  color: var(--navy);
}
.cert-detail .subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
}
.stat-item .label { font-size: .78rem; color: var(--text-light); margin-bottom: .25rem; }
.stat-item .value { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.stat-item .stars { color: var(--accent); font-size: 1.1rem; letter-spacing: 2px; }

/* Sections */
.detail-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.detail-section h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--blue-pale);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.detail-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.25rem;
  background: var(--blue);
  border-radius: 2px;
}
.detail-section p,
.detail-section ul { margin-bottom: 1rem; }
.detail-section ul { padding-left: 1.5rem; }
.detail-section li { margin-bottom: .4rem; }

/* Affiliate boxes */
.affiliate-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.affiliate-box h4 { font-size: 1rem; margin-bottom: .5rem; color: var(--navy); }
.affiliate-box a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .5rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  margin-top: .5rem;
  transition: background .2s;
}
.affiliate-box a:hover { background: #d97706; color: #fff; }

.rakuten-box {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
}

/* Related certs */
.related-certs {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.related-certs a {
  background: var(--blue-pale);
  color: var(--blue);
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
}
.related-certs a:hover {
  background: var(--blue);
  color: #fff;
}

/* --- Ad Spaces --- */
.ad-space {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-size: .85rem;
  margin: 1.5rem 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .85rem;
  margin-top: 3rem;
}
.site-footer a { color: rgba(255,255,255,.9); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: .75rem; }
  .site-nav ul { gap: 1rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .cert-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .cert-detail h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .category-filter { gap: .35rem; }
  .category-filter button,
  .category-filter a { padding: .4rem .8rem; font-size: .8rem; }
}
