/* =========================================================
   HEADER SHELL
   ========================================================= */

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-width) solid var(--color-border);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

/* Header inner */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 76px;
}

/* =========================================================
   BRAND
   ========================================================= */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
    width: 120px;  /* Adjust size as needed */
    height: auto;
    object-fit: contain;  /* Keeps logo crisp */
    flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--color-bg-soft);
  border: var(--border-width) solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.brand-name {
  display: grid;
  line-height: 1.1;
}

.brand-name strong {
  font-size: 1rem;
  font-weight: 800;
}

.brand-name span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav {
  display: none;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto; /* PUSH TO RIGHT */
}

.nav a {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-body);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a:hover {
  background: var(--color-bg-soft);
  color: var(--color-text-primary);
}

.nav a.is-active {
  background: var(--color-bg-soft);
  color: var(--color-text-primary);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: #1f3a8a;
  border-radius: 2px;
}

/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* =========================================================
   SEARCH TOGGLE BUTTON (MOBILE ONLY)
   ========================================================= */

.search-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--border-width) solid var(--color-border);
  background: #ffffff;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: all 0.2s ease;
}

.search-toggle-btn:hover {
  background: var(--color-bg-soft);
}

/* =========================================================
   UNIFIED SEARCH BAR
   ========================================================= */

.unified-search-container {
  position: relative;
  flex: 1;
  max-width: 380px;
  min-width: 260px;
}

.unified-search {
  position: relative;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: 
    0 4px 20px rgba(0,0,0,0.08),
    0 1px 3px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.unified-search input {
  width: 100%;
  padding: 15px 20px 15px 52px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.unified-search input::placeholder {
  color: var(--color-text-muted);
  font-weight: 400;
}

.search-submit {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  cursor: pointer;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.search-submit:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.search-submit svg {
  width: 20px;
  height: 20px;
}

.search-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(99, 102, 241, 0.05) 50%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 16px;
}

.unified-search:hover .search-input-wrapper,
.unified-search input:focus ~ .search-input-wrapper .search-glow {
  box-shadow: 
    0 12px 40px rgba(0,0,0,0.15),
    0 4px 12px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.unified-search input:focus ~ .search-input-wrapper .search-glow {
  opacity: 1;
}

/* =========================================================
   DROPDOWN (INDUSTRIES)
   ========================================================= */

.nav-item {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 20px;
  max-width: 100%;
}


.dropdown-grid a {
  font-size: 0.85rem;
  color: var(--color-text-body);
  text-decoration: none;
}

.dropdown-grid a:hover {
  color: var(--color-primary);
}

/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--border-width) solid var(--color-border);
  background: #ffffff;
  cursor: pointer;
  color: var(--color-text-primary);
}

/* =========================================================
   MOBILE MENU
   ========================================================= */

.mobile-menu {
  display: none;
  background: #ffffff;
  border-top: var(--border-width) solid var(--color-border);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-inner {
  padding: var(--space-4) 0;
}

.mobile-menu a {
  display: block;
  padding: 12px var(--space-5);
  color: var(--color-text-body);
  text-decoration: none;
  font-weight: 600;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width: 980px) {
  .nav {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
  
  /* DESKTOP: Search always visible, search toggle hidden */
  .search-toggle-btn {
    display: none !important;
  }
  
  .unified-search-container {
    max-width: 380px;
    margin-left: auto;
  }
}

@media (max-width: 979px) {
  /* MOBILE: Search toggle visible, search bar hidden by default */
  .search-toggle-btn {
    display: flex !important;
  }
  
  .unified-search-container {
    max-width: none;
    min-width: 0;
    flex: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: var(--border-width) solid var(--color-border);
  }
  
  .unified-search-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .unified-search input {
    padding: 16px 20px 16px 52px;
    font-size: 1rem;
  }
  
  .header-inner {
    gap: var(--space-2);
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 var(--space-4);
  }
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  border-top: var(--border-width) solid var(--color-border);
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    var(--color-bg-soft) 100%
  );
}

/* Top section */
.footer-top {
  padding: var(--space-7) 0;
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
}

/* Footer columns */
.footer-col {
  position: relative;
  padding-left: var(--space-5);
}

/* Vertical divider (desktop only) */
.footer-col::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--color-border);
  display: none;
}

/* First column should NOT have a divider */
.footer-col:first-child::before {
  display: none !important;
}

/* Titles */
.footer-col h4 {
  margin-bottom: var(--space-3);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Text block */
.footer-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

/* Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px; /* tighter, more professional */
}


.footer-col a {
  color: var(--color-text-body);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
  display: inline-block;
  position: relative;
}

/* Modern link hover effect */
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 1px;
  background: #1f3a8a;
  transition: width 0.2s ease;
}

.footer-col a:hover {
  color: var(--color-text-primary);
}

.footer-col a:hover::after {
  width: 100%;
}

/* Bottom bar */
.footer-bottom {
  border-top: var(--border-width) solid var(--color-border);
  background: rgba(247, 248, 250, 0.8);
  backdrop-filter: blur(6px);
  padding: var(--space-4) 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Brand mini */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 800;
}

.footer-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #ffffff;
  border: var(--border-width) solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* Responsive columns + dividers */
@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    align-items: start;
  }

  .footer-col::before {
    display: block;
  }
}


/* Mobile footer polish */
@media (max-width: 899px) {
  .footer-top {
    padding: var(--space-6) 0;
  }

  .footer-col {
    padding-left: 0;
  }

  /* Remove dividers on mobile */
  .footer-col::before {
    display: none !important;
  }

  /* Section separation for mobile */
  .footer-col {
    border-top: var(--border-width) solid var(--color-border);
    padding-top: var(--space-4);
  }

  .footer-col:first-child {
    border-top: none;
    padding-top: 0;
  }

  /* Make section titles stand out more */
  .footer-col h4 {
    font-size: 1rem;
    margin-bottom: var(--space-2);
  }

  /* Center bottom bar content on small screens */
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}
