/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow:       #F5C518;
  --yellow-dark:  #e3b500;
  --blue:         #1A73E8;
  --blue-dark:    #1558b0;
  --white:        #ffffff;
  --text:         #1a1a1a;
  --header-h:     68px;
  --radius:       50px;
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #f9f9f9;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; background: none; border: none; }

/* ── Sticky header ────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--yellow);
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-logo__img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.header-logo__text {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

/* Language selector */
.header-lang {
  position: relative;
  margin-left: 16px;
  flex-shrink: 0;
}

.header-lang__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border-radius: 6px;
  transition: opacity var(--transition);
}

.header-lang__btn:hover { opacity: .8; }

/* Pure CSS flags — circular, zero deps */
.flag {
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 150% 100%;
}

.flag--btn  { width: 28px; height: 28px; border: 2px solid rgba(255,255,255,0.75); }
.flag--menu { width: 22px; height: 22px; border: 1px solid rgba(0,0,0,0.15); }

/* Russia: white / blue / red horizontal stripes */
.flag--ru {
  background-image: linear-gradient(to bottom,
    #ffffff 0, #ffffff 33.333%,
    #0039A6 33.333%, #0039A6 66.666%,
    #D52B1E 66.666%, #D52B1E 100%);
}

/* Germany: black / red / gold horizontal stripes */
.flag--de {
  background-image: linear-gradient(to bottom,
    #000000 0, #000000 33.333%,
    #DD0000 33.333%, #DD0000 66.666%,
    #FFCE00 66.666%, #FFCE00 100%);
}

/* UK (Union Jack) — layered gradients */
.flag--gb {
  background-color: #012169;
  background-image:
    linear-gradient(to bottom, transparent 40%, #C8102E 40%, #C8102E 60%, transparent 60%),
    linear-gradient(to right,  transparent 40%, #C8102E 40%, #C8102E 60%, transparent 60%),
    linear-gradient(to bottom, transparent 35%, #ffffff 35%, #ffffff 65%, transparent 65%),
    linear-gradient(to right,  transparent 35%, #ffffff 35%, #ffffff 65%, transparent 65%),
    linear-gradient(45deg,     transparent 47%, #C8102E 47%, #C8102E 53%, transparent 53%),
    linear-gradient(-45deg,    transparent 47%, #C8102E 47%, #C8102E 53%, transparent 53%),
    linear-gradient(45deg,     transparent 42%, #ffffff 42%, #ffffff 58%, transparent 58%),
    linear-gradient(-45deg,    transparent 42%, #ffffff 42%, #ffffff 58%, transparent 58%);
  background-size: 100% 100%;
}

.header-lang__arrow {
  transition: transform var(--transition);
}

.header-lang.open .header-lang__arrow {
  transform: rotate(180deg);
}

.header-lang__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 130px;
  overflow: hidden;
  z-index: 100;
}

.header-lang.open .header-lang__menu { display: block; }

.header-lang__menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
}

.header-lang__menu li a:hover { background: #f5f5f5; }


/* Primary nav */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav__link {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  border-radius: 8px;
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.header-nav__link:hover { background: rgba(0,0,0,.08); }
.header-nav__link.active { background: rgba(0,0,0,.12); }

/* Right actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Resume / vacancy CTA button */
.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}

.btn-resume:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-resume svg { flex-shrink: 0; }

/* Login link */
.header-login {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  padding: 8px 4px;
  border-radius: 8px;
  transition: opacity var(--transition);
}

.header-login:hover { opacity: .8; }

/* User dropdown */
.header-user {
  position: relative;
}

.header-user__btn {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--transition);
}

.header-user__btn:hover { background: rgba(0,0,0,.1); }

.header-user__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 150px;
  overflow: hidden;
  z-index: 100;
}

.header-user.open .header-user__menu { display: block; }

.header-user__menu li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
}

.header-user__menu li a:hover { background: #f5f5f5; }

/* Hamburger (mobile only) */
.header-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}

.header-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.header-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-hamburger.open span:nth-child(2) { opacity: 0; }
.header-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.header-drawer {
  display: none;
  background: var(--yellow);
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.header-drawer.open { display: block; }

.header-drawer ul { display: flex; flex-direction: column; gap: 4px; }

.header-drawer a {
  display: block;
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.drawer-sep { margin: 4px 0; }

/* ── Main content padding ─────────────────────── */
.main-content {
  min-height: calc(100vh - var(--header-h));
  padding: 0 40px 40px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Hero ─────────────────────────────────────── */
.hero-section {
  position: relative;
  padding: 32px 0 48px;
}

.hero-top {
  margin-bottom: 24px;
}

.hero-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--yellow);
  border-radius: 2px;
}

.hero-image-wrap {
  position: relative;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  overflow: hidden;
  border: none;
  outline: none;
  isolation: isolate;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-watermark {
  position: absolute;
  top: 40px;
  right: 20px;
  width: 280px;
  height: 280px;
  background-color: #F5C518;
  -webkit-mask: url('/static/img/Logo.png') center/contain no-repeat;
          mask: url('/static/img/Logo.png') center/contain no-repeat;
  opacity: 0.85;
  pointer-events: none;
  z-index: 3;
}

.hero-search {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(540px, 86%);
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  padding: 0 0 0 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  overflow: hidden;
  z-index: 3;
}

.hero-search__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 10px;
}

.hero-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  padding: 14px 8px 14px 0;
  background: transparent;
  color: var(--text);
}

.hero-search__input::placeholder { color: #aaa; }

.hero-search__btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--blue);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.hero-search__btn:hover { background: var(--blue-dark); }

@media (max-width: 600px) {
  .hero-title { font-size: 1.5rem; }
  .hero-watermark { width: 140px; height: 140px; top: 10px; right: 10px; opacity: 0.7; }
}

/* ── About section (dark) ─────────────────────── */
.about-section {
  background: #2b2b2b;
  color: #fff;
  padding: 80px 40px 90px;
  margin: 60px calc(50% - 50vw) 0;
  width: 100vw;
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.about-header {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.about-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  position: relative;
  padding-right: 10px;
  z-index: 1;
}

.about-vector {
  position: absolute;
  right: calc(50% - 260px);
  top: -30px;
  width: 110px;
  height: auto;
  pointer-events: none;
  z-index: 0;
}

.about-text {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  color: #c9c9c9;
  font-size: 14px;
  line-height: 1.75;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 56px;
}

.about-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

@media (max-width: 900px) {
  .about-section { padding: 60px 24px 70px; }
  .about-gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .about-vector  { right: 0; width: 80px; top: -20px; }
  .about-title   { font-size: 18px; }
}

@media (max-width: 480px) {
  .about-gallery { grid-template-columns: 1fr; }
}

/* ── Flash messages ───────────────────────────── */
.flash-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.flash--success { background: #d4edda; color: #155724; }
.flash--danger  { background: #f8d7da; color: #721c24; }
.flash--info    { background: #d1ecf1; color: #0c5460; }
.flash--warning { background: #fff3cd; color: #856404; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .header-nav,
  .btn-resume { display: none; }

  .header-hamburger { display: flex; }
  .header-lang { margin-left: 8px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .main-content { padding: 20px 16px; }
}
