/* ==========================================================================
   Header Styles - FixPro 24x7 Home Appliance Repair
   ========================================================================== */

/* Top Info Bar */
.top-bar {
  background: var(--primary-dark);
  color: var(--text-light-muted);
  font-size: 0.825rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.top-bar-item svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* Main Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

.site-header.scrolled {
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.09);
  background: rgba(255, 255, 255, 0.98);
}

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

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
}

.brand-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.25);
  position: relative;
}

.brand-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--accent);
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-medium);
  text-decoration: none;
  padding: 6px 2px;
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Services Dropdown Navigation */
.nav-item-dropdown {
  position: relative;
  padding: 10px 0;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  stroke-width: 2.5;
}

.nav-item-dropdown:hover .dropdown-chevron,
.nav-item-dropdown:focus-within .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 310px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 76, 129, 0.04);
  padding: 10px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
}

/* Bridge gap for mouse cursor */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 14px;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--primary-light);
  transform: translateX(4px);
}

.dropdown-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: rgba(15, 76, 129, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dropdown-icon svg {
  width: 18px;
  height: 18px;
}

.dropdown-item:hover .dropdown-icon {
  background: var(--primary);
  color: var(--white);
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
}

.dropdown-item-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
}

.dropdown-item:hover .dropdown-item-title {
  color: var(--primary);
}

.dropdown-item-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

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

.btn-header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid rgba(15, 76, 129, 0.15);
  transition: all 0.25s ease;
}

.btn-header-call:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.2);
}

.btn-header-call svg {
  width: 16px;
  height: 16px;
}

.btn-header-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--whatsapp-green);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all 0.25s ease;
}

.btn-header-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
  color: var(--white);
}

.btn-header-whatsapp svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Mobile Hamburger Toggle */
.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.mobile-toggle-btn:hover {
  background: var(--bg-light);
}

.mobile-toggle-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 82%;
  max-width: 340px;
  height: 100vh;
  background: var(--white);
  z-index: 2000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

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

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close-btn {
  background: var(--bg-light);
  border: none;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-dark);
}

.drawer-close-btn svg {
  width: 22px;
  height: 22px;
}

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

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

/* Mobile Nav Section Titles */
.mobile-nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 16px 0 8px 6px;
}

/* Mobile Stacked Services List (Reference Design Pattern) */
.mobile-services-stacked {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-service-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.25s ease;
}

.mobile-service-row:hover,
.mobile-service-row.active {
  background: #fff;
  border-color: #f97316;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.15);
  transform: translateX(3px);
}

.mobile-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-row-icon svg {
  width: 18px;
  height: 18px;
}

.mobile-row-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.mobile-row-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.mobile-row-desc {
  font-size: 0.76rem;
  color: var(--text-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.mobile-row-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.mobile-service-row:hover .mobile-row-arrow {
  color: #ea580c;
  transform: translateX(3px);
}

.mobile-drawer-ctas {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Responsive Header Rules */
@media (max-width: 992px) {
  .top-bar-hours {
    display: none;
  }
  .nav-menu {
    display: none;
  }
  .mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-container {
    height: 66px;
  }
  .brand-title {
    font-size: 1.2rem;
  }
  .btn-header-call {
    display: inline-flex;
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .btn-header-whatsapp {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: 5px 0;
    font-size: 0.76rem;
  }
  .top-bar .container {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .top-bar-left {
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
  }
  .top-bar-hours {
    display: none;
  }
  .top-bar-email,
  .top-bar-right a[href^="mailto:"] {
    display: none;
  }
  .top-bar-right {
    gap: 8px;
    flex-shrink: 0;
  }
  .top-bar-badge {
    font-size: 0.7rem;
    padding: 2px 7px;
    white-space: nowrap;
  }
  .top-bar-item {
    font-size: 0.75rem;
    white-space: nowrap;
    gap: 4px;
  }
  .top-bar-item svg {
    width: 12px;
    height: 12px;
  }

  /* Main Navbar Header */
  .header-container {
    height: 60px;
    padding-left: 16px;
    padding-right: 16px;
    gap: 8px;
  }
  .brand-logo {
    gap: 9px;
  }
  .brand-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .brand-icon-wrapper svg {
    width: 19px;
    height: 19px;
  }
  .brand-title {
    font-size: 1.08rem;
    font-weight: 800;
  }
  .brand-tagline {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }
  .header-actions {
    gap: 7px;
    align-items: center;
  }
  .header-actions .btn-header-call {
    display: inline-flex;
    width: 35px;
    height: 35px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }
  .header-actions .btn-header-call .btn-call-text,
  .header-actions .btn-header-call span:not(.sr-only) {
    display: none;
  }
  .header-actions .btn-header-call svg {
    width: 16px;
    height: 16px;
    margin: 0;
  }
  .header-actions .btn-header-whatsapp {
    display: inline-flex;
    height: 35px;
    padding: 0 12px;
    font-size: 0.78rem;
    border-radius: 999px;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .header-actions .btn-header-whatsapp svg {
    width: 15px;
    height: 15px;
  }
  .mobile-toggle-btn {
    width: 35px;
    height: 35px;
    padding: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    flex-shrink: 0;
  }
  .mobile-toggle-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 576px) {
  .top-bar {
    padding: 4px 0;
    font-size: 0.72rem;
  }
  .top-bar-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
    gap: 4px;
  }
  .pulse-dot {
    width: 5px;
    height: 5px;
  }
  .top-bar-item {
    font-size: 0.72rem;
  }
  .top-bar-item svg {
    width: 11px;
    height: 11px;
  }
  .header-container {
    height: 58px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .brand-logo {
    gap: 8px;
  }
  .brand-icon-wrapper {
    width: 33px;
    height: 33px;
    border-radius: 8px;
  }
  .brand-icon-wrapper svg {
    width: 17px;
    height: 17px;
  }
  .brand-title {
    font-size: 1.02rem;
  }
  .brand-tagline {
    font-size: 0.55rem;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .btn-header-call {
    width: 33px;
    height: 33px;
  }
  .header-actions .btn-header-call svg {
    width: 15px;
    height: 15px;
  }
  .header-actions .btn-header-whatsapp {
    height: 33px;
    padding: 0 10px;
    font-size: 0.74rem;
    gap: 4px;
  }
  .header-actions .btn-header-whatsapp svg {
    width: 14px;
    height: 14px;
  }
  .mobile-toggle-btn {
    width: 33px;
    height: 33px;
  }
  .mobile-toggle-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 400px) {
  .top-bar-badge {
    font-size: 0.64rem;
    padding: 1.5px 5px;
  }
  .helpline-prefix {
    display: none;
  }
  .top-bar-item {
    font-size: 0.7rem;
  }
  .brand-tagline {
    display: none;
  }
  .brand-title {
    font-size: 0.98rem;
  }
  .header-actions .btn-header-whatsapp .btn-wa-text {
    display: none;
  }
  .header-actions .btn-header-whatsapp {
    width: 33px;
    height: 33px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
}
