/* ==========================================================================
   CADCENTER — main.css (theme WordPress)
   Một file CSS duy nhất cho toàn site. Không dùng framework.
   Thiết kế mobile-first: style mặc định cho điện thoại,
   @media (min-width: …) bổ sung cho màn hình lớn hơn.

   Mục lục
   1. Biến màu, font, khoảng cách (design tokens)
   2. Reset & nền tảng
   3. Tiện ích (container, skip link, sr-only)
   4. Header & menu
   5. Hero slideshow
   6. Lối tắt (4 ô điểm mạnh)
   7. Section + carousel thẻ
   8. Trang mục (danh sách sản phẩm)
   9. Footer
   10. Thanh liên hệ cố định (mobile)
   11. Giảm chuyển động
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Màu lấy từ logo (#1D8BED) + bản đậm hơn cho chữ/nút để đủ tương phản */
  --blue-logo: #1D8BED;   /* điểm nhấn, đường kẻ */
  --blue: #1667B8;        /* nút, link — tương phản 5.6:1 trên nền trắng */
  --blue-dark: #0F4F8F;   /* hover */
  --blue-tint: #E8F2FC;   /* nền icon, pill */
  --ink: #14212E;         /* chữ chính */
  --ink-2: #4A5868;       /* chữ đoạn */
  --ink-3: #5A6878;       /* chữ phụ */
  --line: #DCE4EC;        /* viền thẻ */
  --line-2: #E3E9F0;      /* viền section */
  --bg: #FFFFFF;
  --bg-alt: #F4F7FA;      /* nền section xen kẽ */
  --bg-footer: #EEF4FA;

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 60px;
  --bar-h: 68px;          /* chiều cao thanh liên hệ dưới đáy (mobile) */
  --gutter: 16px;
}
@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 72px; }
}

/* 2. RESET & NỀN TẢNG ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  /* chừa chỗ cho thanh liên hệ cố định ở đáy trên mobile */
  padding-bottom: var(--bar-h);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-logo); outline-offset: 2px; border-radius: 4px; }

/* 3. TIỆN ÍCH ------------------------------------------------------------ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; color: #fff; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--blue-tint); color: var(--blue); font-weight: 600; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); background: var(--blue); color: #fff; font-weight: 600; font-size: 15px; border: 0; }
.btn:hover { background: var(--blue-dark); color: #fff; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #C5D2DF; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }

/* 4. HEADER & MENU ------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line-2); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.logo img { height: 44px; width: auto; }
.header-call { display: none; }                 /* chỉ hiện trên desktop */
.menu-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 8px; border: 0; background: none; font-weight: 600; font-size: 15px; }

/* --- Menu mobile: panel toàn màn hình --- */
.site-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  background: #fff; overflow-y: auto; padding: 4px var(--gutter) calc(var(--bar-h) + 24px);
  visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s;
}
.nav-open .site-nav { visibility: visible; opacity: 1; }
.nav-open { overflow: hidden; }                 /* khóa cuộn nền khi mở menu */
.nav-list > li { border-bottom: 1px solid var(--line-2); }
.nav-row { display: flex; align-items: center; justify-content: space-between; }
.nav-link { flex: 1; display: flex; align-items: center; min-height: 56px; font-weight: 600; font-size: 18px; color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--blue); }
.sub-toggle { width: 48px; height: 48px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); }
.sub-toggle .icon { transition: transform .2s; }
.has-sub.is-open .sub-toggle .icon { transform: rotate(180deg); }
.sub-menu { display: none; padding: 0 0 10px 12px; }
.has-sub.is-open .sub-menu { display: block; }
.sub-menu a { display: flex; align-items: center; min-height: 48px; color: var(--ink); font-size: 16px; }

/* --- Menu desktop: ngang, dropdown khi rê chuột / focus / bấm --- */
@media (min-width: 1024px) {
  .logo img { height: 52px; }
  .menu-toggle { display: none; }
  .header-call { display: inline-flex; }
  .site-nav { position: static; visibility: visible; opacity: 1; padding: 0; overflow: visible; background: none; }
  .nav-list { display: flex; align-items: center; }
  .nav-list > li { position: relative; border: 0; }
  .nav-link { min-height: 44px; padding: 0 4px 0 12px; font-size: 15px; font-weight: 500; border-bottom: 2px solid transparent; }
  .nav-list > li:not(.has-sub) .nav-link { padding-right: 12px; }
  .nav-link:hover { color: var(--blue); }
  .nav-link[aria-current="page"] { font-weight: 600; border-bottom-color: var(--blue-logo); }
  .sub-toggle { width: 24px; height: 44px; }
  .sub-toggle .icon { width: 14px; height: 14px; }
  .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 10px 28px rgba(20, 33, 46, .10);
  }
  /* mở dropdown: rê chuột, dùng bàn phím (focus-within) hoặc bấm mũi tên (is-open) */
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: block; }
  .sub-menu a { min-height: 40px; padding: 0 12px; border-radius: 6px; font-size: 15px; }
  .sub-menu a:hover { background: #EEF4FA; color: var(--blue); }
}

/* 5. HERO SLIDESHOW ------------------------------------------------------ */
.hero { background: var(--bg-alt); border-bottom: 1px solid var(--line-2); padding: 28px 0 8px; }
.slides { position: relative; min-height: 250px; }
.slide { display: none; }
.slide.is-active { display: block; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.slide-link { display: grid; gap: 32px; align-items: center; color: var(--ink); }
.slide-link:hover { color: var(--ink); }
.slide-title { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 10px 0; }
.slide-intro { color: var(--ink-2); margin-bottom: 18px; max-width: 540px; }
.slide-art { display: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.slide-art .art-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }
.slider-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
.slider-controls .icon-btn { display: none; }   /* mobile: vuốt + chấm là đủ */
.dots { display: flex; gap: 6px; }
.dot { width: 26px; height: 44px; padding: 0; border: 0; background: none; display: flex; align-items: center; }
.dot::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: #C5D2DF; }
.dot[aria-current="true"]::before { background: var(--blue); }

@media (min-width: 900px) {
  .hero { padding: 64px 0 32px; }
  .slides { min-height: 400px; display: flex; align-items: center; }
  .slide { width: 100%; }
  .slide-link { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .slide-title { font-size: 48px; margin: 16px 0 18px; }
  .slide-intro { font-size: 18px; margin-bottom: 28px; }
  .slide-art { display: block; }
  .slider-controls { justify-content: flex-start; margin-top: 24px; }
  .slider-controls .icon-btn { display: inline-flex; }
}

/* 6. LỐI TẮT (4 ô) ------------------------------------------------------ */
.quick { border-bottom: 1px solid var(--line-2); padding: 12px 0; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; gap: 12px; align-items: flex-start; min-height: 64px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.quick a:hover { border-color: var(--blue-logo); }
.quick .icon { color: var(--blue); display: none; }
.quick strong { display: block; font-size: 15px; font-weight: 600; }
.quick span { font-size: 13px; font-weight: 600; color: var(--blue); }
@media (min-width: 768px) {
  .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick a { border-color: transparent; }
  .quick a:hover { background: var(--bg-alt); border-color: transparent; }
  .quick .icon { display: block; }
}

/* 7. SECTION + CAROUSEL -------------------------------------------------- */
.section { padding: 36px 0; border-bottom: 1px solid var(--line-2); }
.section--alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.section-title { font-size: 24px; margin-top: 4px; }
.section-title a { color: var(--ink); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.section-title a:hover { color: var(--blue); }
.section-lead { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.section-actions { display: flex; align-items: center; gap: 10px; }
.section-actions .icon-btn { display: none; }   /* mobile: vuốt ngang */
.swipe-hint { margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* track: hàng thẻ cuộn ngang, có snap; trên mobile thẻ rộng 80% để "ló" thẻ kế tiếp */
.track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter);
  scroll-padding: 0 var(--gutter);
}
.track::-webkit-scrollbar { display: none; }
.card { flex: 0 0 80%; scroll-snap-align: start; }
.card > a {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
}
.card > a:hover { border-color: var(--blue-logo); color: var(--ink); }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--blue-tint); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.card-cat { font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-transform: uppercase; }
.card-title { font-size: 17px; font-weight: 600; line-height: 1.35; }
.card-desc { font-size: 14px; color: var(--ink-3); }
/* thẻ tin tức: ảnh đại diện tỉ lệ cố định để không bị "nhảy" layout khi ảnh tải */
.card--news > a { padding: 0; overflow: hidden; }
.card-thumb { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; background: #DCE6F0; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.card-meta { font-size: 13px; color: var(--ink-3); }
.card-meta b { color: var(--blue); font-weight: 600; }

@media (min-width: 768px) {
  .card { flex-basis: calc((100% - 24px) / 3); }
}
@media (min-width: 1024px) {
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 28px; }
  .section-title { font-size: 36px; }
  .section-lead { font-size: 17px; }
  .section-actions .icon-btn { display: inline-flex; }
  .swipe-hint { display: none; }
  .track { gap: 20px; margin: 0; padding: 2px; scroll-padding: 0; }
  .card { flex-basis: calc((100% - 60px) / 4); }
  .card > a { padding: 26px; }
  .card--news > a { padding: 0; }
  .card-title { font-size: 19px; }
  .card-desc { font-size: 15px; }
}
/* ≤ 4 thẻ: JS gắn thuộc tính hidden cho cụm mũi tên */
.section-actions .icon-btn[hidden] { display: none; }

/* 8. TRANG MỤC ----------------------------------------------------------- */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line-2); padding: 20px 0 24px; }
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb ol { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; }
.page-title { font-size: 28px; margin-bottom: 6px; }
.page-lead { color: var(--ink-2); font-size: 15px; max-width: 640px; }
.list { display: grid; gap: 10px; padding: 16px 0 40px; }
/* mobile: dạng danh sách 1 cột (icon – chữ – mũi tên) */
.list .card > a { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
.list .card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list .chev { color: var(--ink-3); }
@media (min-width: 768px) {
  .page-head { padding: 40px 0 44px; }
  .page-title { font-size: 44px; }
  .page-lead { font-size: 18px; }
  .list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 48px 0 80px; }
  .list .card > a { flex-direction: column; align-items: flex-start; padding: 26px; }
  .list .chev { display: none; }
}

/* 9. FOOTER -------------------------------------------------------------- */
.site-footer { background: var(--bg-footer); color: var(--ink-2); font-size: 14px; border-top: 3px solid var(--blue-logo); }
.footer-grid { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 24px; }
.footer-logo { height: 52px; width: auto; margin-bottom: 12px; mix-blend-mode: multiply; }
.footer-title { color: var(--ink); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.footer-contact a { display: flex; align-items: center; min-height: 44px; font-weight: 600; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-links a { display: flex; align-items: center; min-height: 40px; color: var(--ink-2); }
.footer-bottom { border-top: 1px solid #D3DEE9; padding-top: 16px; padding-bottom: 20px; font-size: 13px; color: var(--ink-3); }
@media (min-width: 768px) {
  .site-footer { font-size: 15px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 28px; }
}

/* 10. THANH LIÊN HỆ CỐ ĐỊNH (mobile) ------------------------------------- */
.contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 6px; height: var(--bar-h);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(20, 33, 46, .06);
}
.contact-bar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--ink); }
.contact-bar .icon { color: var(--blue); width: 22px; height: 22px; }
.contact-bar .bar-call { flex: 1.5; flex-direction: row; gap: 8px; font-size: 15px; background: var(--blue); color: #fff; }
.contact-bar .bar-call .icon { color: #fff; }
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .contact-bar { display: none; }      /* desktop đã có nút gọi trên header */
}

/* 11. GIẢM CHUYỂN ĐỘNG — tôn trọng cài đặt của người dùng ------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.site-footer address { font-style: normal; margin-top: 6px; }

/* ==========================================================================
   12. BỔ SUNG CHO THEME WORDPRESS
   ========================================================================== */

/* WordPress: chừa chỗ cho thanh quản trị khi đăng nhập */
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
.admin-bar .site-nav { inset: calc(var(--header-h) + 46px) 0 0 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container--narrow { max-width: 800px; }
.empty-note { color: var(--ink-3); font-size: 15px; padding: 8px 0; }
.empty-note--page { padding: 40px 0 64px; }
.footer-links ul, .footer-links li { list-style: none; margin: 0; padding: 0; }
.footer-contact .icon { margin-right: 8px; color: var(--blue); }

/* Thẻ: chữ trong thẻ icon; ảnh đại diện; thẻ chưa có ảnh */
.card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.track .chev { display: none; }
img.card-thumb { display: block; }
.card-thumb--empty { display: flex; align-items: center; justify-content: center; color: var(--blue); background: var(--blue-tint); }
.card-thumb--empty .icon { width: 40px; height: 40px; stroke-width: 1.5; }

/* Trang mục: mục con dạng nút tròn; tin tức trên điện thoại = ảnh nhỏ bên trái */
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.list .card--news > a { flex-direction: row; align-items: center; gap: 12px; padding: 10px; }
.list .card--news .card-thumb { width: 96px; height: 72px; aspect-ratio: auto; flex: none; border-radius: 8px; }
.list .card--news .card-body { padding: 0; }
@media (min-width: 768px) {
  .list .card--news > a { flex-direction: column; align-items: stretch; padding: 0; }
  .list .card--news .card-thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; }
  .list .card--news .card-body { padding: 16px 18px 18px; }
}

/* Phân trang */
.pagination { margin: 0 0 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: #fff; }
.pagination .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Trang bài viết ---------- */
.article-head { background: var(--bg-alt); border-bottom: 1px solid var(--line-2); padding: 20px 0 16px; }
.article-title { font-size: 26px; line-height: 1.25; letter-spacing: -0.015em; margin: 4px 0 10px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; color: var(--ink-3); margin-bottom: 12px; }
.article-cat { font-weight: 600; }
.views { display: inline-flex; align-items: center; gap: 4px; }
.article-cover { margin: 20px 0 0; }
.article-cover img { width: 100%; height: auto; border-radius: var(--radius); }
@media (min-width: 768px) {
  .article-head { padding: 36px 0 24px; }
  .article-title { font-size: 38px; }
}

/* Nội dung bài (soạn bằng trình soạn thảo WordPress) */
.entry-content { padding: 24px 0 8px; font-size: 17px; line-height: 1.75; color: #1d2b39; overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 24px; margin-top: 1.8em; }
.entry-content h3 { font-size: 20px; margin-top: 1.5em; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content figure { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content ul { list-style: disc; }
.entry-content li + li { margin-top: .35em; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { height: auto; border-radius: 8px; cursor: zoom-in; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption { font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 6px; }
.entry-content blockquote { margin-left: 0; padding: 12px 16px; border-left: 3px solid var(--blue-logo); background: var(--bg-alt); border-radius: 0 8px 8px 0; }
.entry-content code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; }
.entry-content pre { font-family: var(--mono); font-size: 14px; background: #0f1b27; color: #e6edf3; padding: 16px; border-radius: 8px; overflow-x: auto; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry-content th { background: var(--bg-alt); }
.entry-content .wp-block-image, .entry-content .wp-block-embed { margin-left: 0; margin-right: 0; }
.entry-content .alignwide, .entry-content .alignfull { width: 100%; }
.page-content { padding-bottom: 48px; }
@media (min-width: 768px) { .entry-content h2 { font-size: 28px; } }

/* Thẻ (tag) */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.tags a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); font-size: 14px; }

/* Nút chia sẻ */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font-size: 14px; color: var(--ink-3); margin-right: 2px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.share-btn:hover { border-color: var(--blue); color: var(--blue); }
.share-fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.share-fb:hover { background: #0b5fcc; border-color: #0b5fcc; color: #fff; }
.share-btn.is-done { border-color: #1a7f37; color: #1a7f37; }
.article-end { margin: 28px 0 40px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.article-end-title { font-weight: 600; margin-bottom: 10px; }

/* Bài liên quan: 3 bài trên điện thoại, 4 bài trên máy tính */
.related .section-title { margin-bottom: 16px; }
.related-list { padding: 0 0 8px; }
.related-list > li:nth-child(4) { display: none; }
.related-cta { color: var(--ink-2); font-size: 15px; }
@media (min-width: 768px) {
  .related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 0 16px; }
  .related-list > li:nth-child(4) { display: block; }
}
@media (min-width: 1024px) { .related-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Video YouTube nhúng nhẹ: ảnh + nút ▶, bấm mới tải trình phát */
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.yt-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; opacity: .9; cursor: pointer; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: #FF0000; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Phóng to ảnh khi chạm */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(10, 16, 22, .92); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-close { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

/* Trang Liên hệ */
.contact-cards { display: grid; gap: 10px; list-style: none; padding: 24px 0 56px; margin: 0; }
.contact-cards a, .contact-item { display: flex; gap: 14px; align-items: flex-start; min-height: 64px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.contact-cards a:hover { border-color: var(--blue-logo); }
.contact-cards .icon { color: var(--blue); margin-top: 2px; }
.contact-cards b { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.contact-cards small { display: block; margin-top: 4px; color: var(--blue); font-weight: 600; font-size: 13px; }
@media (min-width: 768px) {
  .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-wide { grid-column: 1 / -1; }
}
.page-head .page-lead p { margin: 0; }

/* Trang bài viết: ẩn mục cuối của breadcrumb (chính là tiêu đề H1 ngay bên dưới) → gọn trên điện thoại.
   Vẫn giữ trong mã (BreadcrumbList JSON-LD) cho Google. */
.article-head .breadcrumb li[aria-current] { display: none; }
@media (max-width: 479px) { .share-label { display: none; } }


/* Slide: hình minh họa SVG phủ kín khung */
.slide-illus { padding: 0; overflow: hidden; }
.slide-illus svg { display: block; width: 100%; height: auto; }

/* Bảng so sánh gói phần mềm trong bài (khối Bảng của WordPress) */
.entry-content .wp-block-table { margin-top: 1.4em; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.entry-content .wp-block-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.entry-content .wp-block-table th,
.entry-content .wp-block-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.entry-content .wp-block-table th:first-child,
.entry-content .wp-block-table td:first-child { text-align: left; }
.entry-content .wp-block-table thead th { background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; border-bottom: 0; }
.entry-content .wp-block-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.entry-content .wp-block-table tbody tr:last-child td { border-bottom: 0; }
.entry-content .wp-block-table .ok { color: #1A9E5A; font-weight: 700; font-size: 18px; }
.entry-content .wp-block-table .no { color: #B7C3CF; }
.entry-content .wp-block-table figcaption { font-size: 13px; color: var(--ink-3); padding: 8px 12px; text-align: left; margin: 0; }
.entry-content .wp-block-table.is-wide table { font-size: 14px; min-width: 640px; }
.entry-content .wp-block-table th:first-child,
.entry-content .wp-block-table td:first-child { min-width: 200px; width: 34%; }
.entry-content .wp-block-table.is-wide thead th { font-size: 13px; padding: 10px 8px; }

/* Bảng trên điện thoại: cột tính năng cố định, thấy 2 cột sản phẩm, vuốt ngang xem thêm */
.tbl-wrap { position: relative; margin-top: 1.4em; }
.tbl-wrap .wp-block-table { margin-top: 0; }
.entry-content .wp-block-table table { display: table; overflow: visible; }
.tbl-hint { display: none; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--blue); }
.tbl-hint svg { width: 18px; height: 18px; animation: tblNudge 1.4s ease-in-out infinite; }
@keyframes tblNudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.tbl-wrap.has-more .tbl-hint { display: flex; }
.tbl-wrap.has-more::after { content: ""; position: absolute; top: 30px; right: 1px; bottom: 1px; width: 36px; pointer-events: none; border-radius: 0 10px 10px 0;
	background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95)); transition: opacity .2s; }
.tbl-wrap.has-more.at-end::after { opacity: 0; }
@media (max-width: 640px) {
	.entry-content .wp-block-table table,
	.entry-content .wp-block-table.is-wide table { width: auto; min-width: 100%; font-size: 14px; }
	.entry-content .wp-block-table th,
	.entry-content .wp-block-table td { min-width: calc((100vw - 34px) * .3); width: auto; padding: 10px 8px; }
	.entry-content .wp-block-table th:first-child,
	.entry-content .wp-block-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: calc((100vw - 34px) * .4); max-width: calc((100vw - 34px) * .4); width: auto;
		background: #fff; box-shadow: 1px 0 0 var(--line); }
	.entry-content .wp-block-table tbody tr:nth-child(even) td:first-child { background: var(--bg-alt); }
	.entry-content .wp-block-table thead th:first-child { background: var(--blue); }
	.entry-content .wp-block-table.is-wide thead th { font-size: 13px; }
	.entry-content .wp-block-table figcaption { position: sticky; left: 0; width: calc(100vw - 34px); box-sizing: border-box; }
}

/* Hero v1.0.5: hình phủ cả khung slide, chữ đè bên trái có lớp nền mờ để dễ đọc */
@media (max-width: 899px) { .slide-title { font-size: 24px; } }
@media (min-width: 900px) {
  .hero { position: relative; overflow: hidden; padding: 56px 0 28px; }
  .hero .slides { position: static; min-height: 380px; }
  .hero .slide, .hero .slide-link { position: static; }
  .slide-link { grid-template-columns: 1fr; }
  .slide-link > div:first-child { position: relative; z-index: 2; max-width: 540px; }
  .slide-title { font-size: 38px; line-height: 1.18; margin: 12px 0 16px; }
  .slide-intro { font-size: 17px; }
  .slide-art { position: absolute; top: 20px; right: 0; bottom: 20px; width: 60%; z-index: 1;
    background: none; border: 0; border-radius: 0; padding: 0; }
  .slide-art .art-head { display: none; }
  .slide-art svg { display: block; width: 100%; height: 100%; }
  .slide-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, var(--bg-alt) 0%, rgba(244,247,250,.9) 10%, rgba(244,247,250,.5) 22%, rgba(244,247,250,0) 36%); }
  .hero .slider-controls { position: relative; z-index: 2; }
}
@media (min-width: 900px) and (max-width: 1199px) { .slide-art { width: 52%; } .slide-link > div:first-child { max-width: 470px; } }
/* v1.0.6: hình nằm gọn trong khung nội dung (container), không tràn ra mép màn hình rộng */
@media (min-width: 900px) {
  .hero { overflow: visible; }
  .hero .container { position: relative; }
  .slide-art { top: 0; bottom: 0; right: var(--gutter); width: 56%; }
  .slide-link > div:first-child { max-width: 500px; }
}
@media (min-width: 900px) and (max-width: 1199px) { .slide-art { width: 52%; } .slide-link > div:first-child { max-width: 470px; } }
