:root {
  --site-bar-bg: rgba(3, 4, 3, 0.94);
  --site-bar-panel: #080b08;
  --site-bar-green: var(--accent-green, var(--green, #39ff14));
  --site-bar-glow: var(--accent-glow, var(--green-glow, rgba(57, 255, 20, 0.34)));
  --site-bar-text: var(--text-main, var(--text, #ffffff));
  --site-bar-muted: var(--text-muted, var(--muted, #768576));
  --site-bar-border: var(--border-color, var(--line, rgba(72, 98, 72, 0.34)));
  --site-bar-display: var(--font-display, var(--display, 'Orbitron', sans-serif));
  --site-bar-accent: var(--font-accent, var(--accent, 'Teko', sans-serif));
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}

header {
  width: 100%;
  min-height: 72px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--site-bar-bg);
  border-bottom: 1px solid var(--site-bar-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1400px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 0.7rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-header,
.logo-header a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-header a { gap: 10px !important; }

.logo-header img {
  width: auto;
  height: 38px;
  display: block;
  filter: drop-shadow(0 0 9px var(--site-bar-glow));
}

.logo-text {
  color: var(--site-bar-text);
  font-family: var(--site-bar-display);
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}

.logo-text span {
  color: var(--site-bar-green);
  margin-left: -0.12em;
  text-shadow: 0 0 9px var(--site-bar-glow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.15rem, 2.3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

header nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--site-bar-muted);
  font-family: var(--site-bar-display);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

header nav > ul > li > a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: var(--site-bar-green);
  box-shadow: 0 0 10px var(--site-bar-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

header nav a:hover,
header nav a.active,
header nav a:focus-visible {
  color: var(--site-bar-text);
  text-shadow: 0 0 8px var(--site-bar-glow);
}

header nav > ul > li > a:hover::after,
header nav > ul > li > a.active::after,
header nav > ul > li > a:focus-visible::after {
  width: auto;
  transform: scaleX(1);
}

.dropdown { position: relative; }
.dropdown-arrow { color: var(--site-bar-green); font-size: 0.62rem; margin-left: 0.2rem; transition: transform 0.2s ease; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  z-index: 1100;
  width: 190px;
  margin: 0;
  padding: 0.45rem !important;
  display: block !important;
  opacity: 0;
  visibility: hidden;
  background: rgba(7, 10, 7, 0.98);
  border: 1px solid var(--site-bar-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 20px rgba(57, 255, 20, 0.06);
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown:hover .dropdown-arrow,
.dropdown:focus-within .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu li,
.dropdown-menu a { width: 100%; }

.dropdown-menu a {
  min-height: 40px;
  padding: 0.75rem 0.85rem;
  color: var(--site-bar-muted);
  font-size: 0.69rem;
  text-align: left;
}

.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible { color: var(--site-bar-green); background: rgba(57, 255, 20, 0.06); }

.btn-nav-cta {
  min-height: 42px;
  padding: 0.65rem 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #030403;
  background: var(--site-bar-green);
  border: 1px solid var(--site-bar-green);
  border-radius: 2px;
  box-shadow: 0 0 16px var(--site-bar-glow);
  font-family: var(--site-bar-accent);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-nav-cta:hover,
.btn-nav-cta:focus-visible {
  color: var(--site-bar-green);
  background: transparent;
  box-shadow: 0 0 22px var(--site-bar-glow);
  transform: translateY(-2px);
}

.mobile-contact-btn { display: none !important; }

.hamburger {
  width: 44px;
  height: 44px;
  padding: 10px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--site-bar-text);
  background: transparent;
  border: 1px solid var(--site-bar-border);
  border-radius: 2px;
}

.hamburger span {
  width: 21px;
  height: 2px;
  display: block;
  background: currentColor;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hamburger:hover,
.hamburger.active { color: var(--site-bar-green); border-color: var(--site-bar-green); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

footer {
  width: 100%;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  color: var(--site-bar-muted);
  background: var(--site-bar-bg);
  border-top: 1px solid var(--site-bar-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

footer .footer-inner {
  width: min(1400px, 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 0.45rem;
}

.footer-brand {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img { width: auto; height: 20px; filter: drop-shadow(0 0 6px var(--site-bar-glow)); }

.footer-copy {
  color: var(--site-bar-muted);
  font-family: var(--site-bar-display);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.45px;
  text-transform: uppercase;
}

.footer-copy span { color: var(--site-bar-green); }

.footer-center {
  display: contents;
}

.footer-socials {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
}

.footer-social-link {
  color: var(--site-bar-muted);
  border-color: var(--site-bar-border);
}

.footer-social-link:hover,
.footer-social-link:focus-visible { color: var(--site-bar-green); border-color: var(--site-bar-green); }

.footer-tagline {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--site-bar-muted);
  font-family: var(--site-bar-accent);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.footer-admin-link {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  padding: 0.25rem 0.55rem;
  color: var(--site-bar-muted);
  border: 1px solid var(--site-bar-border);
  border-radius: 2px;
  font-family: var(--site-bar-display);
  font-size: 0.5rem;
  line-height: 1;
  letter-spacing: 1.4px;
  opacity: 0.62;
  transition: color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.footer-admin-link:hover,
.footer-admin-link:focus-visible {
  color: var(--site-bar-green);
  border-color: var(--site-bar-green);
  opacity: 1;
  text-shadow: 0 0 8px var(--site-bar-glow);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.08);
}

.footer-tagline:hover { color: var(--site-bar-muted) !important; text-shadow: none !important; }

@media (max-width: 900px) {
  .header-inner { min-height: 66px; padding: 0.65rem 1rem; }
  .logo-header img { height: 34px; }
  .logo-text { font-size: 1rem; }
  .hamburger { display: flex; }

  .nav-container {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 66px);
    max-height: calc(100dvh - 66px);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(3, 5, 3, 0.99);
    border-top: 1px solid var(--site-bar-border);
    border-bottom: 1px solid var(--site-bar-border);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
  }

  .nav-container.mobile-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
  header nav ul { width: 100%; display: block; }
  header nav li { width: 100%; }
  header nav > ul > li > a { width: 100%; min-height: 48px; justify-content: center; }
  header nav > ul > li > a::after { right: 35%; left: 35%; }

  .dropdown-menu {
    position: static;
    width: 100%;
    padding: 0 !important;
    display: block !important;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: visible;
    background: rgba(57, 255, 20, 0.035);
    border: 0;
    box-shadow: none;
    transform: none !important;
    animation: none !important;
    pointer-events: none;
    transition: max-height 0.18s ease, opacity 0.14s ease;
  }

  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    transform: none !important;
    animation: none !important;
  }
  .dropdown-menu.mobile-show {
    max-height: 180px;
    opacity: 1;
    border-top: 1px solid var(--site-bar-border);
    border-bottom: 1px solid var(--site-bar-border);
    pointer-events: auto;
  }
  .dropdown-menu a { justify-content: center; text-align: center; }

  .nav-container > .btn-nav-cta:not(.mobile-contact-btn) { display: none; }
  .mobile-contact-btn { width: min(260px, 100%); margin: 1rem auto 0; display: flex !important; }

  footer .footer-inner {
    min-height: 0;
    padding: 1.15rem 1rem;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    justify-items: center;
    gap: 0.7rem;
    text-align: center;
  }

  .footer-brand {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }

  .footer-socials {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
  }

  .footer-admin-link {
    grid-column: 1;
    grid-row: 3;
  }

  .footer-tagline {
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
  }
}

@media (max-width: 420px) {
  .header-inner { min-height: 58px; padding: 0.55rem 0.75rem; }
  .logo-header img { height: 30px; }
  .logo-text { font-size: 0.92rem; }
  .hamburger { width: 40px; height: 40px; padding: 8px; }
  .hamburger span { width: 19px; }
  footer .footer-inner { padding: 1rem 0.75rem; gap: 0.55rem; }
  .footer-copy { font-size: 0.6rem; letter-spacing: 1px; }
  .footer-tagline { font-size: 0.9rem; letter-spacing: 1.5px; }
}

@media (prefers-reduced-motion: reduce) {
  header *, footer * { transition-duration: 0.01ms !important; }
}
