/* ============================================================
   pages/news.css — 最新消息｜加盟與品牌動態(slug: news)
   主題 tokens + BEM 命名空間 news-*;拱形/圓 icon 用 CSS;斷點 1280/1024/768/640。
   ============================================================ */
:root {
  --nw-pad: clamp(1rem, 3vw, 3rem);
  --nw-maxw: 1096px;
  --nw-arch: 50% 50% 0 0 / 44% 44% 0 0;
  --nw-card: #ffffff;
  --nw-bullet-light: #d8d5d0;
  --nw-bullet-dark: #444444;
  --nw-warm: #5f5950;
  --nw-fs-hero: calc(
    var(--fs-heading-scale) * clamp(1rem, calc(0.515rem + 2.071vw), 3rem)
  ); /* 16→48 */
  --nw-fs-sec: calc(
    var(--fs-heading-scale) * clamp(0.813rem, calc(0.646rem + 0.712vw), 1.5rem)
  ); /* 13→24 */
  --nw-fs-body: calc(
    var(--fs-body-scale) * clamp(0.75rem, calc(0.718rem + 0.138vw), 0.883rem)
  ); /* 12→14 */
  --nw-fs-ntitle: calc(
    var(--fs-heading-scale) * clamp(0.813rem, calc(0.706rem + 0.453vw), 1.25rem)
  ); /* 13→20 */
  --nw-fs-gtitle: calc(
    var(--fs-heading-scale) * clamp(0.813rem, calc(0.72rem + 0.394vw), 1.192rem)
  ); /* 13→19 */
  --nw-fs-gtext: calc(
    var(--fs-body-scale) * clamp(0.75rem, calc(0.739rem + 0.047vw), 0.795rem)
  ); /* 12→12.7 */
  --nw-fs-jtitle: calc(
    var(--fs-heading-scale) * clamp(0.813rem, calc(0.524rem + 1.23vw), 2rem)
  ); /* 13→32 */
  --nw-fs-jtext: calc(
    var(--fs-body-scale) * clamp(0.75rem, calc(0.629rem + 0.518vw), 1.25rem)
  ); /* 12→20 */
}

.news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 1.9em;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: clamp(0.813rem, calc(0.706rem + 0.453vw), 1.25rem);
  border: 2px solid transparent;
  white-space: nowrap;
  transition:
    background var(--ease-base),
    color var(--ease-base);
}
.news-btn--primary {
  background: var(--color-brand);
  color: #fff;
}
.news-btn--primary:hover {
  background: var(--color-brand-hover);
}
.news-btn--outline-light {
  border-color: #fff;
  color: #fff;
}
.news-btn--outline-light:hover {
  background: #fff;
  color: var(--color-dark);
}

/* ── HERO ── */
/* 背景圖寫在 background：漸層遮罩 + 底色 + 食物照(cover 縮放、非固定) */
.news-hero {
  position: relative;
  min-height: clamp(150px, 24vw, 371px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--color-dark) url("../../images/news/hero.webp") center /
    cover no-repeat;
}
.news-hero__title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: var(--nw-fs-hero);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  padding: 0 var(--nw-pad);
  text-align: center;
}

/* ── 區塊 ── */
.news-sec {
  padding: clamp(2.25rem, 4vw, 3.5rem) var(--nw-pad);
}
.news-sec--dark {
  background: url("../../images/news/bg-dark.webp") center / cover no-repeat
    var(--color-dark);
  color: #fff;
}
.news-sec--light {
  background: var(--color-surface);
  color: var(--color-text);
}

/* ── INTRO(圖 + 文置中)── */
.news-intro {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 300px);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  justify-content: center;
  max-width: 860px;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
}
.news-intro__image img {
  width: 100%;
  border-radius: var(--radius-md);
}
.news-intro__body {
  text-align: center;
}
.news-intro__title {
  font-size: var(--nw-fs-sec);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}
.news-intro__text {
  font-size: var(--nw-fs-body);
  color: #fff;
}
.news-intro__text + .news-intro__text {
  margin-top: 0.9rem;
}

/* ── NEWS-LIST(說明 bar + 4 icon 卡)── */
.news-list {
  max-width: var(--nw-maxw);
  margin: 0 auto;
}
.news-list__bar {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  padding: 0.9rem 1.5rem;
  text-align: center;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.news-list__title {
  font-size: var(--nw-fs-sec);
  font-weight: 700;
  color: #fff;
}
.news-list__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  --icon-sz: clamp(64px, 6.5vw, 110px);
}
.news-card {
  position: relative;
  margin-top: calc(var(--icon-sz) / 2);
  background: var(--nw-card);
  border: 1px solid var(--color-brand);
  border-radius: 13px;
  padding: calc(var(--icon-sz) / 2 + 1.25rem) 1rem 1.5rem;
  text-align: center;
}
.news-card__icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--icon-sz) / -2);
  width: var(--icon-sz);
  height: var(--icon-sz);
  border-radius: 50%;
  background: var(--color-brand);
  display: grid;
  place-items: center;
}
.news-card__icon img {
  width: 52%;
  height: 52%;
  filter: brightness(0) invert(1);
}
.news-card__title {
  font-size: var(--nw-fs-ntitle);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
}
.news-card__text {
  font-size: var(--nw-fs-body);
  color: #000;
}

/* ── GROWTH(淺色 3 卡 + CTA)── */
.news-growth {
  max-width: var(--nw-maxw);
  margin: 0 auto;
}
.news-growth__title {
  text-align: center;
  color: var(--color-heading);
  font-size: var(--nw-fs-sec);
  font-weight: 700;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.news-growth__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-items: start;
}
.news-gcard {
  display: flex;
  flex-direction: column;
}
.news-gcard__media img {
  width: 100%;
  aspect-ratio: 314 / 224;
  object-fit: cover;
}
.news-gcard__body {
  padding-top: 0.9rem;
}
.news-gcard__title {
  color: var(--color-heading);
  font-size: var(--nw-fs-gtitle);
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.news-gcard__text {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-gcard__text li {
  position: relative;
  padding-left: 1.15em;
  font-size: var(--nw-fs-gtext);
  color: #000;
  margin-bottom: 0.15rem;
}
.news-gcard__text li::before {
  content: "•";
  position: absolute;
  left: 0.15em;
  color: var(--nw-bullet-dark);
}
.news-growth__cta {
  text-align: center;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* ── JOIN(深色 3 拱形卡 + 實心紅 divider + CTA)── */
.news-join {
  max-width: var(--nw-maxw);
  margin: 0 auto;
}
.news-join__title {
  text-align: center;
  color: #fff;
  font-size: var(--nw-fs-sec);
  font-weight: 700;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.news-join__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  justify-items: center;
}
/* 卡片 = 圖 + body(標題/divider/列點)兩塊;桌機直向堆疊、手機橫向(圖左) */
.news-jcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
}
.news-jcard__img {
  width: clamp(220px, 20vw, 297px);
  height: 349px;
  object-fit: cover;
  border-radius: var(--nw-arch);
  flex-shrink: 0;
}
.news-jcard__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 25px;
}
.news-jcard__title {
  color: #fff;
  font-size: var(--nw-fs-jtitle);
  font-weight: 400;
  line-height: 1.25;
  margin-top: 0.75rem;
}
.news-jcard__divider {
  display: block;
  width: 100%;
  max-width: 297px;
  height: clamp(16px, 2.1vw, 39px);
  background: var(--color-brand);
}
.news-jcard__text {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-jcard__text li {
  position: relative;
  padding-left: 1.15em;
  font-size: var(--nw-fs-jtext);
  color: #fff;
  text-align: left;
  margin-bottom: 0.15rem;
}
.news-jcard__text li::before {
  content: "•";
  position: absolute;
  left: 0.15em;
  color: var(--nw-bullet-light);
}
.news-join__cta {
  text-align: center;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* ============================================================ RWD ============================================================ */
@media (max-width: 1280px) {
  .news-intro,
  .news-list,
  .news-growth,
  .news-join {
    max-width: 1000px;
  }
}
@media (max-width: 768px) {
  .news-intro {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 480px;
  }
  .news-list__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-join {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .news-join__grid {
    display: flex;
  }

  .news-growth__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .news-hero {
    min-height: 128px;
    background-image: url("../../images/news/hero-m.webp");
  }
  .news-hero__title {
    font-weight: 600;
    letter-spacing: 0.06em;
  }
  .news-sec {
    padding: 1.9rem var(--nw-pad);
  }
  .news-intro {
    gap: 1.25rem;
    max-width: 300px;
    margin-bottom: 2rem;
  }
  .news-intro__title {
    font-weight: 600;
  }
  .news-list__title {
    font-weight: 600;
  }
  .news-list__bar {
    margin-bottom: 2rem;
  }
  .news-list__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem 0.9rem;
    max-width: 300px;
    margin: 0 auto;
  }
  .news-card__title {
    font-weight: 600;
  }
  .news-growth__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 300px;
    margin: 0 auto;
  }
  .news-growth__title {
    font-weight: 600;
    margin-bottom: 1.25rem;
  }
  .news-gcard__media img {
    aspect-ratio: 300 / 175;
  }
  .news-gcard__title {
    font-weight: 600;
  }
  .news-join__title {
    font-weight: 600;
    margin-bottom: 1.25rem;
  }
  .news-join__grid {
    flex-direction: column;
    gap: 1.6rem;
    max-width: 311px;
  }
  .news-jcard {
    flex-direction: row;
    column-gap: 1rem;
    text-align: left;
    max-width: none;
  }
  .news-jcard__img {
    width: 112px;
    height: 132px;
    object-fit: cover;
  }
  .news-jcard__body {
    flex: 1;
    min-width: 0;
    gap: 12px;
    width: auto;
    align-items: stretch;
  }
  .news-jcard__title {
    font-weight: 600;
    margin-top: 0;
    text-align: center;
  }
  .news-jcard__divider {
    min-height: 16px;
  }
  .news-btn {
    font-weight: 600;
  }
}
