/* ======================================
   資格seek 総合トップページ専用CSS v2
   2025年版 CV最適化レイアウト
   ====================================== */

/* コンテナ：2カラムグリッド */
.container {
  max-width: 1200px !important;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  padding: 20px;
}

.header {
  grid-column: 1 / -1;
}

.main-content {
  grid-column: 1 / 2;
}

.sidebar {
  grid-column: 2 / 3;
}

.footer {
  grid-column: 1 / -1;
}

/* ========================================
   年収ランキング（最優先ヒーロー）
   ======================================== */
.top-ranking {
  background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
  border: 3px solid #ff9800;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 6px 20px rgba(255,152,0,0.15);
}

.top-ranking h2 {
  color: #e65100;
  text-align: center;
  margin: 0 0 25px 0;
  font-size: 1.8em;
}

/* 1位：王者の風格 */
.rank-1 {
  display: block;
  background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%);
  border: 3px solid #ff9800;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: all 0.3s;
}

.rank-1:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,152,0,0.3);
}

.rank-1 .rank-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rank-1 .rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #ff9800;
  color: #fff;
  border-radius: 50%;
  font-size: 2em;
  font-weight: 700;
}

.rank-1 .rank-name {
  font-size: 1.8em;
  font-weight: 700;
  color: #333;
  flex: 1;
  margin: 0 20px;
}

.rank-1 .rank-income {
  font-size: 2em;
  font-weight: 700;
  color: #e65100;
}

/* 2-3位：中サイズ */
.top3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.rank-2, .rank-3 {
  display: block;
  background: #fff;
  border: 2px solid #b0bec5;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.3s;
}

.rank-2:hover, .rank-3:hover {
  border-color: #ff9800;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rank-2 .rank-meta, .rank-3 .rank-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rank-2 .rank-number, .rank-3 .rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #90a4ae;
  color: #fff;
  border-radius: 50%;
  font-size: 1.3em;
  font-weight: 700;
}

.rank-2 .rank-name, .rank-3 .rank-name {
  font-size: 1.2em;
  font-weight: 700;
  color: #333;
  flex: 1;
  margin: 0 15px;
}

.rank-2 .rank-income, .rank-3 .rank-income {
  font-size: 1.3em;
  font-weight: 700;
  color: #ff9800;
}

/* 4-10位：コンパクトリスト */
.rank-others-title {
  font-size: 1em;
  color: #666;
  margin: 20px 0 10px 0;
  font-weight: 600;
}

.rank-others-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-others-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f5f5f5;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 0.95em;
  transition: all 0.2s;
  min-height: 44px;
}

.rank-others-list a:hover {
  background: #ffe0b2;
}

.rank-others-list .rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-others-list .rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #999;
  color: #fff;
  border-radius: 50%;
  font-size: 0.85em;
  font-weight: 700;
}

.rank-others-list .rank-name {
  font-weight: 600;
}

.rank-others-list .rank-income {
  font-weight: 700;
  color: #ff9800;
}

.more-ranking-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  background: #ff9800;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05em;
  transition: background 0.3s;
}

.more-ranking-link:hover {
  background: #f57c00;
}

/* ========================================
   カテゴリカード（中段）
   ======================================== */
.category-section h2 {
  text-align: center;
  font-size: 1.8em;
  margin: 40px 0 10px;
}

.category-section p {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.category-card {
  display: block;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-2px);
}

.category-card .icon {
  font-size: 3em;
  display: block;
  margin-bottom: 12px;
}

.category-card h3 {
  color: #333;
  font-size: 1.2em;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.category-card p {
  color: #666;
  font-size: 0.9em;
  margin: 0;
  line-height: 1.6;
  text-align: center;
}

/* カテゴリ別配色 */
.category-card.medical {
  background: linear-gradient(135deg, #ffebee 0%, #fff 100%);
  border-color: #e91e63;
}
.category-card.medical:hover {
  border-color: #c2185b;
  box-shadow: 0 4px 12px rgba(233,30,99,0.3);
}

.category-card.law {
  background: linear-gradient(135deg, #e8eaf6 0%, #fff 100%);
  border-color: #3f51b5;
}
.category-card.law:hover {
  border-color: #303f9f;
  box-shadow: 0 4px 12px rgba(63,81,181,0.3);
}

.category-card.tax {
  background: linear-gradient(135deg, #e8f5e9 0%, #fff 100%);
  border-color: #4caf50;
}
.category-card.tax:hover {
  border-color: #388e3c;
  box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.category-card.build {
  background: linear-gradient(135deg, #fff3e0 0%, #fff 100%);
  border-color: #ff9800;
}
.category-card.build:hover {
  border-color: #f57c00;
  box-shadow: 0 4px 12px rgba(255,152,0,0.3);
}

.category-card.language {
  background: linear-gradient(135deg, #e0f7fa 0%, #fff 100%);
  border-color: #00bcd4;
}
.category-card.language:hover {
  border-color: #0097a7;
  box-shadow: 0 4px 12px rgba(0,188,212,0.3);
}

.category-card.government {
  background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
  border-color: #2196f3;
}
.category-card.government:hover {
  border-color: #1976d2;
  box-shadow: 0 4px 12px rgba(33,150,243,0.3);
}

.category-card.it {
  background: linear-gradient(135deg, #f3e5f5 0%, #fff 100%);
  border-color: #9c27b0;
}
.category-card.it:hover {
  border-color: #7b1fa2;
  box-shadow: 0 4px 12px rgba(156,39,176,0.3);
}

.category-card.industry {
  background: linear-gradient(135deg, #eceff1 0%, #fff 100%);
  border-color: #607d8b;
}
.category-card.industry:hover {
  border-color: #455a64;
  box-shadow: 0 4px 12px rgba(96,125,139,0.3);
}

.category-card.others {
  background: linear-gradient(135deg, #efebe9 0%, #fff 100%);
  border-color: #795548;
}
.category-card.others:hover {
  border-color: #5d4037;
  box-shadow: 0 4px 12px rgba(121,85,72,0.3);
}

/* ========================================
   サイドバー：違った角度から（sticky）
   ======================================== */
.sidebar-cross {
  position: sticky;
  top: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.sidebar-cross h3 {
  font-size: 1.1em;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #333;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-card {
  display: block;
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #444;
  border-left: 4px solid #2196f3;
  transition: all 0.2s;
}

.sidebar-card:hover {
  background: #e3f2fd;
  border-left-color: #1976d2;
}

.sidebar-card .title {
  font-weight: 700;
  display: block;
  font-size: 0.9em;
  margin-bottom: 4px;
  color: #333;
}

.sidebar-card .desc {
  font-size: 0.75em;
  color: #777;
  line-height: 1.4;
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    padding: 15px;
  }
  
  .main-content, .sidebar {
    grid-column: 1 / -1;
  }
  
  .top3-grid {
    grid-template-columns: 1fr;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* サイドバーをカテゴリー下に移動 */
  .sidebar {
    margin-top: 30px;
  }
  
  .sidebar-cross {
    position: static;
  }
  
  .sidebar-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 500px) {
  .rank-1 .rank-meta {
    flex-direction: column;
    gap: 15px;
  }
  
  .rank-1 .rank-name {
    margin: 0;
    text-align: center;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar-links {
    grid-template-columns: 1fr;
  }
}