/* Adam Solutions — component DÙNG CHUNG giữa trang chủ và trang con.
   Tách khỏi home.css ở BUG-018: home.css chỉ nạp ở front page, nhưng trang con
   dùng lại markup dự án / danh mục / thương hiệu / quy trình / testimonial
   ⇒ 25 class mất CSS, lưới trả về `none`, ô rộng 1200px, section cao 7.556px.
   QUY TẮC: bất cứ class nào có thể xuất hiện ở NGOÀI trang chủ thì phải nằm ở đây. */

/* ============ 4. DỰ ÁN ============ */
.projects__head { display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: flex-end; justify-content: space-between; margin-bottom: var(--sp-6); }
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); }
/* Vuông + chữ micro — pill bo tròn lệch hẳn ngôn ngữ đồ hoạ mới (ENH-067) */
.filter-bar { gap: 0; border-bottom: 1px solid var(--a-border-soft); }
.filter-bar button {
	padding: 11px 16px; margin-bottom: -1px; border-radius: 0;
	border: 0; border-bottom: 1px solid transparent;
	background: transparent; color: var(--a-text-muted); cursor: pointer;
	font-family: var(--font-mono); font-size: var(--fs-hud);
	letter-spacing: var(--tr-hud); text-transform: uppercase;
	transition: .22s var(--ease);
}
.filter-bar button:hover { color: var(--a-text); border-bottom-color: var(--a-text-dim); }
.filter-bar button.is-active { background: transparent; color: var(--a-red); border-bottom-color: var(--a-red); }
.projects__grid { display: grid; gap: var(--sp-7) var(--sp-6); grid-template-columns: repeat(3, 1fr); }
.project-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--a-surface-2); }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover img { transform: scale(1.07); }
.project-card__overlay {
	position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
	padding: var(--sp-5); color: #fff;
	/* ENH-069: overlay dồn xuống dải đáy, phần trên ảnh để trống cho thấy rõ */
	background: linear-gradient(to top, rgba(6,6,8,.94) 0%, rgba(6,6,8,.42) 32%, transparent 58%);
}
.project-card__type { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--a-red-hover); margin-bottom: 8px; }
.project-card__title { font-size: 1.08rem; font-weight: 700; margin: 0 0 4px; color: #fff; line-height: 1.3; }
.project-card__meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: rgba(255,255,255,.6); margin: 0; }
.project-card__line { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--a-red); transition: width .4s var(--ease); }
.project-card:hover .project-card__line { width: 100%; }
.project-card.is-hidden, .project-cell.is-hidden { display: none; }

/* ============ 5. DANH MỤC SẢN PHẨM ============ */
.cats__grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(4, 1fr); }
.cat-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; background: var(--a-surface-2); border: 1px solid var(--a-border); }
/* ENH-069: bỏ làm mờ ảnh (opacity .5 → 1) — ảnh phải rõ, chỉ tối ở dải chữ */
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: .45s var(--ease); }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile__body {
	position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
	padding: var(--sp-4); background: linear-gradient(to top, rgba(8,8,10,.95) 0%, rgba(8,8,10,.6) 34%, transparent 62%);
}
.cat-tile__name { font-weight: 600; font-size: .95rem; color: #fff; margin: 0; letter-spacing: -.01em; }
.cat-tile__count { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--a-text-dim); margin: 4px 0 0; }
.cat-tile:hover { border-color: var(--a-red); }

/* ============ 6. THƯƠNG HIỆU ============ */
.brands { border-block: 1px solid var(--a-border-soft); padding-block: var(--sp-7); }
.brands__marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.brands__track { display: flex; gap: var(--sp-8); width: max-content; animation: marquee 34s linear infinite; }
.brands:hover .brands__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.brand-item {
	flex: none; display: grid; place-items: center; min-width: 150px; height: 58px;
	font-size: 1.22rem; font-weight: 800; letter-spacing: .03em;
	color: var(--a-text-dim); opacity: .62; transition: .25s var(--ease); white-space: nowrap;
}
.brand-item:hover { color: var(--a-text); opacity: 1; }

/* ============ 7. QUY TRÌNH ============ */
.process__grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.process-step { position: relative; padding-top: var(--sp-6); }
.process-step::before {
	content: ""; position: absolute; top: 20px; left: 0; right: 0; height: 1px;
	background: linear-gradient(to right, var(--a-border), transparent);
}
.process-step:last-child::before { background: var(--a-border); }
.process-step__num {
	position: relative; z-index: 1; display: block; margin-top: -30px; margin-bottom: var(--sp-4);
	color: var(--a-red); font-weight: 200; font-size: 2.4rem; line-height: 1; letter-spacing: -.03em;
	background: var(--a-bg-alt); width: fit-content; padding-right: var(--sp-3);
}
.section--alt .process-step__num { background: var(--a-bg-alt); }
.process-step__title { font-size: 1rem; margin-bottom: var(--sp-2); letter-spacing: -.01em; }
.process-step__text { font-size: .89rem; color: var(--a-text-muted); margin: 0; }

/* ============ 8. TESTIMONIAL ============ */
.quotes__grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(3, 1fr); }
.quote { padding: var(--sp-6); background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--radius); position: relative; }
.quote::before { content: "\201C"; position: absolute; top: 6px; right: 22px; font-size: 5rem; line-height: 1; color: var(--a-red); opacity: .16; font-family: Georgia, serif; }
.quote__text { color: var(--a-text-muted); font-size: .96rem; margin-bottom: var(--sp-5); position: relative; }
.quote__author { display: flex; align-items: center; gap: var(--sp-3); }
.quote__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--a-red-dim); color: var(--a-red); font-weight: 800; flex: none; }
.quote__name { font-weight: 700; font-size: .93rem; margin: 0; }
.quote__role { font-size: .82rem; color: var(--a-text-dim); margin: 0; }

/* ============ 9. TIN TỨC ============ */
.news__grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(3, 1fr); }
.news-card__date { font-size: .82rem; color: var(--a-text-dim); margin-bottom: var(--sp-2); }

/* ============ 10. CTA CUỐI ============ */
.cta-final { position: relative; overflow: hidden; background: var(--a-bg-alt); padding-block: clamp(60px, 8vw, 100px); }
.cta-final::before { content: ""; position: absolute; inset: 0; background: radial-gradient(820px 380px at 18% 50%, var(--a-red-dim), transparent 68%); }
.cta-final__inner { position: relative; display: grid; gap: var(--sp-8); grid-template-columns: 1fr 1fr; align-items: center; }
.cta-final h2 { margin-bottom: var(--sp-4); }
.cta-final p { color: var(--a-text-muted); margin-bottom: var(--sp-6); }
.cta-final__points { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.cta-final__points li { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--a-text-muted); font-size: .94rem; }
.cta-final__points svg { width: 19px; height: 19px; color: var(--a-red); flex: none; margin-top: 2px; }
.quote-form { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--radius); padding: var(--sp-6); box-shadow: var(--shadow); }
.quote-form h3 { margin-bottom: var(--sp-5); }


/* ============ Responsive ============ */
@media (max-width: 1080px) {
	.services__grid { grid-template-columns: repeat(2, 1fr); }
	.cats__grid { grid-template-columns: repeat(3, 1fr); }
	.process__grid { grid-template-columns: repeat(3, 1fr); row-gap: var(--sp-7); }
}
@media (max-width: 900px) {
	.projects__grid, .quotes__grid, .news__grid { grid-template-columns: repeat(2, 1fr); }
	.stats__grid { grid-template-columns: repeat(2, 1fr); }
	.stat:nth-child(2n) { border-right: 0; }
	.cta-final__inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.services__grid, .projects__grid, .quotes__grid, .news__grid, .process__grid { grid-template-columns: 1fr; }
	.cats__grid { grid-template-columns: repeat(2, 1fr); }
	.stat { border-right: 0; border-bottom: 1px solid var(--a-border-soft); }
	.stat:last-child { border-bottom: 0; }
	.process-step::before { display: none; }
	.process-step { padding-top: 0; }
	.process-step__num { margin-top: 0; }
}



/* ---- Dải video full-bleed (ENH-069) ---- */
.vband { position: relative; min-height: clamp(420px, 58vh, 640px); overflow: hidden; display: grid; align-items: end; }
.vband__v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Chỉ tối ở dải đáy — phần lớn khung hình để nguyên cho thấy rõ */
.vband__scrim {
	position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top, rgba(8,8,10,.88) 0%, rgba(8,8,10,.3) 26%, transparent 52%);
}
.vband__inner { position: relative; z-index: 1; padding-block: var(--sp-7); }
.vband__line {
	font-size: clamp(1.3rem, 1rem + 1.4vw, 2.1rem); font-weight: 700; letter-spacing: -.02em;
	color: #fff; margin: var(--sp-3) 0 0; max-width: 24ch; line-height: 1.16;
}
@media (prefers-reduced-motion: reduce) { .vband__v { display: none; } }


/* ---------- Sửa sót của BUG-018 (0.9.1) ----------
   `.dash-link--cta` trước nằm trong home.css (chỉ nạp ở trang chủ) nhưng được dùng ở
   /tin-tuc/, /san-pham/, 4 trang dịch vụ, /du-an/, single.php và 404.php ⇒ ngoài trang
   chủ nó rơi về `.dash-link` gốc (mono, in hoa, nhỏ, mờ) chứ không phải kiểu CTA. */
.dash-link--cta { color: var(--a-text); font-family: var(--font-body); font-size: .92rem; font-weight: 600; letter-spacing: 0; }
.dash-link--cta:hover { color: var(--a-red-hover); }
.dash-link--cta::before { background: repeating-linear-gradient(to right, var(--a-red) 0 4px, transparent 4px 8px); }

/* Phân trang: `the_posts_pagination()` dùng ở archive/search/tin-tuc mà chưa có CSS nào,
   trước đó hiện ra dạng link trần. */
.pagination { margin-top: var(--sp-7); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 12px;
	border: 1px solid var(--a-border); border-radius: var(--radius-sm);
	font-family: var(--font-mono); font-size: .82rem; color: var(--a-text-muted);
	transition: .2s var(--ease);
}
.pagination a.page-numbers:hover { border-color: var(--a-red); color: var(--a-text); }
.pagination .page-numbers.current { background: var(--a-red); border-color: var(--a-red); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; }

/* ---------- Gộp khối để rút ngắn trang chủ (Phase 84 · ENH-071) ---------- */
/* Dải logo hãng gộp vào cuối section "Danh mục thiết bị": bỏ padding section riêng,
   kéo lên sát lưới bên trên. GIỮ logo — đây là bằng chứng "hàng chính hãng". */
.brands--compact { padding-block: 0 var(--sp-7); margin-top: calc(var(--sp-6) * -1); background: transparent; }
.brands--compact .micro { margin-bottom: var(--sp-4) !important; }

/* Trang chủ chỉ hiện 1 trích dẫn: bỏ lưới nhiều cột, để nó đứng như một câu dẫn. */
.quotes--single .quotes__grid { grid-template-columns: 1fr; max-width: 720px; }
.quotes--single .section__head { margin-bottom: var(--sp-5); }

/* ═══════════ ENH-072 — chiều sâu 3D cho khối bán hàng / danh sách SP & DV ═══════════
   User: "không muốn ui/ux kiểu slider bình thường, muốn wow hơn, story telling hơi hơi 3D".
   Chốt: CSS transform, KHÔNG quay lại WebGL (giữ ENH-068 — đã xoá 670KB Three.js).
   Mức: tinh tế 4-6°.

   Phạm vi: danh mục thiết bị · 16 sản phẩm · 4 dịch vụ · gói giá · lưới dự án.
   KHÔNG áp cho `.spectable` — bảng tra cứu số liệu, chiều sâu làm khó đọc (user chốt bỏ).

   Nguyên tắc giữ 60fps (đã trả giá ở BUG-015/BUG-017/ENH-070):
   - Chỉ `transform` + `opacity` — hai thuộc tính chạy trên compositor.
   - KHÔNG `will-change` tĩnh: `main.js` chỉ bật lúc con trỏ vào card rồi tắt khi rời.
   - KHÔNG `contain`/`content-visibility` cho nhiều phần tử nhỏ — đã đo 2 lần, luôn tệ hơn.
   - Hiệu ứng vào là MỘT LẦN (qua `.reveal`), không chạy theo từng frame cuộn. */

.prodgrid, .pkgs, .bigist, .projects__grid, .cats__grid { perspective: 1400px; }

/* Lớp bên trong nhô ra trước — chỉ khi con trỏ đang trên card, nên không tốn gì lúc cuộn. */
.prod, .pkg, .project-card, .cat-tile, .bigist__link { transform-style: preserve-3d; }
/* CHỈ khai `transition`, KHÔNG đặt `transform: translateZ(0)` tĩnh: làm vậy tạo layer
   compositor cho MỌI ảnh sản phẩm/dự án dù không ai rê chuột — đúng thứ BUG-017 đã đo là
   không giúp gì. `preserve-3d` ở card cha là đủ. */
.prod__media, .cat-tile > img, .project-card img { transition: transform .35s var(--ease); }
.prod__body, .cat-tile__body, .project-card__overlay, .pkg__n, .bigist__h { transition: transform .35s var(--ease); }

.prod:hover .prod__media { transform: translateZ(18px) scale(1.02); }
.cat-tile:hover > img { transform: translateZ(14px) scale(1.04); }
.prod:hover .prod__body,
.cat-tile:hover .cat-tile__body { transform: translateZ(34px); }
.project-card:hover .project-card__overlay { transform: translateZ(30px); }
.pkg:hover .pkg__n { transform: translateZ(26px); }
.bigist__link:hover .bigist__h { transform: translateZ(22px); }

/* Hiệu ứng VÀO: card ngả nhẹ ra sau rồi dựng thẳng khi cuộn tới — đây là phần "kể chuyện".
   Chạy một lần qua `.reveal` (IntersectionObserver), không phải mỗi frame. */
.prodgrid .reveal, .pkgs .reveal, .projects__grid .reveal, .cats__grid .reveal, .bigist .reveal {
	transform: translateY(26px) rotateX(7deg);
	transform-origin: 50% 100%;
}
.prodgrid .reveal.is-visible, .pkgs .reveal.is-visible,
.projects__grid .reveal.is-visible, .cats__grid .reveal.is-visible,
.bigist .reveal.is-visible { transform: none; }

/* Cảm ứng: không có con trỏ nên không nghiêng được — giữ hiệu ứng VÀO (chạy theo cuộn),
   đó là phương án tương đương chứ không phải bản cắt xén. */
@media (hover: none) {
	.prod:hover .prod__media, .cat-tile:hover > img,
	.prod:hover .prod__body, .cat-tile:hover .cat-tile__body,
	.project-card:hover .project-card__overlay,
	.pkg:hover .pkg__n, .bigist__link:hover .bigist__h { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.prodgrid, .pkgs, .bigist, .projects__grid, .cats__grid { perspective: none; }
	.prodgrid .reveal, .pkgs .reveal, .projects__grid .reveal,
	.cats__grid .reveal, .bigist .reveal { transform: none; }
	.prod__media, .cat-tile > img, .project-card img,
	.prod__body, .cat-tile__body, .project-card__overlay,
	.pkg__n, .bigist__h { transition: none; transform: none !important; }
}
