/* =====================================================
   單篇文章 — Figma 137:3994
   ===================================================== */

.tmpl-single-post {
  --sp-red: #e6433e;
  --sp-font: "Inter", "Noto Sans TC", "Noto Sans JP", sans-serif;
  font-family: var(--sp-font);
  color: #000;
  background: #fff;
  padding-bottom: 120px;
}

.tmpl-single-post * {
  box-sizing: border-box;
}

.tmpl-single-post a {
  color: inherit;
}

/* ========================= Hero（同文章專區列表頁） ========================= */

.tmpl-single-post .single-post__hero {
  position: relative;
  width: 100%;
  max-width: 1920px;
  height: 310px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tmpl-single-post .single-post__hero-media {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tmpl-single-post .single-post__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tmpl-single-post .single-post__hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.tmpl-single-post .single-post__hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 58px;
}

.tmpl-single-post .single-post__hero-inner p {
  margin: 0;
}

.tmpl-single-post .single-post__hero-title {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

/* ========================= 內容區（麵包屑全寬靠左；正文 700 / 內文 690） ========================= */

.tmpl-single-post .single-post__main {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding-top: 48px;
}

/* 麵包屑 14px — Figma 137:4038（電腦端左上角） */
.tmpl-single-post .single-post__breadcrumb {
  display: block;
  width: 100%;
  margin: 0 0 32px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #000;
  text-align: left;
}

.tmpl-single-post .single-post__wrap {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.tmpl-single-post .single-post__breadcrumb-link {
  text-decoration: none;
  color: #000;
}

.tmpl-single-post .single-post__breadcrumb-link:hover,
.tmpl-single-post .single-post__breadcrumb-link:focus-visible {
  text-decoration: underline;
}

.tmpl-single-post .single-post__breadcrumb-sep {
  margin: 0 0.25em;
  color: #000;
}

.tmpl-single-post .single-post__breadcrumb-current {
  font-weight: 400;
  color: #000;
}

/* 文章標題 24px Medium — Figma 副標題24B */
.tmpl-single-post .single-post__header {
  margin: 0 0 24px;
}

.tmpl-single-post .single-post__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  color: #000;
}

/* 主圖 700×477 — Figma 137:4005 */
.tmpl-single-post .single-post__featured {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 700 / 477;
  margin: 0 auto 32px;
  background: #d9d9d9;
  overflow: hidden;
  position: relative;
}

.tmpl-single-post .single-post__featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 內文 16px — Figma 內文16，寬 690 */
.tmpl-single-post .single-post__content {
  max-width: 690px;
  margin: 0 auto;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: #000;
}

.tmpl-single-post .single-post__content > *:first-child {
  margin-top: 0;
}

.tmpl-single-post .single-post__content > *:last-child {
  margin-bottom: 0;
}

.tmpl-single-post .single-post__content p {
  margin: 0 0 1em;
  font-size: 16px;
  line-height: normal;
}

.tmpl-single-post .single-post__content h2,
.tmpl-single-post .single-post__content h3,
.tmpl-single-post .single-post__content h4 {
  font-weight: 700;
  margin: 1.25em 0 0.5em;
  line-height: 1.3;
}

.tmpl-single-post .single-post__content ul,
.tmpl-single-post .single-post__content ol {
  margin: 0 0 1em 0;
  padding: 0;
}

.tmpl-single-post .single-post__content a {
  color: var(--sp-red);
  text-decoration: underline;
}

.tmpl-single-post .single-post__content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 三欄小圖排版 — Figma 137:4006–4008（區塊編輯器圖片列） */
.tmpl-single-post .single-post__content .wp-block-gallery,
.tmpl-single-post .single-post__content .blocks-gallery-grid {
  gap: 24px;
}

.tmpl-single-post .single-post__content .wp-block-image {
  margin-bottom: 1em;
}

.tmpl-single-post .single-post__content .alignwide {
  max-width: 100%;
}

.tmpl-single-post .single-post__page-links {
  margin-top: 2em;
  font-size: 14px;
}

.tmpl-single-post .single-post__page-links a {
  margin: 0 0.25em;
}

/* ========================= 行動版 ========================= */

@media (min-width: 769px) {
  .tmpl-single-post .single-post__breadcrumb {
    padding-left: 240px;
    padding-right: 24px;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .tmpl-single-post .single-post__hero {
    height: min(310px, 42vw);
  }

  .tmpl-single-post .single-post__hero-title {
    font-size: clamp(24px, 7vw, 48px);
    white-space: normal;
    padding: 0 1rem;
    text-align: center;
  }

  .tmpl-single-post .single-post__main {
    padding-top: 24px;
  }

  .tmpl-single-post .single-post__breadcrumb {
    font-size: 12px;
    margin-bottom: 24px;
    line-height: 1.4;
    padding-left: 24px;
    padding-right: 24px;
  }

  .tmpl-single-post .single-post__title {
    font-size: 20px;
    line-height: 1.3;
  }

  .tmpl-single-post .single-post__featured {
    aspect-ratio: 16 / 10;
    margin-bottom: 24px;
  }

  .tmpl-single-post .single-post__content {
    font-size: 15px;
  }

  .tmpl-single-post .single-post__content p {
    font-size: 15px;
  }
}
