/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   副業の教科書 - メインスタイルシート
   note風クリーンデザイン
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ========== カラーパレット ========== */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #3498DB;
  --accent-color: #E74C3C;
  --bg-color: #FFFFFF;
  --text-color: #34495E;
  --light-gray: #F8F9FA;
  --border-color: #E1E4E8;
  --hover-color: #F0F2F5;
}

/* ========== リセット & ベース設定 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.03em;
}

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

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ========== タイポグラフィ ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif JP', 'Yu Mincho', YuMincho, 'Hiragino Mincho ProN', 'MS PMincho', serif;
  font-weight: 600;
  line-height: 1.6;
  color: var(--primary-color);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

h1 {
  font-size: 32px;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 28px;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

h3 {
  font-size: 24px;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

/* ========== ヘッダー ========== */
.site-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  font-family: 'Noto Serif JP', serif;
  letter-spacing: 0.08em;
}

.site-logo:hover {
  color: var(--secondary-color);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 13px;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

.main-nav a:hover {
  color: var(--secondary-color);
  background: var(--hover-color);
}

.main-nav .nav-cta:hover {
  background: #c0392b !important;
  color: white !important;
}

.main-nav a i {
  font-size: 16px;
}

.main-nav .nav-text {
  font-size: 12px;
}

.nav-cta {
  background-color: var(--accent-color);
  color: white !important;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: #c0392b;
  color: white !important;
  background: #c0392b;
}

.bookmark-link {
  position: relative;
}

.bookmark-link .bookmark-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
}

/* ハンバーガーメニュー */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--primary-color);
  cursor: pointer;
}

/* ========== コンテナ ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.main-content {
  min-width: 0;
}

/* ========== ヒーローセクション ========== */
.hero-section {
  background-image: url('../images/hero-bg.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

/* ヒーローセクションのオーバーレイ（暗い半透明層） */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
}

.hero-section h1 {
  color: white;
  font-size: 36px;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
  font-weight: 700;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: 1.5rem;
  opacity: 1;
  color: white;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.9);
  position: relative;
  z-index: 2;
}

/* ヒーローセクション内のコンテナ */
.hero-section .container {
  position: relative;
  z-index: 2;
}

/* ヒーローセクション内のボタン */
.hero-section .hero-cta-buttons {
  position: relative;
  z-index: 2;
}

.hero-credentials {
  display: inline-block;
  background-color: rgba(0,0,0,0.5);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  line-height: 1.8;
}

.hero-credentials-main {
  font-size: 17px;
}

.hero-credentials-sub {
  font-size: 15px;
  display: inline;
  font-weight: 400;
}

/* ========== カテゴリセクション ========== */
.category-section {
  margin-bottom: 80px;
}

/* カテゴリヘッダー（高級版に移行したためコメントアウト） */
/*
.category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 28px;
}

.category-icon {
  font-size: 32px;
}
*/

/* ========== 記事カード ========== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* 記事カードが空の場合のデバッグ用スタイル */
.articles-grid:empty::after {
  content: '記事を読み込み中...';
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #95a5a6;
}

.article-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  text-decoration: none;
}

.article-thumbnail {
  width: 100%;
  height: 200px;
  min-height: 200px;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  font-size: 48px;
  font-weight: 700;
  text-align: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #3498DB, #2980b9);
}

/* JavaScriptで生成されるインラインスタイルが優先される */
.article-card[href] .article-thumbnail[style] {
  /* インラインスタイルを許可 */
}

.article-content {
  padding: 1.5rem;
}

.article-category {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-family: 'Noto Serif JP', serif;
  letter-spacing: 0.03em;
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #95a5a6;
}

.read-time::before {
  content: "📖 ";
}

/* ========== サイドバー ========== */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background-color: var(--light-gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

.popular-articles-list {
  list-style: none;
}

.popular-articles-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.popular-articles-list a {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.popular-articles-list a:hover {
  color: var(--secondary-color);
}

.rank-number {
  color: var(--accent-color);
  font-weight: 700;
  min-width: 20px;
}

.category-list {
  list-style: none;
}

.category-list li {
  margin-bottom: 0.75rem;
}

.category-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  color: var(--text-color);
  font-weight: 500;
}

.category-list a:hover {
  background-color: white;
  color: var(--secondary-color);
}

/* ========== プロフィールボックス ========== */
.profile-box {
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: block;
  object-fit: cover;
  object-position: center 60%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.profile-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 13px;
}

.stat-item {
  padding: 0.5rem;
  background-color: white;
  border-radius: 4px;
}

.stat-value {
  font-weight: 700;
  color: var(--secondary-color);
  display: block;
}

/* ========== CTAボタン ========== */
.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
}

.cta-button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
  color: white;
}

.cta-box {
  background-color: var(--light-gray);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
}

.cta-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 1rem;
  font-family: 'Noto Serif JP', serif;
  letter-spacing: 0.05em;
}

.cta-benefits {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.cta-benefits li {
  padding: 0.75rem 0;
  font-size: 16px;
  font-weight: 500;
}

.cta-benefits li::before {
  content: "✅ ";
  margin-right: 0.5rem;
}

/* CTAボックス内の全ulリストマーカーを非表示 */
.cta-box ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 2rem;
}

.cta-box ul li {
  padding: 0.75rem 0;
  font-size: 16px;
  font-weight: 500;
}

/* ========== フッター ========== */
.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: 60px 20px 20px;
  margin-top: 100px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

/* ========== NEWバッジアニメーション ========== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255,107,107,0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255,107,107,0.6);
  }
}

/* ========== レスポンシブ対応 ========== */
@media (max-width: 768px) {
  /* タイポグラフィ */
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 22px;
  }
  
  h3 {
    font-size: 20px;
  }
  
  body {
    font-size: 15px;
  }
  
  /* ヘッダー */
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .main-nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  .main-nav.active ul {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .main-nav.active a {
    font-size: 14px;
    padding: 0.6rem;
    display: flex;
    width: 100%;
  }
  
  .main-nav.active .nav-text {
    font-size: 14px;
  }
  
  .main-nav.active a i {
    font-size: 18px;
  }
  
  /* ヒーロー */
  .hero-section {
    padding: 40px 15px;
  }
  
  /* モバイル用のオーバーレイを濃くする */
  .hero-section::before {
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.6) 100%) !important;
  }
  
  .hero-profile-img {
    width: 80px !important;
    height: 80px !important;
    border-width: 2px !important;
  }
  
  .hero-section h1 {
    font-size: 24px !important;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    font-weight: 700 !important;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.95) !important;
  }
  
  .hero-subtitle {
    font-size: 14px !important;
    margin-top: 0.6rem !important;
    text-shadow: 1px 1px 8px rgba(0,0,0,0.95) !important;
    line-height: 1.6 !important;
    line-height: 1.6 !important;
  }
  
  .hero-credentials {
    padding: 0.7rem 0.9rem;
    font-size: 11px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 1rem !important;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
  }
  
  .hero-credentials-main {
    font-size: 12px;
    display: block;
    line-height: 1.5;
  }
  
  .hero-credentials-sub {
    font-size: 10px;
    display: block;
    font-weight: 400;
    line-height: 1.5;
  }
  
  .hero-cta-buttons {
    margin-top: 1.5rem !important;
    gap: 0.6rem !important;
  }
  
  .hero-cta-btn {
    padding: 0.7rem 1.4rem !important;
    font-size: 0.85rem !important;
  }
  
  /* レイアウト */
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .sidebar {
    position: static;
  }
  
  /* 記事カード */
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  /* CTAボックス */
  .cta-box {
    padding: 1.5rem;
  }
  
  .cta-title {
    font-size: 18px;
  }
  
  /* フッター */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ========== ユーティリティクラス ========== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.emoji {
  font-style: normal;
}

/* ========== タブレット対応 (768px〜1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-nav ul {
    gap: 0.4rem;
  }
  
  .main-nav a {
    font-size: 12px;
    padding: 0.3rem 0.5rem;
  }
  
  .main-nav a i {
    font-size: 14px;
  }
  
  .main-nav .nav-text {
    font-size: 11px;
  }
  
  .nav-cta {
    padding: 0.3rem 0.6rem;
    font-size: 11px;
  }
  
  .header-container {
    padding: 0 15px;
  }
}

/* ========== 大画面対応 (1400px以上) ========== */
@media (min-width: 1400px) {
  .main-nav ul {
    gap: 1rem;
  }
  
  .main-nav a {
    font-size: 14px;
    padding: 0.5rem 0.8rem;
  }
  
  .main-nav a i {
    font-size: 18px;
  }
  
  .main-nav .nav-text {
    font-size: 13px;
  }
  
  .nav-cta {
    font-size: 13px;
    padding: 0.5rem 1rem;
  }
}

/* ========== もっと見るボタン ========== */
.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--secondary-color), #2980b9);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
  text-decoration: none;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
  background: linear-gradient(135deg, #2980b9, #1f5e8a);
}

.load-more-btn i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.load-more-btn:hover i {
  transform: scale(1.2);
}

.load-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 読み込み中状態 */
.load-more-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.load-more-btn.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* もっと見るボタンが非表示の場合 */
.load-more-btn.hidden {
  display: none;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .load-more-btn {
    padding: 0.9rem 2rem;
    font-size: 14px;
    width: 100%;
    max-width: 320px;
  }
}
