/* Import Variables */
@import url("variables.css?v=20260606161622");
@import url("components/cookie-consent.css?v=20260606161622");

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-padding-top, 0);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Custom Scrollbar - для всего проекта (из index.html) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-purple-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-orange);
  border-radius: 10px;
  border: 2px solid var(--bg-purple-light);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange-hover);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #131416;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  border-color: #131416;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f5f5f5;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  border-color: #f5f5f5;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-orange) var(--bg-purple-light);
}

[data-theme="dark"] * {
  scrollbar-color: var(--accent-orange) #131416;
}

[data-theme="light"] * {
  scrollbar-color: var(--accent-orange) #f5f5f5;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-purple-light);
  color: var(--text-black);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background: #131416;
  color: var(--text-white);
}

[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-black);
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Remove outline on focus/active for all buttons and links */
button:focus,
button:active,
a:focus,
a:active,
input:focus,
input:active,
textarea:focus,
textarea:active,
select:focus,
select:active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Focus-visible styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-orange);
  color: var(--text-white);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* Remove border from iframes (replaces frameborder attribute) */
iframe {
  border: none;
}

/* Sidebar - Hidden on all pages */
.sidebar {
  display: none !important;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  gap: 0;
}

/* Header Styles - Not fixed by default */
.header {
  background: var(--bg-purple-light);
  padding: 20px 0;
  border-bottom: none;
  position: relative;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .header {
  background: #131416;
  border-bottom: none;
}

[data-theme="light"] .header {
  background: var(--bg-primary);
  border-bottom: none;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  pointer-events: none;
}

.header-nav > * {
  pointer-events: auto;
}

.header-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  position: relative;
  --header-link-accent: var(--accent-orange);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 6px;
  font-family: inherit;
  white-space: nowrap;
}

[data-theme="dark"] .header-nav-link {
  color: #ffffff;
}

[data-theme="light"] .header-nav-link {
  color: #333333;
}

.header-nav-link:hover {
  color: var(--header-link-accent);
}

.header-nav-link:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

[data-theme="light"] .header-nav-link:hover {
  background: transparent;
  color: var(--header-link-accent);
}

[data-theme="dark"] .header-nav-link:hover {
  background: transparent;
}

/* Как на index.html / landing.css - свой акцент у каждого пункта */
.header-nav-link--vacancies {
  --header-link-accent: #6c7cff;
}

.header-nav-link--trainer {
  --header-link-accent: #35d07f;
}

.header-nav-link--interview {
  --header-link-accent: #f2b230;
}

.header-nav-link--support {
  --header-link-accent: #49b3ff;
}

.header-nav-link--hidden {
  display: none !important;
  visibility: hidden !important;
}

/* questions.html временно скрыт: flex у ссылок перебивает [hidden] */
.header-nav-link--trainer,
.header-nav a[href*="questions/questions.html"],
.header-menu a[href*="questions/questions.html"],
a.header-nav-link[href*="questions/questions.html"],
.mobile-menu-nav a[href*="questions/questions.html"],
.mobile-menu a[href*="questions/questions.html"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Lesson pages: enable burger from 1440px and below (как на index.html) */
@media (max-width: 1440px) {
  body.lesson-page .header-nav {
    display: none;
  }

  body.lesson-page .header-menu-wrapper {
    justify-content: flex-end;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  body.lesson-page .header-inner {
    justify-content: space-between;
    position: relative;
  }

  body.lesson-page .header-menu-wrapper .header-donate-btn {
    display: flex;
    order: 1;
  }

  body.lesson-page .header-menu-wrapper .theme-toggle-btn {
    display: flex;
    order: 2;
  }

  body.lesson-page .header-menu-wrapper .header-burger-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 3;
    margin-left: 16px;
  }

  body.lesson-page .header-menu-wrapper .header-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer;
  }

  [data-theme="dark"] body.lesson-page .header-menu-btn .menu-icon {
    background: #ffffff !important;
  }

  [data-theme="light"] body.lesson-page .header-menu-btn .menu-icon {
    background: #000000 !important;
  }

  body.lesson-page .header-menu-btn:hover .menu-icon {
    background: var(--accent-orange) !important;
  }

  [data-theme="dark"] body.lesson-page .header-menu-btn.active .menu-icon {
    background: #ffffff !important;
  }

  [data-theme="light"] body.lesson-page .header-menu-btn.active .menu-icon {
    background: #000000 !important;
  }

  body.lesson-page .header-menu-btn.active:hover .menu-icon {
    background: var(--accent-orange) !important;
  }
}

.header-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.header-menu-wrapper .header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
}

.header-menu-wrapper .header-nav > * {
  pointer-events: auto;
}

.header-menu-wrapper .theme-toggle-btn {
  margin-left: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.header-menu-wrapper .header-donate-btn {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.header-burger-wrapper {
  position: relative;
  display: none;
  align-items: center;
}

.header-donate-btn {
  padding: 10px 20px;
  background: var(--accent-orange);
  color: #333;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.header-donate-btn:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 124, 255, 0.3);
}

.header-donate-btn:focus {
  outline: none;
}

.header-donate-btn:active {
  transform: translateY(0);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-black);
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.header-logo:hover,
.header-logo:active,
.header-logo:focus {
  opacity: 1;
  color: var(--text-black);
}

.header-logo:active {
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .header-logo:hover,
[data-theme="dark"] .header-logo:active,
[data-theme="dark"] .header-logo:focus {
  color: var(--text-white);
}

[data-theme="dark"] .header-logo {
  color: var(--text-white);
}

[data-theme="light"] .header-logo {
  color: var(--text-black);
}

[data-theme="light"] .header-logo:hover,
[data-theme="light"] .header-logo:active,
[data-theme="light"] .header-logo:focus {
  color: var(--text-black);
}

/* <picture> иначе выше img и ломает выравнивание текста / обрезает логотип */
.header-logo picture {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  line-height: 0;
}

.header-logo-img {
  display: block;
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: none;
}

.header-logo-text {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.header-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-black);
}

.menu-icon {
  width: 24px;
  height: 2px;
  /* Сайт по умолчанию тёмный — бургер белый */
  background: #ffffff;
  transition: all 0.3s ease;
}

[data-theme="light"] .header-burger-wrapper .menu-icon,
[data-theme="light"] .header-menu-btn .menu-icon {
  background: #000000;
}

.header-menu-btn:hover .menu-icon {
  background: var(--accent-orange);
}

[data-theme="light"] .header-menu-btn:hover .menu-icon,
[data-theme="light"] .header-menu-btn.active:hover .menu-icon {
  background: var(--accent-orange);
}

.header-menu-btn:focus {
  outline: none;
}

.header-menu-btn.active .menu-icon:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header-menu-btn.active .menu-icon:nth-child(2) {
  opacity: 0;
}

.header-menu-btn.active .menu-icon:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.sidebar-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 61px;
  width: 100%;
}

.sidebar-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.sidebar-logo:hover .sidebar-logo-img {
  transform: scale(1.05);
}

.sidebar-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 15px 0 10px;
  margin-bottom: 8px;
}

.balance-dot {
  width: 6px;
  height: 6px;
  background: #ffc629;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 198, 41, 0.6);
  animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(255, 198, 41, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 198, 41, 1), 0 0 24px rgba(255, 198, 41, 0.8);
    transform: scale(1.2);
  }
}

.balance-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.sidebar-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  width: 72px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 12px 0;
}

.sidebar-btn-primary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.sidebar-btn::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent-orange);
  border-radius: 3px 0 0 3px;
  transition: height 0.3s ease;
}

.sidebar-btn-primary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.sidebar-btn:hover::after,
.sidebar-btn:active::after,
.sidebar-btn.active::after {
  height: 60%;
}

.sidebar-btn svg {
  width: 20px;
  height: 20px;
}

/* Social Media Links */
.social-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px 0;
  width: 100%;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.social-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-orange);
}

.social-link svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* Social Media Brand Colors */
.social-link[aria-label="Telegram"]:hover {
  border-color: #229ed9;
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.4);
}

.social-link[aria-label="YouTube"]:hover {
  border-color: #ff0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.social-link[aria-label="VK"]:hover {
  border-color: #4c75a3;
  box-shadow: 0 4px 12px rgba(76, 117, 163, 0.4);
}

.social-link[aria-label="TikTok"]:hover {
  border-color: #ee1d52;
  box-shadow: 0 4px 12px rgba(238, 29, 82, 0.5);
}

.social-link[aria-label="RuTube"]:hover {
  border-color: #00a8e8;
  box-shadow: 0 4px 12px rgba(0, 168, 232, 0.4);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 4px;
  padding-bottom: 20px;
}

.sidebar-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  width: 72px;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.sidebar-link::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent-orange);
  border-radius: 3px 0 0 3px;
  transition: height 0.3s ease;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-link:hover::after,
.sidebar-link:active::after,
.sidebar-link.active::after {
  height: 60%;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
}

.sidebar-link-premium {
  color: #ffc629;
}

.sidebar-link-premium:hover {
  background: rgba(255, 198, 41, 0.1);
  color: #ffb74d;
}

.sidebar-link-premium svg {
  filter: drop-shadow(0 0 8px rgba(255, 198, 41, 0.4));
}

.sidebar-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: #4caf50;
  color: #000;
  font-size: 7px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.2px;
}

/* Container */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Header container width - same as index.html hero (1776px) */
.header .container {
  max-width: 1776px;
}

/* Top Bar */
.top-bar {
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  height: 61px;
  gap: 24px;
}

/* Navigation Menu */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  font-family: "Roboto Condensed", sans-serif;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  text-transform: uppercase;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-orange);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Скрыт: светлая тема пока не доработана */
.theme-toggle-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #ffc629;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn i {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: #ffc629;
  transition: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

[data-theme="light"] .theme-toggle-btn {
  background: transparent;
  border: 2px solid #ffc629;
}

[data-theme="light"] .theme-toggle-btn i {
  color: #ffc629;
}

.premium-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #ffc629;
  border: 2px solid #ffc629;
  border-radius: 4px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.premium-btn:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.dollar-icon {
  font-size: 16px;
  font-weight: 700;
  color: #ffc629;
}

.top-bar-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.top-bar-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Main Content */
.main {
  padding: 24px 0 60px;
  min-height: calc(100vh - 61px);
}

.content-wrapper {
  width: 100%;
}

/* Courses Section */
.courses-section {
  width: 100%;
  padding: 20px 0 40px 0;
}

.courses-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.courses-section-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  transition: color 0.3s ease;
}

.courses-section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  transition: color 0.3s ease;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Course Card */
.course-card {
  position: relative;
  background: var(--bg-card);
  border: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer !important;
  transition: all 0.25s ease;
  aspect-ratio: 16 / 9;
  text-decoration: none;
  display: block;
  color: inherit;
  outline: none !important;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

a.course-card {
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
}

a.course-card:hover {
  cursor: pointer !important;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: none;
  outline: none !important;
  cursor: pointer !important;
}

.course-card:active,
.course-card:focus,
a.course-card:active,
a.course-card:focus {
  outline: none !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  -webkit-tap-highlight-color: transparent !important;
}

.course-card-featured {
  box-shadow: 0 0 0 2px var(--accent-orange);
}

.course-card-highlight {
  box-shadow: 0 0 0 1px var(--accent-orange);
}

.course-card-highlight-gray {
  box-shadow: 0 0 0 2px rgba(128, 128, 128, 0.6);
}

.course-card-disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: brightness(0.6);
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(128, 128, 128, 0.6);
}

.course-card-disabled:hover {
  transform: none;
  box-shadow: 0 0 0 2px rgba(128, 128, 128, 0.6);
}

/* Course Badge */
.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 152, 0, 0.95);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.course-badge-update {
  background: rgba(76, 175, 80, 0.95);
}

.course-badge-soon {
  background: rgba(244, 67, 54, 0.95);
  color: #fff;
}

/* Course Progress */
.course-progress {
  display: none;
}

/* Course Poster */
.course-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: opacity 0.3s ease 0.2s;
  pointer-events: none;
}

.course-card:hover .course-poster {
  opacity: 0;
}

.course-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

/* Course Video */
.course-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-video[src] {
  object-fit: unset;
  border: none;
}

.course-video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
  pointer-events: none;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: 100%;
  box-shadow: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: inherit !important;
  /* Clip corners to hide white controls */
  clip-path: inset(0 0 0 0);
  /* Force hardware acceleration for better rendering */
  transform: translateZ(0);
  will-change: opacity;
  backface-visibility: hidden;
}

/* Ensure iframe is visible on hover */
.course-card:hover .course-video {
  opacity: 1;
  z-index: 2;
}

.course-card:hover .course-video-iframe {
  opacity: 1;
  z-index: 2;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: inherit !important;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
  transition: opacity 0.3s ease 0.2s;
}

a.course-card:hover .course-video-iframe {
  cursor: pointer !important;
}

/* Ensure cursor pointer for all course cards with iframe on hover */
.course-card:hover .course-video-iframe,
.course-card-featured:hover .course-video-iframe,
.course-card:hover,
.course-card-featured:hover {
  cursor: pointer !important;
}

.course-card:hover *,
.course-card-featured:hover * {
  cursor: pointer !important;
}

/* Сетка уроков Frontend (obuchenie-frontend): крупный номер «сзади» превью + плавный hover */
.main .courses-section--lessons-frontend .courses-grid .course-lesson-num {
  position: absolute;
  right: 6%;
  bottom: 10%;
  z-index: 2;
  font-size: clamp(64px, 14vw, 128px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  user-select: none;
  transition:
    color 1.1s cubic-bezier(0.05, 0.82, 0.1, 1),
    opacity 1.1s cubic-bezier(0.05, 0.82, 0.1, 1);
}

[data-theme="light"] .main .courses-section--lessons-frontend .courses-grid .course-lesson-num {
  color: rgba(30, 64, 175, 0.22);
}

.main .courses-section--lessons-frontend .courses-grid .course-card:hover .course-lesson-num {
  color: rgba(255, 255, 255, 0.28);
}

[data-theme="light"] .main .courses-section--lessons-frontend .courses-grid .course-card:hover .course-lesson-num {
  color: rgba(30, 64, 175, 0.32);
}

.main .courses-section--lessons-frontend .courses-grid .course-card {
  transition:
    transform 1.45s cubic-bezier(0.05, 0.82, 0.1, 1),
    box-shadow 1.45s cubic-bezier(0.05, 0.82, 0.1, 1) !important;
}

.main .courses-section--lessons-frontend .courses-grid .course-card:hover {
  transition:
    transform 1.45s cubic-bezier(0.05, 0.82, 0.1, 1),
    box-shadow 1.45s cubic-bezier(0.05, 0.82, 0.1, 1) !important;
}

.main .courses-section--lessons-frontend .courses-grid .course-poster {
  transition: opacity 1.35s cubic-bezier(0.05, 0.82, 0.1, 1) 0.28s !important;
}

.main .courses-section--lessons-frontend .courses-grid .course-video,
.main .courses-section--lessons-frontend .courses-grid .course-video-iframe {
  transition: opacity 1.35s cubic-bezier(0.05, 0.82, 0.1, 1) 0.32s !important;
}

.main .courses-section--lessons-frontend .courses-grid .course-card:hover .course-video,
.main .courses-section--lessons-frontend .courses-grid .course-card:hover .course-video-iframe {
  transition: opacity 1.45s cubic-bezier(0.05, 0.82, 0.1, 1) 0.38s !important;
}

.main .courses-section--lessons-frontend .courses-grid .course-card:hover .course-poster {
  transition: opacity 1.45s cubic-bezier(0.05, 0.82, 0.1, 1) 0.18s !important;
}

/* Course Info */
.course-info {
  display: none;
}

/* Footer */
.footer {
  background: #1e1e1e;
  padding: 60px 0 40px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(128, 133, 143, 0.22);
}

[data-theme="dark"] .footer {
  background: #1e1e1e;
  color: #999999;
}

[data-theme="light"] .footer {
  background: #1e1e1e;
  color: #666666;
}

.footer .container {
  max-width: 1776px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 75px;
}

.footer-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 45%;
}

.footer-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 40px;
  margin-left: auto;
  margin-right: 0;
}

/*
 * Без правой колонки левая часть не должна оставаться узкой (45%): иначе справа -
 * большой «пустой коридор». Срабатывает, если .footer-right убран из разметки,
 * помечен hidden, или на .footer-content добавлен модификатор (если правый блок
 * скрывают только через display:none без атрибута hidden - родителю нужен класс).
 */
.footer-right.footer-right--off {
  display: none !important;
}

/* Скрытая колонка внутри .footer-right - без «пустого» трека как у grid repeat(3, 1fr) */
.footer-section.footer-section--off {
  display: none !important;
}

.footer-content:not(:has(> .footer-right)) .footer-left,
.footer-content:has(> .footer-right[hidden]) .footer-left,
.footer-content:has(> .footer-right.footer-right--off) .footer-left,
.footer-content.footer-content--without-right .footer-left {
  max-width: none;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  border-radius: 8px;
}

.footer-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-language-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  max-width: 200px;
}

.language-select:hover {
  border-color: var(--accent-orange);
}

.footer-theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #ffc629;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.footer-theme-toggle i {
  font-size: 18px;
  color: #ffc629;
  transition: none;
}

.footer-theme-toggle:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

[data-theme="light"] .footer-theme-toggle {
  background: transparent;
  border: 2px solid #ffc629;
}

[data-theme="light"] .footer-theme-toggle i {
  color: #ffc629;
}

/* Responsive Design */
@media (max-width: 1440px) {
  .courses-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 84px;
  }

  /* .sidebar скрыт (display: none) - глобальный отступ body ломает IDE/practice */
  body:has(.sidebar:not([hidden])) {
    margin: 0 0 0 84px;
  }

  .sidebar-btn,
  .sidebar-link {
    width: 70px;
    font-size: 9px;
  }
}

@media (max-width: 1200px) {
  .courses-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 960px) {
  .container {
    padding: 0 16px;
  }

  .top-bar-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .nav {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 32px;
    padding-top: 12px;
  }

  .courses-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }

  .footer-left {
    flex: 1;
    max-width: 100%;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-language-controls {
    justify-content: center;
  }

  .footer-right {
    justify-content: center;
    gap: 30px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    bottom: 0;
    top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  }

  .sidebar-inner {
    flex-direction: row;
    padding: 10px;
    gap: 4px;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar-balance {
    display: none;
  }

  .sidebar-btn {
    margin-bottom: 0;
    width: 70px;
    padding: 8px;
    font-size: 9px;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 4px;
  }

  .sidebar-link {
    width: 70px;
    padding: 8px;
    font-size: 9px;
  }

  .sidebar-badge {
    top: 2px;
    right: 4px;
  }

  /* Полностью скрываем sidebar на мобильных */
  .sidebar {
    display: none;
  }

  /* Убираем левый отступ на мобильных */
  body {
    margin: 0;
    padding-bottom: 0;
  }

  /* Контейнер */
  .container {
    padding: 0 16px;
  }

  /* Top bar */
  .top-bar {
    padding: 12px 0;
  }

  .top-bar-inner {
    flex-direction: column;
    gap: 16px;
  }

  .nav {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 14px;
    padding: 8px 16px;
  }

  .top-bar-right {
    width: 100%;
    justify-content: center;
  }

  .theme-toggle-btn {
    width: 38px;
    height: 38px;
    border: 2px solid #ffc629;
  }

  .theme-toggle-btn i {
    font-size: 16px;
  }

  .premium-btn {
    padding: 10px 20px;
    font-size: 12px;
  }

  /* Main content */
  .main {
    padding: 20px 0 40px;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .course-card {
    aspect-ratio: unset;
    min-height: 180px;
    height: auto;
  }

  .course-img {
    object-fit: contain;
    padding: 10px;
  }

  .course-info {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.7) 70%,
      transparent 100%
    );
    z-index: 2;
  }

  .course-title {
    font-size: 14px;
    text-align: center;
    color: #fff;
    margin: 0;
  }

  .course-stats {
    font-size: 11px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
  }

  /* Hide course info for all cards except first */
  .course-card:not(:first-child) .course-info {
    display: none !important;
  }

  /* Footer */
  .footer {
    padding: 40px 0 30px;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-left {
    text-align: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-logo-img {
    width: 50px;
    height: 50px;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-right {
    justify-content: center;
    gap: 30px;
  }

  .footer-section {
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }

  .language-select {
    max-width: 200px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }

  .top-bar {
    padding: 10px 0;
  }

  .top-bar-inner {
    gap: 12px;
  }

  .nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 13px;
    padding: 6px 12px;
  }

  .theme-toggle-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #ffc629;
  }

  .theme-toggle-btn i {
    font-size: 15px;
  }

  .premium-btn {
    padding: 8px 16px;
    font-size: 11px;
  }

  .top-bar-right {
    width: 100%;
    justify-content: center;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .course-card {
    aspect-ratio: unset;
    min-height: 170px;
    height: auto;
  }

  .course-badge {
    font-size: 9px;
    padding: 3px 8px;
  }

  .footer-left {
    text-align: center;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-language-controls {
    justify-content: center;
  }

  .footer-right {
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
  }

  .footer-heading {
    font-size: 14px;
  }

  .footer-link {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .course-card {
    aspect-ratio: unset;
    min-height: 170px;
    height: auto;
  }

  .course-img {
    object-fit: contain;
    padding: 8px;
  }

  .course-info {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.7) 70%,
      transparent 100%
    );
    z-index: 2;
  }

  .course-title {
    font-size: 13px;
    text-align: center;
    color: #fff;
    margin: 0;
  }

  .course-stats {
    font-size: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
  }

  .footer-left {
    text-align: center;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-language-controls {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .top-bar {
    padding: 8px 0;
  }

  .top-bar-inner {
    padding: 10px 0;
    gap: 10px;
  }

  .nav {
    gap: 12px;
    width: 100%;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 2px solid #ffc629;
  }

  .theme-toggle-btn i {
    font-size: 14px;
  }

  .premium-btn {
    padding: 8px 14px;
    font-size: 10px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .dollar-icon {
    font-size: 14px;
  }

  .top-bar-icon {
    width: 32px;
    height: 32px;
  }

  .main {
    padding: 16px 0 32px;
  }

  .courses-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .course-card {
    aspect-ratio: unset;
    border-radius: 8px;
    min-height: 180px;
    height: auto;
  }

  .course-poster {
    height: 140px;
  }

  .course-img {
    object-fit: contain;
    filter: brightness(0.7);
    padding: 8px;
  }

  .course-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.7) 70%,
      transparent 100%
    );
    z-index: 2;
  }

  .course-title {
    font-size: 13px;
    padding: 0 4px;
    text-align: center;
    color: #fff;
    margin: 0;
  }

  .course-stats {
    font-size: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
  }

  .course-progress {
    font-size: 10px;
    padding: 4px 8px;
  }

  .course-badge {
    font-size: 8px;
    padding: 3px 6px;
  }

  /* Footer */
  .footer {
    padding: 30px 0 20px;
  }

  .footer-left {
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-logo-img {
    width: 45px;
    height: 45px;
  }

  .footer-description {
    font-size: 12px;
    line-height: 1.6;
  }

  .footer-heading {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .footer-link {
    font-size: 12px;
  }

  .language-select {
    font-size: 12px;
    padding: 8px;
  }
}

/* Для очень узких экранов */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }

  .nav {
    flex-direction: column;
    gap: 8px;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    font-size: 11px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .course-img {
    object-fit: contain;
    padding: 12px;
  }

  .course-card {
    aspect-ratio: unset;
    min-height: 200px;
    height: auto;
  }
}

/* Scroll to Top - плавное появление (как на landing) */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: rgba(108, 124, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    box-shadow 0.55s ease,
    visibility 0s linear 0.55s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.visible {
  opacity: 0.88;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    box-shadow 0.4s ease,
    visibility 0s linear 0s;
}

.scroll-to-top:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.42);
}

.scroll-to-top:active {
  transform: translate3d(0, 2px, 0);
  transition:
    opacity 0.35s ease,
    transform 0.12s ease,
    box-shadow 0.12s ease,
    visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-to-top {
    transform: translate3d(0, 12px, 0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .scroll-to-top.visible {
    transform: translate3d(0, 0, 0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
  }

  .scroll-to-top:active {
    transform: translate3d(0, 1px, 0);
    transition: opacity 0.25s ease, transform 0.15s ease, visibility 0s linear 0s;
  }
}

.scroll-to-top i {
  transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
  transform: none;
}

/* Адаптивность для кнопки */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
}

/* ===== Animation Toggle Switch ===== */
.animation-toggle-switch {
  position: relative;
  width: 40px;
  height: 23px;
  background: rgba(255, 197, 1, 0.3);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.animation-toggle-switch:hover {
  background: rgba(255, 197, 1, 0.5);
}

.animation-toggle-switch[aria-pressed="true"] {
  background: var(--accent-orange, #ffc501);
}

.animation-toggle-switch[aria-pressed="true"]:hover {
  background: var(--accent-orange-hover, #e6b201);
}

.animation-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.animation-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.animation-toggle-switch[aria-pressed="true"] .animation-toggle-thumb {
  transform: translateX(17px);
}

.animation-toggle-thumb i {
  font-size: 9px;
  color: var(--accent-orange, #ffc501);
  transition: color 0.3s ease, transform 0.3s ease;
  display: block;
  line-height: 1;
}

.animation-toggle-switch[aria-pressed="true"] .animation-toggle-thumb i {
  color: var(--accent-orange, #ffc501);
}

/* Показываем play когда выключено, pause когда включено */
.animation-toggle-thumb .fa-pause {
  display: none;
}

.animation-toggle-thumb .fa-play {
  display: block;
  margin-left: 1px;
}

.animation-toggle-switch[aria-pressed="true"]
  .animation-toggle-thumb
  .fa-pause {
  display: block;
}

.animation-toggle-switch[aria-pressed="true"] .animation-toggle-thumb .fa-play {
  display: none;
}

.animation-toggle-switch:focus {
  outline: none;
  box-shadow: none;
}

.animation-toggle-switch:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Global animation disable - when animations are turned off */
.animations-disabled *,
.animations-disabled *::before,
.animations-disabled *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

/* Keep essential transitions for UI elements */
.animations-disabled .header,
.animations-disabled .theme-toggle-btn,
.animations-disabled .animation-toggle-switch,
.animations-disabled .animation-toggle-thumb,
.animations-disabled .mobile-menu,
.animations-disabled .mobile-menu-overlay,
.animations-disabled .faq-answer,
.animations-disabled .header-nav-link,
.animations-disabled .header-donate-btn,
.animations-disabled button,
.animations-disabled a {
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease,
    transform 0.2s ease !important;
}

/* Course card hover overlay needs opacity transition even with animations disabled */
.animations-disabled .course-card__hover-overlay {
  transition: opacity 0.2s ease !important;
}

/* Keep lesson-only overlays smooth enough to be noticeable */
.animations-disabled .course-card--lesson-only .course-card__hover-overlay {
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
  transition-delay: 0s !important;
}

.animations-disabled .course-card--lesson-only .course-card__action {
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.animations-disabled .course-card--lesson-only .course-card__num {
  transition:
    color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    font-size 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Stop iframes (videos) when animations disabled */
.animations-disabled iframe {
  pointer-events: none;
}

/* ===== Sections z-index ===== */
.database-categories,
.terms-intro,
.terms-section,
.terms-content,
.course-card,
.payment-section,
.lesson-container,
.lesson-breadcrumb,
.lesson-header,
.lesson-content,
.lesson-block,
.lesson-navigation {
  position: relative;
  z-index: 10000;
}

/* Mobile Menu - 520px */
@media (max-width: 520px) {
  .header-menu-wrapper .theme-toggle-btn {
    display: none !important;
  }

  .header-menu-wrapper .header-donate-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .header-menu-wrapper .header-burger-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .header-menu-wrapper .header-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* =====================================================
   Channel Modal Styles (for Footer social links)
   ===================================================== */

.channel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.channel-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.channel-modal {
  background: var(--bg-dark, #1e1e1e);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
  opacity: 0;
}

.channel-modal-overlay.show .channel-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.channel-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-gray, #999);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 10;
}

.channel-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white, #fff);
}

.channel-modal-close:focus {
  outline: 2px solid var(--accent-orange, #ffc501);
  outline-offset: 2px;
}

.channel-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-white, #fff);
  margin-bottom: 30px;
  text-align: center;
  font-family: "Roboto Condensed", sans-serif;
}

.channel-modal-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.channel-modal-options-inline {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.channel-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.channel-modal-options-inline .channel-option {
  flex: 1 1 200px;
  max-width: 250px;
  padding: 24px 20px;
}

.channel-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-orange, #ffc501);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 197, 1, 0.2);
}

.channel-option:focus {
  outline: 2px solid var(--accent-orange, #ffc501);
  outline-offset: 2px;
}

.channel-option-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.channel-modal-options-inline .channel-option-image {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}

.channel-option-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-white, #fff);
  margin-bottom: 8px;
  text-align: center;
}

.channel-modal-options-inline .channel-option-title {
  font-size: 16px;
  margin-bottom: 0;
}

.channel-option-url {
  font-size: 14px;
  color: var(--text-gray, #999);
  text-align: center;
  word-break: break-all;
}

/* Channel Option - Frontend (gray border) */
.channel-option-frontend {
  border-color: #32353e;
}

.channel-option-frontend:hover {
  border-color: #32353e;
  box-shadow: 0 8px 24px rgba(50, 53, 62, 0.3);
}

/* Channel Option - 1C (orange border) */
.channel-option-1c {
  border-color: var(--accent-orange, #ffc501);
}

.channel-option-1c:hover {
  border-color: var(--accent-orange, #ffc501);
  box-shadow: 0 8px 24px rgba(255, 197, 1, 0.2);
}

/* Light theme for Channel Modal */
[data-theme="light"] .channel-modal {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .channel-modal-title {
  color: var(--text-black, #1a1a1a);
}

[data-theme="light"] .channel-modal-close {
  color: var(--text-black, #1a1a1a);
}

[data-theme="light"] .channel-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-black, #1a1a1a);
}

[data-theme="light"] .channel-option {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .channel-option:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--accent-orange, #ffc501);
}

[data-theme="light"] .channel-option-title {
  color: var(--text-black, #1a1a1a);
}

[data-theme="light"] .channel-option-url {
  color: #666666;
}

[data-theme="light"] .channel-option-frontend {
  border-color: #32353e;
}

[data-theme="light"] .channel-option-frontend:hover {
  border-color: #32353e;
}

/* Footer Link Button Styles */
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  color: #999999;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-link-btn:hover {
  color: var(--text-white, #fff);
  text-decoration: none;
}

.footer-link-btn:focus {
  outline: 2px solid var(--accent-orange, #ffc501);
  outline-offset: 2px;
  border-radius: 2px;
}

[data-theme="light"] .footer-link-btn {
  color: #666666;
}

[data-theme="light"] .footer-link-btn:hover {
  color: var(--text-black, #1a1a1a);
}

/* Responsive for Channel Modal */
@media (max-width: 768px) {
  .channel-modal {
    padding: 30px 20px;
    max-width: 95%;
  }

  .channel-modal-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .channel-option {
    padding: 25px 20px;
  }

  .channel-option-image {
    width: 100px;
    height: 100px;
  }

  .channel-option-title {
    font-size: 18px;
  }

  .channel-option-url {
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .channel-modal-options-inline {
    flex-direction: column;
    align-items: center;
  }

  .channel-modal-options-inline .channel-option {
    max-width: 100%;
    width: 100%;
  }
}

/* ── Header BETA badge (global) - правый край чуть выше ── */
.header-nav-badge {
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 0;
  margin-left: -0.15em;
  padding: 1px 5px;
  background: var(--accent-orange);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  vertical-align: baseline;
  transform: rotate(-8deg);
  transform-origin: left center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Menu - глобальные стили для всех страниц
   ═══════════════════════════════════════════════════════════════════════════ */

/* Скрыто по умолчанию на всех экранах */
.mobile-menu-overlay,
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .mobile-menu-overlay {
    display: block !important;
  }

  .mobile-menu {
    display: flex !important;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Menu Panel */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 45, 45, 0.95);
    z-index: 100002;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  }

  [data-theme="light"] .mobile-menu {
    background: rgba(245, 245, 245, 0.95);
  }

  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    position: relative;
  }

  .mobile-menu-nav a {
    color: var(--text-white);
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  [data-theme="light"] .mobile-menu-nav a {
    color: var(--text-black);
  }

  .mobile-menu-nav a:hover {
    color: var(--accent-orange);
  }

  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  [data-theme="light"] .mobile-menu-close {
    color: var(--text-black);
  }
}
