/* ==========================================================
   Hoàng Gia – responsive.css
   Quy tắc cho máy tính bảng & điện thoại, dùng chung cho mọi trang.
   Dùng @container theo bề rộng khung .hg-desktop / .hg-mobile (= bề rộng màn hình
   trên website thật). Nạp sau hoang-gia.css.
   ========================================================== */

/* ---------- MÁY TÍNH BẢNG + ĐIỆN THOẠI (khung < 1024px) ---------- */
@container (max-width: 1023.98px){
  .hg-d-only,.hg-rail,.hg-totop{display:none !important}
  .hg-desktop .r-wrap{padding-left:20px !important;padding-right:20px !important}
  .hg-desktop .r-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;column-gap:16px !important}
  .hg-desktop .r-layout{grid-template-columns:minmax(0,1fr) !important}
  .hg-desktop .r-g3{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  .hg-desktop .r-place{grid-column:auto !important;grid-row:auto !important}
  .hg-desktop .r-nw{white-space:normal !important}
  .hg-desktop h1{font-size:32px !important;line-height:1.2 !important}
  .hg-desktop h2{font-size:26px !important;line-height:1.25 !important}
  .hg-desktop h3{font-size:22px !important}
  .hg-desktop .r-sec{padding-top:44px !important;padding-bottom:44px !important}
  .hg-desktop .r-pad{padding:24px !important}
  .hg-desktop .r-sticky{position:static !important}
  .hg-desktop .r-between{flex-wrap:wrap}
  .hg-desktop .r-full{flex-basis:100% !important;width:100% !important}
  .hg-desktop .r-hero{height:auto !important;min-height:540px}
  .hg-desktop .hg-g2 .r-row8{flex-direction:column}
  .hg-desktop table{display:block;overflow-x:auto}
  .hg-desktop [role="dialog"]{width:calc(100vw - 24px) !important;max-width:560px !important;max-height:92vh;overflow-y:auto}
  .hg-desktop [role="dialog"] .r-between{flex-wrap:nowrap}
  .hg-desktop .hg-foot{grid-template-columns:minmax(0,1fr) !important;row-gap:28px !important}
  .hg-desktop .r-cta-btns{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px !important;width:100%}
  .hg-desktop .r-cta-btns > *{justify-content:center;padding:0 12px !important;white-space:nowrap}
  .hg-desktop .r-cta-btns > :first-child{grid-column:1 / -1}
}

/* ---------- CHỈ MÁY TÍNH BẢNG (641px – 1023px) ---------- */
@container (min-width: 641px) and (max-width: 1023.98px){
  .hg-desktop .hg-foot.hg-foot{grid-template-columns:repeat(3,minmax(0,1fr)) !important;column-gap:24px !important}
  .hg-desktop .hg-foot > :nth-child(n+4){grid-column:1 / -1 !important}
}

/* ---------- CHỈ ĐIỆN THOẠI (khung ≤ 640px) ---------- */
@container (max-width: 640px){
  .hg-desktop .r-grid{grid-template-columns:minmax(0,1fr) !important}
  .hg-desktop .hg-g2{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important}
  .hg-desktop h1{font-size:28px !important}
  .hg-desktop h2{font-size:23px !important}
  .hg-desktop .r-display{font-size:30px !important}
  .hg-desktop .r-tl-line{display:none !important}
  .hg-desktop .r-collage{height:380px !important}
  .hg-desktop .r-col-a{height:290px !important;width:82% !important}
  .hg-desktop .r-col-b{height:190px !important;width:56% !important}
  .hg-desktop .r-tall{height:auto !important;min-height:240px}
}

/* ---------- MÁY TÍNH (≥ 1024px) – ẩn phần điều hướng dành cho mobile ---------- */
@container (min-width: 1024px){
  .hg-mobile > *{display:none !important}
}

/* ---------- LAPTOP MÀN NHỎ (1024px – 1279px) – menu ngang thu gọn ---------- */
@container (min-width: 1024px) and (max-width: 1279.98px){
  .hg-desktop .hg-nav .r-wrap{padding-left:16px !important;padding-right:16px !important;font-size:13px !important}
  .hg-desktop .hg-nav .hg-navicon{display:none !important}
  .hg-desktop .hg-nav .r-wrap > a,.hg-desktop .hg-nav .r-wrap > div > a{padding:0 8px !important}
  .hg-desktop .hg-nav .r-wrap > button{padding-left:14px !important;padding-right:14px !important}
}
