/* ===========================
   pass-lab.site
   メインスタイルシート
   パスラボ｜資格合格の研究所
=========================== */

/* リセット・基本設定 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green:        #27ae60;
  --green-dark:   #1e8449;
  --green-light:  #2ecc71;
  --green-pale:   #eafaf1;
  --orange:       #f39c12;
  --orange-light: #fef9e7;
  --orange-dark:  #e67e22;
  --blue:         #2980b9;
  --blue-pale:    #eaf4fb;
  --bg:           #ffffff;
  --bg-light:     #f8f9fa;
  --text:         #333333;
  --text-sub:     #777777;
  --border:       #e8e8e8;
  --shadow:       0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.13);
  --font-main:    'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --radius:       10px;
}

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

body {
  font-family: var(--font-main);
  background: var(--bg-light);
  color: var(--text);
  line-height: 1.8;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ===========================
   ヘッダー
=========================== */
.site-header {
  background: var(--green);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.logo-icon { font-size: 1.5rem; }
.site-logo .logo-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  display: block;
  letter-spacing: 0.05em;
}

.global-nav { display: flex; gap: 24px; }

.global-nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.global-nav a:hover {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.8);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* モバイルメニュー */
.mobile-nav {
  display: none;
  background: var(--green-dark);
  padding: 16px 20px;
}

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

.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav a:last-child { border-bottom: none; }

/* ===========================
   ヒーローセクション
=========================== */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  color: #fff;
  padding: 64px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(243,156,18,0.25);
  border: 1px solid rgba(243,156,18,0.8);
  color: #fef9e7;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero h1 em {
  font-style: normal;
  color: #fde68a;
}

.hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   ボタン
=========================== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,0.8);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: translateY(-2px);
}

/* ===========================
   セクション共通
=========================== */
.section-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
  padding-left: 14px;
  border-left: 4px solid var(--green);
}

.section-sub {
  color: var(--text-sub);
  font-size: 0.85rem;
  margin-bottom: 24px;
  padding-left: 18px;
}

/* ===========================
   カテゴリカード
=========================== */
.category-section {
  max-width: 1100px;
  margin: 48px auto;
  padding: 0 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.category-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.25s;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green-light);
  color: var(--text);
}

.category-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon.green { background: var(--green-pale); }
.category-icon.orange { background: var(--orange-light); }
.category-icon.blue { background: var(--blue-pale); }

.category-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}

.category-info p {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 8px;
}

.category-link {
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 700;
}

/* ===========================
   メインコンテンツ＋サイドバー
=========================== */
.content-wrapper {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
}

/* ===========================
   記事グリッド
=========================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  box-shadow: var(--shadow);
  display: block;
  color: var(--text);
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}

.article-thumb {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
}

.article-thumb.study-bg  { background: linear-gradient(135deg, #d5f5e3, #a9dfbf); }
.article-thumb.fp-bg     { background: linear-gradient(135deg, #d6eaf8, #a9cce3); }
.article-thumb.shikaku-bg{ background: linear-gradient(135deg, #fef9e7, #fde68a); }

.article-body { padding: 14px 16px; }

/* カテゴリバッジ */
.article-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.article-cat.study {
  background: var(--green-pale);
  color: var(--green-dark);
}

.article-cat.fp {
  background: var(--blue-pale);
  color: var(--blue);
}

.article-cat.shikaku {
  background: var(--orange-light);
  color: var(--orange-dark);
}

.article-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 8px;
}

.article-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
}

/* ===========================
   サイドバー
=========================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.widget-title {
  background: var(--green);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 16px;
  letter-spacing: 0.04em;
}

.widget-body { padding: 16px; }

/* アフィリエイトボックス */
.affiliate-box {
  border: 2px solid var(--orange);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.affiliate-box:last-child { margin-bottom: 0; }

.affiliate-box .aff-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.affiliate-box .aff-desc {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.5;
}

.btn-affiliate {
  display: block;
  background: var(--orange);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
}

.btn-affiliate:hover {
  background: var(--orange-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ランキングリスト */
.ranking-list { list-style: none; }

.ranking-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
}

.ranking-list li:last-child { border-bottom: none; }

.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-num.gold   { background: #f0c040; color: #7d6000; }
.rank-num.silver { background: #b0b0b0; }
.rank-num.bronze { background: #cd7f32; }

/* ===========================
   フッター
=========================== */
.site-footer {
  background: #2c3e50;
  color: rgba(255,255,255,0.65);
  padding: 48px 20px 24px;
  margin-top: 40px;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .site-logo {
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand p { font-size: 0.83rem; line-height: 1.8; }

.footer-nav h4 {
  color: #fff;
  font-size: 0.87rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 8px; }

.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.83rem;
  transition: color 0.2s;
}

.footer-nav a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  color: rgba(255,255,255,0.45);
  font-size: 0.75rem;
}

.footer-links a:hover { color: rgba(255,255,255,0.8); }
.copyright { font-size: 0.75rem; }

/* ===========================
   レスポンシブ
=========================== */
@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .global-nav { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 48px 20px; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
