/* ==========================================================================
   HEADER & RESPONSIVE MOBILE DRAWER STYLES (Figma Specification #9782:6854)
   Veromon Pest Control Website
   ========================================================================== */

:root {
  --hd-green-primary: #029B3F;
  --hd-green-hover: #0F6935;
  --hd-green-light: #EDF8F8;
  --hd-text-dark: #333333;
  --hd-text-muted: #666666;
  --hd-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  padding: 16px 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.site-header * {
  pointer-events: auto;
}

/* Floating Header Inner Bar */
.header-inner {
  width: calc(100% - 48px);
  max-width: 1280px;
  margin: 0 auto;
  height: 72px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 100px;
  border: 1px solid rgba(230, 230, 230, 0.85);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header on Scroll */
.site-header.header-scrolled {
  padding: 10px 0;
}

.site-header.header-scrolled .header-inner {
  height: 64px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
  border-color: rgba(2, 155, 63, 0.2);
}

/* Logo Section */
.header-logo {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.header-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo-badge {
  height: 44px;
  width: auto;
  max-width: 144px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.header-logo a:hover .header-logo-badge {
  transform: scale(1.04);
}

/* Navigation Links (Desktop) */
.header-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 100%;
}

.header-nav>a,
.nav-dropdown-toggle {
  position: relative;
  font-family: var(--hd-font);
  font-weight: 500;
  font-size: 16px;
  color: var(--hd-text-dark);
  padding: 6px 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
  cursor: pointer;
}

.header-nav>a:hover,
.nav-dropdown-toggle:hover {
  color: var(--hd-green-primary);
}

/* Active Nav State with Green Underline (Figma Spec #9782:6859) */
.header-nav>a.active,
.nav-dropdown.active .nav-dropdown-toggle {
  font-weight: 600;
  color: var(--hd-green-primary);
}

.header-nav>a.active::after,
.nav-dropdown.active .nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--hd-green-primary);
  border-radius: 2px;
  animation: navLineIn 0.3s ease forwards;
}

@keyframes navLineIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }

  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Dropdown Menu (Desktop) */
.nav-dropdown {
  position: relative;
}

.dropdown-arrow {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  min-width: 330px;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 100;
  box-sizing: border-box;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--hd-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--hd-text-dark);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  line-height: 1.4;
}

.nav-dropdown-menu a:hover {
  background-color: var(--hd-green-light);
  color: var(--hd-green-primary);
  transform: translateX(4px);
}

.nav-dropdown-menu a.active {
  background-color: rgba(2, 155, 63, 0.12);
  color: var(--hd-green-primary);
  font-weight: 600;
}

/* Right Header CTA Button: Hubungi Kami (Figma Spec #9782:6870) */
.header-cta-wrap {
  display: flex;
  align-items: center;
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background-color: var(--hd-green-primary);
  color: #FFFFFF !important;
  font-family: var(--hd-font);
  font-weight: 500;
  font-size: 16px;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(2, 155, 63, 0.35);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.btn-header-cta:hover {
  background-color: var(--hd-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 155, 63, 0.5);
  color: #FFFFFF !important;
}

/* Mobile Hamburger Toggle */
.header-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
}

.header-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--hd-text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.header-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   MOBILE DRAWER NAVIGATION
   ========================================================================== */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: #FFFFFF;
  z-index: 1002;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

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

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #EEEEEE;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--hd-text-dark);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close-btn:hover {
  background: #F3F4F6;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-drawer-nav>a {
  font-family: var(--hd-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--hd-text-dark);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.mobile-drawer-nav>a:hover,
.mobile-drawer-nav>a.active {
  color: var(--hd-green-primary);
  font-weight: 600;
}

/* Accordion in Mobile Drawer */
.mobile-drawer-accordion {
  display: flex;
  flex-direction: column;
}

.mobile-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--hd-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--hd-text-dark);
  padding: 8px 0;
  cursor: pointer;
  text-align: left;
}

.mobile-accordion-toggle svg {
  transition: transform 0.25s ease;
}

.mobile-drawer-accordion.open .mobile-accordion-toggle svg {
  transform: rotate(180deg);
}

.mobile-accordion-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 8px 12px;
  border-left: 2px solid var(--hd-green-light);
}

.mobile-drawer-accordion.open .mobile-accordion-menu {
  display: flex;
}

.mobile-accordion-menu a {
  font-family: var(--hd-font);
  font-size: 14px;
  color: #555555;
  text-decoration: none;
  padding: 6px 0;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.mobile-accordion-menu a:hover,
.mobile-accordion-menu a.active {
  color: var(--hd-green-primary);
  font-weight: 600;
}

.btn-drawer-cta {
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */

/* Tablet & Mobile (max-width: 992px) */
@media screen and (max-width: 992px) {
  .header-nav {
    display: none;
  }

  .header-cta-wrap {
    display: none;
  }

  .header-toggle {
    display: flex;
  }

  .header-inner {
    padding: 8px 20px;
    height: 60px;
  }
}