/* Header styles for PolishPackaging */

.pp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(12, 42, 74, 0.08);
  backdrop-filter: blur(8px);
}

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

.pp-header__brand {
  display: flex;
  align-items: center;
}

.pp-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #0c2a4a;
}

.pp-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0c2a4a, #1c6ba0);
  position: relative;
  overflow: hidden;
}

.pp-header__logo-mark::after {
  content: "";
  position: absolute;
  inset: 22% 20%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
}

.pp-header__logo-text {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pp-header__nav {
  display: flex;
}

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

.pp-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #183b5b;
  text-decoration: none;
  padding: 0.25rem 0;
}

.pp-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: #1c6ba0;
  transition: width 0.18s ease-out;
}

.pp-header__nav-link:hover::after,
.pp-header__nav-link:focus-visible::after {
  width: 100%;
}

.pp-header__nav-link:focus-visible {
  outline: 2px solid #1c6ba0;
  outline-offset: 3px;
  border-radius: 3px;
}

.pp-header__nav-item--primary .pp-header__nav-link--cta {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 107, 160, 0.18);
  background: #1c6ba0;
  color: #ffffff;
}

.pp-header__nav-item--primary .pp-header__nav-link--cta::after {
  display: none;
}

.pp-header__nav-item--primary .pp-header__nav-link--cta:hover,
.pp-header__nav-item--primary .pp-header__nav-link--cta:focus-visible {
  background: #164f7a;
  border-color: rgba(12, 42, 74, 0.4);
}

/* Mobile toggle */
.pp-header__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(12, 42, 74, 0.16);
  background-color: #ffffff;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.pp-header__toggle:focus-visible {
  outline: 2px solid #1c6ba0;
  outline-offset: 3px;
}

.pp-header__toggle-bar {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #0c2a4a;
  transition: transform 0.16s ease-out, opacity 0.16s ease-out, top 0.16s ease-out, bottom 0.16s ease-out;
}

.pp-header__toggle-bar:nth-child(1) {
  top: 12px;
}

.pp-header__toggle-bar:nth-child(2) {
  top: 19px;
}

.pp-header__toggle-bar:nth-child(3) {
  bottom: 12px;
}

.pp-header__toggle--open .pp-header__toggle-bar:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}

.pp-header__toggle--open .pp-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.pp-header__toggle--open .pp-header__toggle-bar:nth-child(3) {
  bottom: auto;
  top: 19px;
  transform: rotate(-45deg);
}

/* Responsive layout */
@media (max-width: 880px) {
  .pp-header__inner {
    padding-inline: 1rem;
  }

  .pp-header__toggle {
    display: inline-flex;
  }

  .pp-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(12, 42, 74, 0.08);
    box-shadow: 0 14px 30px rgba(8, 23, 38, 0.12);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0.18s ease-out;
  }

  .pp-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.75rem;
  }

  .pp-header__nav-link {
    padding-block: 0.35rem;
    width: 100%;
  }

  .pp-header__nav-item--primary .pp-header__nav-link--cta {
    width: 100%;
    justify-content: center;
  }

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

@media (prefers-reduced-motion: reduce) {
  .pp-header__toggle-bar,
  .pp-header__nav {
    transition: none;
  }
}
