/* knowledge */

.knowledge {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  gap: 48px 24px;
}

.knowledge-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  gap: 16px;
  width: 100%;
  padding: 10px 20px 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
  color: #212121;
  text-decoration: none;
  position: relative;
  transition: all 0.3s;
}

.knowledge-card:hover {
  background-color: #eaf7d7;
}

.knowledge-card:hover .knowledge-card__image {
  transform: scale(1.2, 1.2);
  transition: 0.3s all;
}

.knowledge-card:hover .knowledge__card_category {
  background-color: #78c800;
  color: #fff;
  transition: 0.3s all;
}

.knowledge-card__img {
  margin-block: 0;
  width: 100%;
  object-fit: cover;
  overflow: hidden;
}

.knowledge-card__text {
  margin-block: 0;
}

.knowledge-card__link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.knowledge-card__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: 0.3s all;
}

.knowledge__card_category {
  font-size: 0.8rem;
  border: 2px solid #78c800;
  border-radius: 5px;
  padding: 2px 0;
  color: #78c800;
  width: 90px;
  text-align: center;
}

.knowledge-card__title {
  font-size: 18px;
  margin-block: 0;
  font-weight: bold;
  text-decoration: none;
  height: min-content;
}

.knowledge__download-btn--wrap {
  text-align: center;
  margin-top: auto;
}

.knowledge__download-btn {
  width: auto;
  font-size: 15px;
  font-weight: bold;
  display: inline-block;
  padding: 10px 35px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s;
  letter-spacing: 0.1em;
  color: #fff !important;
  background-color: #78c800;
  border-radius: 100vh;
}

@media (580px < width <=1080px) {
  .knowledge {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width <=944px) {
  .knowledge-card {
    width: 100%;
    max-width: 470px;
  }
}

/* 2403 knowledgeセクション分け */
html {
  scroll-behavior: smooth;
}

.knowledge__h2 {
  margin-top: 48px;
  margin-bottom: 32px;
  font-size: 36px;
  font-weight: bold;
}

.knowledge__h2::after {
  display: block;
  content: "";
  background: linear-gradient(to right, #292854 0%, 30%, #78c800 30%);
  height: 2px;
  width: 100%;
  margin-top: 8px;
}

.knowledge__section-description {
  text-align: left !important;
  margin-top: 16px;
}

.knowledge__anchorlink_wrapper {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.knowledge__anchorlink_wrapper a {
  color: #78c800;
  font-weight: 600;
  border: #78c800 1px solid;
  border-radius: 40px;
  width: 200px;
  padding-block: 8px;
  text-align: center;
}

.knowledge__anchorlink_wrapper a:hover {
  opacity: 0.6;
}

.knowledge__anchorlink_wrapper a::after {
  content: "";
  background-image: url(../img/renewal/more_green.svg);
  background-size: contain;
  background-repeat: no-repeat;
  height: 16px;
  width: 32px;
  margin-inline: auto;
  display: block;
}

@media  (width <= 580px) {
  .knowledge__anchorlink_wrapper {
    flex-direction: column;
    gap: 16px;
  }

  .knowledge__anchorlink_wrapper a {
    margin-inline: auto;
  }
  .knowledge {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }
}

/* 2405 おすすめセクション追加 */
section.knowledge__recommend .knowledge-card {
  margin: 0;

  h3 {
    height: 100px;
  }
}

.about_box1.pc_only {
  /* 基本 */
  padding-block: 32px;
}

.knowledge__tab-wrapper {
  display: flex;
  gap: 0;

  .tab_switch {
    width: 50%;
    padding-block: 1rem;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    color: #78c800;
    box-shadow: 0 4px 6px #EEF1F1;
  }
}

.tab_switch.is--active {
  background-color: #78c800;
  color: #fff;
}

.tab__contents__wrapper {
  background-color: #fff;
  padding-block: 32px;
  border-top: 2px solid #EEF1F1;
}

.knowledge.tab__contents {
  justify-content: space-between;
  width: 95%;
  align-items: center;
  margin-inline: auto;
}

.tab__contents {
  display: none;
}

.tab__contents.is--show {
  display: flex;
}

.about_box2:has(.knowledge__recommend) {
  padding-block: 32px;
}

/* 横並び */
.knowledge__recommend2 {
  display: flex;
  gap: 24px;
}

.knowledge-recommend_wrapper {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
  max-width: calc(50% - 12px);

  h2 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    background-color: #78c800;
    color: #fff;
    padding: 8px;
    border-radius: 20px 20px 0 0;
  }

  .trim {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    display: -webkit-box;
    overflow: hidden;
    min-height: 80px;
  }

  h3 {
    font-size: 16px;
    font-weight: 400;
    margin-top: 0;
    height: 80px;
  }

  .knowledge {
    padding: 16px;
    justify-content: space-between;
    gap: 0;
  }

  .knowledge-card {
    grid-row: span 2;
    box-shadow: none;
    padding: 8px;
    gap: 8px;
  }

  .knowledge-card__img {
    height: auto;
  }
}

.about_box1:has(.knowledge__anchorlink_wrapper) {
  padding-top: 32px;
}

.knowledge-card__title.long::after {
  content: "…";
  color: #78c800;
  font-weight: 700;
}