@import url("linea-black.css");

/* ============================================================
   LINEA Post Page — 文章/案例详情子页面
   ============================================================ */

.post-page { background: #080808; min-height: 100vh; }

.post-main { padding-top: 72px; min-height: 80vh; }

/* ── Loading ── */
.post-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 120px 20px; gap: 20px;
  color: rgba(255,255,255,.4); font-size: .8rem; letter-spacing: 3px;
}
.post-loading-arc {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.08); border-top-color: #dc0000;
  animation: post-spin .8s linear infinite;
}
@keyframes post-spin { to { transform: rotate(360deg); } }

/* ── Hero ── */
.post-hero {
  height: 52vh; min-height: 320px; max-height: 560px;
  background-size: cover; background-position: center;
  position: relative;
}
.post-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,8,.25) 0%, rgba(8,8,8,.05) 40%, #080808 100%);
}

/* ── Body ── */
.post-body {
  max-width: 780px; margin: 0 auto; padding: 0 24px 60px;
  margin-top: -140px; position: relative; z-index: 2;
}
.post-type {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: #dc0000; background: rgba(220,0,0,.1);
  border: 1px solid rgba(220,0,0,.25);
  padding: 5px 14px; border-radius: 20px; margin-bottom: 18px;
}
.post-title {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800;
  line-height: 1.2; color: #f2f2f2; margin: 0 0 14px;
}
.post-meta {
  font-size: .78rem; color: rgba(255,255,255,.45);
  letter-spacing: 1.5px; margin-bottom: 40px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.post-content { font-size: 1rem; line-height: 1.9; color: rgba(255,255,255,.78); }
.post-content p { margin: 0 0 1.6em; }
.post-content strong { color: #fff; font-weight: 700; }
.post-content h2, .post-content h3 {
  color: #f2f2f2; margin: 1.8em 0 .8em; line-height: 1.35;
}
.post-content img { max-width: 100%; border-radius: 12px; margin: 12px 0; }
.post-content blockquote {
  border-left: 3px solid #dc0000; margin: 1.5em 0;
  padding: 4px 0 4px 20px; color: rgba(255,255,255,.6); font-style: italic;
}

/* ── Related ── */
.post-related { max-width: 980px; margin: 0 auto; padding: 20px 24px 80px; }
.post-related-title {
  font-size: .85rem; font-weight: 700; letter-spacing: 3px;
  color: rgba(255,255,255,.5); text-transform: uppercase;
  margin-bottom: 24px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.post-related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.related-card {
  display: block; text-decoration: none; border-radius: 14px; overflow: hidden;
  background: #101010; border: 1px solid rgba(255,255,255,.06);
  transition: transform .35s cubic-bezier(0.22,1,0.36,1), border-color .35s;
}
.related-card:hover { transform: translateY(-5px); border-color: rgba(220,0,0,.35); }
.related-card-img { height: 150px; background-size: cover; background-position: center; }
.related-card-body { padding: 16px 18px 18px; }
.related-card-body h4 {
  margin: 0 0 6px; font-size: .92rem; font-weight: 700; color: #eee; line-height: 1.4;
}
.related-card-body p {
  margin: 0; font-size: .75rem; color: rgba(255,255,255,.45); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Error ── */
.post-error { text-align: center; padding: 140px 24px; }
.post-error h2 { color: #eee; font-size: 1.5rem; margin-bottom: 12px; }
.post-error p { color: rgba(255,255,255,.45); margin-bottom: 32px; }

/* ── Nav back button ── */
.post-back { text-decoration: none; }

/* ── Entrance animation ── */
.post-article { animation: post-in .6s cubic-bezier(0.22,1,0.36,1); }
@keyframes post-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .post-hero { height: 38vh; min-height: 240px; }
  .post-body { margin-top: -90px; }
  .post-content { font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

@media (max-width: 768px) {
  .post-page .nav-inner { min-height: 58px; padding-inline: 17px; }
  .post-page .post-back { display: inline-flex; min-height: 44px; align-items: center; font-size: .9rem; }
  .post-main { padding-top: 58px; }
  .post-hero { height: clamp(240px, 38svh, 430px); }
  .post-body { margin-top: -59px; padding-inline: clamp(16px, 4.5vw, 28px); }
  .post-title { font-size: clamp(1.9rem, 8.8vw, 3.25rem); line-height: 1.12; overflow-wrap: anywhere; }
  .post-meta { flex-wrap: wrap; font-size: .86rem; }
  .post-content { font-size: 1.04rem; line-height: 1.72; overflow-wrap: anywhere; }
  .post-content :is(figure, img, video) { max-width: 100%; height: auto; }
  .post-related { padding: 20px 17px 45px; }
  .post-related-grid { grid-template-columns: minmax(0, 1fr); }
}
