body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Floating contact button and card (global) */
.contact-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #111827;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 150;
}
.contact-fab:hover { background: #1f2937; transform: translateY(-1px); }

.contact-card {
  position: fixed;
  right: 16px;
  bottom: 68px;
  min-width: 260px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 14px 16px;
  z-index: 150;
  display: none;
}
.contact-card.active { display: block; }
.contact-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #111827; }
.contact-links { display: flex; flex-direction: column; gap: 8px; }
.contact-links a { color: #0366d6; text-decoration: none; font-weight: 600; }
.contact-links a:hover { text-decoration: underline; }

@media (max-width: 576px) {
  .contact-fab { right: 12px; bottom: 12px; }
  .contact-card { right: 12px; bottom: 62px; }
}

h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.01em;
  font-weight: 600;
}

/* Readable default color for h4 on light backgrounds */
h4 {
  color: #111827; /* near-black for good contrast */
}

/* Overrides for dark sections */
.gradient-bg h4 {
  color: #ffffff;
}

footer .footer-column h4 {
  color: #ffffff;
}

/* Hero section */
:root {
  --hero-color-bg1: #111827;
  --hero-color-bg2: #1f2937;
  --hero-color-accent: #4338ca;
  --hero-highlight: rgba(255, 255, 255, 0.08);
}

.hero-title {
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #f9fafb;
  text-shadow: 0 20px 45px rgba(15, 23, 42, 0.5);
  display: inline-block;
  margin-bottom: 0.25rem;
}

/* Blurred gradient background (static, no animations) */
:root {
  --hero-color-bg1: rgb(28, 24, 235);
  --hero-color-bg2: rgb(42, 34, 110);
  --hero-color1: 18, 113, 255;
  --hero-color2: 221, 74, 255;
  --hero-color3: 100, 220, 255;
  --hero-color4: 200, 50, 50;
  --hero-color5: 79, 70, 229;
  --hero-circle-size: 85%;
}

/* Hero: чёрный фон, фиолетовые блики по бокам */
.gradient-bg {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  background: #13111c;
  color: #ffffff;
}

.gradient-bg::before,
.gradient-bg::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  max-width: 320px;
  pointer-events: none;
  z-index: 0;
}

.gradient-bg::before {
  left: 0;
  background: radial-gradient(ellipse 100% 80% at 0% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
}

.gradient-bg::after {
  right: 0;
  background: radial-gradient(ellipse 100% 80% at 100% 50%, rgba(79, 70, 229, 0.3) 0%, transparent 70%);
}

.gradient-bg > .max-w-7xl {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-height: 320px;
}

/* Блики отключены: canvas в hero скрыт */
#hero-webgl {
  display: none !important;
}

@media (max-width: 768px) {
  /* Hero content mobile - minimal */
  .hero-content {
    align-items: flex-start;
    text-align: left;
    gap: 0.6rem;
    position: relative;
    z-index: 2;
  }

  .hero-content .mb-4 {
    margin-top: 1.5rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7.4vw, 2.45rem);
    line-height: 1.12;
  }

  .hero-content-wrapper {
    margin-top: 0.2rem;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .stats-container {
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0;
  }

  /* Hero на мобилке: текст по центру, плавные анимации как на десктопе */
  .gradient-bg .max-w-7xl {
    justify-content: center;
    align-items: center;
  }

  .hero-layout {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.25rem;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    animation: heroFadeIn 0.6s ease-out forwards;
  }

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

  .hero-title-block {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-title {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
  }

  .hero-stats-block {
    width: 100%;
    margin-top: 0.5rem;
  }

  .hero-stats-block .stats-container {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .stat-block {
    min-width: 88px;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0;
    flex: 0 0 auto;
  }

  .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
  }

  .stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0;
  }

  /* Плавные анимации счётчиков на мобилке как на десктопе */
  .hero-stats-block .stat-block {
    animation: statBlockReveal 0.5s ease-out forwards;
    animation-delay: var(--stat-delay, 0s);
  }

  .hero-stats-block .stat-text {
    animation: statReveal 0.5s ease-out forwards;
    animation-delay: var(--stat-delay, 0s);
  }
}

@keyframes heroBloom {
  0% { transform: translate3d(-3%, -2%, 0) scale(1); }
  50% { transform: translate3d(2%, 3%, 0) scale(1.02); }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.03); }
}

.gradient-bg .max-w-7xl {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.gradient-bg .text-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.hero-subtitle {
  max-width: 36rem;
}

/* Элементы hero */
.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.75rem;
}

.hero-cta-group .hero-cta-primary,
.hero-cta-group .hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.65rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-cta-group {
  gap: 0.75rem;
  row-gap: 0.75rem;
}

.hero-cta-primary {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.35);
}

.hero-cta-primary:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(67, 56, 202, 0.42);
}

.hero-cta-secondary {
  background: rgba(15, 23, 42, 0.35);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.hero-cta-secondary:hover {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.38);
  transform: translateY(-2px);
}

/* Подзаголовок в hero поверх тёмного фона */
.gradient-bg p.text-indigo-100 {
  color: rgba(255, 255, 255, 0.85);
}

/* Весь текст в hero белый */
.gradient-bg .stat-number {
  color: #f8fafc;
}

.gradient-bg .stat-label {
  color: rgba(226, 232, 240, 0.75);
}

.hero-content-wrapper {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Course cards */
.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.2s ease;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.course-card:hover {
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
  border-color: #cbd5f5;
  transform: translateY(-2px);
}

.course-card .p-6 {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-card p {
  color: #475569;
  line-height: 1.6;
  font-size: 0.95rem;
}

.course-card ul {
  padding: 0;
  margin: 1.5rem 0 0 0;
  list-style: none;
}

.course-card-actions {
  margin-top: auto !important;
  padding-top: 1.25rem;
  gap: 0.75rem;
}

.course-card h3 {
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}

.course-card .flex.items-center {
  gap: 0.45rem;
}

.course-card .flex.items-center .ml-4 {
  margin-left: 0.5rem;
}

.course-icon-container {
  padding: 0.85rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.course-icon-container i {
  color: #4338ca;
}

/* Стили для карточек тренажеров - более сдержанная ширина */
#trainers .grid {
  max-width: 800px;
}

#trainers .course-card {
  max-width: 100%;
}

@media (min-width: 1024px) {
  #trainers .grid {
    grid-template-columns: repeat(2, minmax(0, 380px));
    justify-content: center;
    gap: 1.5rem;
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-badge.status-ready {
  background: rgba(34, 197, 94, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-badge.status-planned {
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.status-badge.status-in-development {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-size: 0.6rem;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* Buttons */
.course-button {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 0.375rem;
  color: white;
  background-color: #4f46e5;
  transition: all 0.2s ease;
}

.course-button:hover {
  background-color: #4338ca;
}

.course-button-secondary {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 1rem;
  border: 1px solid #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 0.375rem;
  color: #4f46e5;
  background-color: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.course-button-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

/* Typing test section */
.typing-test {
  /* фон как в hero: фирменный градиент без фонового изображения */
  background: linear-gradient(40deg, var(--hero-color-bg1), var(--hero-color-bg2));
  border-radius: 16px;
  padding-top: 40px;
  padding-bottom: 10px;
  position: relative;
  overflow: hidden;
}

/* Размытые градиенты внутри typing-test, с акцентом справа */
.tt-gradients-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  filter: blur(48px);
  pointer-events: none;
}

.tt-g1,
.tt-g2,
.tt-g3,
.tt-g4 {
  position: absolute;
  border-radius: 9999px;
  opacity: 0.85;
  mix-blend-mode: screen;
}

/* крупное пятно справа вверху */
.tt-g1 {
  right: -12%;
  top: -8%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, rgba(var(--hero-color1), 0.75), rgba(var(--hero-color1), 0) 60%);
}

/* среднее пятно справа по центру */
.tt-g2 {
  right: -6%;
  top: 30%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 60% 40%, rgba(var(--hero-color2), 0.65), rgba(var(--hero-color2), 0) 58%);
}

/* маленькое акцентное пятно справа снизу */
.tt-g3 {
  right: 4%;
  bottom: -8%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 50% 50%, rgba(var(--hero-color3), 0.7), rgba(var(--hero-color3), 0) 55%);
}

/* тёплый рефлекс ближе к центру */
.tt-g4 {
  right: 26%;
  top: 18%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 40% 60%, rgba(var(--hero-color4), 0.45), rgba(var(--hero-color4), 0) 58%);
}

/* Метрика/карточка справа — лёгкая подсветка и градиентная рамка */
.metrics-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(transparent, transparent) padding-box,
              linear-gradient(135deg, rgba(99,102,241,0.65), rgba(139,92,246,0.5), rgba(34,197,94,0.45)) border-box;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.metrics-card::before {
  content: none;
}

/* Свечение прогресс-ринга */
.progress-ring-glow {
  filter: drop-shadow(0 0 6px rgba(99,102,241,0.45)) drop-shadow(0 0 14px rgba(34,197,94,0.25));
}

.progress-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* Navigation */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #4f46e5;
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #4f46e5;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Footer */
.footer-simple {
  background: linear-gradient(140deg, #060b14 0%, #0b1524 50%, #162a45 100%);
  color: #e2e8f0;
  padding-top: clamp(3rem, 8vw, 4.5rem);
  padding-bottom: clamp(2rem, 6vw, 3.5rem);
}

.footer-simple__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

.footer-simple__inner h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f8fafc;
}

.footer-simple__inner p {
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.7;
  max-width: 420px;
}

.footer-simple__links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.footer-simple__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.88);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-simple__links a i {
  color: rgba(129, 140, 248, 0.85);
}

.footer-simple__links a:hover {
  color: #f8fafc;
  transform: translateX(4px);
}

.footer-simple__bottom {
  margin-top: clamp(2rem, 6vw, 3rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: rgba(148, 163, 184, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .footer-simple__inner {
    gap: 2rem;
  }
}

/* Modal windows */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.active .modal-backdrop {
  opacity: 1;
}

.modal-content {
  background-color: white;
  border-radius: 1rem;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 50;
  position: relative;
}

.modal.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 9999px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.modal-section {
  margin-bottom: 1.5rem;
}

.modal-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: #475569;
}

.modal-divider {
  height: 1px;
  width: 100%;
  background: #e2e8f0;
  margin: 1.25rem 0;
  opacity: 0.85;
}

.modal-subtitle {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: #475569;
}

/* Hero Layout: один блок — заголовок и счётчики в один ряд */
.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding-left: 0.25rem;
}

.hero-center-block {
  width: 100%;
}

.hero-title-block {
  width: 100%;
  text-align: left;
}

.hero-title {
  text-align: left;
}

.hero-stats-block {
  width: 100%;
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.hero-subtitle {
  max-width: 2xl;
  margin-left: auto;
  margin-right: auto;
}

/* Счётчики: моноширинные цифры для анимации */
.stat-counter {
  font-variant-numeric: tabular-nums;
}

.stat-text {
  opacity: 0;
  animation: statReveal 0.5s ease-out forwards;
}

.stat-block {
  animation: statBlockReveal 0.5s ease-out forwards;
  opacity: 0;
  animation-delay: var(--stat-delay, 0s);
}

.stat-counter {
  animation-delay: var(--stat-delay, 0s);
}

@keyframes statReveal {
  to { opacity: 1; }
}

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

/* Десктоп: слоган сверху, счётчики (курсы, статей, песочниц, доступ, бесплатно) в один ряд */
@media (min-width: 1024px) {
  .hero-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-left: 0.25rem;
  }

  .hero-center-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .hero-title-block {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .hero-title {
    margin-top: 0.5rem;
    margin-bottom: 0;
  }

  .hero-stats-block {
    flex-shrink: 0;
    margin-top: 0.25rem;
  }

  .hero-stats-block .stats-container {
    flex-direction: row;
    justify-content: center;
    gap: 1.75rem;
    margin: 0;
  }

  .hero-title-block {
    text-align: left;
  }

  .hero-stats-block .stat-block {
    min-width: 120px;
    padding: 1rem 1.25rem;
    border-radius: 0;
    background: transparent;
    border: none;
  }

  .hero-stats-block .stat-number {
    font-size: 2.25rem;
    margin-bottom: 0.35rem;
  }

  .hero-stats-block .stat-label {
    font-size: 0.85rem;
  }

  #hero-webgl {
    left: auto;
    width: clamp(520px, 50vw, 800px);
    right: 0;
    transform: translate3d(0, 0, 0);
    opacity: 0.85;
  }
}

@media (min-width: 1280px) {
  .hero-title {
    font-size: clamp(3.5rem, 4vw, 4.5rem);
  }

  .hero-stats-block .stat-block {
    min-width: 140px;
    padding: 1.15rem 1.5rem;
  }

  .hero-stats-block .stat-number {
    font-size: 2.5rem;
  }

  .hero-stats-block .stat-label {
    font-size: 0.9rem;
  }

  #hero-webgl {
    width: clamp(720px, 50vw, 1080px);
    right: clamp(-220px, -3vw, 80px);
    transform: translate3d(-104px, 8px, 0);
  }
}

/* Stats blocks — курс, статей, песочниц, доступ, бесплатно в один ряд; на узких экранах перенос */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 0.25rem 0 0.4rem;
}

@media (min-width: 1024px) {
  .hero-stats-block .stats-container {
    justify-content: center;
  }

  .stat-block {
    align-items: flex-start;
  }
}

/* Плашки без эффекта стекла — как на десктопе везде */
.stat-block {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 1.5rem 1.75rem;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Планшеты и мобилка до 1024px: плашки как на десктопе — без стекла */
@media (max-width: 1023px) {
  .hero-stats-block {
    margin-top: 0.75rem;
  }

  .hero-stats-block .stats-container {
    gap: 0.75rem;
    justify-content: center;
  }

  .hero-stats-block .stat-number {
    font-size: 1.65rem;
    margin-bottom: 0.25rem;
  }

  .hero-stats-block .stat-block {
    padding: 0.9rem 0.85rem;
    min-width: 70px;
    border-radius: 0;
    background: transparent;
    border: none;
  }

  .hero-stats-block .stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }
}

/* Мобильное меню анимация */
#mobile-menu {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

#mobile-menu.is-active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  height: auto;
}

/* Анимация иконки бургера */
.burger-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
}

.burger-icon .line {
  display: block;
  position: absolute;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  left: 3px;
  transition: all 0.3s ease;
}

.burger-icon .line:nth-child(1) {
  top: 6px;
}

.burger-icon .line:nth-child(2) {
  top: 11px;
}

.burger-icon .line:nth-child(3) {
  top: 16px;
}

/* Анимация трансформации в крестик */
.burger-icon.is-active .line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger-icon.is-active .line:nth-child(2) {
  opacity: 0;
}

.burger-icon.is-active .line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* UFO и иконки в hero отключены */
.ufo-hero,
.ufo-hero-2,
.course-icons-left,
.course-icons-right { display: none !important; }

/* Декоративные иконки с эффектом высыпания (только десктоп) */
.hero-icons-cascade {
  display: none;
  position: relative;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero-icons-cascade {
    display: block;
    position: relative;
    min-width: 420px;
    min-height: 385px;
  }
}

.hero-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 38px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  opacity: 0;
  transform: translateY(-200px) translateX(80px) rotate(-20deg) scale(0.2);
}

.hero-icon i { line-height: 1; }

/* Размеры иконок */
.hero-icon.hero-icon-s { width: 78px; height: 78px; }
.hero-icon.hero-icon-s i { font-size: 30px; }

.hero-icon.hero-icon-m { width: 104px; height: 104px; }
.hero-icon.hero-icon-m i { font-size: 40px; }

.hero-icon.hero-icon-l { width: 122px; height: 122px; }
.hero-icon.hero-icon-l i { font-size: 48px; }

.hero-icon.hero-icon-xl { width: 140px; height: 140px; }
.hero-icon.hero-icon-xl i { font-size: 56px; }

/* Анимации диагонального падения с отскоком */
@keyframes cascadeFall {
  0% {
    opacity: 0;
    transform: translateY(-200px) translateX(80px) rotate(-20deg) scale(0.2);
  }
  60% {
    opacity: 1;
    transform: translateY(var(--final-y, 0)) translateX(var(--final-x, 0)) rotate(var(--rotate-angle, 5deg)) scale(1.08);
  }
  75% {
    transform: translateY(calc(var(--final-y, 0) - 5px)) translateX(var(--final-x, 0)) rotate(var(--rotate-angle, 5deg)) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(var(--final-y, 0)) translateX(var(--final-x, 0)) rotate(var(--rotate-angle, 5deg)) scale(1);
  }
}

/* Хаотичное расположение иконок - высыпание с правого края */
/* Большие иконки справа */
.hero-icon.cascade-1 {
  animation: cascadeFall 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
  --final-x: 10px;
  --final-y: -40px;
  --rotate-angle: -10deg;
  right: -20px;
  top: -25px;
}

.hero-icon.cascade-2 {
  animation: cascadeFall 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards;
  --final-x: -100px;
  --final-y: 120px;
  --rotate-angle: 12deg;
  right: 10px;
  top: -5px;
}

/* Средние иконки */
.hero-icon.cascade-3 {
  animation: cascadeFall 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
  --final-x: -190px;
  --final-y: 20px;
  --rotate-angle: -8deg;
  right: 80px;
  top: 20px;
}

.hero-icon.cascade-4 {
  animation: cascadeFall 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards;
  --final-x: -140px;
  --final-y: 210px;
  --rotate-angle: 10deg;
  right: 50px;
  top: 35px;
}

/* Маленькие иконки ближе к центру */
.hero-icon.cascade-5 {
  animation: cascadeFall 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards;
  --final-x: -260px;
  --final-y: 210px;
  --rotate-angle: -12deg;
  right: 150px;
  top: 60px;
}

.hero-icon.cascade-6 {
  animation: cascadeFall 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s forwards;
  --final-x: -320px;
  --final-y: 140px;
  --rotate-angle: 6deg;
  right: 190px;
  top: 80px;
}

/* Свечение тарелок - треугольники с градиентом */
.ufo-hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 60px solid;
  border-image: linear-gradient(to bottom, rgba(99, 102, 241, 0.8) 0%, rgba(99, 102, 241, 0.4) 50%, transparent 100%);
  border-image-slice: 1;
  opacity: 0;
  animation: ufoGlowTriangle 2s ease-in-out 3.5s forwards;
  pointer-events: none;
  z-index: 2;
}

.ufo-hero-2::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 60px solid;
  border-image: linear-gradient(to bottom, rgba(139, 92, 246, 0.8) 0%, rgba(139, 92, 246, 0.4) 50%, transparent 100%);
  border-image-slice: 1;
  opacity: 0;
  animation: ufoGlowTriangle2 2s ease-in-out 3.5s forwards;
  pointer-events: none;
  z-index: 2;
}

@keyframes ufoGlowTriangle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes ufoGlowTriangle2 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}



@keyframes ufoHeroMove {
  0% { 
    transform: translateX(-120px) translateY(70px) rotate(-3deg);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  35% {
    transform: translateX(calc(20vw - 40px)) translateY(70px) rotate(0deg);
  }
  60% {
    transform: translateX(calc(20vw - 40px)) translateY(70px) rotate(0deg);
  }
  100% { 
    transform: translateX(-120px) translateY(70px) rotate(3deg);
    opacity: 0;
  }
}

@keyframes ufoHeroMove2 {
  0% { 
    transform: translateX(calc(100vw + 120px)) translateY(70px) rotate(3deg);
    opacity: 0;
  }
  15% {
    opacity: 0.7;
  }
  35% {
    transform: translateX(calc(80vw - 40px)) translateY(70px) rotate(0deg);
  }
  60% {
    transform: translateX(calc(80vw - 40px)) translateY(70px) rotate(0deg);
  }
  100% { 
    transform: translateX(calc(100vw + 120px)) translateY(70px) rotate(-3deg);
    opacity: 0;
  }
}

/* Отключены декоративные иконки и их анимации */

.course-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0);
}

.course-icon:nth-child(1) { animation: showIconLeft1 8s ease-in-out 4s forwards; }
.course-icon:nth-child(2) { animation: showIconLeft2 8s ease-in-out 4.05s forwards; }
.course-icon:nth-child(3) { animation: showIconLeft3 8s ease-in-out 4.1s forwards; }
.course-icon:nth-child(4) { animation: showIconRight1 8s ease-in-out 4s forwards; }
.course-icon:nth-child(5) { animation: showIconRight2 8s ease-in-out 4.05s forwards; }
.course-icon:nth-child(6) { animation: showIconRight3 8s ease-in-out 4.1s forwards; }
.course-icon:nth-child(7) { animation: showIconRight4 8s ease-in-out 4.15s forwards; }

.course-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.course-icon i {
  font-size: 1.2rem;
  color: #4f46e5;
}

@keyframes showCourseIconsLeft {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(35px);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(35px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(calc(100vh - 200px));
  }
}

@keyframes showCourseIconsRight {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(35px);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(35px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(calc(100vh - 200px));
  }
}

@keyframes showIconLeft {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  20% {
    opacity: 1;
    transform: translateY(0);
  }
  75% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(calc(100vh - 200px));
  }
}

@keyframes showIconRight {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  20% {
    opacity: 1;
    transform: translateY(0);
  }
  75% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(calc(100vh - 200px));
  }
}

/* Отдельные анимации для поочередного падения */
@keyframes showIconLeft1 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@keyframes showIconLeft2 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  72% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@keyframes showIconLeft3 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  74% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@keyframes showIconRight1 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@keyframes showIconRight2 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  72% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@keyframes showIconRight3 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  74% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@keyframes showIconRight4 {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; transform: translateY(0); }
  76% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(calc(100vh - 200px)); }
}

@media (max-width: 768px) {
  .gradient-bg { min-height: 320px; }
}

/* Media queries */
@media (max-width: 640px) {
  .gradient-bg {
    min-height: 320px;
  }

  .hero-content .mb-4 {
    margin-top: 1.5rem;
  }

  .hero-content-wrapper {
    margin-top: 0.2rem;
  }
  
  .hero-stats-block .stats-container {
    gap: 0.65rem;
  }
  
  .hero-stats-block .stat-block {
    padding: 1rem 1.2rem;
    min-width: 82px;
  }
  
  .hero-stats-block .stat-number {
    font-size: 1.7rem;
  }
  
  .hero-stats-block .stat-label {
    font-size: 0.68rem;
  }

  .modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .modal-header, .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 0.75rem 1rem;
  }

  /* Фиксируем мобильную панель результатов под шапкой 64px */
  .mobile-search-results { top: 64px; width: min(560px, calc(100vw - 24px)); }
}

/* Очень маленькие экраны: плашки остаются читаемыми */
@media (max-width: 480px) {
  .gradient-bg {
    min-height: 300px;
  }

  .hero-content .mb-4 {
    margin-top: 1.5rem;
  }

  .hero-content-wrapper {
    margin-top: 0.2rem;
  }
  
  .hero-stats-block .stats-container {
    gap: 0.5rem;
  }
  
  .hero-stats-block .stat-block {
    padding: 0.85rem 1rem;
    min-width: 72px;
    border-radius: 12px;
  }
  
  .hero-stats-block .stat-number {
    font-size: 1.5rem;
  }
  
  .hero-stats-block .stat-label {
    font-size: 0.62rem;
  }

  /* Smaller floating icons on very small screens */
  .tech-icon-float {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .mobile-search-results { top: 56px; width: calc(100vw - 20px); }
}

/* Мобильная шапка: SKL Academy слева, Библиотека и кнопки справа без наложения */
@media (max-width: 768px) {
  nav .flex.justify-between {
    height: 5rem;
  }

  .mobile-header-row {
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  nav .flex.justify-between {
    height: 4rem;
  }

}

@media (max-width: 480px) {
  nav .flex.justify-between {
    height: 3.5rem;
  }

} 

/* Смещение контента hero чуть ниже на планшетах/десктопах без изменения высоты блока */
@media (min-width: 768px) {
  .gradient-bg .text-center { padding-top: 28px; }
}

@media (min-width: 1024px) {
  .gradient-bg .text-center { padding-top: 40px; }
}

/* Стили для карточек статей */
 .article-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}


.article-card:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: #e2e8f0;
  transform: translateY(-2px);
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.article-card .course-icon-container {
  background: #eef2ff;
  border: 1px solid #e5e7eb;
}

.article-card .course-button {
  background-color: #4f46e5;
}

.article-read-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  color: white;
  background-color: #4f46e5;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
}

.article-read-button:hover {
  background-color: #4338ca;
  transform: translateY(-1px);
}

/* Мобильная версия статей: кнопки не налезают, блоки в колонку */
@media (max-width: 768px) {
  .article-card .mt-3.flex.flex-wrap.items-center.justify-between,
  .article-card .mt-3.flex.items-center.justify-end {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

  .article-card .flex.items-start {
    flex-wrap: wrap;
    min-width: 0;
  }

  .article-card .mt-1 {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .article-read-button {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

.article-card .course-button:hover {
  background-color: #4338ca;
}

/* Чипы-теги в карточках статей */
.article-card .mt-3 .inline-block.bg-gray-100 {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}


.article-icon-bg {
  opacity: 0.06;
  right: -10px;
  top: -10px;
  transition: all 0.3s ease;
}

.article-card:hover .article-icon-bg {
  opacity: 0.12;
  transform: none;
}

/* Компактный список статей на мобильных */
@media (max-width: 640px) {
  .article-card { border-radius: 10px; box-shadow: 0 2px 8px rgba(15,23,42,0.05); }
  .article-card .p-5 { padding: 14px; }
  .article-card h3 { font-size: 0.98rem; line-height: 1.3; }
  .article-card .course-icon-container { padding: 10px; border-radius: 10px; background: #f3f4f6; }
  .article-card .mt-1 span { padding: 2px 6px; font-size: 10px; }
  .article-card .mt-3 { margin-top: 10px; }
  .article-card .mt-3 .inline-block { padding: 2px 8px; font-size: 11px; }
  .article-card .course-button { padding: 10px 12px; font-size: 0.9rem; }
  .article-icon-bg { display: none; }
}

/* ========================================
   СТИЛИ ПОИСКОВИКА
   ======================================== */

/* Контейнер поисковика */
.search-container {
  position: relative;
  z-index: 1000;
}

.mobile-search-container {
  position: relative;
  z-index: 1000;
}

/* Обертка для поля ввода и кнопки */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 240px;
}

.search-input-wrapper:focus-within {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* Поле ввода */
.search-input {
  flex: 1;
  padding: 10px 18px;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: transparent;
  min-width: 200px;
}

.search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Кнопка поиска */
.search-button {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #4f46e5;
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.search-button:hover {
  color: #4f46e5;
}

/* Результаты поиска */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  margin-top: 0;
}

.mobile-search-results {
  margin-top: 8px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
}

/* Заголовок результатов */
.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.search-results-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.clear-search-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.clear-search-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Контент результатов */
.search-results-content {
  padding: 8px 0;
  max-height: 320px;
  overflow-y: auto;
}

.mobile-search-results .search-results-content {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

/* Элемент результата */
.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.search-result-item:hover {
  background: #f8fafc;
}

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

/* Иконка результата */
.search-result-icon {
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-result-icon i {
  font-size: 16px;
  color: #4f46e5;
}

/* Контент результата */
.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-description {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Тег типа контента */
.search-result-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

.search-result-type.course {
  background: #dbeafe;
  color: #1e40af;
}

.search-result-type.article {
  background: #f3e8ff;
  color: #7c3aed;
}

.search-result-type.lesson {
  background: #ecfdf5;
  color: #059669;
}

/* Пустое состояние */
.search-empty {
  padding: 24px 16px;
  text-align: center;
  color: #6b7280;
}

.search-empty i {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.search-empty-text {
  font-size: 14px;
  font-weight: 500;
}

/* Анимации */
.search-results {
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================
   СТИЛИ ДЛЯ НОВОГО РАСПОЛОЖЕНИЯ ПОИСКОВИКА
   ======================================== */

/* Мобильный поисковик (кнопка-переключатель) */
.mobile-search-toggle-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  padding: 8px;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.mobile-search-toggle-btn:hover {
  color: #4f46e5;
}

.mobile-search-toggle-btn.active {
  color: #4f46e5;
}

/* Мобильные результаты поиска */
.mobile-search-results {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
  width: min(640px, calc(100vw - 32px));
  background: white;
  z-index: 1000;
  padding: 12px 16px;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  border: none;
  max-height: calc(100vh - 100px);
}

/* Размытие и затемнение заднего плана при открытом поиске */
/* Убрали затемняющий серый фон позади панели */
.mobile-search-results::before {
  content: none;
}

.mobile-search-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 2px solid #e5e7eb;
  border-radius: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.mobile-search-input {
  flex: 1;
  padding: 12px 0;
  border: none;
  outline: none;
  font-size: 16px; /* Предотвращает zoom на iOS */
  font-weight: 500;
  color: #374151;
  background: transparent;
}

.mobile-search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.mobile-clear-search-btn {
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.mobile-clear-search-btn:hover {
  color: #374151;
}

.mobile-search-results-content {
  padding: 0;
}

/* Улучшенные стили для центральной навигации */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #4f46e5;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Адаптивность */
@media (max-width: 768px) {
  .search-input {
    min-width: 150px;
    font-size: 16px; /* Предотвращает zoom на iOS */
  }
  
  .search-results {
    position: fixed;
    top: 80px;
    left: 16px;
    right: 16px;
    border-radius: 12px;
    border-top: 2px solid #e5e7eb;
    max-height: 60vh;
  }

  /* Мобильная навигация */
  .mobile-search-container {
    position: relative;
  }

  /* Растягиваем контейнер справа/слева на всю ширину, чтобы иконки ушли правее */
  nav .flex.items-center.space-x-4 {
    width: 100%;
  }

  /* Убираем фон и outline у бургера на мобильных */
  #mobile-menu-button {
    background: transparent !important;
    border-radius: 0;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  #mobile-menu-button:hover,
  #mobile-menu-button:focus,
  #mobile-menu-button:active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }

  /* Убираем выделение у поисковика на мобильных */
  .mobile-search-toggle-btn {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-search-toggle-btn:focus,
  .mobile-search-toggle-btn:active {
    outline: none !important;
    box-shadow: none !important;
  }

  /* Выравниваем лупу и бургер по правому краю */
  .mobile-search-toggle-btn,
  #mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px 8px 8px;
    margin: 0;
  }

  /* Создаем большое расстояние между логотипом и кнопками */
  .flex.items-center.justify-between {
    gap: 40px;
  }

  /* Сдвигаем правую часть еще правее */
  .flex.items-center.space-x-3 {
    margin-left: auto;
    padding-right: 0;
    gap: 8px;
  }

  /* Дополнительно сдвигаем кнопки к правому краю */
  .mobile-search-toggle-btn,
  #mobile-menu-button {
    margin-left: 0;
  }

  /* Убираем лишние отступы между кнопками */
  .flex.items-center.space-x-3 > * + * {
    margin-left: 0 !important;
  }

  /* Улучшенное мобильное меню */
  #mobile-menu {
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
}

/* Улучшения для десктопной версии */
@media (min-width: 768px) {
  /* Центральная навигация */
  .nav-link {
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  /* Поисковик справа */
  .search-container {
    margin-left: auto;
  }

  /* Улучшенные результаты поиска */
  .search-results {
    right: 0;
    left: auto;
    min-width: 400px;
    max-width: 500px;
  }
}

/* Состояние загрузки */
.search-loading {
  padding: 16px;
  text-align: center;
  color: #6b7280;
}

.search-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Оптимизации для мобильных устройств */
@media (max-width: 768px) {
  /* Оптимизация анимаций - используем will-change только для активно анимируемых элементов */
  .gradient-bg::after {
    will-change: transform, opacity;
  }
  
  .stat-block,
  .article-card {
    will-change: transform;
  }
  
  /* Отключаем will-change после анимации для экономии памяти */
  .article-card:not(:hover) {
    will-change: auto;
  }
  
  /* Уменьшение сложности теней на мобильных */
  .article-card {
    box-shadow: 0 2px 8px rgba(15,23,42,0.08);
  }
  
  /* Оптимизация контейнеров */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Tone down heavy filters on mobile to reduce paint cost */
@media (max-width: 768px) {
  .gradients-container { filter: none; }
  .hero-icon { backdrop-filter: blur(6px) saturate(120%); -webkit-backdrop-filter: blur(6px) saturate(120%); }
}

/* Оптимизации для очень маленьких экранов */
@media (max-width: 480px) {
  /* Упрощение анимаций */
  .gradient-bg {
    background-attachment: scroll;
  }
  
  /* Уменьшение отступов */
  .gradient-bg .text-center {
    padding: 1rem;
  }
  
  /* Оптимизация карточек */
  .article-card {
    margin-bottom: 1rem;
  }
  
  .article-card .p-5 {
    padding: 1rem;
  }
}

/* Предотвращение горизонтальной прокрутки */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  
  .container {
    max-width: 100%;
    width: 100%;
  }
}

/* Validator-friendly override for Font Awesome rotate-by default */
.fa-rotate-by { transform: rotate(var(--fa-rotate-angle, 0deg)); }

#courses {
  position: relative;
  z-index: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

#courses::before,
#courses::after {
  content: none;
}

/* === Accessibility: Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .tech-icon-float,
  .stat-block,
  .hero-title,
  .hero-layout {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .gradient-bg::after {
    animation: none !important;
  }
}

 