/* header flex base */
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  width: 100%;
  box-sizing: border-box;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Segoe UI, system-ui, sans-serif;
}

body {
  background: #0b1120;
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #60a5fa;
}

/* Header */
.site-header {
  background: rgba(17, 24, 39, 0.95);
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  font-size: 22px;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.site-logo span {
  color: #4ea5ff;
}

.site-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: 0.15s;
}

.site-nav a:hover {
  background: #1f2937;
  color: white;
}

.site-main {
  flex: 1;
}

.site-footer {
  border-top: 1px solid #1f2937;
  background: #0f172a;
  margin-top: auto;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
}

.site-footer .muted {
  color: #94a3b8;
  margin-top: 6px;
  font-size: 14px;
}

/* Hero */
.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #111827, #0b1120);
  padding: 60px 20px;
}

.hero h1 {
  font-size: clamp(36px, 8vw, 72px);
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto 40px;
  color: #cbd5e1;
}

button,
.btn {
  padding: 14px 28px;
  font-size: 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.btn:hover {
  background: #1d4ed8;
}

.about {
  padding: 60px 24px;
  max-width: 1200px;
  margin: auto;
}

.about h1,
.about h2 {
  margin-bottom: 16px;
}

.latest-games {
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.game-card {
  background: #111827;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: #334155;
}

.game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #1e293b;
}

.game-card h3 {
  padding: 18px 18px 8px;
  font-size: 18px;
}

.game-card p {
  padding: 0 18px 16px;
  color: #cbd5e1;
  flex: 1;
}

.game-card a {
  display: block;
  padding: 16px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  text-align: center;
  margin-top: auto;
}

.game-card a:hover {
  background: #1d4ed8;
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .about,
  .latest-games {
    padding: 40px 16px;
  }
}

/* Social */
.social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.social-links a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 14px;
  transition: 0.2s;
}
.social-links a:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.error-code {
  font-size: clamp(80px, 18vw, 140px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
  animation: pulseGlow 3s ease-in-out infinite;
}
.error-page h1 {
  font-size: 28px;
  margin-bottom: 12px;
}
.error-hint {
  color: #94a3b8;
  margin-bottom: 28px;
  max-width: 420px;
}
.error-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-ghost {
  background: transparent !important;
  border: 1px solid #334155;
}
.btn-ghost:hover {
  border-color: #60a5fa;
  background: #1e293b !important;
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.35)); }
  50% { filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.55)); }
}

/* Article */
.article-cover {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  margin: 20px 0;
}
.lead {
  font-size: 18px;
  color: #cbd5e1;
  margin-bottom: 20px;
}
.article-body {
  line-height: 1.75;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #1e3a5f;
  color: #93c5fd;
  font-size: 12px;
  margin-bottom: 12px;
}
.section-lead {
  color: #94a3b8;
  margin-top: 8px;
}
.muted { color: #94a3b8; }

/* Scroll / enter animations */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.game-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.hero-content {
  animation: heroIn 0.9s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.site-nav a {
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: #3b82f6;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.site-nav a:hover::after {
  transform: scaleX(1);
}

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.page-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  text-align: center;
}
.loader-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid #1e293b;
  border-top-color: #3b82f6;
  animation: spin 0.8s linear infinite;
}
.loader-text {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-size: 14px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Текстовые ссылки «Все новости →» */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.text-link:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff !important;
  transform: translateX(2px);
}
.text-link span {
  opacity: 0.9;
}

.about-page { max-width: 900px; }
.contact-box {
  margin-top: 40px;
  padding: 28px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  line-height: 1.9;
}
.contact-list a { color: #60a5fa; }
.team-section { padding-top: 20px; }
.team-role {
  color: #60a5fa !important;
  font-weight: 600;
  padding-top: 0 !important;
}
.team-avatar-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #1e3a5f, #312e81);
  color: #93c5fd;
}
.team-card p:last-child { padding-bottom: 24px; }

/* Карточки: стабильный кадр под обложку */
.game-card {
  display: flex;
  flex-direction: column;
}
.game-card > img,
.game-card .card-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  background: #1e293b;
  display: block;
}

/* Страница игры: баннер широкий, обложка вертикальная */
.game-hero-banner {
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  margin: 20px 0;
  background: #1e293b;
  display: block;
}
.game-cover-art {
  width: min(280px, 100%);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  margin: 16px 0;
  background: #1e293b;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  display: block;
}

.article-cover {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  margin: 20px 0;
  background: #1e293b;
}

/* Скриншоты в сетке */
.games-grid .game-card img {
  //aspect-ratio: 16 / 10;
  object-fit: cover;
}

.team-card img,
.team-avatar-placeholder {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  height: auto;
}

/* —— Контентные вкладки Игры / Новости / Девлог —— */
.page-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.content-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 8px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
}
.content-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: 0.15s;
}
.content-tab:hover {
  color: #fff;
  background: #1e293b;
}
.content-tab.is-active {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}
.content-tab-icon {
  font-size: 16px;
}

.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 8px;
}
.page-lead {
  color: #94a3b8;
  font-size: 17px;
  max-width: 640px;
  line-height: 1.5;
}
.empty-state {
  color: #94a3b8;
  padding: 40px 0;
}

.game-card-media {
  display: block;
  position: relative;
  overflow: hidden;
}
.game-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.game-card:hover .game-card-media img {
  transform: scale(1.04);
}
.media-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #334155;
  font-size: 12px;
  color: #e2e8f0;
  backdrop-filter: blur(6px);
}
.game-card-body {
  padding: 18px 18px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.game-card-body h3 {
  padding: 0;
  font-size: 18px;
  line-height: 1.3;
}
.game-card-body p {
  padding: 0;
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.45;
}
.card-meta {
  color: #64748b !important;
  font-size: 12px !important;
}
.game-card-cta {
  display: block;
  margin: 12px 16px 16px;
  padding: 12px;
  text-align: center;
  background: #2563eb;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  transition: 0.15s;
}
.game-card-cta:hover {
  background: #1d4ed8;
}

/* —— Внутренние страницы —— */
.detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.detail-banner-wrap {
  margin: 8px 0 28px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}
.detail-aside .game-cover-art {
  width: 100%;
  margin: 0;
}
.detail-kicker {
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.detail-main h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin-bottom: 12px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.detail-body h2 {
  margin: 32px 0 14px;
  font-size: 22px;
}
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #1f2937;
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
}
.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #1f2937;
  font-size: 14px;
}
.info-list li:last-child {
  border-bottom: none;
}
.info-list span {
  color: #94a3b8;
}
.info-list strong {
  color: #e2e8f0;
  text-align: right;
}
.shots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.shot-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1f2937;
  background: #0f172a;
}
.shot-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.detail-back {
  margin-top: 40px;
}

@media (max-width: 768px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-aside .game-cover-art {
    max-width: 200px;
  }
  .content-tabs {
    gap: 6px;
  }
  .content-tab {
    padding: 10px 12px;
    font-size: 13px;
  }
}
.site-nav a.is-active {
  background: #1e293b;
  color: #fff;
}
.site-nav a.is-active::after {
  transform: scaleX(1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.is-open {
  display: flex;
}
.lightbox-img {
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: #1e293b;
  border: 1px solid #334155;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close {
  top: 16px;
  right: 16px;
  font-size: 28px;
}
.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #2563eb;
  border-color: #2563eb;
}
.shot-item {
  cursor: zoom-in;
}


/* Анимации появления — без ломки layout карточек */
[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}
.game-card {
  will-change: auto;
  backface-visibility: hidden;
}
.game-card:hover {
  transform: translateY(-4px);
}
.game-card[data-animate].is-visible:hover {
  transform: translateY(-4px);
}

.game-card {
  background: var(--card-bg, #111827) !important;
}

.lightbox-prev,
.lightbox-next {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.85);
  font-size: 42px;
  width: 56px;
  height: 56px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: transparent !important;
  color: #fff;
}
.lightbox-close {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Цвет ссылок внутри карточки — задаётся через --card-a-bg на .game-card */
.game-card a {
  background: var(--card-a-bg, #2563eb);
}
.game-card a.game-card-media {
  background: var(--card-a-bg, transparent);
}
.game-card a.game-card-cta {
  background: var(--card-a-bg, #2563eb);
  color: #fff !important;
}

/* —— Header logo + mobile nav —— */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.site-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}
.site-logo-text span {
  color: #60a5fa;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #111827;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: 0.2s;
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 4px;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .site-logo-text {
    font-size: 15px;
  }
  .site-logo-img {
    width: 36px;
    height: 36px;
  }
  .hero-content img {
    max-width: min(220px, 70vw);
  }
  .hero h1 {
    font-size: clamp(24px, 7vw, 36px);
  }
  .games-grid {
    grid-template-columns: 1fr !important;
  }
  .page-section,
  .detail-page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .game-hero-banner {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }
  .shots-grid {
    grid-template-columns: 1fr 1fr;
  }
  .info-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .info-list strong {
    text-align: left;
  }
  .lightbox-prev {
    left: 6px;
  }
  .lightbox-next {
    right: 6px;
  }
  .site-footer-inner {
    padding: 24px 16px;
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .shots-grid {
    grid-template-columns: 1fr;
  }
  .detail-actions {
    flex-direction: column;
  }
  .detail-actions .btn,
  .detail-actions .btn-ghost {
    width: 100%;
    text-align: center;
  }
}

/* —— Header fix: logo left, burger right —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1f2937;
}
.site-header-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  width: 100%;
  box-sizing: border-box;
  min-height: 60px;
}
.site-logo {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
  text-decoration: none;
  color: #fff;
}
.site-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}
.site-logo-text {
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  color: #fff;
}
.site-logo-text .logo-w {
  color: #ffffff !important;
}
.site-logo-text .logo-accent {
  color: #60a5fa !important;
}
.site-logo span {
  color: inherit; /* override old .site-logo span blue on all spans */
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  margin: 0;
  margin-left: auto;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #111827;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: 0.2s;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .site-header-inner {
    flex-wrap: wrap !important;
  }
  .nav-toggle {
    display: flex !important;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
    order: 3;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-logo {
    order: 1;
  }
  .nav-toggle {
    order: 2;
  }
  .site-logo-text {
    font-size: 15px;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  max-width: 560px;
}
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form .field span {
  font-size: 13px;
  color: #94a3b8;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
}
.contact-form .btn {
  align-self: flex-start;
  margin-top: 4px;
  cursor: pointer;
  border: none;
}
.alert.success {
  background: #064e3b;
  color: #a7f3d0;
  padding: 12px 14px;
  border-radius: 10px;
}
.alert.error {
  background: #7f1d1d;
  color: #fecaca;
  padding: 12px 14px;
  border-radius: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 4px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #1f2937;
}
.lang-item {
  padding: 6px 8px !important;
  border-radius: 8px;
  font-size: 12px !important;
  text-transform: uppercase;
  color: #94a3b8 !important;
  text-decoration: none !important;
}
.lang-item.is-active {
  background: #2563eb !important;
  color: #fff !important;
}
.footer-designed {
  color: #94a3b8;
  font-size: 13px;
  margin: 8px 0;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 16px;
  font-size: 13px;
}
.footer-legal a {
  color: #cbd5e1;
  text-decoration: none;
}
.footer-legal a:hover {
  color: #60a5fa;
}
.footer-legal .dot {
  color: #475569;
}
.careers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
}
.career-card {
  padding: 22px;
  border-radius: 16px;
  background: var(--card-bg, #111827);
  border: 1px solid #1f2937;
}
.career-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.career-tags {
  color: #60a5fa;
  font-size: 14px;
  margin: 0 0 12px;
}
.career-desc {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.legal-body {
  max-width: 720px;
  line-height: 1.65;
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .lang-switch {
    margin: 8px 0 0;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.lang-dropdown {
  position: relative;
  margin-left: 8px;
}
.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.lang-caret {
  font-size: 10px;
  opacity: 0.7;
}
.lang-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-dropdown-menu[hidden] {
  display: none !important;
}
.lang-dropdown-menu a {
  display: block;
  padding: 10px 12px !important;
  border-radius: 8px;
  color: #cbd5e1 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  background: transparent !important;
}
.lang-dropdown-menu a:hover,
.lang-dropdown-menu a.is-active {
  background: #1e293b !important;
  color: #fff !important;
}
.lang-dropdown-menu a.is-active {
  background: #2563eb !important;
}

@media (max-width: 900px) {
  .lang-dropdown {
    margin: 8px 0 0;
    width: 100%;
  }
  .lang-dropdown-btn {
    width: 100%;
    justify-content: space-between;
  }
  .lang-dropdown-menu {
    left: 0;
    right: 0;
  }
}

.apply-box {
  margin-top: 48px;
  padding: 28px;
  border-radius: 16px;
  background: #111827;
  border: 1px solid #1f2937;
  max-width: 640px;
}
.apply-kicker {
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.apply-box h2 {
  margin: 0 0 20px;
  font-size: 26px;
}
.apply-form {
  max-width: none;
}

/* Apply modal */
.apply-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.apply-modal.is-open {
  display: flex;
}
.apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
}
.apply-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 28px 28px 24px;
  border-radius: 16px;
  background: #12141c;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.apply-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: transparent;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.apply-modal-close:hover {
  color: #fff;
  border-color: #64748b;
}
.apply-modal-head {
  margin-bottom: 20px;
  padding-right: 36px;
}
.apply-modal-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  color: #f1f5f9;
}
.apply-modal .apply-kicker {
  margin: 0;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #64748b;
}
.apply-modal .apply-kicker-sep {
  margin: 0 4px;
}
#apply-role-label {
  color: #a78bfa;
}
.apply-modal-form .apply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 14px;
}
.apply-modal-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.apply-modal-form .field span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.apply-modal-form input,
.apply-modal-form select,
.apply-modal-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #0a0c12;
  color: #e2e8f0;
  font: inherit;
}
.apply-modal-form textarea {
  resize: vertical;
  min-height: 100px;
}
.apply-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 18px;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
  cursor: pointer;
}
.apply-consent input {
  margin-top: 3px;
  flex-shrink: 0;
}
.apply-consent a {
  color: #c4b5fd;
  text-decoration: underline;
}
.apply-submit {
  width: 100%;
  text-align: center;
  border: 1px solid rgba(139, 92, 246, 0.6) !important;
  background: transparent !important;
  color: #e2e8f0 !important;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.apply-submit:hover {
  background: rgba(139, 92, 246, 0.15) !important;
}

@media (max-width: 560px) {
  .apply-modal-form .apply-grid {
    grid-template-columns: 1fr;
  }
  .apply-modal-dialog {
    padding: 22px 16px 18px;
  }
}

.apply-modal-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 5;
  width: 40px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  border: 1px solid #334155 !important;
  background: #0f172a !important;
  color: #e2e8f0 !important;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 !important;
}
.apply-modal-close:hover {
  background: #1e293b !important;
  color: #fff !important;
  border-color: #64748b !important;
}
.apply-consent {
  user-select: none;
}
.apply-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid #475569;
  border-radius: 4px;
  background: #0a0c12;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.apply-consent input[type="checkbox"]:checked {
  background: #7c3aed;
  border-color: #7c3aed;
}
.apply-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.apply-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.admin-preview-bar {
  background: #422006;
  color: #fde68a;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
}
.admin-preview-bar a {
  color: #fef3c7;
  margin-left: 10px;
}
.draft-mark {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  margin-left: 6px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20000;
  max-width: 720px;
  margin: 0 auto;
}
.cookie-banner[hidden] {
  display: none !important;
}
.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}
.cookie-banner-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #cbd5e1;
}
.cookie-banner-text a {
  color: #93c5fd;
  text-decoration: underline;
}
.cookie-banner-actions {
  flex: 0 0 auto;
}
.cookie-accept {
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.legal-body h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 18px;
  color: #e2e8f0;
}
.legal-body ul {
  padding-left: 20px;
  color: #cbd5e1;
}
.legal-body li {
  margin-bottom: 6px;
}

/* Mobile header: logo left, burger right (как на макете) */
@media (max-width: 900px) {
  .site-header-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 12px;
    padding: 10px 14px !important;
    min-height: 56px;
  }
  .site-logo {
    order: 1 !important;
    margin-right: auto;
  }
  .nav-toggle {
    order: 2 !important;
    display: flex !important;
    margin-left: 0 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 12px !important;
    border: none !important;
    background: #3b82f6 !important;
    align-items: center;
    justify-content: center;
  }
  .nav-toggle span {
    background: #fff !important;
    width: 18px;
  }
  .site-nav {
    order: 3 !important;
    width: 100%;
    flex-basis: 100%;
  }
  .site-logo-img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover;
  }
  .site-logo-text {
    font-size: 15px !important;
    font-weight: 700;
  }
}

/* override older 640px rule that broke alignment */
@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: row !important;
    align-items: center !important;
  }
}
