/* =========================================================
   SiteHub Collection Cards UI
========================================================= */

.sh-collection {
  width: 100%;
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 24px;
}


/* HEADER */

.sh-collection__header {
  margin-bottom: 34px;
}

.sh-collection__kicker {
  margin-bottom: 8px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;

  color: var(--sh-accent, #78518a);
}

.sh-collection__title {
  margin: 0 0 10px;

  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.25;
}

.sh-collection__description {
  margin: 0;

  color: #777;
  font-size: 15px;
  line-height: 1.8;
}


/* GRID */

.sh-collection__grid {
  display: grid;
  gap: 18px;
}

.sh-collection--cols-2 .sh-collection__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sh-collection--cols-3 .sh-collection__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sh-collection--cols-4 .sh-collection__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* CARD */

.sh-collection-card {
  position: relative;

  min-width: 0;
  min-height: 210px;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .98),
      rgba(248, 246, 250, .98)
    );

  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 22px;

  box-shadow:
    0 8px 28px rgba(0, 0, 0, .055);

  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.sh-collection-card:hover {
  transform: translateY(-5px);

  box-shadow:
    0 16px 38px rgba(0, 0, 0, .10);
}


/* IMAGE */

.sh-collection-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #eee;
}

.sh-collection-card__media img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform .35s ease;
}

.sh-collection-card:hover .sh-collection-card__media img {
  transform: scale(1.035);
}


/* ICON */

.sh-collection-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  height: 50px;

  margin: 24px 24px 0;

  border-radius: 15px;

  background: rgba(120, 81, 138, .10);

  font-size: 26px;
}


/* BODY */

.sh-collection-card__body {
  padding: 24px;
}

.sh-collection-card__icon + .sh-collection-card__body {
  padding-top: 19px;
}

.sh-collection-card__category {
  margin-bottom: 7px;

  color: var(--sh-accent, #78518a);

  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
}

.sh-collection-card__title {
  margin: 0;

  color: #222;

  font-size: 19px;
  line-height: 1.4;
}

.sh-collection-card__text {
  margin: 11px 0 0;

  color: #777;

  font-size: 13px;
  line-height: 1.65;
}


/* TABLET */

@media (max-width: 900px) {

  .sh-collection--cols-3 .sh-collection__grid,
  .sh-collection--cols-4 .sh-collection__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


/* MOBILE */

@media (max-width: 600px) {

  .sh-collection {
    margin: 55px auto;
    padding: 0 16px;
  }

  .sh-collection__grid,
  .sh-collection--cols-2 .sh-collection__grid,
  .sh-collection--cols-3 .sh-collection__grid,
  .sh-collection--cols-4 .sh-collection__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sh-collection-card {
    min-height: 0;
    border-radius: 18px;
  }

  .sh-collection-card__icon {
    width: 42px;
    height: 42px;

    margin: 17px 17px 0;

    border-radius: 12px;

    font-size: 21px;
  }

  .sh-collection-card__body {
    padding: 17px;
  }

  .sh-collection-card__icon + .sh-collection-card__body {
    padding-top: 14px;
  }

  .sh-collection-card__category {
    font-size: 9px;
  }

  .sh-collection-card__title {
    font-size: 16px;
  }

  .sh-collection-card__text {
    margin-top: 8px;

    font-size: 12px;
    line-height: 1.6;
  }
}

/* =========================================================
   Collection UI - Wide Layout Fix
========================================================= */

.sh-collection {
  width: min(1200px, calc(100vw - 48px));
  max-width: none;

  position: relative;
  left: 50%;

  transform: translateX(-50%);
}

/* WordPressが自動生成する空のpをGridから除外 */
.sh-collection__grid > p:empty {
  display: none;
}


/* =========================================================
   Collection Cards - Dark Theme Fix
========================================================= */

/* Collection全体の上下余白 */
.entry-content .sh-collection {
  margin-top: 30px !important;
  margin-bottom: 60px !important;
}


/* 見出し */
.entry-content .sh-collection .sh-collection__header {
  margin-bottom: 20px !important;
}

.entry-content .sh-collection .sh-collection__kicker {
  margin: 0 0 8px !important;
  color: var(--sh-accent, #78518a) !important;
}

.entry-content .sh-collection .sh-collection__title {
  margin: 0 0 12px !important;
}

.entry-content .sh-collection .sh-collection__description {
  margin: 0 !important;
}


/* カード */
.entry-content .sh-collection .sh-collection-card {
  background: #fff !important;
}


/* カードタイトル */
.entry-content .sh-collection .sh-collection-card__title {
  color: #111 !important;
  opacity: 1 !important;
}


/* カード説明 */
.entry-content .sh-collection .sh-collection-card__text {
  color: #666 !important;
  opacity: 1 !important;
}


/* カテゴリ */
.entry-content .sh-collection .sh-collection-card__category {
  color: var(--sh-accent, #78518a) !important;
  opacity: 1 !important;
}