/* Header Component Styles */

.site-header {
  width: 100%;
  position: relative;
  z-index: 1005;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Sticky Header on scroll */
.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  animation: slideDown 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-header.is-sticky .top-bar {
  display: none;
}

.site-header.is-sticky .mobile-drawer,
.site-header.is-sticky .mobile-drawer-overlay {
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* TOP BAR STYLES */
.top-bar {
  background-color: var(--dark-bg);
  color: var(--text-light);
  font-size: 0.85rem;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
  margin-top: -24px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
}

.top-bar-item a:hover {
  color: var(--secondary);
}

.top-bar-item svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.top-bar-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-bar-social a {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.top-bar-social a:hover {
  color: var(--secondary);
}

.top-bar-social svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-bar-divider {
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.2);
}

.client-login-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 400;
  padding: 2px 8px;
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.client-login-btn:hover {
  background-color: var(--dark-bg-hover);
  color: var(--secondary);
}

.client-login-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* MAIN HEADER STYLES */
.main-nav-bar {
  background-color: var(--navbar-bg);
  height: var(--header-height);
  display: flex;
  align-items: center;
  position: relative;
  transition: all var(--transition-normal);
}

.main-nav-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  height: 100%;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  position: relative;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform var(--transition-fast);
}

.nav-item:hover .nav-link svg {
  transform: translateY(2px);
}

/* Indicator line for active items */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-normal);
}

.nav-item.active .nav-link {
  color: var(--primary);
}

.nav-item.active .nav-link::after {
  transform: scaleX(1);
}

.nav-item:hover .nav-link::after {
  transform: scaleX(1);
}

/* DROPDOWN MENU STYLES */
.dropdown-menu {
  position: absolute;
  top: calc(100% - 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #ffffff;
  min-width: 240px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  padding: 0.75rem 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background-color: #ffffff;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  top: 100%;
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 2;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  padding-left: 1.8rem;
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color:#46aefd;
  background-color: transparent;
  transition: all var(--transition-fast);
  position: relative;
  overflow: visible;
}

/* Sonar ping — dual expanding rings suggest live search activity */
.search-btn::before,
.search-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #46aefd;
  opacity: 0;
  pointer-events: none;
  animation: search-sonar 2.6s ease-out infinite;
}

.search-btn::after {
  animation-delay: 1.3s;
}

@keyframes search-sonar {
  0% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  70% {
    opacity: 0.15;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.search-btn:hover {
  background-color: var(--primary-light);
  transform: scale(1.05);
}

.search-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  animation: search-wobble 4s ease-in-out infinite;
  transform-origin: 55% 55%;
}

/* Every few seconds, magnifier gives a subtle wiggle as if being used */
@keyframes search-wobble {
  0%, 82%, 100% {
    transform: rotate(0deg) scale(1);
  }
  86% {
    transform: rotate(-14deg) scale(1.08);
  }
  90% {
    transform: rotate(12deg) scale(1.08);
  }
  94% {
    transform: rotate(-8deg) scale(1.05);
  }
  98% {
    transform: rotate(0deg) scale(1);
  }
}

/* Silence the effect once the user actually engages the search */
.search-container.active .search-btn::before,
.search-container.active .search-btn::after {
  animation: none;
  opacity: 0;
}

.search-container.active .search-btn svg {
  animation: none;
}

/* Sleek expanding search bar */
.search-container {
  display: flex;
  align-items: center;
  position: relative;
  background-color: #f1f5f9;
  border-radius: 30px;
  padding: 2px;
  transition: all var(--transition-normal);
  border: 1.5px solid transparent;
}

.search-container.active {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light), var(--shadow-sm);
}

.search-input-expand {
  width: 0px;
  opacity: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1), opacity 0.2s ease, padding 0.3s ease;
}

.search-container.active .search-input-expand {
  width: 180px;
  opacity: 1;
  padding: 0.25rem 0.5rem 0.25rem 0.8rem;
}

/* Get a Quote CTA Button */
.quote-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  padding: 0.5rem 1.4rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal);
}

.quote-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform var(--transition-normal);
}

.quote-btn:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.quote-btn:hover svg {
  transform: translateX(4px);
}

.mobile-social-bar {
  display: none;
}

/* HAMBURGER & MOBILE TOGGLE */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 1002;
}

.mobile-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--dark-bg);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* MOBILE DRAWER STYLES */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  right: -320px;
  width: 320px;
  height: calc(100vh - var(--header-height));
  background-color: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
  transition: right var(--transition-slow);
  z-index: 1001;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-drawer.active {
  right: 0;
}

.mobile-drawer-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100vw;
  height: calc(100vh - var(--header-height));
  background-color: rgba(11, 19, 32, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  z-index: 1000;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.mobile-nav-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.6rem;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--primary);
}

.mobile-nav-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform var(--transition-fast);
}

.mobile-nav-link.open svg {
  transform: rotate(180deg);
}

/* Mobile Submenu Accordion */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  gap: 0.4rem;
}

.mobile-nav-link.open + .mobile-submenu {
  max-height: 500px;
  transition: max-height 0.3s ease-in;
  margin-top: 0.4rem;
  margin-bottom: 0.25rem;
}

.mobile-submenu-item {
  font-size: 0.85rem;
  color: #475569;
  padding: 0.3rem 0;
  font-weight: 500;
  display: block;
  transition: color var(--transition-fast);
}

.mobile-submenu-item:hover, .mobile-submenu-item.active {
  color: var(--primary);
}

.mobile-drawer-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-drawer-footer .quote-btn {
  width: 100%;
  justify-content: center;
}

.mobile-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  /* padding-top: 0.5rem; */
}

.mobile-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-contact-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* RESPONSIVE MEDIA QUERIES */

@media (max-width: 1024px) {
  :root {
    --header-height: 70px; /* Header height goes back to 70px on mobile */
  }
  
  .top-bar {
    height: auto;
    padding: 0.4rem 0;
    font-size: 0.72rem;
    margin-top: 0;
  }

  .top-bar .container {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    justify-content: center;
  }

  .top-bar-left,
  .top-bar-right {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .top-bar-item {
    gap: 0.35rem;
  }

  .top-bar-item svg {
    width: 12px;
    height: 12px;
  }

  .top-bar-social {
    gap: 0.65rem;
  }

  .top-bar-social svg {
    width: 14px;
    height: 14px;
  }

  .top-bar-item.address-item {
    display: none; /* Hide long address on mobile */
  }
  
  .nav-menu {
    display: none; /* Hide desktop menu */
  }
  
  .header-actions .quote-btn {
    display: none; /* Hide CTA on mobile header (available in drawer) */
  }

  .header-actions .search-container {
    display: flex; /* Keep search icon visible on mobile */
    margin-right: 0.25rem;
  }
  
  .mobile-toggle {
    display: flex; /* Show mobile hamburger toggle */
  }
  
  .logo-img {
    height: 42px;
  }
  
  .mobile-social-bar {
    display: flex;
    width: calc(100% + 3rem); /* Full width of drawer */
    height: 44px;
    background-color: var(--primary); /* Blue background */
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -2rem; /* Sit flush against bottom edge of drawer padding */
    /* margin-top: 1.5rem; */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-social-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    transition: all var(--transition-fast);
    text-decoration: none;
  }

  .mobile-social-bar a:last-child {
    border-right: none;
  }

  .mobile-social-bar svg {
    width: 15px;
    height: 15px;
    box-sizing: border-box;
    transition: all var(--transition-fast);
  }

  /* Mockup: highlight circle active/hover state */
  .mobile-social-bar a.active-social svg,
  .mobile-social-bar a:hover svg {
    background-color: #ffffff;
    color: var(--primary); /* Blue icon on white background */
    border-radius: 50%;
    width: 26px;
    height: 26px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
  }
}

@media (max-width: 480px) {
  .logo-img {
    height: 36px;
  }
  .mobile-drawer {
    width: 280px;
    right: -280px;
    padding: 1.5rem 1.2rem 2rem 1.2rem;
  }
}

/* MEGA MENU DROPDOWN STYLES */
.main-nav-bar .container {
  position: relative; /* Base for full container-width positioning of mega menu */
}

.nav-item.has-mega-menu {
  position: static;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 46, 132, 0.12);
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(10px);
  z-index: 1000;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
  text-align: left;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-menu.force-hide {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(10px) !important;
}

.mega-menu.force-hide {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(10px) !important;
}

/* Left Sidebar in Mega Menu */
.mega-sidebar {
  background-color: #f8fafc;
  border-right: 1px solid var(--border);
  padding: 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.mega-sidebar::-webkit-scrollbar,
.mega-columns::-webkit-scrollbar,
.mega-links-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera - hide all scrollbars */
}

.mega-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  padding-left: 0.4rem;
}

.mega-sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: normal;
  line-height: 1.25;
}

.mega-sidebar-tab span {
  flex: 1;
}

.mega-sidebar-tab .arrow-indicator {
  margin-left: auto;
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.mega-sidebar-tab:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--primary);
}

.mega-sidebar-tab.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.mega-sidebar-tab.active .arrow-indicator {
  transform: translateX(3px);
}

/* Columns area in Mega Menu */
.mega-columns {
  display: block;
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
}

.mega-col {
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
}

.mega-col.active {
  display: flex;
}

.mega-col:last-child {
  border-right: none;
}

.mega-col-header {
  background-color: #00358a; /* 00358a background requested by user for bg sections */
  color: #ffffff;
  padding: 0.7rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.mega-col-header svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.mega-links-list {
  padding: 0.85rem 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 1.2rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mega-link-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.77rem;
  font-weight: 500;
  color: #475569;
  border-radius: 4px;
  transition: all var(--transition-fast);
  line-height: 1.3;
}

.mega-link-item svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.mega-link-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  padding-left: 0.9rem;
}

.mega-link-item:hover svg {
  transform: translateX(2px);
}

/* Mobile Nested Submenus Accordion style */
.mobile-nested-list {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0;
  width: 100%;
}

.mobile-nested-item {
  width: 100%;
}

.mobile-nested-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color var(--transition-fast);
  width: 100%;
}

.mobile-nested-link > span {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  line-height: 1.35;
  margin-right: 0.5rem;
}

.mobile-nested-link:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

.mobile-nested-link .arrow-indicator,
.mobile-nested-link > svg:last-child {
  margin-left: auto;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform var(--transition-fast);
}

.mobile-nested-link.open {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nested-link.open .arrow-indicator,
.mobile-nested-link.open > svg:last-child {
  transform: rotate(180deg);
}

.mobile-nested-submenu {
  display: none;
  padding-left: 1.2rem;
  background-color: rgba(0, 0, 0, 0.015);
  border-left: 2px solid var(--primary-light);
}

.mobile-nested-submenu.open {
  display: flex;
  flex-direction: column;
  max-height: 270px;
  overflow-y: auto;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* Scrollbar for mobile nested submenus */
.mobile-nested-submenu::-webkit-scrollbar {
  width: 4px;
}

.mobile-nested-submenu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

.mobile-nested-submenu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.mobile-nested-submenu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.mobile-nested-submenu .mobile-submenu-item {
  border-bottom: none;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mobile-nested-submenu .mobile-submenu-item svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  flex-shrink: 0;
}

.mobile-nested-submenu .mobile-submenu-item:hover {
  color: var(--primary);
}

/* Sidebar category square icon badges */
.mega-sidebar-icon-badge {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  background-color: #ffffff;
  color: var(--primary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mega-sidebar-icon-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.mega-sidebar-tab.active .mega-sidebar-icon-badge {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Mobile accordion category icon badges */
.mobile-nested-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background-color: #f8fafc;
  color: var(--primary);
  margin-right: 0.75rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.mobile-nested-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.mobile-nested-link.open .mobile-nested-icon {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ── Header Quick Enquiry Form ───────────────────────────────── */
.hqf-wrap {
  position: relative;
}

.hqf-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary, #0d6efd);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.hqf-trigger:hover { background: var(--primary-dark, #0b5ed7); }
.hqf-trigger svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.hqf-chevron {
  transition: transform 0.2s;
}
.hqf-wrap.is-open .hqf-chevron { transform: rotate(180deg); }

.hqf-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 270px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 2000;
}
.hqf-wrap.is-open .hqf-dropdown { display: block; }

.hqf-title {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.hqf-field {
  margin-bottom: 10px;
}
.hqf-field input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.hqf-field input::placeholder { color: #94a3b8; }
.hqf-field input:focus { border-color: var(--primary, #0d6efd); }
.hqf-field.has-error input { border-color: #f87171; }

.hqf-err {
  display: block;
  color: #f87171;
  font-size: 0.73rem;
  margin-top: 3px;
  min-height: 14px;
}

.hqf-submit {
  width: 100%;
  background: var(--primary, #0d6efd);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}
.hqf-submit:hover { background: var(--primary-dark, #0b5ed7); }
.hqf-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.hqf-global-err {
  color: #f87171;
  font-size: 0.76rem;
  margin: 6px 0 0;
  text-align: center;
  min-height: 16px;
}

.hqf-success {
  text-align: center;
  padding: 10px 0;
}
.hqf-success svg {
  width: 38px; height: 38px;
  stroke: #4ade80; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 8px;
}
.hqf-success p {
  color: #e2e8f0;
  font-size: 0.84rem;
  margin: 0;
}

@media (max-width: 768px) {
  .hqf-wrap { display: none; }
}
/* ── /Header Quick Enquiry Form ──────────────────────────────── */


/* ── Site-wide Search Popup ─────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.search-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(12vh, 120px);
}
.search-popup[hidden] { display: none !important; }

.search-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.search-popup.is-open .search-popup-overlay { opacity: 1; }

.search-popup-panel {
  position: relative;
  width: min(680px, calc(100% - 32px));
  max-height: 78vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.35), 0 12px 30px -10px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.18s ease;
}
.search-popup.is-open .search-popup-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.search-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.search-popup-icon {
  display: inline-flex;
  color: #46aefd;
}
.search-popup-icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2;
}
.search-popup-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: #0f172a;
  padding: 6px 4px;
}
.search-popup-input::placeholder { color: #94a3b8; }

.search-popup-close {
  border: 0;
  background: transparent;
  color: #64748b;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.search-popup-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.search-popup-body {
  overflow-y: auto;
  padding: 12px 14px 16px;
  scrollbar-width: thin;
  background: #f8fafc;
}

.search-popup-hint,
.search-popup-empty,
.search-popup-loading {
  padding: 22px 20px;
  text-align: center;
  color: #64748b;
  font-size: 0.92rem;
}
.search-popup-empty strong { color: #0f172a; }

/* Each result group is its own card */
.search-result-group {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.search-result-group + .search-result-group {
  margin-top: 12px;
}

.search-result-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary, #1e40af);
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}
.search-result-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary, #1e40af);
  color: #ffffff;
  flex-shrink: 0;
}
.search-result-group-icon svg {
  width: 16px;
  height: 16px;
}
.search-result-group-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-group-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 1px 8px;
  letter-spacing: 0;
}

/* Per-group accent colours */
.search-result-group[data-group="isi-products"] .search-result-group-icon { background: #1e40af; }
.search-result-group[data-group="products"] .search-result-group-icon { background: #0f766e; }
.search-result-group[data-group="qco-orders"] .search-result-group-icon { background: #b45309; }
.search-result-group[data-group="services"] .search-result-group-icon { background: #7c3aed; }
.search-result-group[data-group="service-categories"] .search-result-group-icon { background: #db2777; }
.search-result-group[data-group="news-updates"] .search-result-group-icon { background: #dc2626; }
.search-result-group[data-group="blog-posts"] .search-result-group-icon { background: #0369a1; }

.search-result-list {
  display: flex;
  flex-direction: column;
  padding: 6px;
}
.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  color: #0f172a;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.search-result-item + .search-result-item {
  border-top: 1px solid #f1f5f9;
}
.search-result-item:hover,
.search-result-item:focus {
  background: #eff6ff;
  outline: none;
}
.search-result-title {
  font-size: 0.95rem;
  line-height: 1.35;
}
.search-result-title mark {
  background: #fff3bf;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.search-result-sub {
  margin-top: 2px;
  font-size: 0.78rem;
  color: #64748b;
}

@media (max-width: 640px) {
  .search-popup { padding-top: 60px; }
  .search-popup-panel { max-height: 82vh; }
}
/* ── /Site-wide Search Popup ────────────────────────────────── */
