/* Header styles for TechGadgetPL */

.tg-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(4, 9, 20, 0.96);
  color: #f5f7fb;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(120, 144, 180, 0.35);
}

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

.tg-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

.tg-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 20%, #5de0ff, #00b7ff 40%, #0050b3 90%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 18px rgba(0, 0, 0, 0.45);
}

.tg-header__site-name {
  font-family: "Ubuntu", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.95rem;
  white-space: nowrap;
}

.tg-header__nav {
  display: flex;
  align-items: center;
}

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

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

.tg-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: #e3e8f8;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.tg-header__nav-link:hover,
.tg-header__nav-link:focus-visible {
  background-color: rgba(0, 183, 255, 0.14);
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 183, 255, 0.7);
}

.tg-header__nav-link:active {
  transform: translateY(1px) scale(0.99);
}

.tg-header__nav-item--highlight .tg-header__nav-link {
  background: linear-gradient(135deg, #00b7ff, #0077ff);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 119, 255, 0.45);
}

.tg-header__nav-item--highlight .tg-header__nav-link:hover,
.tg-header__nav-item--highlight .tg-header__nav-link:focus-visible {
  background: linear-gradient(135deg, #5de0ff, #00b7ff);
}

/* Mobile toggle */
.tg-header__toggle {
  position: relative;
  display: none;
  width: 40px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(120, 144, 180, 0.7);
  background: rgba(5, 13, 30, 0.9);
  padding: 0;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.tg-header__toggle:hover,
.tg-header__toggle:focus-visible {
  background: rgba(0, 183, 255, 0.15);
  border-color: rgba(0, 183, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 183, 255, 0.7);
  outline: none;
}

.tg-header__toggle:active {
  transform: translateY(1px) scale(0.98);
}

.tg-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #e3e8f8;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

/* Open state */
.tg-header__toggle[aria-expanded="true"] .tg-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.tg-header__toggle[aria-expanded="true"] .tg-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.tg-header__toggle[aria-expanded="true"] .tg-header__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile layout */
@media (max-width: 768px) {
  .tg-header__inner {
    padding-inline: 1rem;
  }

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

  .tg-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(4, 9, 20, 0.98);
    border-bottom: 1px solid rgba(120, 144, 180, 0.3);
    transform-origin: top;
  }

  .tg-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.4rem 1.25rem 0.9rem;
  }

  .tg-header__nav-link {
    width: 100%;
    justify-content: flex-start;
    padding-block: 0.6rem;
  }

  /* JS enhances this by collapsing; default is visible for no-JS */
  .tg-header__nav--collapsed {
    display: none;
  }

  .tg-header__nav--open {
    display: block;
  }
}

@media (min-width: 769px) {
  .tg-header__nav {
    position: static;
  }

  .tg-header__nav-list {
    gap: 0.4rem;
  }
}

/* Focus styles for keyboard navigation */
.tg-header__nav-link:focus-visible,
.tg-header__toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 183, 255, 0.9);
}
