/* ============================
   HEADER / BRAND BAR
   ============================ */

:root{
  --header-bg: #ffffff;
  --header-border: #e5e7eb;
  --header-text: #1f2937;   /* slate-800 */
  --header-text-strong: #0f172a; /* slate-900 */
}

/* Thanh đầu trang */
.brandbar{
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: relative;
  z-index: 40;
}

.brandbar .inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
}

/* Logo */
.brandbar .logo{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}

.brand-logo{
  height: 60px;
  width: auto;
  max-width: 60px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  transition: all 0.3s ease;
}

/* Khu liên hệ bên phải */
.brandbar .contact-right{
  display: flex;
  align-items: center;
  gap: 2rem; /* khoảng cách giữa phone & email */
}

/* Mỗi item liên hệ (icon + text) */
.brandbar .contact-item-header{
  display: flex;
  align-items: center;
  gap: .75rem;
  white-space: nowrap;
}

/* ====== ICON FIX ======
   Không cho áp dụng style khung/bo góc/bóng từ nơi khác */
.brandbar .contact-item-header .contact-icon{
  width: 24px;
  height: 24px;
  display: inline-block;
  object-fit: contain;

  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Nếu có pseudo (::before) ở CSS khác, tắt luôn */
.brandbar .contact-item-header .contact-icon::before{
  content: none !important;
}

/* Text bên cạnh icon */
.brandbar .contact-text{
  color: var(--header-text);
  font-weight: 600;
  font-size: .95rem;
}

/* Link liên hệ (nếu dùng <a>) */
.brandbar .contact-link{
  color: var(--header-text);
  text-decoration: none;
}

.brandbar .contact-link:hover{
  color: var(--header-text-strong);
  text-decoration: underline;
}

/* Vạch ngăn giữa các mục (tuỳ chọn) */
.brandbar .divider{
  width: 1px;
  height: 20px;
  background: var(--header-border);
  display: inline-block;
}

/* ============================
   NAVBAR LOGO (SMALL)
   ============================ */

.navbar .brand-logo-sm{
  height: 40px;
  width: auto;
  max-width: 40px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  transition: all 0.3s ease;
}

/* Navbar sticky state */
.navbar.is-stuck{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Brandbar scroll effect */
.brandbar.scrolled .brand-logo{
  height: 40px;
  max-width: 40px;
  border-radius: 8px;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 992px){
  .brandbar .contact-right{ gap: 1.25rem; }
  .brandbar .contact-text{ font-size: .9rem; }
  /* Logo vừa phải trên tablet */
  .brand-logo{
    height: 40px;
    max-width: 40px;
  }
  .brandbar.scrolled .brand-logo{
    height: 35px;
    max-width: 35px;
  }
  /* Logo nhỏ trong navbar trên tablet */
  .navbar .brand-logo-sm{
    height: 35px;
    max-width: 35px;
  }
}

@media (max-width: 768px){
  /* Mobile: chỉ hiển thị icon cho gọn */
  .brandbar .contact-text{ display: none; }
  .brandbar .contact-right{ gap: .75rem; }
  .brandbar .contact-item-header .contact-icon{
    width: 22px; height: 22px;
  }
  /* Logo nhỏ hơn trên mobile */
  .brand-logo{
    height: 45px;
    max-width: 45px;
  }
  .brandbar.scrolled .brand-logo{
    height: 35px;
    max-width: 35px;
  }
  /* Logo nhỏ trong navbar trên mobile */
  .navbar .brand-logo-sm{
    height: 35px;
    max-width: 35px;
  }
}

/* Gạch dọc mảnh giữa 2 item (giống ảnh tham chiếu) */
.brandbar .contact-sep{
  width:1px;
  height:22px;
  background: var(--header-border);
  display:inline-block;
  margin: 0 .25rem;
}

/* Hover nhẹ: chữ đậm hơn, icon tươi hơn (không đổi layout hiện tại) */
.brandbar .contact-item-header:hover .contact-text{
  color: var(--header-text-strong);
}
.brandbar .contact-item-header:hover .contact-icon{
  filter: saturate(1.12);
}

/* Nếu icon còn bị ‘viền/nền’ do CSS nơi khác, ép tắt hoàn toàn ở header */
.brandbar .contact-item-header .contact-icon{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  outline: none !important;
}
/* ==== Tinh chỉnh contact ở header (ghi đè CUỐI FILE) ==== */

/* khoảng cách tổng giữa Phone | Email */
.brandbar .contact-right{
  gap: 1.25rem !important;
}

/* khoảng cách icon ↔ text */
.brandbar .contact-item-header{
  gap: .5rem !important;
}

/* kích thước icon + căn baseline */
.brandbar .contact-item-header .contact-icon{
  width: 22px !important;
  height: 22px !important;
  display: block;
  object-fit: contain;
  margin-top: -1px; /* trùng baseline với chữ */
}

/* chữ đậm vừa, màu chuẩn */
.brandbar .contact-text{
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #111827 !important; /* slate-900 */
  letter-spacing: .2px;
}

/* gạch ngăn mảnh giữa 2 mục */
.brandbar .contact-sep{
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin: 0 .75rem;
  display: inline-block;
}

/* hover nhẹ */
.brandbar .contact-item-header:hover .contact-text{ color:#0f172a; }
.brandbar .contact-item-header:hover .contact-icon{ filter: saturate(1.1); }

/* Mobile */
@media (max-width: 768px){
  .brandbar .contact-right{ gap: .75rem !important; }
  .brandbar .contact-item-header{ gap: .45rem !important; }
  .brandbar .contact-item-header .contact-icon{
    width: 20px !important; height: 20px !important; margin-top: 0 !important;
  }
}
/* === Contact chip (icon + text trong 1 khung link) === */
.brandbar .contact-chip{
  display:inline-flex;
  align-items:center;
  gap:.45rem;                   /* icon sát chữ hơn */
  padding:.15rem .55rem;        /* khung gọn */
  border-radius:8px;
  text-decoration:none;
  color:#111827;                /* chữ */
  line-height:1;
}

.brandbar .contact-chip .contact-icon{
  width:22px; height:22px;      /* icon đồng bộ */
  display:block; object-fit:contain;
  margin-top:-1px;              /* căn baseline với chữ */
  background:transparent!important;
  border:none!important;
  box-shadow:none!important;
}

.brandbar .contact-chip .contact-text{
  font-size:1rem;               /* 16px */
  font-weight:600;
  letter-spacing:.2px;
}

.brandbar .contact-chip:hover{
  background:#f9fafb;           /* hover nhẹ */
  color:#0f172a;
}

/* Divider giữa Phone | Email */
.brandbar .contact-sep{
  width:1px; height:20px;
  background:#e5e7eb;
  margin:0 .75rem;
  display:inline-block;
}

/* Khoảng cách tổng giữa 2 mục */
.brandbar .contact-right{ gap:1.25rem; }

/* Mobile */
@media (max-width:768px){
  .brandbar .contact-chip{ padding:.1rem .45rem; }
  .brandbar .contact-chip .contact-icon{ width:20px;height:20px;margin-top:0; }
  .brandbar .contact-right{ gap:.75rem; }
}
/* ============================
   CONTACT (Header) — polish
   ============================ */

/* Tổng khoảng cách giữa Phone | Email */
.brandbar .contact-right{
  gap: 1.35rem !important;   /* nhẹ hơn 2rem */
}

/* Box liên hệ (nếu dùng .contact-chip) – không nền, chỉ hover rất nhẹ */
.brandbar .contact-chip{
  display:flex; align-items:center; gap:.5rem;
  padding: 6px 10px; border-radius: 12px;
  background: transparent; box-shadow: none;
  text-decoration: none;
}
.brandbar .contact-chip:hover{
  background: #f7f8fa;            /* rất nhẹ */
}

/* Icon: nhỏ gọn & căn baseline với chữ */
.brandbar .contact-chip .i,
.brandbar .contact-item-header .contact-icon{
  width: 22px !important;
  height: 22px !important;
  display: block;
  object-fit: contain;
  margin-top: -1px;               /* căn baseline giống mẫu */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  outline: none !important;
}

/* Khoảng cách icon ↔ chữ */
.brandbar .contact-chip,
.brandbar .contact-item-header{
  gap: .5rem !important;          /* sát hơn */
}

/* Chữ: 16px, đậm vừa, màu #42515C như hình tham chiếu */
.brandbar .contact-chip .label,
.brandbar .contact-item-header .contact-text{
  font-size: 1rem !important;     /* 16px */
  font-weight: 600 !important;
  color: #42515C !important;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  text-decoration: none;
}
.brandbar .contact-chip:hover .label,
.brandbar .contact-item-header:hover .contact-text{
  color: #0f172a !important;      /* đậm hơn khi hover */
}

/* Gạch ngăn mảnh giữa 2 mục */
.brandbar .contact-sep{
  width:1px; height:22px;
  background: rgba(2,6,23,.08);   /* mảnh & dịu */
  margin: 0 .85rem;
  display:inline-block;
}
/* === CONTACT: style siêu nhẹ giống ảnh === */
.brandbar .contact-chip{
  color:#6b7280 !important;                /* slate-500 */
  font-weight:400 !important;              /* bỏ đậm ở <a> nếu có */
}

.brandbar .contact-chip .contact-text{
  font-size:.975rem;                       /* nhỏ 1 xíu */
  font-weight:400 !important;              /* nhẹ hẳn */
  letter-spacing:.05px;                    /* gần như không dãn */
  color:#6b7280 !important;                /* xám nhạt */
  font-variation-settings: "wght" 400;     /* nếu dùng font variable (Inter) */
}

.brandbar .contact-chip .contact-icon{
  width:20px; height:20px;                 /* icon nhỏ & tinh */
  margin-top:-1px; opacity:.9;
}

.brandbar .contact-sep{
  height:18px;
  background:rgba(2,6,23,.06);             /* vạch ngăn mảnh & nhạt hơn */
  margin:0 .9rem;
}

/* ============================
   ADMIN BUTTON FIX
   ============================ */

/* Fix icon trong nút admin bị lỗi */
.admin-button {
  position: relative;
  overflow: hidden;
}

.admin-button::before {
  content: none !important;
}

.admin-button::after {
  content: none !important;
}

/* Đảm bảo icon Font Awesome hiển thị đúng */
.admin-button i,
.admin-button .fas,
.admin-button .fa-solid {
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Fix cho dropdown items */
.dropdown-item i,
.dropdown-item .fas,
.dropdown-item .fa-solid {
  display: inline-block !important;
  font-style: normal !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Fix cho language button */
.btn-light i,
.btn-light .fas,
.btn-light .fa-solid {
  display: inline-block !important;
  font-style: normal !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Fix cho avatar image */
.avatar-img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Fix cho admin button container */
.avatar-chip {
  position: relative;
  overflow: visible !important;
}

.avatar-chip::before,
.avatar-chip::after {
  content: none !important;
}

/* Đảm bảo không có pseudo-element nào can thiệp */
.admin-button *::before,
.admin-button *::after {
  content: none !important;
}

/* Fix cho tất cả icon trong header */
.navbar i,
.navbar .fas,
.navbar .fa-solid,
.navbar .fa-brands {
  display: inline-block !important;
  font-style: normal !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ============================
   DROPDOWN USER MENU STYLING (WEBSITE HEADER)
   ============================ */

/* Enhanced dropdown styling for website header */
.navbar .dropdown-menu {
  min-width: 300px;
  padding: 0.5rem 0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.05);
  background: white;
  z-index: 1050;
}

.navbar .dropdown-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem 0.25rem 1rem;
  margin-top: 0.25rem;
  background: transparent;
}

.navbar .dropdown-item {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 8px;
  color: #495057;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #495057;
  transform: translateX(2px);
}

/* Special styling for "Quay về" buttons in website header */
.navbar .dropdown-item.bg-primary {
  background: linear-gradient(135deg, #007bff, #0056b3) !important;
  color: white !important;
  font-weight: 600;
  border-radius: 8px;
  margin: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.navbar .dropdown-item.bg-success {
  background: linear-gradient(135deg, #28a745, #1e7e34) !important;
  color: white !important;
  font-weight: 600;
  border-radius: 8px;
  margin: 4px 8px;
  box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

.navbar .dropdown-item.bg-info {
  background: linear-gradient(135deg, #17a2b8, #117a8b) !important;
  color: white !important;
  font-weight: 600;
  border-radius: 8px;
  margin: 4px 8px;
  box-shadow: 0 2px 8px rgba(23,162,184,0.3);
}

.navbar .dropdown-item.bg-dark {
  background: linear-gradient(135deg, #343a40, #23272b) !important;
  color: white !important;
  font-weight: 600;
  border-radius: 8px;
  margin: 4px 8px;
  box-shadow: 0 2px 8px rgba(52,58,64,0.3);
}

.navbar .dropdown-item.bg-primary:hover,
.navbar .dropdown-item.bg-success:hover,
.navbar .dropdown-item.bg-info:hover,
.navbar .dropdown-item.bg-dark:hover {
  transform: translateX(4px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  color: white !important;
}

.navbar .dropdown-divider {
  margin: 0.5rem 1rem;
  border-color: rgba(0,0,0,0.08);
}

/* Icon styling in dropdown */
.navbar .dropdown-item i {
  width: 18px;
  text-align: center;
  opacity: 0.8;
}

.navbar .dropdown-item:hover i {
  opacity: 1;
}

/* Avatar chip styling enhancement */
.avatar-chip {
  border-radius: 25px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  padding: 0.5rem 1rem !important;
  font-weight: 500;
  color: #495057 !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.avatar-chip:hover {
  background: white !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .navbar .dropdown-menu {
    min-width: 250px;
  }
  
  .navbar .dropdown-item {
    padding: 0.7rem 1rem;
  }
}
