/* ===== Военная кафедра — Торайгыров университет ===== */
/* Строгий современный стиль */

:root {
  --primary: #0b2545;
  --primary-dark: #061628;
  --primary-mid: #133a66;
  --accent: #c9a227;
  --accent-hover: #b08d1e;
  --accent-light: #e8d48b;
  --bg: #f0f4f9;
  --bg-alt: #e6edf5;
  --white: #ffffff;
  --text: #1a2332;
  --text-muted: #5a6a7e;
  --border: #d0dae6;
  --success: #1b7a3d;
  --warning: #c47a00;
  --danger: #b71c1c;
  --shadow: 0 2px 12px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 8px 30px rgba(11, 37, 69, 0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --transition: 0.2s ease;
  --header-h: 64px;
  --container: 1180px;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 10% -20%, rgba(11, 37, 69, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 100% 60% at 90% 110%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  background: var(--primary-dark);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-emblem {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, var(--accent) 0%, #a67c00 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(201,162,39,0.4);
  overflow: hidden;
  flex-shrink: 0;
}
.logo-emblem-img {
  background: #ffffff;
  padding: 0;
}
.logo-tou-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 5px;
  box-sizing: border-box;
}
}

.logo-text {
  line-height: 1.2;
}

.logo-text .uni {
  font-size: 11px;
  opacity: 0.75;
  letter-spacing: 0.3px;
}

.logo-text .dept {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Nav */
.nav-main {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-main a {
  color: rgba(255,255,255,0.88);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
}

.nav-main a:hover,
.nav-main a.active {
  color: white;
  background: rgba(255,255,255,0.1);
}

.nav-main a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

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

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--accent-hover);
  color: white;
}

/* Mobile burger */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: var(--radius-sm);
}

.burger:hover {
  background: rgba(255,255,255,0.1);
}

.burger svg {
  width: 24px;
  height: 24px;
}

/* Mobile menu */
.mobile-nav {
  display: none;
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 20px 20px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.9);
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a.active {
  color: var(--accent);
}

.mobile-nav .btn-login {
  margin-top: 12px;
  justify-content: center;
  width: 100%;
}

/* ===== HERO — выразительный фон ===== */
.hero {
  color: white;
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
  background: #050a08;
  min-height: 520px;
}

/* ===== 3D Command Center Hero ===== */
.hero.hero-3d {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 55% 58%, rgba(0, 210, 255, 0.22) 0%, rgba(0, 40, 50, 0.35) 35%, rgba(10, 15, 18, 0.95) 65%, #0a0f12 100%);
  cursor: none;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3; /* 3D вертолёт / сцена */
  pointer-events: none;
}
.hero.hero-3d .hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  /* Fog/heavy atmosphere reduced — helicopter stays clearly visible */
  background:
    linear-gradient(105deg, rgba(5, 12, 10, 0.55) 0%, rgba(5, 12, 10, 0.28) 36%, rgba(5, 12, 10, 0.05) 58%, rgba(5, 12, 10, 0.18) 100%),
    radial-gradient(ellipse 75% 70% at 72% 48%, transparent 35%, rgba(5, 10, 8, 0.18) 100%);
}
.hero.hero-3d::before {
  display: none;
}
.hero-crosshair {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.hero-crosshair.visible { opacity: 1; }
.hero-crosshair .hc-h,
.hero-crosshair .hc-v {
  position: absolute;
  background: rgba(51, 255, 136, 0.85);
  box-shadow: 0 0 6px rgba(51, 255, 136, 0.5);
}
.hero-crosshair .hc-h {
  width: 28px; height: 1.5px;
  left: -14px; top: 0;
}
.hero-crosshair .hc-v {
  width: 1.5px; height: 28px;
  left: 0; top: -14px;
}
.hero-crosshair .hc-dot {
  position: absolute;
  width: 4px; height: 4px;
  left: -2px; top: -2px;
  border-radius: 50%;
  background: #ff3344;
  box-shadow: 0 0 8px #ff3344, 0 0 14px rgba(255,50,50,0.5);
}
.hero-crosshair::after {
  content: '';
  position: absolute;
  width: 36px; height: 36px;
  left: -18px; top: -18px;
  border: 1px solid rgba(51, 255, 136, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(51, 255, 136, 0.25);
}
/* Трекинг курсора — в колонке hero-stats под карточками, без absolute */
.staff-display {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin-top: 4px;
  padding: 10px 12px 8px;
  background: rgba(6, 18, 14, 0.75);
  border: 1px solid rgba(51, 255, 136, 0.35);
  border-radius: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 10px;
  color: #9dffc0;
  backdrop-filter: blur(6px);
  pointer-events: none;
  box-shadow: 0 0 16px rgba(51, 255, 136, 0.08);
  box-sizing: border-box;
}
.hero.hero-3d .hero-stats {
  position: relative;
  z-index: 6;
}
.staff-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #33ff88;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(51, 255, 136, 0.18);
}
.staff-sub { display: none; }
.staff-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 1px 0;
  color: #6fa88a;
  font-size: 10px;
}
.staff-row span:first-child {
  flex-shrink: 0;
  opacity: 0.9;
}
.staff-row span:last-child {
  color: #d4ffe8;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.staff-row .sd-online { color: #33ff88; }
.staff-row .sd-scan { color: #e8d48b; }
.staff-row .sd-lock {
  color: #ff6b4a;
  text-shadow: 0 0 8px rgba(255, 80, 40, 0.45);
  animation: sdPulse 0.9s ease-in-out infinite alternate;
}
@keyframes sdPulse {
  from { opacity: 0.75; }
  to { opacity: 1; }
}
.hero.hero-3d .hero-copy {
  max-width: 540px;
  position: relative;
  z-index: 4;
}
.hero.hero-3d .hero-copy p {
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.hero.hero-3d .hero-stats .stat-item {
  background: rgba(8, 22, 16, 0.55);
  border-color: rgba(51, 255, 136, 0.2);
  backdrop-filter: blur(4px);
}
@media (max-width: 768px) {
  .hero.hero-3d { cursor: auto; min-height: 480px; }
  .staff-display { display: none; }
  .hero-crosshair { display: none; }
}

/* Фото корпуса — более заметное */
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/hero-bg.jpg') center 32% / cover no-repeat;
  opacity: 0.55;
  filter: saturate(0.85) brightness(0.7) contrast(1.05);
  z-index: 0;
  transform-origin: center;
  animation: heroPhotoSoft 25s ease-in-out infinite alternate;
}

@keyframes heroPhotoSoft {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Военная сетка — тоньше и аккуратнее */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 162, 39, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 39, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 10%, transparent 70%);
  opacity: 0.7;
}

/* Мягкие световые пятна */
.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.28;
  animation: orbFloat 16s ease-in-out infinite alternate;
}

.hero-orb:nth-child(1) {
  width: 320px; height: 320px;
  background: #c9a227;
  top: -12%; left: -8%;
  animation-duration: 18s;
}

.hero-orb:nth-child(2) {
  width: 240px; height: 240px;
  background: #1a6ab0;
  bottom: -5%; right: 5%;
  animation-duration: 22s;
  animation-delay: -5s;
}

.hero-orb:nth-child(3) {
  width: 180px; height: 180px;
  background: #2a8a5a;
  top: 45%; left: 60%;
  animation-duration: 20s;
  animation-delay: -9s;
  opacity: 0.18;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.12); }
}

/* Частицы остаются (canvas) */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Градиентное затемнение — читаемость + глубина */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(6, 22, 40, 0.82) 0%, rgba(6, 22, 40, 0.55) 42%, rgba(6, 22, 40, 0.4) 100%),
    radial-gradient(ellipse 90% 80% at 70% 20%, transparent 20%, rgba(6, 22, 40, 0.45) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Золотая линия снизу */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, var(--accent) 50%, transparent 95%);
  z-index: 3;
  opacity: 0.85;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 4;
}

.hero-badge {
  display: inline-block;
  background: rgba(201,162,39,0.18);
  border: 1px solid rgba(201,162,39,0.45);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.hero .slogan {
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 200px;
}

.stat-item {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
}

.stat-item .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.stat-item .label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

a.stat-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

a.stat-item-link:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: rgba(201, 162, 39, 0.55);
  transform: translateY(-2px);
}

a.stat-item-link:hover .label {
  opacity: 1;
  color: var(--accent-light);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: white;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: white;
}

.btn-dark {
  background: var(--primary);
  color: white;
}

.btn-dark:hover {
  background: var(--primary-mid);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: white;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

/* ===== SECTIONS ===== */
.section {
  padding: 52px 0;
  position: relative;
}

/* Чередование секций — более живой фон */
.section:nth-of-type(even) {
  background:
    linear-gradient(180deg, rgba(230, 237, 245, 0.65) 0%, rgba(240, 244, 249, 0.9) 100%);
}

/* Акцентные секции с лёгкой текстурой */
.section.section-alt,
.section[style*="--bg-alt"] {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(11, 37, 69, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(201, 162, 39, 0.035) 0%, transparent 50%),
    var(--bg-alt);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 560px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-header .link-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-mid);
}

.section-header .link-all:hover {
  color: var(--accent);
}

/* ===== CARDS ===== */
.card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #c5d0de;
}

.card-body {
  padding: 20px 22px;
}

/* Programs grid */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.program-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
  will-change: transform;
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(11, 37, 69, 0.18);
  border-color: rgba(201, 162, 39, 0.45);
}

.program-card .card-top {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: white;
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease;
}

.program-card:nth-child(1) .card-top {
  background: linear-gradient(135deg, #0b2545 0%, #1a4a7a 100%);
}

.program-card:nth-child(2) .card-top {
  background: linear-gradient(135deg, #1a3d2e 0%, #2d6b4a 100%);
}

.program-card:hover .card-top {
  filter: brightness(1.08);
}

.program-card .card-top::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
  background-size: 200% 100%;
  transition: height 0.3s ease;
}

.program-card:hover .card-top::after {
  height: 4px;
  animation: goldShimmer 1.2s ease infinite;
}

@keyframes goldShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.program-card .icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.program-card:hover .icon {
  transform: scale(1.15) rotate(-6deg);
}

.program-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  transition: letter-spacing 0.3s ease;
}

.program-card:hover h3 {
  letter-spacing: 0.3px;
}

.program-card .duration {
  font-size: 13px;
  opacity: 0.85;
}

.program-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
}

.program-card:hover .card-body {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.program-card ul {
  margin: 0 0 16px;
  padding-left: 0;
}

.program-card li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.program-card:hover li {
  color: var(--text);
}

.program-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  transition: transform 0.25s ease;
}

.program-card:hover li::before {
  transform: translateX(2px);
}

.program-card .btn {
  margin-top: auto;
  align-self: flex-start;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.program-card:hover .btn {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.2);
}

/* ===== Анимация появления карточек ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  filter: blur(2px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.55s ease;
}

/* Задержки для сетки */
.programs-grid .reveal:nth-child(1).visible { transition-delay: 0.05s; }
.programs-grid .reveal:nth-child(2).visible { transition-delay: 0.18s; }
.programs-grid .reveal:nth-child(3).visible { transition-delay: 0.30s; }
.programs-grid .reveal:nth-child(4).visible { transition-delay: 0.42s; }

.leadership-grid .reveal:nth-child(1).visible { transition-delay: 0.05s; }
.leadership-grid .reveal:nth-child(2).visible { transition-delay: 0.15s; }
.leadership-grid .reveal:nth-child(3).visible { transition-delay: 0.25s; }
.leadership-grid .reveal:nth-child(4).visible { transition-delay: 0.35s; }

/* Альтернатива: появление слева/справа */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardPopIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal.pop-in.visible {
  animation: cardPopIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  filter: none;
  transform: none;
  opacity: 1;
}

/* Общие карточки — мягкий hover */
.card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

/* Leadership */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.person-card {
  text-align: center;
  padding: 28px 20px 24px;
}

.person-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary-mid), var(--primary));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 14px rgba(11,37,69,0.2);
}

.person-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary-dark);
}

.person-card .rank {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.person-card .role {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Announcements */
.announce-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.announce-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.announce-item:last-child {
  border-bottom: none;
}

.announce-date {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}

.announce-date .day {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.announce-date .month {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.announce-text {
  flex: 1;
}

.announce-text h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.announce-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  background: #fde8e8;
  color: var(--danger);
  margin-left: 8px;
  vertical-align: middle;
}

.badge-info {
  background: #e3f0ff;
  color: var(--primary-mid);
}

/* Quick links */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.quick-item:hover {
  border-color: var(--primary-mid);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.quick-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.quick-item span {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Announce + quick on home */
.announce-quick-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

/* About teaser */
.about-teaser {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}

.about-teaser .text h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.about-teaser .text p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.65;
}

.about-teaser .visual {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 36px 28px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-teaser .visual::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201,162,39,0.25) 0%, transparent 70%);
}

.about-teaser .visual .year {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.about-teaser .visual .desc {
  font-size: 14px;
  opacity: 0.9;
}

/* ===== PAGE LAYOUT ===== */
main {
  flex: 1;
}

.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 36px 0 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.breadcrumb {
  font-size: 13.5px;
  opacity: 0.8;
}

.breadcrumb a {
  opacity: 0.9;
}

.breadcrumb a:hover {
  color: var(--accent);
  opacity: 1;
}

.page-content {
  padding: 36px 0 56px;
}

.content-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.content-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 22px 0 10px;
}

.content-card p {
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.65;
}

.content-card ul {
  margin: 0 0 16px 4px;
}

.content-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  color: var(--text-muted);
  line-height: 1.5;
}

.content-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 13px;
}

tr:hover td {
  background: #fafbfd;
}

/* Tabs (for o-kafedre etc.) */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary-dark);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-q:hover {
  background: var(--bg-alt);
}

.faq-q span {
  font-size: 18px;
  color: var(--accent);
  transition: var(--transition);
}

.faq-item.open .faq-q span {
  transform: rotate(45deg);
}

.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.open .faq-a {
  display: block;
}

/* News cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.news-card .card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: rgba(255,255,255,0.3);
}

.news-card .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
}

.news-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-dark);
  line-height: 1.35;
}

.news-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Contact info */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-block {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-block .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-block h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.contact-block p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ===== FOOTER ===== */
.footer {
  background:
    radial-gradient(ellipse 70% 80% at 10% 20%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 90% 80%, rgba(26, 106, 176, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #061628 0%, #0a1f38 50%, #061628 100%);
  color: rgba(255,255,255,0.85);
  padding: 44px 0 28px;
  margin-top: auto;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo-text .dept {
  color: white;
}

.footer-brand p {
  font-size: 13.5px;
  opacity: 0.75;
  margin-top: 12px;
  line-height: 1.55;
  max-width: 280px;
}

.footer h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul a {
  font-size: 14px;
  opacity: 0.85;
}

.footer ul a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  opacity: 0.7;
}

.footer-slogan {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1.5px;
  font-size: 13px;
}

/* ===== UTILITIES ===== */
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .nav-main {
    display: none;
  }
  .burger {
    display: flex;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stat-item {
    flex: 1;
    min-width: 120px;
  }
  .programs-grid {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-teaser {
    grid-template-columns: 1fr;
  }
  .announce-quick-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .cabinet-layout {
    grid-template-columns: 1fr;
  }
  .cabinet-sidebar {
    position: relative;
    top: 0;
    height: auto;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  .header-inner {
    height: 56px;
    gap: 10px;
  }
  .logo-emblem {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .logo-text .uni {
    display: none;
  }
  .logo-text .dept {
    font-size: 13px;
  }
  .lang-switcher {
    margin-right: 4px;
  }
  .lang-btn {
    padding: 5px 7px;
    font-size: 11px;
  }
  .btn-login {
    padding: 7px 12px;
    font-size: 13px;
  }

  /* Hero */
  .hero {
    padding: 36px 0 44px;
  }
  .hero.hero-3d {
    min-height: 520px;
    padding: 28px 0 36px;
  }
  .hero h1 {
    font-size: 26px;
    letter-spacing: 0.2px;
  }
  .hero .slogan {
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 14px;
  }
  .hero p {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    justify-content: center;
  }
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    margin-top: 20px;
  }
  .stat-item {
    flex: 1 1 30%;
    min-width: 90px;
    padding: 12px 10px;
  }
  .stat-item .num {
    font-size: 22px;
  }
  .stat-item .label {
    font-size: 11px;
  }
  .staff-display {
    display: none;
  }
  .hero-crosshair {
    display: none;
  }

  /* Page headers */
  .page-header {
    padding: 22px 0 18px;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .page-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .page-header-actions {
    width: 100%;
  }
  .page-header-actions .btn,
  .page-header-actions a.btn {
    flex: 1 1 auto;
    font-size: 12px;
    padding: 8px 10px;
    justify-content: center;
  }

  /* Content */
  .page-content {
    padding: 20px 0 40px;
  }
  .content-card {
    padding: 18px 16px;
    margin-bottom: 16px;
  }
  .content-card h2 {
    font-size: 18px;
  }
  .content-card h3 {
    font-size: 15px;
  }
  .section {
    padding: 32px 0;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Tables — horizontal scroll */
  .content-card,
  .page-content {
    overflow-x: clip;
  }
  .table-scroll,
  .content-card table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 480px;
    font-size: 13px;
  }
  th, td {
    padding: 10px 10px;
  }

  /* Grids */
  .quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .leadership-grid,
  .programs-grid,
  .about-teaser,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* Buttons / forms */
  .btn {
    min-height: 42px;
  }
  input, select, textarea {
    font-size: 16px; /* prevent iOS zoom */
  }

  /* Admission video already has its own rules; tighten a bit */
  .av-head {
    padding: 12px 14px;
  }
  .av-copy {
    padding: 18px 16px 14px;
  }
  .av-copy h2 {
    font-size: 20px;
  }
  .av-steps span {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .admission-video {
    max-height: 240px;
  }

  /* Mobile nav polish */
  .mobile-nav {
    padding: 8px 14px 16px;
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
  }
  .mobile-nav a {
    padding: 14px 4px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  .hero.hero-3d {
    min-height: 480px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .stat-item {
    flex: 1 1 100%;
  }
  .page-header-actions {
    flex-direction: column;
  }
  .page-header-actions .btn,
  .page-header-actions a.btn {
    width: 100%;
  }
  .btn-login {
    display: none; /* есть в мобильном меню */
  }
  .header-actions .lang-switcher {
    margin-right: 0;
  }
}

/* ===== CABINET LAYOUT ===== */
.cabinet-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  background: var(--bg);
}

.cabinet-sidebar {
  background: var(--primary-dark);
  color: white;
  padding: 24px 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  overflow-y: auto;
}

.cabinet-user {
  text-align: center;
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}

.cabinet-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary-mid), var(--primary));
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 12px;
}

.cabinet-user h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cabinet-user p {
  font-size: 12px;
  opacity: 0.7;
}

.cabinet-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.cabinet-menu a:hover,
.cabinet-menu a.active {
  background: rgba(255,255,255,0.08);
  color: white;
  border-left-color: var(--accent);
}

.cabinet-menu a.logout {
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  color: #f5a5a5;
}

.cabinet-main {
  padding: 28px 32px 48px;
  overflow-x: auto;
}

.cabinet-main h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.cabinet-main .page-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cabinet-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}

.cabinet-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.cabinet-section-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.cabinet-section-body {
  padding: 20px 22px;
}

/* Forms in cabinet */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px rgba(19,58,102,0.1);
}

.form-group textarea {
  min-height: 90px;
  resize: vertical;
}

/* Tables */
.cabinet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cabinet-table th,
.cabinet-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cabinet-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cabinet-table tr:hover td {
  background: #fafbfd;
}

.grade {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.grade-5 { background: #e8f5e9; color: #1b7a3d; }
.grade-4 { background: #e3f2fd; color: #1565c0; }
.grade-3 { background: #fff8e1; color: #f57f17; }
.grade-2 { background: #fde8e8; color: #b71c1c; }

.badge-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(201,162,39,0.15);
  color: var(--accent-hover);
}

.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.role-tab {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}

.role-tab:hover {
  border-color: var(--primary-mid);
}

.role-tab.active {
  border-color: var(--accent);
  background: rgba(201,162,39,0.08);
}

.role-tab .icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.role-tab .title {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-dark);
}

.role-tab .desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.demo-accounts {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.demo-accounts strong {
  color: var(--primary-dark);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-success {
  background: #e8f5e9;
  color: #1b7a3d;
  border: 1px solid #c8e6c9;
}

.alert-error {
  background: #fde8e8;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
}

.alert-info {
  background: #e3f0ff;
  color: #0d47a1;
  border: 1px solid #bbdefb;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #9a1818;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #166532;
}

@media (max-width: 900px) {
  .cabinet-layout {
    grid-template-columns: 1fr;
  }
  .cabinet-sidebar {
    position: relative;
    top: 0;
    height: auto;
  }
  .cabinet-main {
    padding: 20px 16px 40px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}


/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  overflow: hidden;
  margin-right: 10px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.lang-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.lang-btn.active {
  background: var(--accent);
  color: var(--primary-dark);
}
.header .lang-switcher {
  border-color: rgba(255,255,255,0.22);
}
@media (max-width: 900px) {
  .lang-switcher { margin-right: 6px; }
  .lang-btn { padding: 5px 8px; font-size: 11px; }
}


/* ===== Дополнительные анимации ===== */
.news-card,
.person-card,
.stat-item {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}

.news-card:hover,
.person-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-item-link:hover {
  transform: translateY(-3px);
}

.btn {
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Плавное появление секций */
.section-header {
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav underline animation */
.nav-main a {
  position: relative;
}

.nav-main a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-main a:hover::after,
.nav-main a.active::after {
  width: 60%;
  left: 20%;
}


/* ===== Параллакс ===== */
.hero-bg,
.hero-grid,
.hero-rays,
.hero-orbs,
.hero-particles {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.hero.parallax-active .hero-bg {
  transition: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .hero-grid,
  .hero-rays,
  .hero-orbs {
    animation: none !important;
  }
}



/* ===== Снайперский эффект (реалистичный) ===== */
.sniper-crosshair {
  position: fixed;
  width: 96px;
  height: 96px;
  margin-left: -48px;
  margin-top: -48px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.08s ease-out;
  transform: scale(0.92);
}

.sniper-crosshair.active {
  opacity: 1;
  transform: scale(1);
}

.sniper-crosshair svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}

/* Лёгкое затемнение краёв при прицеливании */
.sniper-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    ellipse 55% 55% at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

.sniper-vignette.on {
  opacity: 0; /* затемнение отключено */
}

.sniper-flash {
  position: fixed;
  width: 160px;
  height: 160px;
  margin-left: -80px;
  margin-top: -80px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(255,255,240,0.95) 0%, rgba(255,200,80,0.7) 18%, rgba(255,100,20,0.35) 40%, transparent 68%);
}

.sniper-flash.bang {
  animation: sniperFlash 0.28s ease-out forwards;
}

@keyframes sniperFlash {
  0% { opacity: 1; transform: scale(0.25); }
  40% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.6); }
}

.sniper-impact {
  position: fixed;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  pointer-events: none;
  z-index: 9997;
  opacity: 0;
}

.sniper-impact.hit {
  animation: sniperHit 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sniper-impact::before,
.sniper-impact::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #e8c547;
}

.sniper-impact::after {
  border-color: rgba(255, 255, 255, 0.5);
  animation: none;
}

@keyframes sniperHit {
  0% {
    opacity: 1;
    transform: scale(0.15);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* Искры при попадании */
.sniper-sparks {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 9997;
}

.sniper-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffe9a0;
  box-shadow: 0 0 4px #c9a227;
  animation: sparkFly 0.45s ease-out forwards;
}

@keyframes sparkFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(0.2);
  }
}

.sniper-trail {
  position: fixed;
  height: 2px;
  pointer-events: none;
  z-index: 9996;
  opacity: 0;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 240, 180, 0.3) 20%,
    rgba(255, 220, 100, 0.9) 70%,
    #fff 100%
  );
  box-shadow: 0 0 6px rgba(255, 200, 80, 0.6);
  transform-origin: left center;
}

.sniper-trail.fire {
  animation: sniperTrail 0.18s ease-out forwards;
}

@keyframes sniperTrail {
  0% { opacity: 1; filter: brightness(1.5); }
  100% { opacity: 0; filter: brightness(0.8); }
}

.sniper-target-hit {
  animation: targetFlash 0.5s ease;
  position: relative;
}

@keyframes targetFlash {
  0%, 100% {
    filter: none;
    box-shadow: none;
  }
  25% {
    filter: brightness(1.35);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.7), 0 0 16px rgba(201, 162, 39, 0.35);
  }
}

/* Тряска экрана */
@keyframes sniperShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
}

body.sniper-shake {
  animation: sniperShake 0.2s ease-out;
}

body.sniper-mode {
  cursor: none;
}

body.sniper-mode a,
body.sniper-mode button,
body.sniper-mode .btn {
  cursor: none;
}

@media (prefers-reduced-motion: reduce) {
  .sniper-crosshair,
  .sniper-vignette,
  .sniper-flash,
  .sniper-impact,
  .sniper-trail {
    display: none !important;
  }
  body.sniper-mode {
    cursor: auto;
  }
}


/* ===== Heli mission easter-egg tooltip ===== */
.heli-mission-tip {
  display: none;
  position: absolute;
  z-index: 12;
  pointer-events: none;
  padding: 8px 12px;
  background: rgba(8, 22, 16, 0.92);
  border: 1px solid rgba(51, 255, 136, 0.55);
  border-radius: 6px;
  color: #9dffc0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(51, 255, 136, 0.2);
  transform: translateY(-100%);
}
.heli-mission-tip::before {
  content: '';
  position: absolute;
  left: 12px;
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: rgba(8, 22, 16, 0.92);
  border-right: 1px solid rgba(51, 255, 136, 0.55);
  border-bottom: 1px solid rgba(51, 255, 136, 0.55);
  transform: rotate(45deg);
}








/* Soft glow at radar center (floor) — z-index 1 */
.hero-radar-glow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 280px;
  height: 140px;
  transform: translateX(-40%);
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(0, 210, 255, 0.35) 0%, rgba(0, 180, 216, 0.12) 40%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

/* ===== Schematics (z-index 0 — задний фон и чертежи) ===== */
.hero-schematics {
  position: absolute;
  top: 8%;
  right: 10%;
  width: min(520px, 50vw);
  height: min(520px, 50vw);
  z-index: 0;
  background: url('../assets/blueprint.svg') no-repeat center / contain;
  opacity: 0.16;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.25)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
  pointer-events: none;
  animation: schematics-drift 28s ease-in-out infinite alternate;
}
.hero-schematics-2 {
  top: 18%;
  right: 28%;
  width: min(320px, 34vw);
  height: min(320px, 34vw);
  background: url('../assets/hud-gauge.svg') no-repeat center / contain;
  opacity: 0.14;
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.3));
  animation: schematics-drift 22s ease-in-out infinite alternate-reverse;
}
@keyframes schematics-drift {
  from { transform: rotate(-5deg) translateY(0); }
  to   { transform: rotate(5deg) translateY(10px); }
}
@media (max-width: 768px) {
  .hero-schematics { opacity: 0.1; width: 260px; height: 260px; right: 0; }
  .hero-schematics-2 { opacity: 0.08; width: 180px; height: 180px; }
  .hero-radar-glow { width: 160px; height: 80px; }
}

/* ===== Admission instruction video ===== */
.admission-video-card {
  margin-bottom: 28px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #0c1814 0%, #12241c 45%, #0a1410 100%);
  border: 1px solid rgba(201, 162, 39, 0.4);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.av-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 22px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.18), transparent 70%);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}
.av-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c9a227;
  text-transform: uppercase;
}
.av-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(220, 230, 224, 0.75);
}
.av-meta-dot { opacity: 0.45; }
.av-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.6fr);
  gap: 0;
}
.av-copy {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.av-copy h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.25;
  color: #f2f5f3;
  font-weight: 700;
}
.av-copy p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(210, 220, 214, 0.85);
}
.av-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.av-steps span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #0a1210;
  background: linear-gradient(145deg, #d4b03a, #a67c00);
  box-shadow: 0 2px 6px rgba(201, 162, 39, 0.35);
}
.admission-video-wrap {
  position: relative;
  background: #050a08;
  border-left: 1px solid rgba(201, 162, 39, 0.2);
  min-height: 220px;
}
.admission-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #050a08;
  vertical-align: middle;
}
@media (max-width: 900px) {
  .av-body {
    grid-template-columns: 1fr;
  }
  .admission-video-wrap {
    border-left: none;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
  }
  .av-copy {
    padding: 22px 20px 18px;
  }
  .av-copy h2 {
    font-size: 22px;
  }
  .admission-video {
    max-height: 280px;
  }
}

/* ===== Chance calculator (Поступление) ===== */
.chance-calc {
  margin-bottom: 28px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(11, 37, 69, 0.12);
  box-shadow: var(--shadow);
}
.cc-head {
  padding: 16px 22px;
  background: linear-gradient(135deg, #0b2545 0%, #133a66 100%);
  color: #fff;
}
.cc-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.cc-note {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.45;
}
.cc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.cc-form {
  padding: 22px 22px 24px;
  border-right: 1px solid var(--border);
}
.cc-field {
  display: block;
  margin-bottom: 14px;
}
.cc-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.cc-label em {
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
}
.cc-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  background: #f8fafc;
  color: var(--text);
  transition: border-color 0.15s;
}
.cc-input:focus {
  outline: none;
  border-color: var(--primary-mid);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(19, 58, 102, 0.12);
}
.cc-btn {
  width: 100%;
  margin-top: 6px;
  justify-content: center;
}
.cc-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}
.cc-result {
  padding: 22px;
  background: linear-gradient(180deg, #f7faf8 0%, #eef4f0 100%);
}
.cc-score-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cc-score-box {
  flex: 0 0 auto;
  min-width: 140px;
  text-align: center;
  padding: 14px 18px;
  background: #0b2545;
  color: #fff;
  border-radius: 10px;
}
.cc-score-label {
  font-size: 11px;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cc-score-num {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}
.cc-score-max {
  font-size: 12px;
  opacity: 0.7;
}
.cc-breakdown {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.cc-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
  border: 1px solid rgba(11,37,69,0.06);
}
.cc-bar-wrap {
  margin-bottom: 16px;
}
.cc-bar-track {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #c62828 0%, #f9a825 45%, #2e7d32 100%);
  position: relative;
  overflow: hidden;
}
.cc-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: rgba(11, 37, 69, 0.35);
  border-right: 3px solid #0b2545;
  transition: width 0.45s ease;
}
.cc-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  position: relative;
}
.cc-status {
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.cc-status.grant {
  background: rgba(46, 125, 50, 0.12);
  border: 1px solid rgba(46, 125, 50, 0.35);
  color: #1b5e20;
}
.cc-status.paid {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(180, 120, 0, 0.35);
  color: #8a5a00;
}
.cc-status.risk {
  background: rgba(198, 40, 40, 0.1);
  border: 1px solid rgba(198, 40, 40, 0.3);
  color: #8b1a1a;
}
.cc-status.low {
  background: rgba(100, 100, 100, 0.1);
  border: 1px solid rgba(100, 100, 100, 0.25);
  color: #444;
}
.cc-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}
.cc-tips li {
  padding: 4px 0 4px 18px;
  position: relative;
}
.cc-tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 768px) {
  .cc-grid {
    grid-template-columns: 1fr;
  }
  .cc-form {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .cc-score-num {
    font-size: 36px;
  }
}

.cc-disclaimer {
  font-size: 12px;
  line-height: 1.45;
  color: #6b4a00;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.cc-norms {
  margin-bottom: 4px;
}

/* Video language switcher */
.av-lang {
  display: inline-flex;
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(0, 0, 0, 0.25);
}
.av-lang-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(240, 240, 230, 0.75);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.av-lang-btn:hover {
  color: #fff;
  background: rgba(201, 162, 39, 0.15);
}
.av-lang-btn.active {
  background: linear-gradient(145deg, #d4b03a, #a67c00);
  color: #0a1210;
}


/* Military department emblem next to hero title */
.hero-copy > .hero-badge {
  margin-bottom: 12px;
}
.hero-title-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 8px;
}
.hero-vk-logo {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
  box-shadow: none;
  margin-top: 0;
}
.hero-title-block h1 {
  margin: 0;
  white-space: nowrap;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hero-copy > .slogan {
  margin: 0 0 16px;
  padding-left: 0;
}
@media (max-width: 900px) {
  .hero-vk-logo { width: 58px; height: 58px; }
  .hero-title-block { gap: 12px; }
  .hero-title-block h1 { font-size: clamp(24px, 5vw, 34px); }
}
@media (max-width: 640px) {
  .hero-vk-logo { width: 52px; height: 52px; }
  .hero-title-block h1 { white-space: normal; line-height: 1.1; }
}

/* ===== YouTube-плеер видео-инструкции (Поступление) ===== */
.admission-video-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.av-yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050a08;
}
.av-yt[hidden], .admission-video[hidden], .av-yt-link[hidden] { display: none; }
.av-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.av-yt-link {
  display: block;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
  color: #d4b03a;
  background: #050a08;
  text-decoration: none;
}
.av-yt-link:hover { color: #f0cf5a; text-decoration: underline; }
@media (max-width: 900px) {
  .admission-video { max-height: none; }
}


/* =====================================================================
   MOBILE POLISH
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, summary, [role="button"] { touch-action: manipulation; } /* без задержки двойного тапа */
img, video, svg { max-width: 100%; }

/* --- Подменю на страницах «Студенту»: чипы с горизонтальным скроллом --- */
.subnav { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.subnav-inner {
  display: flex; gap: 8px; overflow-x: auto;
  padding-top: 10px; padding-bottom: 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a {
  flex: 0 0 auto; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--primary-dark); background: #fff; border: 1px solid var(--border);
}
.subnav a:hover { border-color: var(--primary); }
.subnav a.active { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }

/* --- Тач-устройства: крупные цели нажатия, без зума iOS в полях --- */
@media (pointer: coarse) {
  .lang-btn { min-height: 38px; min-width: 44px; padding-left: 12px; padding-right: 12px; }
  .link-all,
  .breadcrumb a,
  .footer a { display: inline-block; padding: 10px 0; margin: -10px 0; }
  .mobile-nav a { min-height: 48px; display: flex; align-items: center; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select, textarea { font-size: 16px; }
  .btn, .tab-btn { min-height: 44px; }
  .av-lang-btn { min-height: 40px; }
}

/* --- Таблицы на телефоне: остаются настоящими таблицами (широкие — с горизонтальным скроллом) --- */
@media (max-width: 640px) {
  .content-card table { font-size: 13px; }
  .content-card th, .content-card td { overflow-wrap: anywhere; }
  .content-card th { white-space: normal; }
}

/* --- Мелкие экраны: 3D/декор не должен ломать ширину --- */
@media (max-width: 480px) {
  .hero-schematics { max-width: 100%; overflow: hidden; }
}

/* --- Очень узкие экраны (≤360px): шапка должна ужиматься, а не раздвигать страницу --- */
@media (max-width: 360px) {
  .header-inner { gap: 6px; }
  .logo { min-width: 0; flex: 1 1 auto; }
  .logo-text { min-width: 0; }
  .logo-text .dept { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-actions { flex: 0 0 auto; }
  .lang-switcher { margin-right: 2px; }
  .lang-btn { min-width: 36px; padding-left: 8px; padding-right: 8px; }
}

/* --- podgotovka: своя карточная вёрстка spec-table не должна растягиваться глобальным min-width --- */
@media (max-width: 700px) {
  .content-card table.spec-table, table.spec-table { display: table; min-width: 0; width: 100%; overflow: visible; }
  .spec-table td { overflow-wrap: anywhere; }
}

/* --- Мобильный hero: вертолёт — фон, текст — читаем --- */
@media (max-width: 768px) {
  .hero-canvas { opacity: 0.92; }
  /* затемнение сверху вниз: плотнее под заголовком, мягче там, где стоит вертолёт */
  .hero.hero-3d .hero-vignette {
    background:
      linear-gradient(180deg, rgba(5, 12, 10, 0.60) 0%, rgba(5, 12, 10, 0.42) 30%, rgba(5, 12, 10, 0.22) 50%, rgba(5, 12, 10, 0.08) 75%, rgba(5, 12, 10, 0.30) 100%);
  }
  .hero.hero-3d .hero-copy h1,
  .hero.hero-3d .hero-copy p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 0, 0, 0.65);
  }
}

/* --- Контакты: карточка разработчиков на всю ширину --- */
.contact-grid .dev-card { grid-column: 1 / -1; }
.dev-card .dev-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 24px;
}
@media (max-width: 900px) {
  .dev-card .dev-list { grid-template-columns: 1fr; }
}
