/* 新增頁面（最新消息、成功案例、表單狀態）的樣式，沿用 style.css 的變數 */

.page-top {
  padding-top: calc(var(--header-height) + 60px);
  min-height: 70vh;
}

.section-more {
  margin-top: 40px;
}

/* ---------- 文章卡片 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-body {
  padding: 24px;
}

.post-body h2,
.post-body h3 {
  font-size: 1.2rem;
  margin: 8px 0 10px;
  color: var(--text-main);
}

.post-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.post-meta {
  display: block;
  color: var(--primary-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.post-empty {
  color: var(--text-muted);
  padding: 40px 0;
}

/* ---------- 文章內文 ---------- */
.article-container {
  max-width: 860px;
}

.article-back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 24px;
}

.article-back:hover {
  color: var(--primary-cyan);
}

.article-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.article-cover {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: 32px 0 0;
}

.article-body {
  margin-top: 32px;
  padding: 40px;
  line-height: 1.9;
  color: var(--text-main);
}

.article-body h2,
.article-body h3 {
  margin: 1.6em 0 0.6em;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin-bottom: 1em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.article-body a {
  color: var(--primary-cyan);
}

.article-cta {
  margin-top: 40px;
  text-align: center;
}

@media (max-width: 640px) {
  .article-body {
    padding: 24px 20px;
  }
}

/* ---------- 一般頁面（解決方案等） ---------- */
.page-hero {
  padding: calc(var(--header-height) + 72px) 0 48px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 242, 254, 0.14), transparent 60%),
    radial-gradient(ellipse at 90% 30%, rgba(121, 40, 202, 0.16), transparent 55%);
  border-bottom: 1px solid var(--border-color);
}

.page-hero .article-title {
  background: var(--gradient-cyber);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 8px;
}

.page-hero-summary {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 720px;
}

.page-body {
  padding: 48px 0 96px;
}

.page-body .article-body {
  margin-top: 0;
}

.article-body .page-lead {
  font-size: 1.15rem;
  color: var(--text-main);
  border-left: 3px solid var(--primary-cyan);
  padding: 4px 0 4px 18px;
  margin-bottom: 1.6em;
}

.article-body h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.45rem;
}

.article-body h2::before {
  content: '';
  width: 6px;
  height: 1.1em;
  border-radius: 3px;
  background: var(--gradient-cyber);
  flex-shrink: 0;
}

.article-body ul {
  list-style: none;
  padding-left: 0;
}

.article-body ul li {
  position: relative;
  padding-left: 1.8em;
  margin-bottom: 0.5em;
}

.article-body ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--primary-cyan);
  font-size: 0.9em;
}

.article-body ol li {
  margin-bottom: 0.5em;
}

.article-body ol li::marker {
  color: var(--primary-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.article-body figure {
  margin: 1.2em 0 1.6em;
}

.article-body figure img {
  display: block;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.04);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 1.2em 0 1.8em;
}

/* 剛好 4 張卡片時排成 2×2，避免最後一張落單 */
.feature-grid:has(> .feature-card:nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .feature-grid:has(> .feature-card:nth-child(4):last-child) {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
}

.article-body .feature-card h3 {
  margin: 0 0 0.6em;
  font-size: 1.1rem;
  color: var(--primary-cyan);
}

.feature-card p:last-child,
.feature-card ul:last-child {
  margin-bottom: 0;
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  align-items: center;
  margin: 1.2em 0 1.8em;
}

.figure-row img {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
}

.page-cta-box {
  padding: 40px 24px;
}

.page-cta-box h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.page-cta-box p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.related-solutions {
  margin-top: 64px;
}

.related-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

/* ---------- 其他 ---------- */
.about-statement p + p {
  margin-top: 0.8em;
}

.ind-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

/* 防垃圾訊息欄位：移出畫面，螢幕閱讀器也略過 */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-nav-col a {
  color: inherit;
}
