/* ==========================================================================
   HEADER TẦNG GỘP TINH GỌN — hp-header (Tham khảo phong cách hiện đại)
   Font: Roboto (Google Fonts) + Outfit (headings)
   ========================================================================== */
body { font-family: 'Roboto', 'Outfit', sans-serif !important; }
h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', 'Roboto', sans-serif !important; }

.hp-header { position: sticky; top:0; left:0; right:0; z-index:1000; box-shadow: 0 2px 16px rgba(0,0,0,0.15); }
.hp-header-spacer { display: none !important; }

/* ── TIER 1: Marquee ── */
.hp-header__top { background: #022B54; height:32px; display:flex; align-items:center; overflow:hidden; }
.hp-header__top-inner { display:flex; align-items:center; width:100%; max-width:1200px; margin:0 auto; padding:0 24px; gap:16px; overflow:hidden; }
.hp-marquee { flex:1; overflow:hidden; position:relative; mask-image:linear-gradient(to right,transparent 0%,black 5%,black 95%,transparent 100%); -webkit-mask-image:linear-gradient(to right,transparent 0%,black 5%,black 95%,transparent 100%); }
.hp-marquee__track { display:inline-flex; align-items:center; gap:20px; white-space:nowrap; animation:hp-marquee-scroll 40s linear infinite; font-size:12px; color:rgba(255,255,255,0.85); }
.hp-marquee__track:hover { animation-play-state:paused; }
@keyframes hp-marquee-scroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.hp-marquee__item { display:inline-flex; align-items:center; gap:6px; }
.hp-marquee__item strong { color:#EBB000; }
.hp-marquee__sep { color:rgba(255,255,255,0.3); font-size:16px; }
.hp-header__top-links { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.hp-header__top-link { display:flex; align-items:center; gap:5px; font-size:12px; color:rgba(255,255,255,0.8); transition:color 0.2s; white-space:nowrap; text-decoration:none; }
.hp-header__top-link:hover { color:#EBB000; }

/* ── Combined Navigation Bar (Logo + Nav Menu + Search + Hotline) ── */
.hp-header__main-nav {
  background: #fff;
  border-bottom: 1px solid #E1E4E8;
  height: 68px;
  display: flex;
  align-items: center;
}
.hp-header__main-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  gap: 15px;
}

/* Logo */
.hp-logo { display:flex; align-items:center; text-decoration:none; flex-shrink:0; gap:10px; }
.hp-logo__img { height:44px; width:auto; object-fit:contain; }
.hp-logo__hp { width:42px; height:42px; background:#EBB000; color:#022B54; border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:'Outfit',sans-serif; font-size:18px; font-weight:800; flex-shrink:0; }
.hp-logo__brand { display:flex; flex-direction:column; }
.hp-logo__brand-name { font-family:'Outfit',sans-serif; font-size:16px; font-weight:700; color:#005A9C; line-height:1.2; }
.hp-logo__brand-sub { font-size:11px; color:#666; }

/* Navigation Links */
.hp-header__nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}
.hp-header__nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.hp-header__nav-link {
  color: #022B54;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 12px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.hp-header__nav-link:hover,
.hp-header__nav-link.nav-active {
  color: #005A9C;
  border-bottom-color: #005A9C;
}

/* Dropdown wrapper — cần position:relative để con absolute định vị đúng */
.hp-header__nav-dropdown {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  cursor: pointer;
  color: #022B54;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}
.hp-header__nav-dropdown:hover {
  color: #005A9C;
  border-bottom-color: #005A9C;
}
/* Sub-dropdown — con trực tiếp của .hp-header__nav-dropdown */
.hp-header__nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 240px;
  z-index: 9999;
  border: 1px solid #E1E4E8;
  overflow: visible;
  padding: 6px 0;
}
/* FIX CHÍNH: selector đúng là hover trên wrapper div, không phải li */
.hp-header__nav-dropdown:hover > .hp-header__nav-sub {
  display: block;
  animation: hp-menu-in 0.18s ease;
}
.hp-header__nav-sub ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}
.hp-header__nav-sub li {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hp-header__nav-sub li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 13.5px;
  color: #1e293b;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.hp-header__nav-sub li:last-child > a {
  border-bottom: none;
}
.hp-header__nav-sub li a span {
  flex: 1;
}
.hp-header__nav-sub li a:hover {
  background: #EDF4FF;
  color: #005A9C;
  padding-left: 24px;
}
/* Nếu có submenu con, giữ nguyên padding khi hover (arrow indicator) */
.hp-header__nav-sub li:has(ul) > a:hover {
  padding-left: 20px;
  background: #dbeafe;
  color: #005A9C;
}
/* Flyout nested levels to the right */
.hp-header__nav-sub li ul {
  display: none;
  position: absolute;
  top: -6px;
  left: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 230px;
  z-index: 1000;
  border: 1px solid #E1E4E8;
  padding: 6px 0;
  animation: hp-menu-in 0.15s ease;
}
/* Hover bridge to keep dropdown open when moving cursor */
.hp-header__nav-sub li ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  width: 20px;
  height: 100%;
  background: transparent;
}
.hp-header__nav-sub li:hover > ul {
  display: block;
}
@keyframes hp-menu-in { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

/* Right actions (Search + CTA) */
.hp-header__right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Search bar on desktop */
.hp-search {
  display: flex;
  align-items: center;
  border: 1.5px solid #E1E4E8;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s ease;
  width: 170px;
  background: #fdfdfd;
}
.hp-search:focus-within {
  border-color: #005A9C;
  width: 210px;
  box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.1);
}
.hp-search__input {
  flex: 1;
  padding: 7px 10px;
  border: none;
  outline: none;
  font-size: 13px;
  color: #2A2A2A;
  background: transparent;
}
.hp-search__input::placeholder {
  color: #aaa;
}
.hp-search__btn {
  background: none;
  color: #005A9C;
  border: none;
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-search__btn:hover {
  color: #022B54;
}

/* Hotline badge */
.hp-cta-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #EBB000;
  color: #022B54 !important;
  padding: 7px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(235,176,0,0.18);
}
.hp-cta-phone:hover {
  background: #D4A000;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(235,176,0,0.28);
}
.hp-cta-phone__num {
  font-size: 13.5px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #022B54;
}

/* ── Footer ── */
.hp-footer { background:#022B54; color:rgba(255,255,255,0.8); margin-top:60px; }
.hp-footer__main { padding:52px 0 36px; }
.hp-footer__grid { display:grid; grid-template-columns:2fr 1fr 1fr 1.5fr; gap:36px; max-width:1200px; margin:0 auto; padding:0 24px; }
.hp-footer__logo { margin-bottom:12px; }
.hp-footer__logo-text { font-family:'Outfit',sans-serif; font-size:22px; font-weight:800; color:#EBB000; }
.hp-footer__desc { font-size:14px; line-height:1.7; color:rgba(255,255,255,0.6); margin-bottom:14px; }
.hp-footer__solar-badge { margin-bottom:12px; opacity:0.55; }
.hp-footer__socials { display:flex; gap:10px; }
.hp-footer__social { width:36px; height:36px; background:rgba(255,255,255,0.08); border-radius:50%; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,0.7); transition:all 0.2s; text-decoration:none; }
.hp-footer__social:hover { background:#EBB000; color:#022B54; }
.hp-footer__title { font-family:'Outfit',sans-serif; font-size:15px; font-weight:700; color:white; margin-bottom:14px; padding-bottom:8px; border-bottom:1px solid rgba(255,255,255,0.12); }
.hp-footer__links { display:flex; flex-direction:column; gap:8px; list-style:none; }
.hp-footer__links a { font-size:13px; color:rgba(255,255,255,0.55); transition:color 0.2s; text-decoration:none; }
.hp-footer__links a:hover { color:#EBB000; }
.hp-footer__contact { display:flex; flex-direction:column; gap:12px; }
.hp-footer__contact-item { display:flex; align-items:flex-start; gap:10px; font-size:13px; color:rgba(255,255,255,0.6); }
.hp-footer__contact-item svg { flex-shrink:0; margin-top:2px; color:rgba(255,255,255,0.4); }
.hp-footer__bottom { border-top:1px solid rgba(255,255,255,0.1); padding:14px 24px; font-size:13px; color:rgba(255,255,255,0.35); }


/* Hamburger Menu button */
.hp-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #005A9C;
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
}

/* ── Mobile responsive ── */
@media (max-width:990px) {
  .hp-header-spacer { display: none !important; }
  .hp-cta-phone { padding: 6px 10px; border-radius: 6px; }
  .hp-cta-phone__num { font-size: 12.5px; }
  
  .hp-header__main-nav-inner {
    position: relative;
    justify-content: flex-start;
  }
  .hp-logo {
    position: static;
    transform: none;
    order: 1;
    margin-right: auto;
  }
  .hp-header__right-actions {
    order: 2;
    gap: 8px;
  }
  .hp-mobile-toggle {
    display: flex !important;
    order: 3;
    margin-left: 8px;
  }
  .hp-search {
    display: none !important;
  }
  .hp-header__nav-list {
    display: none !important;
  }
  
  .hp-footer__grid { grid-template-columns:1fr 1fr; }
}


@media (max-width:600px) {
  .hp-header-spacer { display: none !important; }
  .hp-footer__grid { grid-template-columns:1fr; }
  .hp-logo__brand { display:none; }
  .hp-header__main-nav { height:58px; }
}

/* Mobile Drawer Overlay */
.hp-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.hp-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Mobile Drawer Menu */
.hp-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: #ffffff;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  z-index: 99999;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.hp-drawer.open {
  left: 0;
}

.hp-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E1E4E8;
}
.hp-drawer__title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #022B54;
}
.hp-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  display: flex;
  align-items: center;
}
.hp-drawer__search {
  padding: 16px 20px;
  border-bottom: 1px solid #E1E4E8;
  background: #f8f9fa;
}
.hp-drawer__search form {
  display: flex;
  border: 1px solid #ced4da;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.hp-drawer__search input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  color: #2a2a2a;
}
.hp-drawer__search button {
  background: none;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  color: #005A9C;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}
.hp-drawer__link, .hp-drawer__accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #2a2a2a;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.hp-drawer__link:hover, .hp-drawer__accordion-btn:hover {
  background: #EDF4FF;
  color: #005A9C;
}
.hp-drawer__accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #f9fbfd;
}
.hp-drawer__accordion-content.open {
  max-height: 250px;
}
.hp-drawer__accordion-content a {
  display: block;
  padding: 10px 30px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}
.hp-drawer__accordion-content a:hover {
  color: #005A9C;
  background: #EDF4FF;
}
.hp-drawer__accordion-btn svg {
  transition: transform 0.2s;
}
.hp-drawer__accordion-btn.active svg {
  transform: rotate(180deg);
}
.hp-drawer__footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid #E1E4E8;
  background: #f8f9fa;
}
.hp-drawer__hotline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #022B54;
  text-decoration: none;
  margin-bottom: 12px;
}
.hp-drawer__socials {
  display: flex;
  gap: 12px;
}
.hp-drawer__socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #022B54;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
