/* ==========================================================
   けちゅの英語学習 トップページ専用CSS
   このファイルの全てのルールは .kechu-home の内側にのみ適用される。
   ========================================================== */

.kechu-home {
  background: #ffffff;
  color: #1f2937;
}

.kechu-home a {
  text-decoration: none;
  color: inherit;
}

.kechu-home__inner,
.kechu-home .kechu-section__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- ヒーロー ---------- */

.kechu-home .kechu-hero {
  background: #f7fbff;
  padding: 48px 0;
}

.kechu-home .kechu-hero__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.kechu-home .kechu-hero__text {
  flex: 1 1 auto;
}

.kechu-home .kechu-hero__title {
  font-size: 28px;
  line-height: 1.5;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 16px;
}

.kechu-home .kechu-hero__meta {
  font-size: 15px;
  color: #4b5563;
  margin: 0 0 24px;
}

.kechu-home .kechu-hero__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.kechu-home .kechu-hero__image {
  flex: 0 0 auto;
  width: 100%;
  max-width: 300px;
}

.kechu-home .kechu-hero__image img {
  width: 100%;
  height: auto;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* ---------- 共通ボタン ---------- */

.kechu-home .kechu-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #2468c9;
  white-space: nowrap;
}

.kechu-home .kechu-btn--primary {
  background: #2468c9;
  color: #ffffff;
}

.kechu-home .kechu-btn--outline {
  background: #ffffff;
  color: #2468c9;
}

.kechu-home .kechu-btn--small {
  padding: 8px 18px;
  font-size: 14px;
}

/* ---------- セクション共通 ---------- */

.kechu-home .kechu-section {
  padding: 70px 0;
}

.kechu-home .kechu-section--tint {
  background: #f7fbff;
}

.kechu-home .kechu-section__title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 36px;
  color: #1f2937;
}

/* ---------- おすすめ記事カード ---------- */

.kechu-home .kechu-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.kechu-home .kechu-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kechu-home .kechu-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
}

.kechu-home .kechu-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.kechu-home .kechu-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kechu-home .kechu-card__noimg {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
}

.kechu-home .kechu-card__body {
  padding: 16px;
}

.kechu-home .kechu-card__cat {
  display: inline-block;
  font-size: 12px;
  color: #2468c9;
  font-weight: 700;
  margin-bottom: 8px;
}

.kechu-home .kechu-card__title {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
}

/* ---------- テーマから探す ---------- */

.kechu-home .kechu-topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kechu-home .kechu-topic {
  display: block;
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px 40px 18px 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.kechu-home .kechu-topic:hover {
  background: #f0f7ff;
  border-color: #93c5fd;
}

.kechu-home .kechu-topic:after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #2468c9;
  font-weight: 700;
}

.kechu-home .kechu-topic__label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

.kechu-home .kechu-topic__desc {
  display: block;
  font-size: 13px;
  color: #6b7280;
}

/* ---------- 最新記事 ---------- */

.kechu-home .kechu-latest {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kechu-home .kechu-latest__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.kechu-home .kechu-latest__item:last-child {
  border-bottom: none;
}

.kechu-home .kechu-latest__thumb {
  flex: 0 0 auto;
  width: 120px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #f3f4f6;
}

.kechu-home .kechu-latest__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kechu-home .kechu-latest__body {
  flex: 1 1 auto;
  min-width: 0;
}

.kechu-home .kechu-latest__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1f2937;
}

.kechu-home .kechu-latest__meta {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 6px;
}

.kechu-home .kechu-latest__excerpt {
  font-size: 13px;
  color: #4b5563;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kechu-home .kechu-latest__more {
  text-align: center;
  margin-top: 32px;
}

.kechu-home .kechu-latest__more a {
  font-size: 14px;
  font-weight: 700;
  color: #2468c9;
}

/* ---------- 記事一覧ページ(/articles/) ---------- */

.kechu-home.kechu-articles .kechu-section {
  padding-top: 50px;
}

.kechu-home .kechu-articles__pager {
  margin-top: 40px;
  text-align: center;
}

/* ---------- プロフィール ---------- */

.kechu-home .kechu-profile {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
}

.kechu-home .kechu-profile__img {
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.kechu-home .kechu-profile__name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.kechu-home .kechu-profile__text {
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
  margin: 0 0 16px;
}

/* ==========================================================
   タブレット 768px〜1023px
   ========================================================== */
@media screen and (max-width: 1023px) {
  .kechu-home .kechu-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   スマートフォン 〜767px
   ========================================================== */
@media screen and (max-width: 767px) {
  .kechu-home__inner,
  .kechu-home .kechu-section__inner {
    padding: 0 16px;
  }

  .kechu-home .kechu-hero {
    padding: 32px 0;
  }

  .kechu-home .kechu-hero__inner {
    flex-direction: column;
    gap: 24px;
    padding: 0 16px;
  }

  .kechu-home .kechu-hero__title {
    font-size: 21px;
  }

  .kechu-home .kechu-hero__image {
    max-width: 220px;
    order: 3;
  }

  .kechu-home .kechu-section {
    padding: 44px 0;
  }

  .kechu-home .kechu-section__title {
    font-size: 19px;
    margin-bottom: 24px;
  }

  .kechu-home .kechu-cards {
    grid-template-columns: 1fr;
  }

  .kechu-home .kechu-topics {
    grid-template-columns: repeat(2, 1fr);
  }

  .kechu-home .kechu-latest__thumb {
    width: 88px;
  }

  .kechu-home .kechu-latest__excerpt {
    display: none;
  }

  .kechu-home .kechu-profile {
    flex-direction: column;
    text-align: center;
  }
}
