/**
 * topics.css
 * TOPICS（人気トピックス）セクション用スタイル
 * 広告枠2件 + 人気子カテゴリ2件を表示
 */

/* ===== TOPICSセクション ===== */
.topics-section {
  margin: 60px 0;
  padding: 0;
}

/* ===== タイトル ===== */
.topics-title {
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 30px;
  padding: 0;
  color: var(--color-main);
  display: block;
  line-height: 1.2;
  letter-spacing: 0.14em;
  font-family: "Outfit", sans-serif;
}

.topics-title span {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin: 4px 0 0 14px;
  letter-spacing: 0.1em;
  font-family: "Zen Kaku Gothic New", sans-serif !important;
}

@media (max-width: 768px) {
  .topics-section {
    width: 94%;
    margin: 60px auto;
  }
  .topics-title {
    font-size: 24px;
    margin: 0 0 20px;
  }
  .topics-title span {
    font-size: 12px;
  }
}

/* ===== リスト ===== */
.topics-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px 30px !important;
}

@media (max-width: 768px) {
  .topics-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ===== トピックアイテム（共通） ===== */
.topics-item {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid #e0e0e0;
  padding: 20px;
  transition: all 0.2s ease;
  background: #fff;
}

.topics-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .topics-item {
    padding: 16px;
    gap: 12px;
  }
}

/* ===== アイコン/サムネイル ===== */
.topics-item__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f5f5f5;
  font-size: 24px;
}

@media (max-width: 768px) {
  .topics-item__icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

/* ===== テキストエリア ===== */
.topics-item__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.topics-item__label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.topics-item__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #2962ff !important;
}

.topics-item__text {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .topics-item__title {
    font-size: 14px;
  }
  .topics-item__text {
    font-size: 12px;
  }
}

/* ===== 広告枠専用スタイル ===== */
.topics-item--ad {
  list-style: none;
  background: #2962ff !important;
  flex-direction: column;
  gap: 8px;
  padding: 24px 20px;
}

.topics-item--ad .topics-item__content {
  gap: 8px;
}

.topics-item--ad .topics-item__label {
  color: #fff;
}

.topics-item--ad .topics-item__label--ad {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  display: inline-block;
  letter-spacing: 0.05em;
}

.topics-item--ad .topics-item__title {
  color: #fff !important;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
}

.topics-item--ad .topics-item__text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.6;
}

.topics-item--ad:hover {
  background: #1e4fd9 !important;
  box-shadow: 0 4px 12px rgba(41, 98, 255, 0.3);
}

@media (max-width: 768px) {
  .topics-item--ad {
    padding: 20px 16px;
  }
  .topics-item--ad .topics-item__title {
    font-size: 15px;
  }
}

/* ===== カテゴリ専用スタイル（リンク付き） ===== */
.topics-item--category {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.topics-item--category .topics-item__icon {
  background: var(--color-main);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.topics-item--category .topics-item__label {
  color: var(--color-main);
}

.topics-item--category:hover {
  border-color: var(--color-main);
  background: #f9fffe;
}
