/* Bổ sung UX/UI cho pi2.vn (2026-10-09). Giữ phong cách gốc: gradient #386BB7 → #E24C4A, bo góc lớn, Manrope. */

:root { --xanh: #386BB7; --do: #E24C4A; --den: #1F1F1F; --xam-nhat: #F0F1F2; }

.nut-icon { background: none; border: 0; padding: 6px; cursor: pointer; line-height: 0; }
.thanh-mxh { gap: 16px; }
.chu-zalo { font-weight: 700; font-size: .9em; border: 1px solid rgba(255,255,255,.5); border-radius: 20px; padding: 3px 12px; }
.chu-zalo:hover { background: #0068FF; border-color: #0068FF; color: #fff; }

/* ---------- Hero: nút hành động rõ ràng, mũi tên chuyển xuống dưới ---------- */
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; position: relative; z-index: 2; }
.hero-cta.giua { justify-content: center; }
.nut-chinh, .nut-phu { display: inline-flex; align-items: center; padding: 16px 28px; border-radius: 40px; font-weight: 700; font-size: 1em; transition: .3s; }
.nut-chinh { background: linear-gradient(45deg, var(--xanh), var(--do)); color: #fff; box-shadow: 0 8px 24px rgba(226,76,74,.35); }
.nut-chinh:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(226,76,74,.45); }
.nut-phu { border: 1.5px solid rgba(255,255,255,.85); color: #fff; background: rgba(0,0,0,.15); }
.nut-phu:hover { background: #fff; color: var(--den); }
.nut-phu.toi { border-color: var(--den); color: var(--den); background: none; }
.nut-phu.toi:hover { background: var(--den); color: #fff; }
#home-banner .tieu-de-slide { font-size: 4.5em; line-height: 1.1; font-weight: 500; }
#home-banner .mySlides { position: relative; padding-bottom: 130px; }
#home-banner .prev, #home-banner .next { top: auto; bottom: 34px; transform: none; z-index: 3; }
#home-banner .prev { left: 15%; }
#home-banner .next { left: calc(15% + 64px); right: auto; }
#home-banner .prev img, #home-banner .next img { max-width: 52px; }

/* ---------- Thẻ dịch vụ: bấm được, tiêu đề rõ, icon lên đầu ---------- */
.services > a.the-dich-vu { display: flex; flex-direction: column; color: var(--den); margin: 15px 0; transition: .3s; }
.services > a.the-dich-vu > img { order: -1; width: 44px; height: 44px; margin-bottom: 18px; }
.services > a.the-dich-vu p.font-11 { font-size: 1.2em; margin: 0 0 10px; }
.services > a.the-dich-vu p.font-11 b { font-weight: 700; }
.services > a.the-dich-vu p { margin: 0 0 14px; }
.services > a.the-dich-vu .xem-them { margin-top: auto; font-weight: 700; font-size: .9em; background: linear-gradient(45deg, var(--xanh), var(--do)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.services > a.the-dich-vu:hover { background: #E7E8E8; transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.06); color: var(--den); }

/* ---------- FAQ: biểu tượng +/− rõ ràng ---------- */
.accordion .w-10 img, .dropdown-button::after { display: none; }
.accordion .w-10::after { content: "+"; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--den); font-size: 24px; line-height: 1; flex: 0 0 40px; transition: .3s; }
.accordion.active .w-10::after { content: "−"; background: var(--den); color: #fff; }
.accordion:hover .w-10::after { border-color: var(--do); }

/* ---------- Form liên hệ ---------- */
#lien-he { scroll-margin-top: 110px; }
.khoi-lien-he { padding: 50px; align-items: flex-start; }
.lien-he-trai { width: 42%; }
.lien-he-trai h2 { font-size: 2.4em; }
.lien-he-nhanh { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.nut-nhanh { display: flex; flex-direction: column; background: #fff; border-radius: 16px; padding: 14px 16px; font-weight: 600; font-size: .95em; word-break: break-word; border: 1px solid transparent; }
.nut-nhanh span { font-size: .75em; font-weight: 400; color: #7a7a7a; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.nut-nhanh:hover { border-color: var(--do); color: var(--den); }
.form-lien-he { width: 58%; background: #fff; border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.form-lien-he label { display: flex; flex-direction: column; gap: 6px; font-size: .9em; font-weight: 600; }
.form-lien-he input, .form-lien-he select, .form-lien-he textarea { font: inherit; font-weight: 400; font-size: 1em; padding: 13px 14px; border: 1px solid #d5d7da; border-radius: 12px; background: #fff; color: var(--den); width: 100%; box-sizing: border-box; }
.form-lien-he input:focus, .form-lien-he select:focus, .form-lien-he textarea:focus { outline: 2px solid var(--xanh); border-color: transparent; }
.form-lien-he .hai-cot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-lien-he button.primary-btn { align-self: flex-start; width: auto; white-space: nowrap; border: 0; cursor: pointer; font: inherit; font-weight: 700; color: #fff; background: linear-gradient(45deg, var(--xanh), var(--do)); padding: 16px 32px; border-radius: 40px; }
.form-lien-he button.primary-btn::before { display: none; }
.form-lien-he button[disabled] { opacity: .6; cursor: wait; }
.form-trang-thai { margin: 0; font-weight: 600; }
.form-trang-thai.ok { color: #1a7f37; }
.form-trang-thai.loi { color: var(--do); }
.o-mat { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Chân trang: bản đồ ---------- */
.ban-do { width: 100%; height: 220px; border: 0; border-radius: 18px; margin-top: 20px; filter: grayscale(.2); }
.chu-chan { font-size: 2.6em; line-height: 1.2; font-weight: 500; }

/* ---------- Nút nổi: Zalo + lên đầu trang (gọn, chỉ hiện khi cuộn ngược lên) ---------- */
.zalo-noi { position: fixed; left: 24px; bottom: 24px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: #0068FF; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,104,255,.4); }
.zalo-noi:hover { color: #fff; transform: scale(1.06); }
#backToTop, #backToTop.show { display: none; }
#backToTop.show.dang-cuon-len { display: flex; align-items: center; justify-content: center; }
#backToTop { width: 44px; height: 44px; border-radius: 50%; right: 24px; bottom: 24px; opacity: .85; z-index: 50; }
#backToTop img { width: 16px; }

/* ---------- Trang 404 ---------- */
.trang-404 { padding: 120px 15px 40px; }
.so-404 { font-size: 7em; font-weight: 700; margin: 0; background: linear-gradient(45deg, var(--xanh), var(--do)); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 992px) {
  #home-banner .tieu-de-slide { font-size: 3em; }
  .khoi-lien-he { flex-direction: column; padding: 30px; gap: 30px; }
  .lien-he-trai, .form-lien-he { width: 100%; box-sizing: border-box; }
}

@media (max-width: 767px) {
  /* Lưới dịch vụ 2 cột trên điện thoại */
  .services { gap: 12px 4%; }
  .services .w-23, .services > a.the-dich-vu { width: 48%; padding: 18px 16px; margin: 0; box-sizing: border-box; }
  .services > a.the-dich-vu > img { width: 32px; height: 32px; margin-bottom: 12px; }
  .services > a.the-dich-vu p.font-11 { font-size: 1em; }
  .services > a.the-dich-vu p:not(.font-11) { font-size: .82em; line-height: 1.5; }
  #home-banner .mySlides { padding: 50px 8% 110px; }
  #home-banner .tieu-de-slide { font-size: 2.2em; }
  #home-banner .prev { left: 8%; }
  #home-banner .next { left: calc(8% + 58px); }
  #home-banner .prev img, #home-banner .next img { max-width: 44px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .nut-chinh, .nut-phu { justify-content: center; padding: 14px 20px; }
  .lien-he-trai h2 { font-size: 1.8em; }
  .lien-he-nhanh { grid-template-columns: 1fr 1fr; }
  .form-lien-he { padding: 20px; }
  .form-lien-he .hai-cot { grid-template-columns: 1fr; }
  .form-lien-he button.primary-btn { align-self: stretch; }
  .chu-chan { font-size: 1.8em; }
  .zalo-noi { width: 50px; height: 50px; left: 14px; bottom: 14px; }
  #backToTop { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  header .black-box .thanh-mxh { display: none; }
}

/* Mũi tên hero: nút tròn gọn thay ảnh tab cong */
#home-banner .prev img, #home-banner .next img { display: none; }
#home-banner .prev, #home-banner .next { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.7); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; backdrop-filter: blur(4px); }
#home-banner .prev::before { content: "‹"; margin-top: -3px; }
#home-banner .next::before { content: "›"; margin-top: -3px; }
#home-banner .prev:hover, #home-banner .next:hover { background: #fff; color: #1F1F1F; }
.services > a.the-dich-vu p.font-11 { line-height: 1.35; }
@media (max-width: 767px) {
  .zalo-noi { width: 46px; height: 46px; font-size: 12px; opacity: .95; }
  #home-banner .next { left: calc(8% + 56px); }
}

/* ---------- Dải logo khách hàng chạy ngang ---------- */
.khach-tieu-de { text-align: center; font-size: .85em; letter-spacing: .12em; text-transform: uppercase; color: #8a8f98; margin: 0 0 26px; }
.chay-logo { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hang-logo { display: flex; align-items: center; width: max-content; animation: chay-logo 40s linear infinite; }
.chay-logo:hover .hang-logo { animation-play-state: paused; }
.logo-khach { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 64px; padding: 0 44px; }
.logo-khach img { width: auto; max-width: 170px; filter: grayscale(1); opacity: .5; transition: .3s; }
.logo-khach:hover img { filter: none; opacity: 1; }
@keyframes chay-logo { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 767px) {
  .logo-khach { padding: 0 26px; height: 54px; }
  .logo-khach img { max-width: 120px; transform: scale(.82); }
  .hang-logo { animation-duration: 28s; }
}
@media (prefers-reduced-motion: reduce) {
  .hang-logo { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .hang-logo > [aria-hidden="true"] { display: none; }
  .chay-logo { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Case Studies nổi bật: 1 hàng cuộn ngang (10 dự án) ---------- */
.cuon-case { overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cuon-case::-webkit-scrollbar { display: none; }
.hang-case { display: flex; gap: 40px; }
#case-studies .hang-case > a { flex: 0 0 calc((100% - 120px) / 4); width: auto; display: block; scroll-snap-align: start; }
@media (max-width: 992px) {
  .hang-case { gap: 20px; }
  #case-studies .hang-case > a { flex-basis: calc((100% - 40px) / 3); }
}
@media (max-width: 767px) {
  #case-studies .hang-case > a { flex-basis: 72%; }
}

/* Trang Case studies: thẻ dự án mới nổi bật toàn chiều ngang */
#case-studies-section .the-noi-bat { width: 100%; }
#case-studies-section .the-noi-bat .case-studies-img { height: 380px; }
@media (max-width: 767px) { #case-studies-section .the-noi-bat .case-studies-img { height: 200px; } }
