/* Anikeev Lab — shared site header */
:root {
  --header-border: #e6e6e6;
  --bg: #FAF9F7;
}

.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(250, 249, 247, 0.78);
  border-bottom: 1px solid rgba(93, 179, 207, 0.22);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  box-sizing: border-box;
}

.header-nav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #22C9FF 0%, #5DB3CF 38%, #FF631F 100%);
  opacity: 0.55;
  pointer-events: none;
}

@media (min-width: 1100px) {
  .header-nav:not(.header-nav--compact) {
    min-height: 64px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
}

.header-nav--compact {
  min-height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary, #1a1a1a);
  text-decoration: none;
  flex-shrink: 0;
  z-index: 1;
}

.logo-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(243, 98, 36, 0.28);
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-links {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (min-width: 1100px) {
  .nav-links {
    display: flex;
    justify-self: center;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary, #4a4a4a);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary, #1a1a1a);
  background: rgba(235, 255, 177, 0.55);
}

.nav-links a:focus-visible {
  outline: 2px solid rgba(34, 201, 255, 0.45);
  outline-offset: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  z-index: 1;
  flex-shrink: 0;
}

.header-actions-divider {
  width: 1px;
  height: 22px;
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

@media (max-width: 1099px) {
  .header-actions-divider { display: none; }
}

.header-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #4a4a4a);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.header-back:hover {
  color: var(--text-primary, #1a1a1a);
  background: rgba(235, 255, 177, 0.55);
  border-color: rgba(173, 233, 0, 0.4);
}

.lang-switcher { position: relative; }

.header-globe {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  cursor: pointer;
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary, #1a1a1a);
  transition: border-color 0.2s, background 0.2s;
}

.header-globe:hover {
  border-color: rgba(93, 179, 207, 0.45);
  background: #fff;
}

.header-globe svg {
  width: 22px;
  height: 23px;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--header-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1001;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
}

.lang-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #000;
  text-decoration: none;
  transition: background 0.15s;
}

.lang-dropdown a:hover { background: #f5f5f5; }
.lang-dropdown a.is-active { font-weight: 600; background: #f0f0f0; pointer-events: none; }

.lang-top-prompt {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--header-border);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  z-index: 1100;
  padding: 14px;
  backdrop-filter: blur(6px);
}

.lang-top-prompt[hidden] { display: none !important; }

.lang-top-prompt-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 2px;
}

.lang-top-prompt-subtitle {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted, #6b7280);
  margin-bottom: 12px;
}

.lang-top-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lang-top-prompt-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--header-border);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-primary, #1a1a1a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  background: #fff;
}

.lang-top-prompt-btn:hover {
  background: #f6f6f6;
  border-color: #d8d8d8;
}

.lang-top-prompt-btn--primary {
  background: var(--cta-green, #ebffb1);
  border-color: var(--cta-border, #ade900);
}

.lang-top-prompt-btn--primary:hover {
  background: var(--cta-green-hover, #e0fe92);
  border-color: var(--cta-border, #ade900);
}

@media (max-width: 1100px) {
  .lang-top-prompt { top: 66px; }
}

@media (max-width: 560px) {
  .lang-top-prompt {
    top: 62px;
    padding: 12px;
    border-radius: 15px;
  }
  .lang-top-prompt-title { font-size: 14px; }
  .lang-top-prompt-subtitle { font-size: 12px; }
  .lang-top-prompt-btn { min-height: 36px; font-size: 13px; }
}

.header-cta,
.contact-submit {
  font-size: 13px;
  font-weight: 600;
  color: #000;
  font-family: inherit;
  background-color: var(--cta-green, #ebffb1);
  border: 1px solid var(--cta-border, #ade900);
  border-radius: 10px;
  padding: 0 14px;
  height: 34px;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  cursor: pointer;
}

button.header-cta {
  -webkit-appearance: none;
  appearance: none;
}

@media (min-width: 1100px) {
  .header-cta {
    font-size: 14px;
    padding: 0 18px;
    height: 36px;
  }
}

.header-cta:hover,
.contact-submit:hover {
  background-color: var(--cta-green-hover, #e0fe92);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(173, 233, 0, 0.35);
}

@media (max-width: 1100px) {
  .header-right { gap: 6px; }
  .header-cta {
    padding: 0 12px;
    height: 32px;
    font-size: 12px;
  }
  .lang-switcher { display: none; }
}

@media (max-width: 420px) {
  .header-cta {
    padding: 0 10px;
    font-size: 11px;
  }
  .logo {
    font-size: 14px;
    gap: 6px;
  }
  .logo-icon {
    width: 26px;
    height: 26px;
  }
}

.header-spacer {
  height: 60px;
}

@media (min-width: 1100px) {
  .header-spacer { height: 66px; }
}

@media (max-width: 1100px) {
  .header-burger { display: flex !important; }
}

@media (min-width: 1101px) {
  .header-burger { display: none !important; }
  .mobile-menu { display: none !important; }
}

@media (max-width: 1099px) {
  .nav-links { display: none; }
}

.header-burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary, #1a1a1a);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.header-burger:hover {
  background: #fff;
  border-color: rgba(255, 99, 31, 0.35);
}

.header-burger:focus { outline: none; }
.header-burger svg { width: 18px; height: 18px; }
.header-burger[aria-expanded="true"] .header-burger-open { display: none; }
.header-burger[aria-expanded="true"] .header-burger-close { display: block; }
.header-burger-close { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 15, 15, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: var(--bg);
  border-left: 1px solid rgba(93, 179, 207, 0.25);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  padding: calc(58px + 1.25rem) 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7280);
  margin: 0.5rem 0 0.35rem;
  padding: 0 0.25rem;
}

.mobile-menu a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary, #1a1a1a);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}

.mobile-menu a:hover {
  background: rgba(235, 255, 177, 0.45);
}

.mobile-menu-lang {
  margin-top: auto;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-menu-lang-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.5rem;
}

.mobile-menu-lang a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  margin-right: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #fff;
}

.mobile-menu-lang a.is-active {
  border-color: var(--cta-border, #ade900);
  background: var(--cta-green, #ebffb1);
  font-weight: 600;
}

@media (max-width: 767px) {
  .header-globe { display: none; }
}
