/* =========================================================
   Việt Nhật Solar – giao diện website
   ========================================================= */
:root {
    --navy: #002c6c;
    --navy-2: #0b3a8c;
    --navy-dark: #01214c;
    --ink: #0c1857;
    --blue: #2b3aa8;
    --orange: #fb7d03;
    --orange-2: #ff9a1f;
    --red: #e5141e;
    --text: #1d2433;
    --muted: #5b6475;
    --line: #e3e7f0;
    --soft: #eaf2fe;
    --radius: 10px;
    --shadow: 0 4px 18px rgba(0, 44, 108, .08);
    --container: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.55; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 15px; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; vertical-align: -.125em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; padding: 10px 20px; font-weight: 700; font-size: 15px; line-height: 1.2; transition: .2s; white-space: nowrap; }
.btn-orange { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; box-shadow: 0 4px 12px rgba(251, 125, 3, .3); }
.btn-orange:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { color: #fff; background: var(--navy-2); }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #fff; font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 32px; gap: 16px; }
.topbar-left { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-left .icon { color: var(--orange-2); font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.topbar-right a { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.topbar-right a:hover { color: var(--orange-2); }
.topbar-right .sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .35); }
.topbar-right .ico-flag { color: var(--orange-2); }
.topbar-social { display: flex; gap: 6px; margin-left: 4px; }
.topbar-social a { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.topbar-social svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.header { background: #fff; position: relative; z-index: 50; }
.header-main { display: flex; align-items: center; gap: 28px; height: 78px; }
.logo { flex: 0 0 auto; display: block; }
.logo img { height: 58px; width: auto; }
.search { flex: 1; max-width: 400px; margin-left: 30px; display: flex; height: 38px; border: 1px solid #d5dbe7; border-radius: 6px; overflow: hidden; background: #fff; }
.search input { flex: 1; border: 0; outline: 0; padding: 0 14px; font-size: 14px; color: var(--text); min-width: 0; }
.search input::placeholder { color: #6b7280; }
.search button { width: 48px; border: 0; background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; font-size: 19px; display: grid; place-items: center; }
.header-hotline { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-hotline .ring { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--orange); color: var(--orange); display: grid; place-items: center; font-size: 19px; }
.header-hotline small { display: block; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.header-hotline strong { display: block; font-size: 22px; font-weight: 800; color: var(--red); line-height: 1.15; letter-spacing: .2px; }
.header-quote { margin-left: 22px; height: 40px; padding: 0 22px; }
.header-quote .icon { font-size: 18px; }
.header-cart { position: relative; width: 40px; height: 40px; border-radius: 50%; display: none; place-items: center; color: var(--navy); font-size: 22px; }
.header-cart .count { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.nav-toggle { display: none; border: 0; background: none; color: var(--navy); font-size: 28px; padding: 4px; }

/* ---------- Nav ---------- */
.nav { background: var(--navy); }
.nav > .container > ul { list-style: none; display: flex; justify-content: space-between; padding: 0 70px 0 110px; }
.nav li { position: relative; }
.nav > .container > ul > li > a { display: flex; align-items: center; gap: 5px; height: 44px; padding: 0 16px; color: #fff; font-weight: 600; font-size: 15px; position: relative; }
.nav > .container > ul > li > a .icon { font-size: 10px; opacity: .9; }
.nav > .container > ul > li > a::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 4px; background: var(--orange); border-radius: 2px 2px 0 0; transform: scaleX(0); transition: .2s; }
.nav > .container > ul > li.active > a::after, .nav > .container > ul > li:hover > a::after { transform: none; }
.nav > .container > ul > li:hover > a { color: #fff; }
.nav .sub { position: absolute; top: 100%; left: 0; min-width: 270px; background: #fff; border-radius: 0 0 8px 8px; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); list-style: none; padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; }
.nav li:hover > .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { display: block; padding: 9px 18px; font-size: 14px; color: var(--text); font-weight: 500; }
.nav .sub a:hover { background: var(--soft); color: var(--navy); }
.nav .sub .sub { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; padding: 0 0 0 12px; min-width: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: #0a3f95; }
.hero-track { display: flex; transition: transform .6s ease; }
.hero-slide { position: relative; flex: 0 0 100%; height: 300px; overflow: hidden;
    background: radial-gradient(120% 140% at 0% 30%, #0a54b8 0%, #0047a6 35%, #0a3c8f 60%, #072f78 100%); }
.hero-slide.has-bg { background-size: cover; background-position: center; }
.hero-swoosh { position: absolute; left: 0; bottom: 0; width: 46%; height: 100%; pointer-events: none; }
.hero-img { position: absolute; right: 0; top: 0; height: 100%; width: 57%; object-fit: cover; object-position: left center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%); mask-image: linear-gradient(90deg, transparent 0, #000 7%); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-left: 66px; color: #fff; max-width: 560px; }
.hero-eyebrow { font-size: 28px; font-weight: 800; font-style: italic; line-height: 1.15; letter-spacing: -.3px; text-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.hero-title { font-size: 43px; font-weight: 800; font-style: italic; line-height: 1.12; letter-spacing: -.5px; margin: 0 0 10px; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.hero-desc { font-size: 17.5px; font-style: italic; font-weight: 600; line-height: 1.38; margin: 0 0 14px 4px; }
.hero-features { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px 4px; font-size: 12px; font-weight: 500; }
.hero-features li { display: flex; align-items: center; gap: 6px; }
.hero-features .icon { font-size: 16px; }
.hero-content .btn { align-self: flex-start; margin-left: 4px; padding: 10px 20px; font-size: 16px; }
.hero-dots { position: absolute; z-index: 3; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; }
.hero-dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0; background: var(--orange); }
.hero-dots button.active { background: #fff; }

/* ---------- USP ---------- */
.usp { position: relative; z-index: 2; background: #fff; box-shadow: 0 6px 20px rgba(0, 44, 108, .07); }
.usp .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.usp-item { display: flex; align-items: center; gap: 14px; padding: 12px 8px 12px 20px; position: relative; }
.usp-item + .usp-item::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 1px; background: #d9dfe9; }
.usp-item img { width: 44px; height: 44px; object-fit: contain; }
.usp-item h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.usp-item p { margin: 1px 0 0; font-size: 13.5px; color: #3b4252; white-space: nowrap; }

/* ---------- Section ---------- */
.section { padding: 16px 0 4px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; gap: 12px; }
.section-title { font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; position: relative; padding-bottom: 9px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 58px; height: 4px; background: var(--orange); border-radius: 2px; }
.see-all { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 700; font-size: 14px; white-space: nowrap; padding-bottom: 8px; }
.see-all .icon { font-size: 16px; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 0 10px; border-radius: 10px; overflow: hidden;
    background: #dce9fd; transition: .2s; } /* trùng màu nền ảnh danh mục */
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.cat-card img { width: 100%; aspect-ratio: 284 / 146; object-fit: cover;
    -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent); } /* mép dưới ảnh hoà vào nền thẻ */
.cat-card h3 { font-size: 15px; font-weight: 800; color: #111; margin-top: -2px; }
.cat-card span { font-size: 13.5px; color: #333; }

/* ---------- Product cards / carousel ---------- */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; margin: -6px; padding: 6px; }
.carousel-track { display: flex; gap: 18px; transition: transform .45s ease; }
.carousel-track > * { flex: 0 0 calc((100% - 18px * 4) / 5); min-width: 0; }
.carousel-btn { position: absolute; top: 46%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--navy);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .15); display: grid; place-items: center; font-size: 17px; z-index: 3; }
.carousel-btn:hover { background: var(--navy); color: #fff; }
.carousel-btn.prev { left: -44px; }
.carousel-btn.next { right: -44px; }
.carousel-btn[disabled] { opacity: .7; cursor: default; }

.p-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #e6e9f0; border-radius: 10px; padding: 10px 12px 12px; box-shadow: 0 2px 10px rgba(0, 44, 108, .05); transition: .2s; }
.p-card:hover { box-shadow: 0 8px 24px rgba(0, 44, 108, .12); }
.p-badge { position: absolute; top: 12px; left: 14px; z-index: 2; background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 5px; }
.p-thumb { display: block; aspect-ratio: 348 / 164; margin: 0 -8px; }
.p-thumb img { width: 100%; height: 100%; object-fit: contain; }
.p-name { font-size: 14.5px; font-weight: 700; line-height: 1.32; color: #111; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.p-name a:hover { color: var(--navy); }
.p-price { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; margin: 4px 0 9px; white-space: nowrap; }
.p-price strong { color: var(--red); font-size: 15.5px; font-weight: 800; letter-spacing: -.4px; }
.p-price del { color: #777; font-size: 10px; letter-spacing: -.3px; }
.p-price .off { background: #ffe1e1; color: var(--red); font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; }
.p-card form, .p-card > .btn { margin-top: auto; }
.p-card .btn { padding: 7px 12px; font-size: 14px; font-weight: 600; width: calc(100% - 20px); margin-left: 10px; }
.p-card .btn .icon { font-size: 17px; }

.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- Why us ---------- */
.why { display: grid; grid-template-columns: 250px 1fr; align-items: center; gap: 10px; padding-top: 16px; padding-bottom: 14px; }
.why h2 { font-size: 28px; line-height: 1.22; font-weight: 800; color: var(--ink); letter-spacing: -.5px; position: relative; padding-bottom: 10px; }
.why h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 58px; height: 4px; background: var(--orange); border-radius: 2px; }
.why-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.why-item { display: flex; align-items: center; gap: 10px; }
.why-item img { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 44, 108, .1); }
.why-item h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; white-space: nowrap; }
.why-item p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #4a5263; }

/* ---------- Certification banner ---------- */
.cert { position: relative; display: flex; align-items: stretch; min-height: 186px; border-radius: 16px; overflow: hidden; color: #fff; margin: 4px 0 0;
    background: radial-gradient(90% 160% at 70% 50%, #2a5ec4 0%, #1747a8 40%, #0e3a96 70%, #0b3289 100%); }
.cert-left { position: relative; z-index: 2; flex: 0 0 33%; padding: 18px 10px 18px 50px; }
.cert-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cert-head img { width: 62px; height: 60px; }
.cert-head h2 { font-size: 29px; font-weight: 700; line-height: 1.18; }
.cert-left p { font-size: 14.5px; line-height: 1.45; margin: 0 0 10px 12px; max-width: 300px; }
.cert-left .btn { margin-left: 12px; padding: 9px 18px; font-size: 15px; font-weight: 600; }
.cert-img { position: absolute; right: 0; top: 0; height: 100%; width: 70%; object-fit: cover; object-position: right center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%); mask-image: linear-gradient(90deg, transparent 0, #000 5%); }

/* ---------- Projects ---------- */
.prj-grid { display: grid; grid-template-columns: 1.07fr 1fr 1fr 1.07fr; gap: 18px; }
.prj-card { display: block; text-align: center; }
.prj-card .img { border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 3px 10px rgba(0, 0, 0, .12); }
.prj-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prj-card:hover img { transform: scale(1.05); }
.prj-card h3 { font-size: 13.5px; font-weight: 700; margin-top: 8px; color: #111; }

/* ---------- Testimonials ---------- */
.tst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.tst-card { display: flex; gap: 14px; background: #fff; border: 1px solid #e6e9f0; border-radius: 8px; padding: 10px 12px; box-shadow: 0 2px 10px rgba(0, 44, 108, .05); }
.tst-card img { width: 96px; height: 80px; flex: 0 0 96px; border-radius: 6px; object-fit: cover; }
.tst-card h3 { font-size: 14px; font-weight: 700; color: #111; }
.stars { color: #f5a300; font-size: 16px; letter-spacing: 1px; line-height: 1.25; }
.tst-card p { margin: 2px 0 0; font-size: 13px; line-height: 1.42; color: #2b3240; }

/* ---------- Bottom 3 cols ---------- */
.trio { display: grid; grid-template-columns: 1fr 1.04fr 1fr; gap: 24px; padding-bottom: 18px; }
.trio .section-head { margin-bottom: 12px; }
.trio .section-title { font-size: 22px; padding-bottom: 7px; }
.trio .section-title::after { width: 50px; height: 3px; }
.trio .see-all { font-size: 13px; padding-bottom: 6px; }
.faq-item { border: 1px solid #cdd6ea; border-radius: 6px; margin-bottom: 8px; background: #fff; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 12px; text-align: left; font-weight: 600; font-size: 12.4px; letter-spacing: -.15px; color: #111; }
.faq-q .icon { font-size: 15px; color: #111; transition: .2s; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 14px 12px; font-size: 14px; color: var(--muted); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-item.open .faq-a { display: block; }
.news-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.news-mini .img { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 284 / 114; }
.news-mini img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-mini a:hover img { transform: scale(1.05); }
.news-mini h3 { font-size: 12.8px; letter-spacing: -.15px; font-weight: 700; line-height: 1.4; margin: 8px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #555; }
.video-box { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 572 / 212; background: #111; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.video-box img { width: 100%; height: 100%; object-fit: cover; }
.video-box .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; transform: translate(-50%, -50%); border-radius: 12px; background: #f00; color: #fff; display: grid; place-items: center; font-size: 22px; opacity: 0; transition: .2s; }
.video-box.no-play-art .play, .video-box:hover .play { opacity: 1; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-dark); color: #dbe3f3; font-size: 12.3px; }
.footer-top { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto auto; gap: 18px; padding: 22px 0 10px; }
.footer h4 { color: #fff; font-size: 14.5px; font-weight: 700; margin-bottom: 10px; white-space: nowrap; }
.footer-logo img { height: 46px; width: auto; margin-bottom: 12px; }
.footer-company { color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; margin-bottom: 8px; }
.footer-info { list-style: none; }
.footer-info li { display: flex; gap: 10px; margin-bottom: 4px; line-height: 1.45; }
.footer-info .icon { font-size: 16px; margin-top: 2px; color: #fff; }
.footer-links { list-style: none; }
.footer-links li { position: relative; padding-left: 13px; margin-bottom: 3px; white-space: nowrap; }
.footer-links li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: #dbe3f3; }
.footer-links a:hover { color: var(--orange-2); }
.footer-social { display: flex; gap: 8px; margin-bottom: 12px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; transition: .2s; }
.footer-social a:hover { transform: translateY(-2px); }
.footer-social svg { width: 34px; height: 34px; }
.footer-bct img { height: 54px; width: auto; }
.footer-bottom { text-align: center; padding: 8px 0 18px; font-size: 14px; color: #e6ecf7; }

/* ---------- Floating contact ---------- */
.float-contact { position: fixed; right: 16px; bottom: 90px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.float-contact a { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); font-size: 22px; }
.float-contact .f-phone { background: var(--red); animation: pulse 1.6s infinite; }
.float-contact .f-zalo { background: #fff; overflow: hidden; border: 1px solid #d6e4ff; animation: pulse-zalo 1.6s infinite .8s; } /* nền trắng: icon Zalo nền trong, không bị lẫn vào ảnh phía sau */
.float-contact .f-zalo img { width: 50px; height: 50px; display: block; }
.back-top { position: fixed; right: 16px; bottom: 24px; z-index: 90; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: .2s; font-size: 18px; }
.back-top.show { opacity: 1; visibility: visible; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 20, 30, .5); } 70% { box-shadow: 0 0 0 14px rgba(229, 20, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 20, 30, 0); } }
@keyframes pulse-zalo { 0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, .5); } 70% { box-shadow: 0 0 0 14px rgba(0, 104, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(1, 20, 50, .6); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; position: relative; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.modal-box.wide { max-width: 900px; background: #000; }
.modal-head { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 18px 22px; border-bottom: 4px solid var(--orange); }
.modal-head h3 { font-size: 20px; }
.modal-head p { margin: 4px 0 0; font-size: 13.5px; opacity: .85; }
.modal-body { padding: 20px 22px 22px; }
.modal-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 22px; line-height: 1; }
.video-frame { position: relative; aspect-ratio: 16 / 9; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; color: var(--ink); }
.form-row label .req { color: var(--red); }
.input { width: 100%; border: 1px solid #cfd6e4; border-radius: 6px; padding: 10px 12px; font-size: 15px; color: var(--text); background: #fff; outline: 0; transition: .2s; }
.input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(11, 58, 140, .12); }
textarea.input { resize: vertical; min-height: 90px; }
.hp { position: absolute; left: -9999px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14.5px; }
.alert-success { background: #e8f8ee; color: #136c34; border: 1px solid #bfe8cd; }
.alert-error { background: #fdecec; color: #a3141b; border: 1px solid #f6c5c7; }
.alert ul { margin: 4px 0 0 18px; }

/* ---------- Toast ---------- */
.toast-box { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: #fff; border-left: 4px solid #16a34a; border-radius: 8px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: 14.5px; animation: toastIn .25s ease-out; }
.toast.error { border-color: var(--red); }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } }

/* =========================================================
   Trang con
   ========================================================= */
.page-hero { background: linear-gradient(120deg, var(--navy) 0%, #0a4aa6 100%); color: #fff; padding: 28px 0 30px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; border: 40px solid rgba(251, 125, 3, .18); }
.page-hero h1 { font-size: 30px; font-weight: 800; position: relative; z-index: 1; }
.page-hero p { margin: 8px 0 0; opacity: .9; max-width: 760px; position: relative; z-index: 1; }
.page-hero.compact { padding: 14px 0; }
.page-hero.compact .breadcrumb { margin: 0; }
.page-hero.compact::after { display: none; }
.breadcrumb { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; margin-bottom: 8px; opacity: .9; position: relative; z-index: 1; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; opacity: .7; }
.breadcrumb a:hover { color: var(--orange-2); }
.page-body { padding: 30px 0 46px; }
.layout-side { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.layout-main-side { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.side-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.side-box h3 { background: var(--navy); color: #fff; font-size: 16px; padding: 11px 16px; }
.side-box ul { list-style: none; padding: 6px 0; }
.side-box li a { display: flex; justify-content: space-between; padding: 8px 16px; font-size: 14.5px; }
.side-box li a.active, .side-box li a:hover { color: var(--orange); background: #fff7ef; }
.side-box li li a { padding-left: 30px; font-size: 14px; }
.side-hotline { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 18px; border-radius: 10px; text-align: center; }
.side-hotline strong { display: block; font-size: 24px; color: #ffd28a; margin: 4px 0 10px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h2 { font-size: 22px; font-weight: 800; color: var(--ink); }
.toolbar select { border: 1px solid #cfd6e4; border-radius: 6px; padding: 8px 12px; background: #fff; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; background: #f7f9fc; border-radius: 10px; }
.pagination { display: flex; justify-content: center; gap: 6px; list-style: none; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.pagination .active span { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .disabled span { opacity: .45; }
.cat-intro { background: #f4f8ff; border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; color: #3b4252; }

/* Product detail */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.pd-gallery .main { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; background: #fff; }
.pd-gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.pd-thumbs button { flex: 0 0 76px; height: 76px; border: 2px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.pd-thumbs button.active { border-color: var(--orange); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd h1 { font-size: 27px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.pd-meta b { color: var(--text); }
.pd-price { background: #fff6f6; border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-price strong { font-size: 30px; color: var(--red); font-weight: 800; }
.pd-price del { color: #888; }
.pd-price .off { background: var(--red); color: #fff; font-weight: 700; padding: 2px 8px; border-radius: 4px; font-size: 13px; }
.pd-short { color: #3b4252; margin-bottom: 14px; white-space: pre-line; }
.pd-commit { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; font-size: 14px; }
.pd-commit li { display: flex; gap: 8px; align-items: center; }
.pd-commit .icon { color: #16a34a; font-size: 18px; }
.pd-buy { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.qty { display: flex; border: 1px solid #cfd6e4; border-radius: 6px; overflow: hidden; }
.qty button { width: 38px; border: 0; background: #f2f5fa; font-size: 18px; }
.qty input { width: 52px; border: 0; text-align: center; font-weight: 700; outline: 0; }
.pd-buy .btn { flex: 1; min-width: 150px; }
.pd-call { margin-top: 12px; padding: 12px 16px; border: 1px dashed var(--orange); border-radius: 10px; background: #fff9f2; font-size: 14.5px; }
.pd-call a { color: var(--red); font-weight: 800; font-size: 18px; }
.tabs { margin-top: 36px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tab-nav { display: flex; background: #f4f7fc; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-nav button { border: 0; background: none; padding: 13px 22px; font-weight: 700; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; }
.tab-nav button.active { color: var(--navy); border-color: var(--orange); background: #fff; }
.tab-pane { display: none; padding: 22px; }
.tab-pane.active { display: block; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 9px 14px; text-align: left; font-size: 14.5px; }
.spec-table th { width: 38%; background: #f7f9fc; font-weight: 600; }

/* Content (editor) */
.k-content { font-size: 16px; line-height: 1.75; }
.k-content h2 { font-size: 23px; color: var(--ink); margin: 1.4em 0 .6em; }
.k-content h3 { font-size: 19px; color: var(--ink); margin: 1.2em 0 .5em; }
.k-content img { border-radius: 8px; }
.k-content ul, .k-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.k-content a { color: var(--blue); text-decoration: underline; }

/* News */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card .img { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: #eef2f8; }
.post-card img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.post-card:hover img { transform: scale(1.04); }
.post-card h3 { font-size: 17px; font-weight: 700; margin: 10px 0 6px; line-height: 1.4; }
.post-card p { color: var(--muted); font-size: 14px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article h1 { font-size: 30px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.article .sapo { font-weight: 600; color: #2b3240; font-size: 17px; }
.side-post { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.side-post img { width: 96px; height: 54px; border-radius: 6px; object-fit: cover; flex: 0 0 96px; } /* 16:9 như YouTube */
.side-post h4 { font-size: 14px; line-height: 1.4; font-weight: 600; }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; background: #fff; }
.cart-table th { background: #f4f7fc; text-align: left; padding: 12px; font-size: 14px; }
.cart-table td { border-bottom: 1px solid var(--line); padding: 12px; vertical-align: middle; }
.cart-table img { width: 80px; height: 60px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; }
.cart-summary { background: #f7f9fc; border-radius: 12px; padding: 20px; }
.cart-summary .total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin: 10px 0 16px; }
.cart-summary .total span:last-child { color: var(--red); font-size: 22px; }
.link-btn { border: 0; background: none; color: var(--red); font-size: 13.5px; padding: 0; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; }
.contact-card { background: #f4f8ff; border-radius: 12px; padding: 22px; }
.contact-card ul { list-style: none; }
.contact-card li { display: flex; gap: 12px; margin-bottom: 12px; }
.contact-card .icon { color: var(--orange); font-size: 20px; margin-top: 2px; }
.map iframe { width: 100%; height: 340px; border: 0; border-radius: 12px; margin-top: 20px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1279px) {
    .carousel-btn.prev { left: -12px; }
    .carousel-btn.next { right: -12px; }
}
@media (max-width: 1100px) {
    .nav > .container > ul { padding: 0; }
    .header-quote { display: none; }
    .search { margin-left: 0; }
    .hero-content { padding-left: 30px; }
    .why { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: repeat(3, 1fr); }
    .footer-links li { white-space: normal; }
    .tst-grid { gap: 20px; }
    .carousel-track > * { flex-basis: calc((100% - 18px * 3) / 4); }
}
@media (max-width: 991px) {
    .topbar-left { display: none; }
    .topbar .container { justify-content: center; }
    .header-main { height: 66px; gap: 12px; }
    .logo img { height: 46px; }
    .nav-toggle { display: block; order: -1; }
    .search { position: absolute; left: 15px; right: 15px; top: 66px; max-width: none; display: none; }
    .search.open { display: flex; }
    .header-hotline small { display: none; }
    .header-hotline strong { font-size: 18px; }
    .header-hotline .ring { width: 34px; height: 34px; }
    .header-cart { display: grid; }
    .nav { position: fixed; inset: 0 30% 0 0; z-index: 150; transform: translateX(-100%); transition: .25s; overflow-y: auto; background: var(--navy); }
    body.nav-open .nav { transform: none; }
    body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 140; }
    .nav > .container > ul { flex-direction: column; padding: 14px 0; }
    .nav > .container > ul > li > a { height: auto; padding: 12px 6px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
    .nav > .container > ul > li > a::after { display: none; }
    .nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding: 0 0 6px 12px; display: none; min-width: 0; }
    .nav li.open > .sub { display: block; }
    .nav .sub a { color: #dbe3f3; }
    .nav .sub a:hover { background: transparent; color: #fff; }
    .hero-slide { height: 300px; }
    .hero-img { width: 100%; opacity: .45; -webkit-mask-image: none; mask-image: none; }
    .hero-eyebrow { font-size: 24px; }
    .hero-title { font-size: 36px; }
    .hero-desc { font-size: 16px; }
    .usp .container { grid-template-columns: repeat(2, 1fr); }
    .usp-item:nth-child(3)::before { display: none; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .why-items { grid-template-columns: repeat(2, 1fr); }
    .cert-left { flex-basis: 100%; padding: 22px; }
    .cert-img { width: 100%; opacity: .25; }
    .prj-grid { grid-template-columns: repeat(2, 1fr); }
    .tst-grid { grid-template-columns: 1fr; }
    .trio { grid-template-columns: 1fr; }
    .carousel-track > * { flex-basis: calc((100% - 18px * 2) / 3); }
    .p-grid { grid-template-columns: repeat(3, 1fr); }
    .layout-side, .layout-main-side { grid-template-columns: 1fr; }
    .layout-side > aside { order: 2; }
    .pd { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .topbar-right .t-agent, .topbar-right .sep:first-of-type { display: none; }
    .header-hotline > div { display: none; }
    .hero-slide { height: 270px; }
    .hero-content { padding-left: 18px; padding-right: 18px; }
    .hero-eyebrow { font-size: 20px; }
    .hero-title { font-size: 30px; }
    .hero-features { font-size: 12.5px; gap: 6px 12px; }
    .usp .container { grid-template-columns: 1fr 1fr; padding: 0; }
    .usp-item { padding: 12px 10px; gap: 10px; }
    .usp-item img { width: 36px; height: 36px; }
    .usp-item h3 { font-size: 14px; }
    .usp-item p { font-size: 12.5px; }
    .usp-item::before { display: none; }
    .section-title { font-size: 21px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .carousel-track { gap: 12px; }
    .carousel-track > * { flex-basis: calc((100% - 12px) / 2); }
    .carousel-btn { display: none; }
    .carousel-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .carousel-viewport::-webkit-scrollbar { display: none; }
    .carousel-track > * { scroll-snap-align: start; }
    .p-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .p-card { padding: 10px; }
    .p-card .btn { width: 100%; margin-left: 0; font-size: 13.5px; }
    .p-price { flex-wrap: wrap; }
    .p-price strong { font-size: 16px; }
    .why h2 { font-size: 24px; }
    .why-items { grid-template-columns: 1fr; }
    .cert-head h2 { font-size: 23px; }
    .prj-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .news-mini { grid-template-columns: 1fr 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
    .post-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .pd-commit { grid-template-columns: 1fr; }
    .page-hero h1 { font-size: 24px; }
    .cart-table thead { display: none; }
    .cart-table tr { display: grid; grid-template-columns: 80px 1fr; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .cart-table td { border: 0; padding: 0; }
    .cart-table td:first-child { grid-row: span 4; }
}
@media (min-width: 1240px) {
    .cert { margin-left: -18px; margin-right: -18px; }
}

/* ===== Bài viết: tác giả & ngày (E-E-A-T) ===== */
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: #555; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eef0f4; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .icon { width: 15px; height: 15px; color: var(--orange); }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin: 32px 0 8px; padding: 18px; border: 1px solid #e6e9ef; border-radius: 10px; background: #f8fafc; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: contain; padding: 6px; flex: none; background: #fff; border: 1px solid #e6e9ef; }
.author-box .author-name { font-weight: 700; color: var(--ink); font-size: 16px; }
.author-box .author-name small { font-weight: 500; color: #666; font-size: 13px; }
.author-box p { margin: 6px 0; font-size: 14px; color: #444; }
.author-box a { font-size: 14px; font-weight: 600; color: var(--orange); }
.k-content img { max-width: 100%; height: auto; }
.layout-main-side > *, .layout-side > * { min-width: 0; }
.k-content figure { max-width: 100%; margin: 18px 0; }
.k-content figcaption { font-size: 13px; color: #666; text-align: center; margin-top: 6px; }
.k-content table { display: block; max-width: 100%; overflow-x: auto; }
.k-content iframe { max-width: 100%; }

/* =====================================================================
   THOÁNG HƠN (12/11/2026): rộng hơn, khoảng cách giữa các khối lớn hơn,
   chữ nhỏ được nâng cỡ để dễ đọc.
   ===================================================================== */
:root { --container: 1320px; }
.container { padding: 0 24px; }
body { font-size: 16px; line-height: 1.6; }

.usp-item { padding: 20px 10px 20px 24px; gap: 16px; }
.usp-item h3 { font-size: 16.5px; }
.usp-item p { font-size: 14px; }

.section { padding: 44px 0 8px; }
.section-head { margin-bottom: 22px; }
.section-title { font-size: 28px; padding-bottom: 12px; }
.see-all { font-size: 15px; }

.cat-grid { gap: 20px; }
.cat-card { padding-bottom: 16px; border-radius: 14px; }
.cat-card h3 { font-size: 16.5px; margin-top: 6px; }
.cat-card span { font-size: 14px; }

.carousel-track { gap: 22px; }
.carousel-track > * { flex-basis: calc((100% - 22px * 4) / 5); }
.carousel-btn.prev { left: -21px; }
.carousel-btn.next { right: -21px; }
.p-card { padding: 12px 14px 16px; border-radius: 14px; }
.p-name { font-size: 15.5px; margin-top: 8px; }
.p-price { margin: 8px 0 14px; gap: 6px; }
.p-price strong { font-size: 17px; }
.p-price del { font-size: 12.5px; }
.p-price .off { font-size: 12px; padding: 1px 6px; }
.p-card .btn { padding: 9px 12px; font-size: 14.5px; width: 100%; margin-left: 0; }
.p-grid { gap: 24px; }

.why { grid-template-columns: 300px 1fr; gap: 24px; padding-top: 48px; padding-bottom: 24px; }
.why h2 { font-size: 32px; }
.why-items { gap: 24px; }
.why-item { gap: 14px; align-items: flex-start; }
.why-item h3 { font-size: 16px; white-space: normal; }
.why-item p { font-size: 14px; }

.cert { margin-top: 28px; min-height: 220px; }

.trio { gap: 44px; padding-top: 8px; padding-bottom: 56px; }
.trio .section-title { font-size: 24px; }
.trio .see-all { font-size: 14px; }
.faq-item { margin-bottom: 12px; border-radius: 10px; border-color: #dde3f0; }
.faq-q { padding: 13px 16px; font-size: 15px; letter-spacing: 0; }
.faq-a { padding: 0 16px 14px; font-size: 15px; }
.news-mini { gap: 20px; }
.news-mini .img { aspect-ratio: 16 / 9; border-radius: 10px; }
.news-mini h3 { font-size: 15px; letter-spacing: 0; margin: 12px 0 6px; }
.date { font-size: 13.5px; }
.video-box { aspect-ratio: 16 / 9; border-radius: 14px; }

.footer { font-size: 14px; }
.footer-top { gap: 32px; padding: 48px 0 24px; }
.footer h4 { font-size: 16px; margin-bottom: 16px; }
.footer-info li { margin-bottom: 8px; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom { padding: 18px 0 24px; border-top: 1px solid rgba(255, 255, 255, .1); }

/* Trang trong */
.k-content { font-size: 16.5px; line-height: 1.75; }
.k-content p { margin: 0 0 1.05em; }
.k-content h2 { font-size: 24px; margin: 1.6em 0 .6em; }
.k-content h3 { font-size: 20px; margin: 1.4em 0 .5em; }

@media (max-width: 1279px) {
    .carousel-btn.prev { left: -8px; }
    .carousel-btn.next { right: -8px; }
}
@media (max-width: 1100px) {
    .why { grid-template-columns: 1fr; }
    .trio { gap: 32px; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding-top: 32px; }
    .section-title { font-size: 23px; }
    .why h2 { font-size: 26px; }
    .why-items { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 1279px) { .carousel-track > * { flex-basis: calc((100% - 22px * 3) / 4); } }
@media (max-width: 991px) {
    .carousel-track { gap: 16px; }
    .carousel-track > * { flex-basis: calc((100% - 16px * 2) / 3); }
    .cat-grid { gap: 14px; }
}
@media (max-width: 640px) {
    .carousel-track { gap: 12px; }
    .carousel-track > * { flex-basis: calc((100% - 12px) / 2); }
    .cat-grid { gap: 10px; }
    .why-items { grid-template-columns: 1fr; }
    .usp-item { padding: 12px 8px; }
}
/* Vì sao chọn: tiêu đề phía trên, 4 thẻ đều nhau */
.why { grid-template-columns: 1fr; gap: 22px; }
.why h2 br { display: none; }
.why-items { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-item { background: #f5f8fe; border-radius: 14px; padding: 20px; align-items: flex-start; }
.why-item img { background: #fff; }
@media (max-width: 991px) { .why-items { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .why-items { grid-template-columns: 1fr; } }
.guide-box { margin-top: 28px; padding: 18px 20px; border-radius: 12px; background: #f5f8fe; border: 1px solid #dfe7f6; }
.guide-box strong { display: block; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.guide-box p { margin: 0 0 8px; font-size: 15px; color: #444; }
.guide-box a { display: inline-block; margin-right: 22px; font-weight: 600; color: var(--orange); }
.footer-top { grid-template-columns: minmax(280px, 1.6fr) repeat(4, minmax(0, 1fr)); } /* bỏ cột Giải pháp: còn 5 cột */
.footer-links li, .footer h4 { white-space: normal; }
@media (max-width: 1100px) { .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .footer-top { grid-template-columns: 1fr 1fr; } }
.p-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.p-grid > * { min-width: 0; }
.p-price { flex-wrap: wrap; row-gap: 2px; }
@media (max-width: 640px) {
    .p-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .usp-item { min-width: 0; }
    .usp-item > div { min-width: 0; }
    .usp-item p { white-space: normal; }
}

/* ===== Hero tĩnh (bỏ slider) – cao hơn, H1 là chữ thật ===== */
.hero-slide { height: auto; min-height: 460px; display: flex; }
.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; width: 100%; }
.hero-content { height: auto; max-width: 600px; padding: 56px 0 64px 40px; }
.hero-h1 { margin: 0 0 14px; font-weight: 800; font-style: italic; color: #fff; }
.hero-h1 .hero-eyebrow { display: block; font-size: 32px; margin-bottom: 4px; }
.hero-h1 .hero-title { display: block; font-size: 52px; margin: 0; }
.hero-desc { font-size: 19px; margin-bottom: 18px; }
.hero-features { font-size: 14px; gap: 8px 22px; margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-left: 4px; }
.hero-cta .btn { margin: 0; padding: 13px 24px; font-size: 16.5px; }
.btn-ghost-light { color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .08); gap: 8px; }
.btn-ghost-light:hover { color: #0c1857; background: #fff; }
.hero-img { width: 58%; }
@media (max-width: 991px) {
    .hero-slide { min-height: 400px; }
    .hero-content { padding: 44px 0 52px 24px; }
    .hero-h1 .hero-eyebrow { font-size: 26px; }
    .hero-h1 .hero-title { font-size: 42px; }
}
@media (max-width: 640px) {
    .hero-slide { min-height: 380px; }
    .hero-img { width: 100%; opacity: .35; }
    .hero-content { padding: 36px 4px 44px; }
    .hero-h1 .hero-eyebrow { font-size: 21px; }
    .hero-h1 .hero-title { font-size: 34px; }
    .hero-desc { font-size: 16px; }
    .hero-features { font-size: 13px; }
    .hero-cta .btn { padding: 11px 18px; font-size: 15px; }
}

/* ===== Tin tức: hàng riêng 4 bài ===== */
.home-news { padding-top: 52px; padding-bottom: 12px; }
.news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.news-card { display: flex; flex-direction: column; border: 1px solid #e6eaf2; border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; color: inherit; }
.news-card:hover { box-shadow: 0 10px 28px rgba(12, 24, 87, .1); transform: translateY(-2px); }
.news-card .img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f1f4f9; }
.news-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .img img { transform: scale(1.04); }
.news-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card h3 { font-size: 16px; line-height: 1.45; font-weight: 700; margin: 0; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .date { margin-top: auto; }

/* ===== Câu hỏi thường gặp + Video ===== */
.home-faq-video { background: #f5f8fe; margin-top: 52px; padding: 52px 0 60px; }
.fv-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.home-faq-video .faq-item { background: #fff; margin-bottom: 14px; }
.home-faq-video .faq-q { padding: 16px 20px; font-size: 16px; }
.home-faq-video .faq-a { padding: 0 20px 16px; }
.video-caption { margin: 12px 2px 0; font-weight: 600; color: var(--ink); font-size: 15px; }
@media (max-width: 1100px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .fv-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 640px) {
    .news-grid { gap: 14px; }
    .news-card h3 { font-size: 14.5px; }
    .home-faq-video { padding: 40px 0 44px; margin-top: 40px; }
}
.hero-features { flex-direction: column; align-items: flex-start; gap: 8px; }
.hero-content { max-width: 560px; }

/* ===== Chứng nhận & giải thưởng (ảnh thật) ===== */
.cert-section { padding: 48px 0 8px; }
.cert2 { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 36px; align-items: center; padding: 32px 40px; border-radius: 18px; color: #fff;
    background: radial-gradient(120% 160% at 0% 0%, #1857c4 0%, #0c3a96 45%, #0a2a6e 100%); box-shadow: 0 10px 30px rgba(12, 24, 87, .18); }
.cert2-left p { font-size: 15px; line-height: 1.55; margin: 6px 0 18px; color: #dfe8ff; }
.cert2-left .btn { padding: 11px 20px; font-size: 15px; }
.cert2-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cert2-item { display: flex; flex-direction: column; gap: 10px; color: #fff; }
.cert2-item .frame { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #fff; padding: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, .28); transition: transform .25s; }
.cert2-item .frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: 6px; }
.cert2-item:hover .frame { transform: translateY(-4px); }
.cert2-item .name { font-size: 13px; line-height: 1.4; font-weight: 600; color: #e9efff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.cert-card { margin: 0; border: 1px solid #e6eaf2; border-radius: 14px; overflow: hidden; background: #fff; scroll-margin-top: 120px; }
.cert-card .frame { display: block; aspect-ratio: 3 / 4; background: #f4f7fc; }
.cert-card .frame img { width: 100%; height: 100%; object-fit: contain; }
.cert-card figcaption { padding: 14px 16px 18px; }
.cert-card h2 { font-size: 16.5px; line-height: 1.4; margin: 0 0 6px; color: var(--ink); }
.cert-card p { font-size: 14px; color: #5b6475; margin: 0; }
@media (max-width: 1100px) { .cert2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .cert2 { padding: 24px 18px; }
    .cert2-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

/* ===== Dự án tiêu biểu (dự án thật, dẫn tới bài chi tiết) ===== */
.prj-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.prj-card { text-align: left; border: 1px solid #e6eaf2; border-radius: 14px; overflow: hidden; background: #fff; color: inherit; transition: box-shadow .2s, transform .2s; }
.prj-card:hover { box-shadow: 0 10px 28px rgba(12, 24, 87, .1); transform: translateY(-2px); }
.prj-card .img { aspect-ratio: 16 / 9; border-radius: 0; box-shadow: none; background: #f1f4f9; }
.prj-card .body { padding: 14px 16px 16px; }
.prj-card h3 { font-size: 16px; line-height: 1.45; margin: 0 0 6px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prj-card .loc { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: #5b6475; }
.prj-card .loc .icon { width: 14px; height: 14px; color: var(--orange); flex: none; }

@media (max-width: 1100px) { .prj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .prj-grid { gap: 14px; } }
.cert-head img { width: 62px; height: 60px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.k-content table { border-collapse: collapse; width: auto; min-width: 60%; margin: 8px 0 18px; font-size: 15.5px; }
.k-content th, .k-content td { border: 1px solid #dfe5ef; padding: 10px 14px; text-align: left; vertical-align: top; }
.k-content thead th { background: #0c1857; color: #fff; font-weight: 600; }
.k-content tbody tr:nth-child(even) td { background: #f7f9fd; }
/* Menu 8 mục, đều nhau */
.nav > .container > ul { padding: 0 8px; justify-content: space-between; }
.nav > .container > ul > li > a { padding: 0 14px; }
.nav .sub { min-width: 250px; }

/* ===== Khách hàng: giữ nguyên thiết kế, 5 người chạy dạng carousel 3 thẻ ===== */
.tst-carousel .carousel-track > * { flex-basis: calc((100% - 22px * 2) / 3); }
.tst-carousel .tst-card { height: 100%; }
@media (max-width: 991px) { .tst-carousel .carousel-track > * { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 640px) { .tst-carousel .carousel-track > * { flex-basis: 88%; } }
.tst-carousel .carousel-track { align-items: stretch; }
/* Avatar khách hàng nhỏ, tròn */
.tst-card { align-items: flex-start; gap: 14px; padding: 14px 16px; }
.tst-card img { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid #fff; box-shadow: 0 0 0 1px #e1e6ef; }
/* Menu dồn về bên trái (cạnh Trang chủ) */
.nav > .container > ul { justify-content: flex-start; gap: 6px; padding: 0; }
.nav > .container > ul > li > a { padding: 0 18px; }
@media (min-width: 992px) { .nav > .container > ul > li:first-child > a { padding-left: 0; } .nav > .container > ul > li:first-child > a::after { left: 0; } }

/* Địa chỉ cũ (in trên giấy phép) */
.addr-old { display: block; margin-top: 3px; font-size: 12.5px; opacity: .75; }

/* Ảnh đại diện bài viết / dự án / giải pháp: luôn khung 16:9 như thumbnail YouTube */
.thumb-16x9 { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 18px; display: block; }
.post-card .img img[src$="logo-square.png"], .side-post img[src$="logo-square.png"] { object-fit: contain; background: #eef2f8; padding: 8px; }

/* Footer: .container ở mobile ghi đè padding: 0 16px làm mất khoảng cách trên/dưới -> đặt lại riêng cho footer */
.footer .footer-top { padding-top: 48px; padding-bottom: 24px; }
@media (max-width: 640px) {
    .footer .footer-top { padding-top: 36px; padding-bottom: 12px; row-gap: 28px; }
    .footer-logo img { margin-bottom: 16px; }
    .footer-company { margin-bottom: 12px; }
}

/* Menu mobile (≤991px): đưa menu lên trên lớp phủ tối, cân lại khoảng cách, mũi tên xoay khi mở menu con */
@media (max-width: 991px) {
    body.nav-open .header { z-index: 160; }
    .nav { width: 82%; max-width: 340px; right: auto; box-shadow: 4px 0 24px rgba(0, 0, 0, .25); }
    .nav .container { padding: 0; }
    .nav > .container > ul { gap: 0; padding: 8px 0 24px; }
    .nav > .container > ul > li > a { height: auto; padding: 14px 20px; justify-content: space-between; font-size: 15.5px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
    .nav > .container > ul > li:first-child > a { padding-left: 20px; }
    .nav > .container > ul > li > a .icon { font-size: 12px; transition: transform .2s; }
    .nav li.open > a .icon { transform: rotate(180deg); }
    .nav li.open > a { background: rgba(255, 255, 255, .06); }
    .nav .sub { padding: 4px 0 8px; background: rgba(0, 0, 0, .15); }
    .nav .sub a { padding: 10px 20px 10px 32px; font-size: 14.5px; line-height: 1.4; }
    .nav .sub .sub { padding: 0 0 4px 12px; background: transparent; }
}

/* Nút đang gửi form */
.btn.is-loading { opacity: .85; cursor: progress; transform: none; }
.btn-spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: btn-spin .7s linear infinite; }
.btn-outline .btn-spinner { border-color: rgba(23, 51, 122, .3); border-top-color: var(--navy); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Chi tiết sản phẩm: dải ảnh nhỏ (nhiều ảnh) làm cột lưới phình rộng hơn màn hình mobile -> cho phép cột co lại */
.pd > * { min-width: 0; }
@media (max-width: 991px) { .pd { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
@media (max-width: 640px) {
    .pd h1 { font-size: 22px; }
    .pd-price strong { font-size: 26px; }
    .pd-buy .btn { min-width: 0; white-space: normal; }
}

/* ===== Trang chi tiết (bài viết, dự án, giải pháp, trang tĩnh) – 17/11 ===== */
/* Cột đọc ~780px (khoảng 80–85 ký tự/dòng), cả khối căn giữa trang */
@media (min-width: 992px) {
    .layout-main-side { grid-template-columns: minmax(0, 780px) 320px; gap: 48px; justify-content: center; }
}
.k-content { font-size: 17px; line-height: 1.75; color: #1f2633; }
.k-content h2 { font-size: 25px; line-height: 1.35; }
.k-content h3 { font-size: 20px; line-height: 1.4; }
.k-content li { margin-bottom: .4em; }
.k-content li > p { margin-bottom: .4em; }
/* Ảnh trong nội dung: căn giữa, chú thích gọn */
.k-content figure { margin: 26px auto; text-align: center; }
.k-content figure img, .k-content p > img { display: block; margin-left: auto; margin-right: auto; }
.k-content figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: #6b7280; font-style: italic; }
.k-content blockquote { margin: 20px 0; padding: 12px 18px; border-left: 4px solid var(--orange); background: #fff7ef; border-radius: 0 8px 8px 0; }
.k-content hr { border: 0; border-top: 1px solid #e6e9ef; margin: 28px 0; }
/* Breadcrumb: bỏ mục cuối trùng tiêu đề H1 ngay bên dưới */
.page-hero:not(.compact) .breadcrumb li:last-child:not(:has(a)) { display: none; }
/* Bài liên quan: 2 cột, mobile 1 cột */
.post-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) {
    .k-content { font-size: 16.5px; }
    .k-content h2 { font-size: 22px; }
    .k-content h3 { font-size: 18.5px; }
    .k-content figure { margin: 20px auto; }
    .page-hero h1 { font-size: 22px; line-height: 1.35; }
    .post-grid.cols-2 { grid-template-columns: 1fr; }
}

/* ===== Ảnh sản phẩm trong thẻ: khung vuông (ảnh gốc 600×600) cho ảnh to, rõ – 17/11 ===== */
.p-thumb { aspect-ratio: 1 / 1; margin: 0 0 4px; }
.p-thumb img { border-radius: 8px; }
@media (max-width: 640px) {
    .p-card { padding: 8px 8px 12px; border-radius: 12px; }
    .p-name { font-size: 14.5px; margin-top: 6px; }
    .p-price { margin: 6px 0 10px; }
}
