/*-------------------------------------------
ページの詳細トップパート
-------------------------------------------*/
.info-top {
  margin-bottom: 3.5rem;
}

.info-underline {
  margin: 4% 0;
  border-bottom: 2px solid var(--color-main);
}

/*-------------------------------------------
  Card一覧
  -------------------------------------------*/
.cards-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5%;
  margin-bottom: 150px;
  /* overflow: visible; */
}

.card {
  max-width: 24rem;
  width: 100%;
height: 400px; 
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 0.3rem;
  padding: 1rem 5%;
  cursor: pointer;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s, transform 0.3s;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
  transform: translate(0, -2px);
  height: auto;
  /* ← ホバーしたら高さを伸ばす */
  min-height: 400px;
  /* ← 最低400pxはキープ */
}

.card-image {
  width: 100%;
  height: 200px;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 3% 3% 0 3%;
}

.card-top {
  display: flex;
  flex-direction: column;
      justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222222;
  margin-bottom: 0.5rem;
}


.card-top .card-tags {
  display: flex;
  width: 100%;
  justify-content: end;
  align-items: center;
  padding: 1%;
}

.card-top .card-tags li {
  border: 0.5px solid var(--color-main);

  border-radius: 5px;
  font-size: clamp(0.5rem, 2vw, 0.7rem);
  padding: 0 0.25rem;
  background-color: #FBE36F;
}

.card-title {
  font-size: clamp(0.8rem, 2.1vw, 0.9rem);
  font-weight: 700;
  color: var(--color-main);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* ← 2行で省略 */
  -webkit-box-orient: vertical;
}
.card:hover .card-title {
  -webkit-line-clamp: unset;
  overflow: visible;
  white-space: normal;
}

.card-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.5rem;
  font-weight: 400;
  color: var(--color-main);
  transition: all 0.3s ease;
}

.card:hover .card-text {
  -webkit-line-clamp: unset;
  overflow: visible;
  white-space: normal;
}

.card-bottom {
  margin-top: auto; /* 常に一番下に寄せる */
  max-height: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3%;
}

/* Post view */
.card-icons .post-view {
  display: block;
  position: relative;
  line-height: normal;
  margin: 0;
  padding: 10px 0;
}
.post-view .post-view-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.post-view span {
  font-size: 14px;
  text-decoration: none;
  line-height: 28px;
  display: inline-block;
  color: #616161;
  text-align: center;
  font-weight: 600;
  vertical-align: middle;
  padding: 5px 5px 10px 5px;
}

#front-page .card-image-box {
  min-height: 200px;
  min-width: auto;
}

/* ページネーションの汎用スタイル */
.navigation {
  width: 100%;
}
.nav-links ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.nav-links li > * {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  height: 45px;
}
.nav-links li > *:not(.dots) {
  width: 45px;
  border-radius: 50%;
  color: #000000;
  background: #efefef;
  transition: color 0.3s ease, background 0.3s ease;
}
.nav-links li > .current,
.nav-links li > a:hover {
  color: #ffffff;
  background: var(--color-main);
}

/*-------------------------------------------
レスポンシブ
-------------------------------------------*/

@media (max-width: 768px) {
  .cards-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 0 auto;
    margin-bottom: 50px;
  }

  .card {
    width: 80vw;
  }

  .card-text {
    font-size: 0.75rem;
  }

  .info-underline {
    width: 90%;
  }

  .info-top p {
    font-size: 2.5vw;
  }
}
