/* Header component for Officecleaningsupply
   Relies on global reset, layout, and color tokens from base.css
*/

.ocs-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 35, 52, 0.08);
  backdrop-filter: blur(8px);
}

.ocs-header__top {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ocs-header__skip-link {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -200%);
  margin-top: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #0b5fa4;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  pointer-events: auto;
}

.ocs-header__skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.ocs-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.ocs-header__brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.ocs-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.ocs-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b5fa4, #24a1d7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.ocs-header__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ocs-header__site-name {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #13293d;
  line-height: 1.2;
}

.ocs-header__tagline {
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: #5b6b7a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation */

.ocs-header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ocs-header__nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.ocs-header__nav-item {
  position: relative;
}

.ocs-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #243447;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.ocs-header__nav-link:hover,
.ocs-header__nav-link:focus-visible {
  background-color: rgba(11, 95, 164, 0.08);
  color: #0b5fa4;
  outline: none;
}

.ocs-header__nav-link[aria-current="page"] {
  background: rgba(11, 95, 164, 0.12);
  color: #0b5fa4;
}

.ocs-header__nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.2rem;
  width: 14px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background-color: #0b5fa4;
}

.ocs-header__cta-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ocs-header__cta-link {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0b5fa4;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.ocs-header__cta-link:hover,
.ocs-header__cta-link:focus-visible {
  background: rgba(11, 95, 164, 0.08);
  outline: none;
}

.ocs-header__cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  border: 1px solid #0b5fa4;
  background: #0b5fa4;
  color: #ffffff;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.08s ease;
}

.ocs-header__cta-button:hover {
  background: #084574;
  box-shadow: 0 6px 18px rgba(11, 95, 164, 0.28);
}

.ocs-header__cta-button:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(11, 95, 164, 0.25);
}

.ocs-header__cta-button:focus-visible {
  outline: 2px solid #0b5fa4;
  outline-offset: 3px;
}

/* Mobile nav toggle */

.ocs-header__nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 35, 52, 0.12);
  background: #ffffff;
  cursor: pointer;
  color: #13293d;
}

.ocs-header__nav-toggle-box {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.ocs-header__nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #13293d;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ocs-header__nav-toggle-text {
  font-size: 0.85rem;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ocs-header__nav-toggle:focus-visible {
  outline: 2px solid #0b5fa4;
  outline-offset: 2px;
}

/* Toggle active state animations */

.ocs-header--menu-open .ocs-header__nav-toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.ocs-header--menu-open .ocs-header__nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.ocs-header--menu-open .ocs-header__nav-toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Responsive layout */

@media (max-width: 768px) {
  .ocs-header__inner {
    padding-inline: 1rem;
  }

  .ocs-header__tagline {
    display: none;
  }

  .ocs-header__nav-toggle {
    display: inline-flex;
  }

  .ocs-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 56px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(15, 35, 52, 0.08);
    box-shadow: 0 18px 40px rgba(15, 35, 52, 0.18);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .ocs-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.25rem 0.25rem;
  }

  .ocs-header__nav-link {
    width: 100%;
    padding-block: 0.55rem;
    border-radius: 8px;
  }

  .ocs-header__nav-link[aria-current="page"]::after {
    display: none;
  }

  .ocs-header__cta-group {
    padding: 0.25rem 1.25rem 0.85rem;
    border-top: 1px solid rgba(15, 35, 52, 0.06);
    justify-content: flex-start;
  }

  .ocs-header__cta-group .ocs-header__cta-button {
    flex: 0 0 auto;
  }

  .ocs-header--menu-open .ocs-header__nav {
    opacity: 1;
    transform: scaleY(1);
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 520px) {
  .ocs-header__inner {
    padding-inline: 0.75rem;
    gap: 0.75rem;
  }

  .ocs-header__logo-mark {
    width: 34px;
    height: 34px;
  }

  .ocs-header__site-name {
    font-size: 0.98rem;
  }

  .ocs-header__nav-list {
    padding: 0.75rem 0.9rem 0.25rem;
  }

  .ocs-header__cta-group {
    padding: 0.25rem 0.9rem 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ocs-header,
  .ocs-header * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}