/* Header styles for CityRenovationPL */

.cr-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.cr-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;
}

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

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

.cr-header__logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 20%, #f5b383 0, #c77535 40%, #8c4a1e 80%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 20px rgba(0, 0, 0, 0.45);
}

.cr-header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cr-header__logo-title {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cr-header__logo-subtitle {
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  color: #d0d4da;
}

/* Navigation */

.cr-header__nav {
  display: flex;
}

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

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

.cr-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #e3e6ec;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.cr-header__nav-link:hover,
.cr-header__nav-link:focus-visible {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  outline: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.cr-header__nav-link:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.cr-header__nav-item--cta .cr-header__nav-link--cta {
  background: linear-gradient(135deg, #f5b383, #c77535);
  color: #111318;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.cr-header__nav-item--cta .cr-header__nav-link--cta:hover,
.cr-header__nav-item--cta .cr-header__nav-link--cta:focus-visible {
  background: linear-gradient(135deg, #ffd0a4, #d5833e);
  color: #111318;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
}

/* Mobile toggle */

.cr-header__toggle {
  display: none;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 11, 15, 0.9);
  padding: 0.35rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
  color: #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.cr-header__toggle:focus-visible {
  outline: 2px solid #f5b383;
  outline-offset: 2px;
}

.cr-header__toggle:hover {
  background: rgba(22, 22, 26, 0.98);
  border-color: rgba(255, 255, 255, 0.32);
}

.cr-header__toggle:active {
  transform: translateY(1px);
}

.cr-header__toggle-bar {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

/* Toggle active state (controlled via JS) */

.cr-header__toggle--open .cr-header__toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

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

.cr-header__toggle--open .cr-header__toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile / small screens */

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

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

  .cr-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 3.5rem;
    background: rgba(7, 7, 10, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
  }

  .cr-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0.25rem;
  }

  .cr-header__nav-link {
    justify-content: flex-start;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    font-size: 1rem;
  }

  .cr-header__nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Medium and up */

@media (min-width: 769px) {
  .cr-header__nav {
    align-items: center;
  }
}

/* High contrast focus states, if base doesn't already cover */

.cr-header__nav-link:focus-visible {
  box-shadow: 0 0 0 2px #f5b383;
  background-color: rgba(245, 179, 131, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .cr-header,
  .cr-header__nav,
  .cr-header__toggle,
  .cr-header__nav-link {
    scroll-behavior: auto;
    transition: none !important;
  }
}