/* ==========================================================
   [CSS-1] CSS TOÀN SITE — DÙNG CHUNG CHO MỌI TRANG
   ========================================================== */
:root{
  --brand:        #055360;
  --brand-dark:   #033A44;
  --brand-deep:   #022A31;
  --accent:       #FF5E14;
  --accent-dark:  #E94C05;
  --radius:       18px;

  /* Hotline mobile bar */
  --mobile-hotline-h: 64px;
}

html{ scroll-behavior: smooth; }
body{
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #334155;
  -webkit-font-smoothing: antialiased;
}
::selection{ background: var(--accent); color:#fff; }

/* --- Tiêu đề section dùng chung --- */
.section-eyebrow{
  display:inline-flex; align-items:center; gap:.5rem;
  font-size:.78rem; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color: var(--accent);
}
.section-eyebrow::before{
  content:""; width:26px; height:2px; background: var(--accent); display:inline-block;
}
.section-title{
  font-weight: 800; color: var(--brand-deep);
  line-height: 1.2; letter-spacing: -0.02em;
}

/* --- Button hệ thống --- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  padding:.85rem 1.6rem; border-radius:9999px;
  font-weight:700; font-size:.92rem; line-height:1;
  transition: all .25s ease; white-space:nowrap; cursor:pointer;
}
.btn svg{ width:18px; height:18px; }
.btn-accent{ background: var(--accent); color:#fff; box-shadow:0 12px 24px -12px rgba(255,94,20,.9); }
.btn-accent:hover{ background: var(--accent-dark); transform: translateY(-2px); box-shadow:0 16px 28px -12px rgba(255,94,20,.9); }
.btn-brand{ background: var(--brand); color:#fff; box-shadow:0 12px 24px -12px rgba(5,83,96,.9); }
.btn-brand:hover{ background: var(--brand-dark); transform: translateY(-2px); }
.btn-ghost{ border:2px solid rgba(255,255,255,.55); color:#fff; background:transparent; }
.btn-ghost:hover{ background:#fff; color: var(--brand); border-color:#fff; transform: translateY(-2px); }
.btn-outline-brand{ border:2px solid var(--brand); color: var(--brand); background:#fff; }
.btn-outline-brand:hover{ background: var(--brand); color:#fff; }

/* --- HEADER (dùng chung) --- */
.nav-link{
  position:relative; display:inline-flex; align-items:center; gap:.3rem;
  padding:.55rem .1rem; font-size:.93rem; font-weight:600; color:#1e293b;
  transition: color .2s ease;
}
.nav-link::after{
  content:""; position:absolute; left:0; bottom:.15rem;
  height:2px; width:0; background: var(--accent);
  transition: width .28s ease; border-radius:2px;
}
.nav-link:hover, .nav-link.is-active{ color: var(--brand); }
.nav-link:hover::after, .nav-link.is-active::after{ width:100%; }

.nav-dropdown{
  position:absolute; left:0; top:100%; padding-top:.75rem;
  opacity:0; visibility:hidden; transform: translateY(8px);
  transition: all .22s ease; z-index:60;
}
.nav-item:hover .nav-dropdown{ opacity:1; visibility:visible; transform: translateY(0); }

#site-header.is-scrolled .header-bar{
  box-shadow: 0 10px 30px -18px rgba(2,42,49,.55);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
}

/* --- Mobile menu --- */
#mobile-menu{
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
#mobile-menu.is-open{ transform: translateX(0); }
#mobile-overlay{
  opacity:0; visibility:hidden; transition: all .3s ease;
}
#mobile-overlay.is-open{ opacity:1; visibility:visible; }
.mobile-submenu{
  max-height:0; overflow:hidden;
  transition: max-height .32s ease;
}
.mobile-submenu.is-open{ max-height:340px; }

/* ==========================================================
   FLOAT ACTIONS — HOTLINE + BACK TO TOP
   ==========================================================
   Desktop (≥768px):
     - Float dọc góc phải dưới
     - 2 nút hotline xếp trên, back-to-top ở dưới
     - Mỗi nút: icon tròn + (tên nhỏ trên, số lớn dưới)
   Mobile (<768px):
     - Thanh ngang cố định sát đáy
     - 2 cột đều nhau, mỗi cột icon + tên + số
     - Có safe-area cho iPhone
   ========================================================== */

/* ---------- WRAPPER ---------- */
.float-actions{
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none; /* chỉ con nhận click */
}
.float-actions > *{ pointer-events: auto; }

/* ---------- NÚT HOTLINE (desktop) ---------- */
.float-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 16px 0 8px;
  border-radius: 9999px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 26px -12px rgba(0,0,0,.45);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.float-btn:hover{
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow: 0 18px 30px -12px rgba(0,0,0,.5);
}

/* Icon tròn bên trái */
.float-btn__icon{
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.22);
  flex-shrink: 0;
}
.float-btn__icon svg{
  width: 20px;
  height: 20px;
}

/* Text 2 dòng: tên nhỏ trên, số lớn dưới */
.float-btn__text{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.float-btn__name{
  font-size: .66rem;
  font-weight: 600;
  opacity: .85;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.float-btn__phone{
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .01em;
  margin-top: 2px;
}

/* Nút 1: cam – Mr Hải */
.float-hotline{
  background: linear-gradient(135deg, #FF7A3D 0%, var(--accent) 100%);
  animation: floatPulse 2.2s infinite;
}
@keyframes floatPulse{
  0%   { box-shadow: 0 0 0 0 rgba(255,94,20,.55), 0 14px 26px -12px rgba(0,0,0,.45); }
  70%  { box-shadow: 0 0 0 14px rgba(255,94,20,0), 0 14px 26px -12px rgba(0,0,0,.45); }
  100% { box-shadow: 0 0 0 0 rgba(255,94,20,0), 0 14px 26px -12px rgba(0,0,0,.45); }
}

/* Nút 2: brand – Mr Nam */
.float-hotline-2{
  background: linear-gradient(135deg, #0F7C89 0%, var(--brand) 100%);
  animation: floatPulseBrand 2.2s infinite;
}
@keyframes floatPulseBrand{
  0%   { box-shadow: 0 0 0 0 rgba(5,83,96,.55), 0 14px 26px -12px rgba(0,0,0,.45); }
  70%  { box-shadow: 0 0 0 14px rgba(5,83,96,0), 0 14px 26px -12px rgba(0,0,0,.45); }
  100% { box-shadow: 0 0 0 0 rgba(5,83,96,0), 0 14px 26px -12px rgba(0,0,0,.45); }
}

/* ---------- BACK TO TOP ---------- */
#backToTop{
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  background: #fff;
  color: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px -12px rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .3s ease;
  border: none;
  cursor: pointer;
  margin-top: 2px;
}
#backToTop.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#backToTop:hover{
  background: var(--brand);
  color: #fff;
}

/* ==========================================================
   MOBILE — THANH NGANG 2 CỘT CỐ ĐỊNH ĐÁY
   ========================================================== */
@media (max-width: 767.98px){

  /* Ẩn back to top trên mobile */
  #backToTop{ display: none; }

  .float-actions{
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: #fff;
    box-shadow: 0 -6px 20px -8px rgba(0,0,0,.25);
    border-top: 1px solid rgba(0,0,0,.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .float-btn{
    flex: 1 1 50%;
    height: var(--mobile-hotline-h);
    border-radius: 0;
    box-shadow: none;
    animation: none !important;
    justify-content: center;
    padding: 0 10px;
    gap: 10px;
  }
  .float-btn:hover{ transform: none; filter: none; }

  /* Nút 1 – trái, cam */
  .float-hotline{
    background: linear-gradient(135deg, #FF7A3D 0%, var(--accent) 100%);
    border-right: 1px solid rgba(255,255,255,.25);
  }
  /* Nút 2 – phải, brand */
  .float-hotline-2{
    background: linear-gradient(135deg, #0F7C89 0%, var(--brand) 100%);
  }

  /* Icon nhỏ lại cho cân đối thanh ngang */
  .float-btn__icon{
    width: 36px;
    height: 36px;
  }
  .float-btn__icon svg{
    width: 18px;
    height: 18px;
  }

  /* Text trong thanh ngang: căn trái gọn */
  .float-btn__text{
    align-items: flex-start;
  }
  .float-btn__name{
    font-size: .64rem;
    opacity: .9;
    letter-spacing: .04em;
  }
  .float-btn__phone{
    font-size: .92rem;
    margin-top: 1px;
  }

  /* Đẩy body lên để không bị thanh hotline che nội dung cuối */
  body{
    padding-bottom: calc(var(--mobile-hotline-h) + env(safe-area-inset-bottom, 0px));
  }
}

/* Màn hình rất nhỏ (<360px) — thu gọn text để không bị tràn */
@media (max-width: 359.98px){
  .float-btn__name{ font-size: .58rem; }
  .float-btn__phone{ font-size: .84rem; }
  .float-btn__icon{ width: 32px; height: 32px; }
  .float-btn__icon svg{ width: 16px; height: 16px; }
}

/* --- FOOTER (dùng chung) --- */
.footer-link{
  display:inline-flex; align-items:center; gap:.5rem;
  color: rgba(255,255,255,.72); font-size:.9rem; padding:.32rem 0;
  transition: color .2s ease, transform .2s ease;
}
.footer-link:hover{ color:#fff; transform: translateX(4px); }
.footer-link::before{
  content:""; width:6px; height:6px; border-radius:9999px;
  background: var(--accent); flex-shrink:0;
}
.social-btn{
  width:38px; height:38px; border-radius:9999px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.1); color:#fff;
  transition: all .22s ease;
}
.social-btn:hover{ background: var(--accent); transform: translateY(-3px); }

/* --- Tiện ích --- */
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:200;
  background: var(--accent); color:#fff; padding:.7rem 1.2rem; border-radius:0 0 10px 0;
}
.skip-link:focus{ left:0; }