/* ============================================================
   Digiland 首頁 (XDA-style) landing 版型
   獨立於論壇舊版 CSS，僅作用於 body.landing
   ============================================================ */

body.landing {
    margin: 0;
    padding: 0;
    background: #f1f3f5;
    color: #1a1d21;
    font-family: "Helvetica Neue", "Segoe UI", "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body.landing a { color: inherit; text-decoration: none; }
body.landing img { display: block; max-width: 100%; }
.lp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 頂部導覽列 ---------- */
.lp-header {
    position: sticky; top: 0; z-index: 100;
    background: #0f1115; color: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,.25);
}
.lp-header .lp-wrap { display: flex; align-items: center; gap: 20px; height: 58px; }
.lp-logo { font-size: 22px; font-weight: 800; letter-spacing: .5px; color: #fff; white-space: nowrap; }
.lp-logo span { color: #ff5722; }
.lp-nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.lp-nav::-webkit-scrollbar { display: none; }
.lp-nav a {
    color: #c9ced6; font-size: 14px; font-weight: 600; padding: 8px 12px;
    border-radius: 6px; white-space: nowrap; transition: .15s;
}
.lp-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.lp-actions { display: flex; gap: 10px; align-items: center; }
.lp-btn {
    font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 20px;
    background: #ff5722; color: #fff; transition: .15s; white-space: nowrap;
}
.lp-btn:hover { background: #e64a19; }
.lp-btn.ghost { background: transparent; border: 1px solid #3a3f47; color: #c9ced6; }
.lp-btn.ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Hero 精選區 ---------- */
.lp-hero { padding: 24px 0; }
.lp-hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.lp-hero-main { position: relative; border-radius: 12px; overflow: hidden; min-height: 380px; background:#222; }
.lp-hero-main .cover { width: 100%; height: 100%; min-height: 380px; object-fit: cover; transition: transform .4s; }
.lp-hero-main:hover .cover { transform: scale(1.04); }
.lp-hero-main .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 55%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 24px;
}
.lp-hero-main h2 { margin: 8px 0 0; color: #fff; font-size: 26px; font-weight: 800; line-height: 1.3; }
.lp-hero-side { display: flex; flex-direction: column; gap: 14px; }
.lp-hero-side .card-mini {
    display: flex; gap: 12px; background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); flex: 1; align-items: stretch;
}
.lp-hero-side .card-mini .thumb { width: 110px; flex: none; object-fit: cover; background:#e9ecef; }
.lp-hero-side .card-mini .body { padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; }
.lp-hero-side .card-mini h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 分類標籤 (置於封面/卡片上) */
.cat-tag {
    display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .5px;
    color: #fff; background: #ff5722; padding: 3px 9px; border-radius: 4px; text-transform: uppercase;
    align-self: flex-start;
}
.cat-tag.dark { background: #0f1115; }

/* ---------- 分類過濾條 ---------- */
.lp-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 18px; border-bottom: 2px solid #e3e6ea; }
.lp-filter a {
    font-size: 13px; font-weight: 700; color: #51585f; padding: 6px 14px; border-radius: 18px;
    background: #fff; border: 1px solid #dce0e5; transition: .15s;
}
.lp-filter a:hover, .lp-filter a.active { background: #0f1115; color: #fff; border-color: #0f1115; }

/* ---------- 最新文章網格 ---------- */
.lp-section-title { font-size: 20px; font-weight: 800; margin: 26px 0 16px; display: flex; align-items: center; gap: 10px; }
.lp-section-title::before { content: ""; width: 4px; height: 22px; background: #ff5722; border-radius: 2px; }
.lp-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.lp-card {
    background: #fff; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s;
}
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.lp-card .thumb-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; background:#e9ecef; }
.lp-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.lp-card:hover .thumb-wrap img { transform: scale(1.05); }
.lp-card .thumb-wrap .cat-tag { position: absolute; top: 10px; left: 10px; }
/* 無封面時的佔位漸層 */
.lp-card .thumb-ph, .lp-hero-side .thumb-ph {
    width: 100%; height: 100%; min-height: 90px;
    background: linear-gradient(135deg, #2b5876, #4e4376);
    display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.55);
    font-size: 28px; font-weight: 800;
}
.lp-card .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lp-card h3 {
    margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lp-card .excerpt {
    font-size: 13px; color: #6a727b; line-height: 1.5; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lp-card .meta {
    margin-top: auto; font-size: 12px; color: #909aa3; display: flex; gap: 10px; align-items: center;
    border-top: 1px solid #eef0f2; padding-top: 10px;
}
.lp-card .meta .author { font-weight: 700; color: #51585f; }

/* ---------- footer ---------- */
.lp-footer { background: #0f1115; color: #9aa1aa; margin-top: 50px; padding: 30px 0; font-size: 13px; }
.lp-footer .lp-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
.lp-footer a { color: #c9ced6; }
.lp-footer a:hover { color: #fff; }

/* ---------- 響應式 ---------- */
@media (max-width: 980px) {
    .lp-hero-grid { grid-template-columns: 1fr; }
    .lp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .lp-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-hero-main { min-height: 240px; }
    .lp-hero-main .cover { min-height: 240px; }
    .lp-hero-main h2 { font-size: 20px; }
}
@media (max-width: 460px) {
    .lp-grid { grid-template-columns: 1fr; }
}
