/* Tiến Phát — trang nội dung: page.php, page-lien-he.php, archive.php / home.php, single.php.
   Không có mockup riêng: dựng theo ngôn ngữ thiết kế sẵn có (màu, kicker cam, hero xám, thẻ bo góc, blueprint). */

:root{
  --tp-ink:#173731;--tp-muted:#60746e;--tp-line:#dce6e1;--tp-paper:#fffdfa;--tp-mint:#edf5f0;
  --tp-cream:#f6f0e4;--tp-accent:#ef6b2e;--tp-accent-dark:#b94b1a;--tp-zalo:#0068ff;
  --tp-shadow:0 14px 34px rgba(23,55,49,.08);--tp-radius:16px;
  --tp-font:'Be Vietnam Pro','Segoe UI',system-ui,sans-serif;
}
.tp-wrap{width:min(1240px,calc(100% - 48px));margin:0 auto}
.tp-kicker{color:var(--tp-accent);font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.tp-content-main{background:var(--tp-paper);color:var(--tp-ink);font-family:var(--tp-font);padding:48px 0 72px}

/* ---- Nút */
.tp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border-radius:10px;border:1px solid transparent;font:700 14px/1.2 var(--tp-font);text-decoration:none;cursor:pointer;transition:background .15s ease,border-color .15s ease}
.tp-btn-primary{background:var(--tp-accent-dark);color:#fff!important}
.tp-btn-primary:hover{background:#a03f14}
.tp-btn-zalo{background:var(--tp-zalo);color:#fff!important}
.tp-btn-zalo:hover{background:#0056d6}
.tp-btn-ghost{background:#fff;border-color:#cbd8d3;color:var(--tp-ink)!important}

/* ---- Hero */
.tp-content-hero{background:#f2f2f3;border-bottom:1px solid var(--tp-line);font-family:var(--tp-font);color:var(--tp-ink)}
.tp-content-hero-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:40px;align-items:center;padding:44px 0 40px}
.tp-content-hero.has-image .tp-content-hero-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
.tp-content-hero h1{margin:10px 0 12px;max-width:22ch;font-size:clamp(30px,4vw,46px);line-height:1.12;letter-spacing:-.02em}
.tp-content-lead{max-width:64ch;margin:0;color:var(--tp-muted);font-size:17px;line-height:1.65}
.tp-content-meta{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:16px;color:var(--tp-muted);font-size:14px}
.tp-content-meta>*:not(:last-child)::after{content:"·";margin-left:18px;color:#a9b7b2}
.tp-chip-time::after{content:none!important}
.tp-chip-time{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border-radius:999px;background:#fff;border:1px solid var(--tp-line);font-weight:700;color:var(--tp-ink)}
.tp-content-hero-media{border-radius:var(--tp-radius);overflow:hidden;border:1px solid #d3dfda;background:#fff;aspect-ratio:4/3}
.tp-content-hero-media img{display:block;width:100%;height:100%;object-fit:cover}
.tp-content-hero.is-post h1{max-width:28ch}

/* ---- Bố cục nội dung + mục lục */
.tp-content-layout{display:grid;grid-template-columns:minmax(0,760px);justify-content:center;gap:48px}
.tp-content-layout.has-toc{grid-template-columns:260px minmax(0,760px)}
.tp-toc{font-family:var(--tp-font)}
.tp-toc-inner,.tp-side-box{position:relative}
.tp-content-layout .tp-toc-inner{position:sticky;top:24px;padding:18px;border:1px solid var(--tp-line);border-radius:14px;background:#fff}
.tp-toc-title{margin:0 0 10px;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--tp-muted)}
.tp-toc ol{margin:0;padding:0;list-style:none;counter-reset:toc}
.tp-toc li{margin:0}
.tp-toc li.lv-3{padding-left:14px}
.tp-toc a{display:block;padding:7px 10px;border-left:2px solid transparent;border-radius:0 8px 8px 0;color:var(--tp-ink);font-size:14px;line-height:1.4;text-decoration:none}
.tp-toc a:hover{background:var(--tp-mint)}
.tp-toc a.is-current{border-left-color:var(--tp-accent);background:#fff6f0;color:var(--tp-accent-dark);font-weight:700}

/* ---- Văn bản (prose) */
.tp-prose{font-family:var(--tp-font);font-size:17px;line-height:1.75;color:#2b4540;min-width:0}
.tp-prose>*:first-child{margin-top:0}
.tp-prose h2{margin:44px 0 14px;font-size:clamp(22px,2.4vw,28px);line-height:1.25;color:var(--tp-ink);scroll-margin-top:90px}
.tp-prose h3{margin:30px 0 10px;font-size:20px;line-height:1.3;color:var(--tp-ink);scroll-margin-top:90px}
.tp-prose h4{margin:24px 0 8px;font-size:17px;color:var(--tp-ink)}
.tp-prose p{margin:0 0 18px}
.tp-prose a{color:var(--tp-accent-dark);text-decoration:underline;text-underline-offset:3px}
.tp-prose ul,.tp-prose ol{margin:0 0 20px;padding-left:22px}
.tp-prose li{margin:0 0 8px}
.tp-prose ul li::marker{color:var(--tp-accent)}
.tp-prose blockquote{margin:24px 0;padding:18px 22px;border-left:4px solid var(--tp-accent);border-radius:0 12px 12px 0;background:var(--tp-cream);color:var(--tp-ink);font-size:17px}
.tp-prose blockquote p:last-child{margin:0}
.tp-prose img{max-width:100%;height:auto;border-radius:12px}
.tp-prose figure{margin:26px 0}
.tp-prose figcaption{margin-top:8px;color:var(--tp-muted);font-size:14px;text-align:center}
.tp-prose .wp-block-table{margin:22px 0;overflow-x:auto;border:1px solid var(--tp-line);border-radius:12px;background:#fff}
.tp-prose table{width:100%;margin:0;border-collapse:collapse;font-size:15px;background:#fff}
.tp-prose>table{margin:22px 0;border:1px solid var(--tp-line)}
.tp-prose tr:last-child td{border-bottom:0}
.tp-prose th,.tp-prose td{padding:11px 14px;border-bottom:1px solid #e8eeeb;text-align:left;vertical-align:top}
.tp-prose th{background:var(--tp-mint);font-weight:700;color:var(--tp-ink)}
.tp-prose hr{margin:36px 0;border:0;border-top:1px solid var(--tp-line)}
.tp-prose .wp-block-buttons{margin:24px 0}
.tp-prose .wp-block-button__link{background:var(--tp-accent-dark);border-radius:10px;color:#fff;text-decoration:none;font-weight:700}
.tp-prose .tp-note{padding:16px 18px;border:1px solid #cfe0d4;border-radius:12px;background:#f0f8f2;font-size:16px}

/* ---- CTA cuối trang */
.tp-content-cta{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-top:56px;padding:28px 30px;border-radius:20px;background:var(--tp-ink);color:#fff;font-family:var(--tp-font)}
.tp-content-cta h2{margin:6px 0 6px;font-size:24px;line-height:1.25;color:#fff}
.tp-content-cta p{margin:0;max-width:60ch;color:#cfe0db;font-size:15px;line-height:1.6}
.tp-content-cta-actions{display:flex;flex-wrap:wrap;gap:10px;flex:0 0 auto}

/* ---- Lưu trữ bài viết */
.tp-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 28px;font-family:var(--tp-font)}
.tp-chips a{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 14px;border:1px solid var(--tp-line);border-radius:999px;background:#fff;color:var(--tp-ink);font-size:14px;font-weight:700;text-decoration:none}
.tp-chips a span{color:var(--tp-muted);font-weight:600}
.tp-chips a:hover{border-color:#9fbdb2}
.tp-chips a[aria-current="page"]{background:var(--tp-accent-dark);border-color:var(--tp-accent-dark);color:#fff}
.tp-chips a[aria-current="page"] span{color:#fbd9c8}
.tp-post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.tp-post-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--tp-line);border-radius:var(--tp-radius);background:#fff;box-shadow:0 8px 22px rgba(23,55,49,.04);font-family:var(--tp-font);transition:transform .18s ease,box-shadow .18s ease}
.tp-post-card:hover{transform:translateY(-2px);box-shadow:var(--tp-shadow)}
.tp-post-card-media{display:block;aspect-ratio:16/9;background:#eef1ee;overflow:hidden}
.tp-post-card-media img{display:block;width:100%;height:100%;object-fit:cover}
.tp-post-card-placeholder{display:grid;place-items:center;height:100%;color:var(--tp-muted);font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.tp-post-card-body{display:flex;flex:1;flex-direction:column;padding:18px 20px 20px}
.tp-post-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-bottom:8px;color:var(--tp-muted);font-size:13px}
.tp-post-cat{color:var(--tp-accent-dark);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;text-decoration:none}
.tp-post-card h3{margin:0 0 8px;font-size:19px;line-height:1.35}
.tp-post-card h3 a{color:var(--tp-ink);text-decoration:none}
.tp-post-card h3 a:hover{color:var(--tp-accent-dark)}
.tp-post-card p{margin:0 0 14px;color:var(--tp-muted);font-size:15px;line-height:1.6}
.tp-post-more{margin-top:auto;color:var(--tp-accent-dark);font-size:14px;font-weight:800;text-decoration:none}
.tp-post-card.is-featured{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.tp-post-card.is-featured .tp-post-card-media{aspect-ratio:auto;min-height:340px}
.tp-post-card.is-featured .tp-post-card-body{justify-content:center;padding:34px}
.tp-post-card.is-featured h3{font-size:clamp(22px,2.4vw,30px)}
.tp-post-card.is-featured p{font-size:16px}
.tp-pagination{margin-top:36px;font-family:var(--tp-font)}
.tp-pagination .nav-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.tp-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;padding:0 12px;border:1px solid var(--tp-line);border-radius:10px;background:#fff;color:var(--tp-ink);font-weight:700;text-decoration:none}
.tp-pagination .page-numbers.current{background:var(--tp-ink);border-color:var(--tp-ink);color:#fff}
.tp-empty{padding:40px;border:1px dashed #cfdcd6;border-radius:var(--tp-radius);background:#fff;text-align:center;font-family:var(--tp-font)}
.tp-empty h2{margin:0 0 8px;font-size:22px}
.tp-empty a{color:var(--tp-accent-dark);font-weight:700}

/* ---- Chi tiết bài viết */
.tp-single-cover{margin:0 0 40px;border-radius:20px;overflow:hidden;border:1px solid var(--tp-line);background:#eef1ee}
.tp-single-cover img{display:block;width:100%;max-height:560px;object-fit:cover}
.tp-single-cover figcaption{padding:10px 16px;color:var(--tp-muted);font-size:14px;background:#fff}
.tp-single-layout{display:grid;grid-template-columns:minmax(0,760px) 320px;justify-content:center;gap:56px;align-items:start}
.tp-single-side{position:sticky;top:24px;display:flex;flex-direction:column;gap:16px}
.tp-side-box{padding:18px;border:1px solid var(--tp-line);border-radius:14px;background:#fff;font-family:var(--tp-font)}
.tp-side-contact{background:var(--tp-mint);border-color:#d5e8e1}
.tp-side-contact p{margin:8px 0 14px;color:#38534d;font-size:14px;line-height:1.55}
.tp-side-contact .tp-btn{width:100%;margin-top:8px}
.tp-side-product{display:grid;grid-template-columns:56px 1fr;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #edf1ee;text-decoration:none;color:var(--tp-ink)}
.tp-side-product:first-of-type{border-top:0}
.tp-side-product img{width:56px;height:56px;border-radius:10px;object-fit:cover;background:#eef1ee}
.tp-side-product strong{display:block;font-size:14px;line-height:1.35}
.tp-side-product small{display:block;margin-top:2px;color:var(--tp-muted);font-size:12px}
.tp-side-product:hover strong{color:var(--tp-accent-dark)}
.tp-single-foot{display:flex;flex-direction:column;gap:14px;margin-top:40px;padding-top:22px;border-top:1px solid var(--tp-line);font-size:14px}
.tp-tags,.tp-share{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tp-tags span,.tp-share span{color:var(--tp-muted);font-weight:700;margin-right:4px}
.tp-tags a{padding:5px 10px;border-radius:999px;background:var(--tp-mint);color:var(--tp-ink);text-decoration:none;font-weight:600}
.tp-share a,.tp-share button{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border:1px solid var(--tp-line);border-radius:9px;background:#fff;color:var(--tp-ink);font:700 13px/1 var(--tp-font);text-decoration:none;cursor:pointer}
.tp-share a:hover,.tp-share button:hover{border-color:#9fbdb2}
.tp-related-posts{margin-top:64px}
.tp-related-posts h2{margin:6px 0 22px;font-family:var(--tp-font);font-size:26px;color:var(--tp-ink)}

/* ---- Liên hệ */
.tp-contact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:36px}
.tp-contact-card{display:grid;grid-template-columns:44px 1fr;gap:12px;align-items:center;padding:16px;border:1px solid var(--tp-line);border-radius:14px;background:#fff;color:var(--tp-ink);text-decoration:none;font-family:var(--tp-font);transition:border-color .15s ease,box-shadow .15s ease}
.tp-contact-card:hover{border-color:#9fbdb2;box-shadow:var(--tp-shadow)}
.tp-contact-card small{display:block;color:var(--tp-muted);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.tp-contact-card strong{display:block;margin:2px 0;font-size:19px;line-height:1.2}
.tp-contact-card em{display:block;color:var(--tp-muted);font-size:13px;font-style:normal}
.tp-contact-card-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--tp-mint);color:var(--tp-ink)}
.tp-contact-card-icon .ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tp-contact-card.is-call{background:var(--tp-accent-dark);border-color:var(--tp-accent-dark);color:#fff}
.tp-contact-card.is-call small,.tp-contact-card.is-call em{color:#fbd9c8}
.tp-contact-card.is-call .tp-contact-card-icon{background:#fff;color:var(--tp-accent-dark)}
.tp-contact-card.is-zalo{background:var(--tp-zalo);border-color:var(--tp-zalo);color:#fff}
.tp-contact-card.is-zalo small,.tp-contact-card.is-zalo em{color:#d6e6ff}
.tp-contact-card.tp-zalo-mark.tp-contact-card-icon,.tp-contact-card .tp-zalo-mark{width:44px;height:44px;border-radius:12px;background:#fff}
.tp-contact-card .tp-zalo-mark .tp-zalo-glyph{width:34px;height:32px}
.tp-contact-card .tp-zalo-mark .zg-bubble{fill:var(--tp-zalo)}
.tp-contact-card .tp-zalo-mark .zg-word{fill:#fff}
.tp-contact-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
.tp-form{padding:28px;border:1px solid var(--tp-line);border-radius:20px;background:#fff;box-shadow:var(--tp-shadow);font-family:var(--tp-font)}
.tp-form h2{margin:6px 0 6px;font-size:24px;color:var(--tp-ink)}
.tp-form>p{margin:0 0 18px;color:var(--tp-muted);font-size:15px}
.tp-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}
.tp-form-grid label{display:flex;flex-direction:column;gap:6px;color:var(--tp-ink);font-size:13px;font-weight:700}
.tp-form-grid label.full{grid-column:1/-1}
.tp-form-grid em{color:var(--tp-accent-dark);font-style:normal}
.tp-opt{color:var(--tp-muted);font-weight:500}
.tp-form input,.tp-form select,.tp-form textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid #cfdcd6;border-radius:10px;background:#fbfdfc;color:var(--tp-ink);font:15px/1.4 var(--tp-font)}
.tp-form textarea{min-height:120px;resize:vertical}
.tp-form input:focus,.tp-form select:focus,.tp-form textarea:focus{outline:none;border-color:#7fa597;box-shadow:0 0 0 3px rgba(23,55,49,.08);background:#fff}
.tp-form button[type="submit"]{width:100%}
.tp-contact-place{display:flex;flex-direction:column;gap:14px}
.tp-map{overflow:hidden;border:1px solid var(--tp-line);border-radius:20px;background:#eef1ee;aspect-ratio:4/3}
.tp-map iframe{display:block;width:100%;height:100%;border:0}
.tp-contact-address{display:grid;grid-template-columns:44px 1fr;gap:12px;padding:18px;border:1px solid var(--tp-line);border-radius:14px;background:#fff;font-family:var(--tp-font)}
.tp-contact-address small{display:block;color:var(--tp-muted);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.tp-contact-address strong{display:block;margin:2px 0 6px;font-size:17px;color:var(--tp-ink)}
.tp-contact-address p{margin:0;color:var(--tp-muted);font-size:14px;line-height:1.55}
.tp-contact-content{max-width:760px;margin:48px auto 0}
.tp-contact-faq{margin:56px auto 0;max-width:860px;font-family:var(--tp-font)}
.tp-contact-faq h2{margin:6px 0 18px;font-size:26px;color:var(--tp-ink)}
.tp-faq-list details{border-top:1px solid var(--tp-line)}
.tp-faq-list details:last-child{border-bottom:1px solid var(--tp-line)}
.tp-faq-list summary{display:flex;justify-content:space-between;gap:16px;padding:18px 4px;cursor:pointer;list-style:none;color:var(--tp-ink);font-size:17px;font-weight:700}
.tp-faq-list summary::-webkit-details-marker{display:none}
.tp-faq-list summary::after{content:"+";color:var(--tp-accent-dark);font-size:22px;line-height:1}
.tp-faq-list details[open] summary::after{content:"−"}
.tp-faq-list details p{margin:0;padding:0 4px 18px;color:#38534d;font-size:16px;line-height:1.65}

/* ---- Responsive */
@media (max-width:1100px){
  .tp-single-layout{grid-template-columns:minmax(0,1fr);gap:32px}
  .tp-single-side{position:static}
  .tp-content-layout.has-toc{grid-template-columns:minmax(0,1fr)}
  .tp-content-layout .tp-toc-inner{position:static}
}
@media (max-width:900px){
  .tp-content-hero.has-image .tp-content-hero-grid{grid-template-columns:1fr}
  .tp-content-hero-media{aspect-ratio:16/9}
  .tp-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tp-post-card.is-featured{grid-template-columns:1fr}
  .tp-post-card.is-featured .tp-post-card-media{min-height:0;aspect-ratio:16/9}
  .tp-contact-grid{grid-template-columns:1fr}
  .tp-content-cta{flex-direction:column;align-items:flex-start}
}
@media (max-width:640px){
  .tp-wrap{width:calc(100% - 32px)}
  .tp-content-main{padding:32px 0 56px}
  .tp-content-hero-grid{padding:30px 0 28px;gap:22px}
  .tp-content-lead{font-size:16px}
  .tp-post-grid{grid-template-columns:1fr}
  .tp-post-card.is-featured .tp-post-card-body{padding:20px}
  .tp-prose{font-size:16px}
  .tp-form{padding:20px}
  .tp-form-grid{grid-template-columns:1fr}
  .tp-content-cta{padding:22px}
  .tp-content-cta-actions,.tp-content-cta-actions .tp-btn{width:100%}
}

/* ---- Trang FAQ + Sơ đồ website */
.tp-faq-page .tp-faq-group{margin-top:40px;max-width:none}
.tp-faq-page .tp-faq-group:first-of-type{margin-top:0}
.tp-faq-page .tp-chips{margin-bottom:36px}
.tp-sitemap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:40px}
.tp-sitemap ul ul{margin-top:6px}
@media (max-width:760px){.tp-sitemap{grid-template-columns:1fr}}
/* Thẻ liên hệ: chữ dài (email) tự xuống dòng thay vì bị cắt */
.tp-contact-card>span:last-child{min-width:0}
.tp-contact-card strong{overflow-wrap:anywhere;word-break:break-word}
