:root {
  --brand-red: #bd1212;
  --header-h: 72px;
  --page-max: 1200px;
}

html { scroll-behavior: smooth; }
body { padding-top: var(--header-h) !important; }

header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-h);
  width: 100%;
  padding: 8px clamp(18px, 2.4vw, 36px);
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
  z-index: 9999;
}

.logo-area { flex: 0 0 auto; }
.logo-area img { display: block; width: auto; height: 48px; }

header nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
header nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.25vw, 34px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
header nav li { position: relative; }
header nav a {
  display: inline-block;
  padding: 8px 0;
  color: #121212;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}
header nav a:hover { color: var(--brand-red); }
header nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 5px;
  background: var(--brand-red);
  transition: width .22s ease;
}
header nav a:hover::after,
header nav a:focus-visible::after { width: 100%; }
header a:focus-visible, header [role="button"]:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 3px;
  border-radius: 4px;
}

.header-btn {
  flex: 0 0 auto;
  padding: 11px 18px;
  border-radius: 8px;
  background: var(--brand-red);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-btn:hover { background: #941010; color: #fff; }

.mega-menu {
  position: fixed;
  top: var(--header-h);
  left: 50%;
  display: none;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 28px;
  width: min(680px, calc(100vw - 32px));
  padding: 22px 26px;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .14);
}
.mega-menu.mega-open { display: grid !important; }
.mega-menu > div { display: flex; flex-direction: column; align-items: flex-start; }
.mega-menu a { width: 100%; padding: 8px 0; font-size: .92rem; font-weight: 500; white-space: normal; }
.mega-menu a::after { margin-top: 3px; }

.menu-toggle, .menu-close { display: none; }

@media (max-width: 1080px) {
  header nav ul { gap: 18px; }
  header nav a { font-size: .89rem; }
  .header-btn { padding-inline: 14px; }
}

@media (max-width: 900px) {
  header { height: 66px; padding-inline: 18px; }
  :root { --header-h: 66px; }
  .logo-area img { height: 42px; }
  header nav { justify-content: flex-end; }
  .header-btn { display: none; }
  .menu-toggle {
    display: block;
    padding: 4px 8px;
    color: #111;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
  }
  header nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    width: min(340px, 88vw);
    height: 100dvh;
    padding: 80px 28px 28px;
    overflow-y: auto;
    background: #fff;
    box-shadow: -12px 0 28px rgba(0, 0, 0, .14);
    transition: right .25s ease;
  }
  header nav ul.active { right: 0; }
  header nav a { padding: 10px 0; font-size: 1rem; }
  .menu-close { display: block !important; position: absolute; top: 18px; right: 22px; font-size: 1.7rem; cursor: pointer; }
  .mega-menu { position: static; width: 100%; transform: none; grid-template-columns: 1fr; padding: 6px 0 8px 14px; border: 0; box-shadow: none; }
}
