/* ==========================================================
   Hoàng Gia – pages.css
   Quy tắc riêng của từng trang (hiệu ứng banner, slider giới thiệu, timeline...).
   Mỗi quy tắc được gắn với class trên <body> (body.pg-<tên-trang>) nên không ảnh hưởng
   trang khác. Nạp sau cùng.
   ========================================================== */

/* ---------- Trang: Trang chủ (index.html) ---------- */
body.pg-index .hg-bn{animation:hg-bn-fade .7s ease both}
body.pg-index .hg-bn > img{animation:hg-bn-zoom 6.5s ease-out both;transform-origin:center}
body.pg-index .hg-bn-c > *{animation:hg-bn-up .75s cubic-bezier(.2,.75,.25,1) both}
body.pg-index .hg-bn-c > :nth-child(1){animation-delay:.15s}
body.pg-index .hg-bn-c > :nth-child(2){animation-delay:.3s}
body.pg-index .hg-bn-c > :nth-child(3){animation-delay:.48s}
body.pg-index .hg-bn-c > :nth-child(4){animation:none}
body.pg-index .hg-bn-c > :nth-child(4) > *{animation:hg-bn-pop .6s cubic-bezier(.2,.75,.25,1) both}
body.pg-index .hg-bn-c > :nth-child(4) > :nth-child(1){animation-delay:.66s}
body.pg-index .hg-bn-c > :nth-child(4) > :nth-child(2){animation-delay:.8s}
body.pg-index .hg-bn-c > :nth-child(5){animation-delay:.95s}
@keyframes hg-bn-fade{from{opacity:0}to{opacity:1}}
@keyframes hg-bn-zoom{from{transform:scale(1.08)}to{transform:scale(1)}}
@keyframes hg-bn-up{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes hg-bn-pop{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){
  body.pg-index .hg-bn,body.pg-index .hg-bn > img,body.pg-index .hg-bn-c > *,body.pg-index .hg-bn-c > :nth-child(4) > *{animation:none !important}
}
@container (max-width: 1023.98px){
  body.pg-index .hg-desktop .r-arrow{display:none !important}
  body.pg-index .hg-desktop .r-about{display:grid !important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px 16px !important;align-items:center}
  body.pg-index .hg-desktop .r-about-l{display:contents !important}
  body.pg-index .hg-desktop .r-about-l > *{grid-column:1 / -1}
  body.pg-index .hg-desktop .r-tabs{flex-wrap:nowrap !important;overflow-x:auto;width:100%;max-width:100%;box-sizing:border-box;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
  body.pg-index .hg-desktop .r-tabs::-webkit-scrollbar{display:none}
  body.pg-index .hg-desktop .r-tabs button{flex:0 0 auto;white-space:nowrap;scroll-snap-align:start}
  body.pg-index .hg-desktop .r-ticks{flex-wrap:nowrap !important;gap:12px !important;font-size:12px !important}
  body.pg-index .hg-desktop .r-ticks > span{white-space:nowrap}
  body.pg-index .hg-desktop .r-about-btns{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px !important}
  body.pg-index .hg-desktop .r-about-btns > a svg{flex:0 0 auto}
  body.pg-index .hg-desktop .r-about-btns > a{justify-content:center;padding:0 10px !important;font-size:15px !important;gap:8px !important;white-space:nowrap}
  body.pg-index .hg-desktop .r-about-l > .r-about-stats{grid-column:1;max-width:none !important;gap:14px !important;align-self:center;border-top:0 !important;padding-top:0 !important}
  body.pg-index .hg-desktop .r-about-r{grid-column:2;min-height:0 !important}
  body.pg-index .hg-desktop .r-about-r > div:not(.r-about-card){display:none}
  body.pg-index .hg-desktop .r-about-card{margin:0 !important;padding:8px !important;gap:8px !important;border-radius:16px !important}
  body.pg-index .hg-desktop .r-about-car{height:auto !important;aspect-ratio:4 / 3}
  body.pg-index .hg-desktop .r-about-car button[aria-label^="Ảnh"]{width:30px !important;height:30px !important;left:auto}
  body.pg-index .hg-desktop .r-about-car button[aria-label^="Ảnh"] svg{width:16px;height:16px}
  body.pg-index .hg-desktop .r-about-car > span:nth-of-type(2){font-size:11px !important;left:8px !important;right:8px;bottom:26px !important;line-height:1.3}
  body.pg-index .hg-desktop .r-about-car > div{left:4px !important;right:4px;flex-wrap:wrap}
  body.pg-index .hg-desktop .r-about-car > div button{padding:0 2px !important}
  body.pg-index .hg-desktop .r-about-foot{flex-direction:column;align-items:stretch !important;gap:8px !important}
  body.pg-index .hg-desktop .r-about-foot > div{gap:8px !important}
  body.pg-index .hg-desktop .r-about-foot img{width:32px !important;height:32px !important}
  body.pg-index .hg-desktop .r-about-foot > div > div{width:auto !important;min-width:0}
  body.pg-index .hg-desktop .r-about-foot > div > div span{white-space:normal !important;font-size:11px !important}
  body.pg-index .hg-desktop .r-about-foot > a{justify-content:center;height:40px !important;font-size:13px !important}
}
@container (max-width: 640px){
  body.pg-index .hg-desktop .r-ticks{gap:8px !important;font-size:clamp(12px,3.5cqi,13px) !important;justify-content:flex-start}
  body.pg-index .hg-desktop .r-about-car{aspect-ratio:1 / 1}
}

/* ---------- Trang: Giới thiệu (gioi-thieu.html) ---------- */
body.pg-gioi-thieu .hg-tl-fill{position:absolute;left:0;top:0;height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,#7DD3FC 0%,#0EA5E9 50%,#C8102E 100%);animation:hg-tl-fill 6s ease-in-out infinite}
body.pg-gioi-thieu .hg-tl-fill::after{content:"";position:absolute;right:-7px;top:50%;width:14px;height:14px;margin-top:-7px;border-radius:50%;background:#ffffff;border:3px solid #C8102E;box-shadow:0 0 0 6px rgba(200,16,46,.18)}
@keyframes hg-tl-fill{0%{width:0;opacity:1}66%{width:100%;opacity:1}90%{width:100%;opacity:1}100%{width:100%;opacity:0}}
body.pg-gioi-thieu .hg-tl-dot{animation:hg-tl-pop 6s ease-out infinite}
body.pg-gioi-thieu .hg-tl-d2{animation-delay:2s}
body.pg-gioi-thieu .hg-tl-d3{animation-delay:4s}
@keyframes hg-tl-pop{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(14,165,233,.55)}6%{transform:scale(1.18);box-shadow:0 0 0 12px rgba(14,165,233,0)}14%{transform:scale(1);box-shadow:0 0 0 0 rgba(14,165,233,0)}100%{transform:scale(1)}}
body.pg-gioi-thieu .hg-tl-card{animation:hg-tl-up .7s ease-out both}
body.pg-gioi-thieu .hg-tl-c2{animation-delay:.25s}
body.pg-gioi-thieu .hg-tl-c3{animation-delay:.5s}
body.pg-gioi-thieu .hg-tl-card>div{transition:transform .25s ease,box-shadow .25s ease}
body.pg-gioi-thieu .hg-tl-card>div:hover{transform:translateY(-6px);box-shadow:0 18px 36px rgba(12,74,110,.18)}
@keyframes hg-tl-up{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){
  body.pg-gioi-thieu .hg-tl-fill{animation:none;width:100%}
  body.pg-gioi-thieu .hg-tl-dot,body.pg-gioi-thieu .hg-tl-card{animation:none}
}
@keyframes hg-tl-pop{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(14,165,233,.55)}6%{transform:scale(1.15);box-shadow:0 0 0 10px rgba(14,165,233,0)}14%{transform:scale(1);box-shadow:0 0 0 0 rgba(14,165,233,0)}100%{transform:scale(1)}}
@keyframes hg-tl-up{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@container (max-width: 1023.98px){
  body.pg-gioi-thieu .hg-desktop .r-flags.r-flags{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important}
}
@container (max-width: 640px){
  body.pg-gioi-thieu .hg-desktop .r-flags.r-flags{gap:8px !important}
  body.pg-gioi-thieu .hg-desktop .r-flags > div{flex-direction:column;justify-content:center;text-align:center;gap:8px !important;padding:12px 6px !important}
  body.pg-gioi-thieu .hg-desktop .r-flags > div > span:last-child{font-size:13px !important;line-height:1.3}
  body.pg-gioi-thieu .hg-desktop .r-flags > div > span:first-child{width:36px !important;height:36px !important}
}
@container (max-width: 1023.98px){
  body.pg-gioi-thieu .hg-desktop .r-stats4.r-stats4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:10px !important}
  body.pg-gioi-thieu .hg-desktop .r-stats4 > div > span:first-child{font-size:clamp(20px,6cqi,28px) !important;line-height:1.1}
  body.pg-gioi-thieu .hg-desktop .r-stats4 > div > span:last-child{font-size:clamp(11px,3.1cqi,13px) !important}
  body.pg-gioi-thieu .hg-desktop .r-tl.r-tl{grid-template-columns:48px minmax(0,1fr) !important;column-gap:16px !important;row-gap:20px !important}
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card{display:contents !important}
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card > div{grid-column:2;position:relative;min-width:0;padding:20px !important;text-align:left;align-self:stretch !important}
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-dot{grid-column:1;width:48px !important;height:48px !important;align-self:center;z-index:3}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(2) > *{grid-row:1}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(3) > *{grid-row:2}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(4) > *{grid-row:3}
  body.pg-gioi-thieu .hg-desktop .r-tl .r-tl-line{display:none !important}
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card > div::before,body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card > div::after{content:"";position:absolute;left:-42px;width:4px}
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card > div::before{background:#D5E6F2;height:var(--h)}
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card > div::after{height:0;width:22px;margin-left:-9px;background-image:var(--db);background-repeat:no-repeat;background-position:center;background-size:22px 100%,4px 100%;animation:var(--a) 6s ease-in-out infinite;z-index:2}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(2) > div{--h:calc(50% + 24px);--a:hg-tls1}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(3) > div{--h:calc(100% + 26px);--a:hg-tls2}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(4) > div{border:1.5px solid transparent}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(4) > div{--h:calc(50% + 3px);--a:hg-tls3}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(2) > div::before,body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(2) > div::after{top:50%}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(3) > div::before,body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(3) > div::after,body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(4) > div::before,body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(4) > div::after{top:-3px}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(2) > div::after{--db:radial-gradient(circle at 50% calc(100% - 11px),#ffffff 0 4px,#C8102E 4.5px 7px,rgba(200,16,46,.2) 7.5px 11px,transparent 11.5px),linear-gradient(180deg,#7DD3FC,#38BDF8);--lb:linear-gradient(transparent,transparent),linear-gradient(180deg,#7DD3FC,#38BDF8)}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(3) > div::after{--db:radial-gradient(circle at 50% calc(100% - 11px),#ffffff 0 4px,#C8102E 4.5px 7px,rgba(200,16,46,.2) 7.5px 11px,transparent 11.5px),linear-gradient(180deg,#38BDF8,#0EA5E9 50%,#7C3A6B);--lb:linear-gradient(transparent,transparent),linear-gradient(180deg,#38BDF8,#0EA5E9 50%,#7C3A6B)}
  body.pg-gioi-thieu .hg-desktop .r-tl > :nth-child(4) > div::after{--db:radial-gradient(circle at 50% calc(100% - 11px),#ffffff 0 4px,#C8102E 4.5px 7px,rgba(200,16,46,.2) 7.5px 11px,transparent 11.5px),linear-gradient(180deg,#7C3A6B,#C8102E);--lb:linear-gradient(transparent,transparent),linear-gradient(180deg,#7C3A6B,#C8102E)}
}
@keyframes hg-tls1{0%{height:0;opacity:1;background-size:22px 100%,4px 100%}27.9%{background-size:22px 100%,4px 100%}28%{height:var(--h);opacity:1;background-size:0px 0px,4px 100%}92%{height:var(--h);opacity:1;background-size:0px 0px,4px 100%}100%{height:var(--h);opacity:0;background-size:0px 0px,4px 100%}}
@keyframes hg-tls2{0%,28%{height:0;opacity:1;background-size:22px 100%,4px 100%}55.9%{background-size:22px 100%,4px 100%}56%{height:var(--h);opacity:1;background-size:0px 0px,4px 100%}92%{height:var(--h);opacity:1;background-size:0px 0px,4px 100%}100%{height:var(--h);opacity:0;background-size:0px 0px,4px 100%}}
@keyframes hg-tls3{0%,56%{height:0;opacity:1;background-size:22px 100%,4px 100%}71.9%{background-size:22px 100%,4px 100%}72%{height:var(--h);opacity:1;background-size:0px 0px,4px 100%}92%{height:var(--h);opacity:1;background-size:0px 0px,4px 100%}100%{height:var(--h);opacity:0;background-size:0px 0px,4px 100%}}
@media (prefers-reduced-motion: reduce){
  body.pg-gioi-thieu .hg-desktop .r-tl .hg-tl-card > div::after{animation:none;height:var(--h)}
}

/* ---------- Các trang: Sản phẩm (tất cả), Danh mục: Máy móc ngành in PET, Danh mục: Vật tư in PET, Danh mục: Vật tư in vải, Danh mục: Vật tư & Thiết bị, Chi tiết tin tức (mẫu chung), Tuyển dụng, Liên hệ, Chính sách bảo mật, Điều khoản sử dụng ---------- */
body.pg-san-pham .hg-side,body.pg-danh-muc-may-moc-in-pet .hg-side,body.pg-danh-muc-vat-tu-in-pet .hg-side,body.pg-danh-muc-vat-tu-in-vai .hg-side,body.pg-danh-muc-vat-tu-thiet-bi .hg-side,body.pg-chi-tiet-tin-tuc .hg-side,body.pg-tuyen-dung .hg-side,body.pg-lien-he .hg-side,body.pg-chinh-sach-bao-mat .hg-side,body.pg-dieu-khoan-su-dung .hg-side{position:-webkit-sticky;position:sticky;top:76px;align-self:start}
