/*
 * hashtag.css - ハッシュタグセクション
 * Why: カードレイアウトをPC用とSP用で完全分離し、
 *      テンプレートの `.section-hashtag__cards--pc` / `--sp` と1対1に対応させる。
 */

.section-hashtag {
  --row-skew-pc: -8deg;
  --row-skew-sp: -6deg;
  background: #fff;
  color: var(--color-text);
  position: relative;
  padding: clamp(56px, 6vw, 92px) 0 clamp(72px, 7vw, 120px);
  overflow: hidden;
}

.section-hashtag__inner {
  position: relative;
  z-index: 1;
}

/* ── 見出し ── */
.section-hashtag__headline {
  display: flex;
  justify-content: center;
  align-items: center;
  font-style: italic;
  gap: clamp(12px, 1.4vw, 24px);
  transform: rotate(var(--row-skew-pc));
  transform-origin: center center;
  margin-left: clamp(24px, 3vw, 70px);
  margin-top: clamp(-8px, -0.7vw, -2px);
}

.section-hashtag__text {
  font-family: var(--font-ja);
  font-size: clamp(1.25rem, 1.95vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-hashtag__brand {
  font-family: var(--font-en-heading);
  font-size: 118px;
  font-weight: 700;
  line-height: 0.88;
  color: var(--color-magenta);
  letter-spacing: 0.03em;
}

/* ── カードコンテナ ── */
.section-hashtag__cards {
  position: relative;
  margin-top: clamp(12px, 1.4vw, 22px);
}

.section-hashtag__card {
  position: relative;
}

.section-hashtag__card-media {
  position: relative;
  display: block;
  overflow: visible;
}

.section-hashtag__card-media > img:first-child {
  width: 100%;
  display: block;
}

.section-hashtag__card-cta {
  position: absolute;
  border-radius: 50%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.section-hashtag__card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.section-hashtag__card-date {
  font-family: var(--font-en-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
}

.section-hashtag__card-category {
  font-family: var(--font-ja);
  font-size: var(--fs-base);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1px;
  line-height: 1.25;
}

.section-hashtag__card-title {
  font-family: var(--font-ja);
  font-size: clamp(1.05rem, 1.55vw, 2rem);
  font-weight: 700;
  line-height: 1.45;
}

.section-hashtag__card-excerpt {
  margin-top: 2px;
  font-family: var(--font-ja);
  font-size: clamp(0.8125rem, 1.05vw, 1rem);
  line-height: 1.75;
  color: var(--color-text);
  line-clamp: 6;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-hashtag__sub {
  margin-top: clamp(var(--space-lg), 2.8vw, var(--space-2xl));
  text-align: center;
  font-family: var(--font-ja);
  font-size: clamp(0.875rem, 1.1vw, var(--fs-md));
  line-height: 1.8;
}

.section-hashtag__cta-stack {
  margin-top: clamp(20px, 2.8vw, 38px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.section-hashtag__view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.section-hashtag__view-all:hover {
  transform: translateY(-2px);
}

.section-hashtag__view-all img {
  width: 96px;
  height: auto;
  display: block;
}

/* ============================================================
   表示切り替え
   ============================================================ */
.section-hashtag__cards--sp {
  display: none;
}

/* ============================================================
   PC専用 (768px以上)
   ============================================================ */
@media (min-width: 768px) {
  .section-hashtag__cards--pc {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .section-hashtag__cards--pc .section-hashtag__row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start;
    padding: 0 clamp(24px, 3vw, 48px) clamp(28px, 3vw, 48px);
    margin-left: -6vw;
    margin-right: -6vw;
    padding-left: calc(6vw + clamp(24px, 3vw, 48px));
    padding-right: calc(6vw + clamp(24px, 3vw, 48px));
    background: #e8e8e8;
    border-top: 2px solid var(--color-magenta);
    border-bottom: 2px solid var(--color-magenta);
    border-radius: 20px;
    transform: skewY(var(--row-skew-pc));
    overflow: hidden;
  }

  .section-hashtag__cards--pc .section-hashtag__card {
    display: grid;
    grid-template-columns: minmax(190px, 1.08fr) minmax(160px, 0.92fr);
    gap: 0;
    align-items: start;
  }

  .section-hashtag__cards--pc .section-hashtag__card-media {
    border-radius: 0 0 28px 0;
  }

  .section-hashtag__cards--pc .section-hashtag__card-media > img:first-child {
    height: auto;
    aspect-ratio: 276 / 338;
    object-fit: cover;
    border-radius: 0 0 28px 0;
  }

  .section-hashtag__cards--pc .section-hashtag__card-cta {
    right: clamp(-25px, -8vw, 11px);
    bottom: clamp(12px, 1vw, 16px);
    width: clamp(54px, 4.5vw, 70px);
    height: clamp(54px, 4.5vw, 70px);
    transform: skewY(calc(var(--row-skew-pc) * -1));
  }

  .section-hashtag__cards--pc .section-hashtag__card-body {
    gap: 0;
    padding: 24px clamp(18px, 1.8vw, 26px) 0
      calc(clamp(18px, 1.8vw, 26px) + 10px);
    transform: skewY(calc(var(--row-skew-pc) * -1));
    align-self: center;
  }

  .section-hashtag__cards--pc .section-hashtag__card-date,
  .section-hashtag__cards--pc .section-hashtag__card-category,
  .section-hashtag__cards--pc .section-hashtag__card-title,
  .section-hashtag__cards--pc .section-hashtag__card-excerpt {
    margin: 0;
  }

  .section-hashtag__cards--pc .section-hashtag__card-category,
  .section-hashtag__cards--pc .section-hashtag__card-excerpt {
    font-size: 16px;
  }

  .section-hashtag__cards--pc .section-hashtag__card-title {
    margin-top: 10px;
    font-size: 22px;
    line-height: 1.4;
  }

  .section-hashtag__cards--pc .section-hashtag__card-excerpt {
    margin-top: 30px;
  }

  /* VIEW ALL: PC では右寄せし、斜めrowと同じ横方向基準に合わせる */
  .section-hashtag__cta-stack {
    display: flex;
    justify-content: flex-end;
    width: auto;
    margin-top: clamp(-56px, -3.8vw, -26px);
    margin-left: -6vw;
    margin-right: -6vw;
    padding-left: calc(6vw + clamp(24px, 3vw, 48px));
    padding-right: calc(6vw + clamp(24px, 3vw, 48px));
  }
}

/* ============================================================
   SP専用 (767px以下)
   ============================================================ */
@media (max-width: 767px) {
  .section-hashtag {
    padding: 10px 0 74px;
  }

  .section-hashtag__headline {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    transform: rotate(var(--row-skew-sp));
    margin-left: 0;
    margin-top: 0;
  }

  .section-hashtag__cards--pc {
    display: none;
  }

  .section-hashtag__cards--sp {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 28px;
    padding: 0 0 20px;
    margin-left: -8vw;
    margin-right: -8vw;
    padding-left: 2vw;
    padding-right: 8vw;
    background: #e8e8e8;
    border-top: 2px solid var(--color-magenta);
    border-bottom: 2px solid var(--color-magenta);
    border-radius: 14px;
    transform: skewY(var(--row-skew-sp));
    overflow: hidden;
  }

  .section-hashtag__cards--sp .section-hashtag__card {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 12px;
    align-items: start;
    transform: skewY(calc(var(--row-skew-sp) * -1));
    padding-top: 0;
    padding-bottom: 60px;
  }

  .section-hashtag__cards--sp
    .section-hashtag__card
    + .section-hashtag__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -12vw;
    right: -12vw;
    height: 2px;
    background: var(--color-magenta);
    transform: skewY(var(--row-skew-sp));
    z-index: 6;
  }

  .section-hashtag__cards--sp
    .section-hashtag__card
    + .section-hashtag__card::after {
    content: "";
    position: absolute;
    top: -13px;
    left: -12vw;
    right: -12vw;
    height: 15px;
    background: #e8e8e8;
    transform: skewY(var(--row-skew-sp));
    z-index: 5;
  }

  .section-hashtag__cards--sp .section-hashtag__card-media {
    border-radius: 0 0 18px 0;
    overflow: visible;
  }

  .section-hashtag__cards--sp .section-hashtag__card-media > img:first-child {
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    border-radius: 0 0 18px 0;
    clip-path: polygon(0 clamp(14px, 4vw, 24px), 100% 0, 100% 100%, 0 100%);
  }

  .section-hashtag__cards--sp .section-hashtag__card-cta {
    width: 68px;
    height: 68px;
    left: 50%;
    right: auto;
    bottom: -34px;
    z-index: 7;
    transform: translateX(-50%);
  }

  .section-hashtag__cards--sp .section-hashtag__card-body {
    padding: 14px 0 0 8px;
  }

  .section-hashtag__cards--sp .section-hashtag__card-category {
    font-size: 0.875rem;
  }

  .section-hashtag__cards--sp .section-hashtag__card-title {
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .section-hashtag__cards--sp .section-hashtag__card-excerpt {
    font-size: 0.75rem;
    line-clamp: 4;
    -webkit-line-clamp: 4;
  }

  .section-hashtag__brand {
    font-size: 80px;
    line-height: 0.95;
  }

  .section-hashtag__cta-stack {
    margin-top: 18px;
    gap: 0;
  }

  .section-hashtag__view-all img {
    width: 96px;
  }
}
