/*
 * 新版頁面（$page['v2']）共用的版型元件。新版頁面不載入 Tailwind，樣式由
 * site-chrome.css（頁首頁尾）、site-typography.css（字級變數）與這個檔案組成。
 * 數值取自設計稿 newfrontend/home.html 的行內樣式，改寫成 class 方便各頁共用。
 */
body.v2 {
  margin: 0;
  background: #F7F2E8;
  color: #171512;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.v2 main { display: block; }
body.v2 img { max-width: 100%; }

/* 區塊外框：交錯的米白／奶油底色由版型依顯示順序指定 is-cream */
.v2-section {
  box-sizing: border-box;
  padding: var(--space-section) clamp(20px, 5vw, 72px);
  background: #FFFDF8;
}
.v2-section.is-cream { background: #F7F2E8; }
.v2-inner { max-width: 1200px; margin: 0 auto; }
.v2-section-head { margin-bottom: 28px; }
.v2-section-head .v2-section-more { margin: 8px 0 0; }
.v2 .v2-section-title {
  margin: 10px 0 0;
  font: 700 var(--type-section)/var(--leading-section) var(--font-body);
  color: #171512;
}
.v2-section-lead { margin-top: 12px; }
.v2-lead {
  max-width: 100%;
  margin: 0;
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: #312E29;
  text-wrap: pretty;
}

/* 卡片 */
.v2-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  align-items: stretch;
}
@media (min-width: 700px) {
  .v2-cards.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.v2-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: #FFFDF8;
  border: 1px dashed #CDBB98;
  border-radius: 16px;
  color: #171512;
}
.v2-card-img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: #EFE6D3;
}
.v2 .v2-card-title {
  margin: 12px 0 0;
  font: 700 var(--type-card)/var(--leading-card) var(--font-body);
  color: #171512;
}
.v2-card-img + .v2-card-title { margin-top: 12px; }
.v2-card-text {
  margin: 6px 0 0;
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: #6F6A62;
}
.v2-card-action { margin-top: auto; padding-top: 20px; }

/* 主要按鈕（金色膠囊） */
.v2-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 26px;
  border: 0;
  border-radius: 999px;
  background: #D5A53B;
  color: #171512;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.v2-btn:hover { background: #c79630; }
.v2-btn:focus-visible { outline: 2px solid #171512; outline-offset: 3px; }
.v2-link { color: #68460f; font-weight: 700; text-underline-offset: .2em; }

/* 問答（details／summary） */
.v2-faq { max-width: 100%; margin-top: 28px; border-top: 1px solid #E8DCC6; }
.v2-faq h3 { margin: 28px 0 0; color: #8A5F14; font: 700 var(--type-small)/1.6 var(--font-body); letter-spacing: .16em; }
.v2-faq details { border-bottom: 1px solid #E8DCC6; }
.v2-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: var(--type-card);
  line-height: var(--leading-card);
  color: #171512;
}
.v2-faq summary::-webkit-details-marker { display: none; }
.v2-faq .plus { color: #8A5F14; font-size: 26px; line-height: 1; font-weight: 400; transition: transform .2s ease; }
.v2-faq details[open] .plus { transform: rotate(45deg); }
.v2-faq .v2-faq-answer { padding: 0 0 24px; font-size: var(--type-body); line-height: var(--leading-body); color: #6F6A62; }
.v2-faq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (prefers-reduced-motion: reduce) { .v2-faq .plus { transition: none; } }

/* 後台 TinyMCE 編輯的內文（報名 QA 回答等） */
.v2-rich p { margin: 0 0 .9em; }
.v2-rich p:last-child { margin-bottom: 0; }
.v2-rich a { color: #68460f; text-decoration: underline; text-underline-offset: .2em; }
.v2-rich ul, .v2-rich ol { margin: 0 0 .9em; padding-inline-start: 1.4em; }
.v2-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.v2-rich table { width: 100%; border-collapse: collapse; }
.v2-rich td, .v2-rich th { border: 1px solid #E8DCC6; padding: .5rem .75rem; }
