/* ==========================================================================
   HIREMATH FINVEST - GLOBAL HEADER COMPONENT STYLES
   Single source of truth extracted from approved Home page header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: height var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  height: 68px;
  background-color: rgba(247, 248, 233, 0.96); /* Subtle cream background on scroll */
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-header-scroll);
}

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

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  user-select: none;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  transition: height var(--transition-normal);
}

.site-header.scrolled .brand-logo-img {
  height: 44px;
}

/* Desktop Navigation Menu (Strictly: Home, About, Services, Enquiry) */
.nav-container {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-primary-forest);
  border-radius: 2px;
  transition: width var(--transition-fast), left var(--transition-fast);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Partner With Us Header CTA (Outline / Light button, secondary to filled WhatsApp) */
.header-actions .btn-partner-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: var(--color-primary-forest);
  border: 1.5px solid var(--color-primary-forest);
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.header-actions .btn-partner-outline:hover {
  background-color: var(--color-soft-mint);
  border-color: var(--color-forest-dark);
  color: var(--color-forest-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 61, 42, 0.08);
}

.header-actions .btn-partner-outline:focus-visible {
  outline: 2px solid var(--color-primary-forest);
  outline-offset: 2px;
}

.site-header.scrolled .btn-partner-outline {
  padding: 8px 15px;
  font-size: 0.875rem;
}

/* WhatsApp Brand Button */
.header-actions .btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--color-primary-forest);
  color: var(--color-white);
  border: 1.5px solid var(--color-primary-forest);
  border-radius: var(--radius-btn);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  outline: none;
}

.header-actions .btn-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.header-actions .btn-whatsapp:hover {
  background-color: var(--color-forest-dark);
  border-color: var(--color-forest-dark);
  color: var(--color-white);
  transform: translateY(-1px);
}

.header-actions .btn-whatsapp:hover svg {
  transform: translateX(3px);
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  border: 1px solid var(--color-border);
  padding: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

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

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

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

/* Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  top: 82px;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 16px 32px rgba(24, 35, 29, 0.1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(-120%);
  transition: transform var(--transition-normal);
  z-index: 999;
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-drawer-link {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-subtle);
  display: block;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
  color: var(--color-primary-forest);
  font-weight: var(--fw-bold);
}

/* WhatsApp Button inside Mobile Drawer */
.mobile-drawer .btn-whatsapp-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #25D366;
  color: #FFFFFF;
  border: 1.5px solid #25D366;
  border-radius: var(--radius-btn);
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: var(--font-size-btn);
  font-weight: var(--fw-bold);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
  transition: all var(--transition-fast);
}

.mobile-drawer .btn-whatsapp-green svg {
  width: 20px;
  height: 20px;
  fill: #FFFFFF;
  flex-shrink: 0;
}

.mobile-drawer .btn-whatsapp-green:hover {
  background-color: #1EBE5D;
  border-color: #1EBE5D;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

/* Mobile Drawer Partner CTA Button */
.mobile-drawer .btn-partner-drawer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-soft-mint, #EAF3E8);
  color: var(--color-primary-forest, #245C3C);
  border: 1.5px solid var(--color-primary-forest, #245C3C);
  border-radius: var(--radius-btn);
  padding: 13px 20px;
  font-family: var(--font-body);
  font-size: var(--font-size-btn);
  font-weight: var(--fw-bold);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.mobile-drawer .btn-partner-drawer:hover {
  background-color: #dceada;
  color: var(--color-forest-dark);
  border-color: var(--color-forest-dark);
  transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1060px) {
  .nav-menu {
    gap: 22px;
  }
}

@media (max-width: 860px) {
  .nav-menu {
    display: none; /* Drawer takes over */
  }

  .mobile-menu-btn {
    display: flex;
  }

  .header-actions .btn-whatsapp,
  .header-actions .btn-partner-outline {
    display: none; /* Appears inside drawer on mobile */
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 74px;
  }

  .site-header.scrolled {
    height: 64px;
  }

  .mobile-drawer {
    top: 74px;
    padding: 20px 16px;
  }

  .brand-logo-img {
    height: 40px;
    max-width: 160px;
  }

  .site-header.scrolled .brand-logo-img {
    height: 36px;
  }
}

@media (max-width: 380px) {
  .brand-logo-img {
    height: 36px;
    max-width: 145px;
  }
}
