* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* отступ сверху при переходе по якорю, чтобы шапка не перекрывала секцию */
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main {
    flex: 1 0 auto;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =====  ===== */
header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(2px);
    background-color: rgba(255, 255, 255, 0.96);
    /* нужно для абсолютного позиционирования мобильного меню */
    isolation: isolate;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    flex-wrap: wrap;
}

/* Логотип теперь — тег <a> */
a.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.2;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-mark {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: contain;
}
.logo-title {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.logo-sub {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

/* Бургер-кнопка (скрыта на десктопе) */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}
.burger-btn:hover {
    background: rgba(37,99,235,0.08);
}
.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.is-open span:nth-child(2) { opacity: 0; }
.burger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Старые стили .logo h1 / .logo p — оставляем для совместимости */
.logo h1 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.logo p {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}
.nav-links a {
    text-decoration: none;
    font-weight: 500;
    color: #1e293b;
    transition: 0.2s;
    font-size: 1rem;
}
.nav-links a:hover {
    color: #2563eb;
}
.btn-call {
    background: #2563eb;
    color: white !important;
    padding: 8px 20px;
    border-radius: 40px;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(37,99,235,0.2);
}
.btn-call:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* =====  ===== */
.hero {
    padding: 90px 0 90px;
    background: url('../img/hero.webp') top center / cover no-repeat;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgb(255 255 255 / 70) 0%, rgba(255, 255, 255, 0.4) 100%);
    z-index: 1;
}
.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0;
}
.hero-grid {
    display: flex;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}
.hero-text {
    max-width: 720px;
}
h2 {
    font-family: 'Unbounded', 'Inter', 'Arial Narrow', Arial, sans-serif;
    margin-bottom: 0.5em;
}

.hero-text h2 {
    font-family: 'Unbounded', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #0c4a6e;
}
.hero-text p {
    font-size: 1.2rem;
    color: #334155;
    margin-bottom: 28px;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-primary {
    background: #2563eb;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
}
.btn-outline {
    border: 1.5px solid #2563eb;
    background: transparent;
    color: #2563eb;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}
.btn-outline:hover {
    background: #2563eb10;
    transform: translateY(-2px);
}

/* Disable motion in admin editor for faster editing flow */
body.admin-page .spec-card,
body.admin-page .btn-primary,
body.admin-page .btn-outline {
    transition: none;
    box-shadow: none;
}

body.admin-page .spec-card:hover,
body.admin-page .btn-primary:hover,
body.admin-page .btn-outline:hover {
    transform: none;
}
.hero-image {
    flex: 1;
    text-align: center;
}
.hero-emblem {
    width: min(220px, 100%);
    height: auto;
    opacity: 0.72;
    display: inline-block;
}

/*  */
section {
    padding: 70px 0;
    border-bottom: 1px solid #e2e8f0;
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 48px;
    color: #0f172a;
}
.section-sub {
    text-align: center;
    color: #475569;
    max-width: 700px;
    margin: -30px auto 48px auto;
}

/* =====        ===== */
/* ===== Фильтры — компактная однострочная панель ===== */
.specialties-filters {
    margin: -8px auto 28px auto;
    max-width: 1100px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.filter-group-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-sep {
    width: 1px;
    height: 24px;
    background: #cbd5e1;
    margin: 0 4px;
    flex-shrink: 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 40px;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.filter-pill:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.filter-pill input[type="radio"] {
    display: none;
}

.filter-pill:has(input:checked) {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
}

.filter-clear {
    margin-left: auto;
    background: transparent;
    border: 1px solid #cbd5e1;
    /* width: 28px; */
    height: 28px;
    padding: 4px;
    border-radius: 15px;
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-clear:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/*   */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 32px;
}
.spec-card {
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 30px 26px;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid #eef2ff;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.spec-card[data-href] {
    cursor: pointer;
}
.spec-card[data-href] .btn-details {
    cursor: pointer;
}
.spec-card.has-bg {
    overflow: hidden;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    border-color: rgba(255, 255, 255, 0.18);
    color: #f8fafc;
}
.spec-card.has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.88) 70%);
}
.spec-card.has-bg > * {
    position: relative;
    z-index: 1;
}
.spec-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 30px -12px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}
.spec-card.has-bg:hover {
    border-color: rgba(248, 250, 252, 0.35);
}
.spec-icon {
    font-size: 2.8rem;
    color: #2563eb;
    margin-bottom: 18px;
}
.spec-card.has-bg .spec-icon {
    color: #fbbf24;
}
.spec-prof-logo {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 118px;
    max-width: 34%;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
.spec-prof-logo-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.6;
}
.spec-prof-logo-img--dark {
    display: none;
}
.spec-card.has-bg > .spec-prof-logo {
    position: absolute;
    z-index: 1;
}
.spec-card > :not(.spec-prof-logo) {
    position: relative;
    z-index: 1;
}
body.theme-dark .spec-prof-logo-img--light,
.spec-card.has-bg .spec-prof-logo-img--light {
    display: none;
}
body.theme-dark .spec-prof-logo-img--dark,
.spec-card.has-bg .spec-prof-logo-img--dark {
    display: block;
}
.spec-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
}
.spec-card p {
    color: #334155;
    margin-bottom: 10px;
}
.spec-card.has-bg p {
    color: #e2e8f0;
}
.spec-desc {
    font-size: 0.98rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 6px;
    min-height: calc(1.45em * 3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.spec-card.has-bg .spec-desc {
    color: #e5e7eb;
}
.spec-code {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
}
.spec-card.has-bg .spec-code {
    color: #f8fafc;
}

.games-hero {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    padding: 96px 0;
    display: flex;
    align-items: center;
    background: url('../img/prof-games/hero-masterclasses.webp') center / cover no-repeat;
}

.games-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(248, 250, 252, 0.92) 0%, rgba(248, 250, 252, 0.72) 42%, rgba(248, 250, 252, 0.2) 100%);
}

.games-hero-inner {
    position: relative;
    z-index: 1;
}

.games-hero-text {
    
}

.games-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.games-hero h1 {
    font-family: 'Unbounded', 'Inter', Arial, sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.1;
    font-weight: 800;
    color: #0c4a6e;
    margin-bottom: 22px;
}

.games-hero p:not(.games-kicker) {
    max-width: 660px;
    color: #334155;
    font-size: 1.18rem;
}

.games-section {
    background: #f8fafc;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    perspective: 1200px;
}

.game-card {
    min-width: 0;
    transform-style: preserve-3d;
}

.game-card-link {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 18px 36px -26px rgba(15, 23, 42, 0.35);
    color: inherit;
    text-decoration: none;
    transform-origin: center;
    transform-style: preserve-3d;
    transition: transform 0.24s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.game-card-link:hover,
.game-card-link:focus-visible {
    /* transform: translateY(-8px) scale(1.025) rotateX(5deg) rotateY(-6deg); */
    transform: rotate3d(0, 1, 0, 4deg) scale(1.025);
    border-color: #bfdbfe;
    box-shadow: 0 24px 46px -24px rgba(37, 99, 235, 0.32);
}

.game-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
    overflow: hidden;
}

.game-card-image picture {
    display: block;
    width: 100%;
    height: 100%;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.28s ease;
}

.game-card-link:hover .game-card-image img {
    transform: scale(1.035);
}

.game-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    transform: translateZ(16px);
}

.game-specialty {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 11px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
}

.game-title {
    font-family: 'Unbounded', 'Inter', Arial, sans-serif;
    color: #0f172a;
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.25;
}

.game-description {
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.5;
}

.game-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-weight: 700;
    margin-top: auto;
}
.spec-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}
.spec-tag-location {
    background: #e2e8f0;
    color: #2563eb;
}
.spec-card.has-bg .spec-tag {
    background: rgba(248, 250, 252, 0.18);
    color: #f8fafc;
}
.spec-card.has-bg .spec-tag-location {
    background: rgba(248, 250, 252, 0.18);
    color: #f8fafc;
}
.spec-tag-program {
    background: #dcfce7;
    color: #166534;
}
.spec-card.has-bg .spec-tag-program {
    background: rgba(34, 197, 94, 0.28);
    color: #dcfce7;
}
.spec-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.spec-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-details {
    align-self: flex-start;
    text-decoration: none;
    background: #0f172a;
    color: #ffffff;
    padding: 9px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s ease;
}
.spec-card.has-bg .btn-details {
    background: #f8fafc;
    color: #0f172a;
}
.btn-details:hover {
    background: #1e293b;
    transform: translateY(-1px);
}
.spec-card.has-bg .btn-details:hover {
    background: #e2e8f0;
}
.btn-masterclass {
    position: relative;
    width: 39px;
    height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.8);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn-masterclass:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px -10px rgba(37, 99, 235, 0.9);
}
.btn-masterclass::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: min(260px, 70vw);
    padding: 8px 10px;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
}
.btn-masterclass::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    border-top-color: #0f172a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
}
.btn-masterclass:hover::after,
.btn-masterclass:hover::before,
.btn-masterclass:focus-visible::after,
.btn-masterclass:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.spec-card.has-bg .btn-masterclass {
    background: #fbbf24;
    color: #0f172a;
}
.spec-card.has-bg .btn-masterclass:hover {
    background: #f59e0b;
}
.spec-note {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 600;
}
.spec-card.has-bg .spec-note {
    background: rgba(251, 191, 36, 0.25);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.specialties-empty {
    text-align: center;
    color: #475569;
    font-weight: 600;
    padding: 16px 0;
}

/*   */
.career-block {
    background: #eef2ff;
    border-radius: 48px;
    padding: 48px 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: space-between;
}
.career-text {
    flex: 1.2;
}
.career-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.career-list {
    list-style: none;
    margin: 24px 0;
}
.career-list li {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}
.career-list i {
    color: #2563eb;
    font-size: 1.2rem;
    width: 28px;
}
.career-img {
    flex: 0.8;
    text-align: center;
}
.career-img i {
    font-size: 9rem;
    color: #1e3a8a;
}
.btn-test {
    background: #0f172a;
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.btn-test:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

/*  */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 30px;
    text-align: center;
}
.benefit-item {
    background: white;
    padding: 30px 20px;
    border-radius: 32px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}
.benefit-item i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 16px;
}

/* ===== Статистика ===== */
.statistics-section {
    background: transparent;
}
.statistics-head {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    text-align: center;
}
.statistics-head .section-sub {
    margin-left: auto;
    margin-right: auto;
}
.admin-statistics-section {
    margin-top: 32px;
}
.admin-statistics-head {
    justify-content: flex-start;
    text-align: left;
}
.admin-statistics-title {
    text-align: left;
    margin-bottom: 0;
}
.statistics-root {
    margin-top: 22px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    border-radius: 48px;
    padding: 40px;
}
.statistics-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.statistics-card {
    min-height: 126px;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 20px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.statistics-card i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #dbeafe;
    color: #1d4ed8;
    display: grid;
    place-items: center;
}
.statistics-card span {
    color: #475569;
    font-size: 0.92rem;
}
.statistics-card strong {
    color: #0f172a;
    font-size: 1.8rem;
    line-height: 1;
}
.statistics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 18px;
}
.statistics-chart,
.statistics-top {
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.statistics-chart-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}
.statistics-chart h3,
.statistics-top h3 {
    font-size: 1.1rem;
    margin: 0;
}
.statistics-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: #475569;
    font-size: 0.86rem;
}
.statistics-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.statistics-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.statistics-dot--visitors,
.statistics-bar--visitors {
    background: #2563eb;
}
.statistics-dot--views,
.statistics-bar--views {
    background: #16a34a;
}
.statistics-dot--tests,
.statistics-bar--tests {
    background: #f59e0b;
}
.statistics-days {
    min-height: 250px;
    display: grid;
    grid-template-columns: repeat(14, minmax(26px, 1fr));
    gap: 8px;
    align-items: end;
}
.statistics-day {
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 8px;
    height: 250px;
}
.statistics-bars {
    min-height: 0;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 3px;
    border-bottom: 1px solid #e2e8f0;
}
.statistics-bar {
    width: 8px;
    min-height: 6px;
    border-radius: 999px 999px 0 0;
}
.statistics-date {
    color: #64748b;
    font-size: 0.72rem;
    text-align: center;
    white-space: nowrap;
}
.statistics-mobile-values {
    display: none;
}
.statistics-programs {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.statistics-program-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.statistics-program-rank {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}
.statistics-program-title {
    min-width: 0;
}
.statistics-program-title strong,
.statistics-program-title small {
    display: block;
}
.statistics-program-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.statistics-program-title small {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 2px;
}
.statistics-program-count {
    color: #0f172a;
    font-weight: 800;
}
.statistics-top-empty {
    color: #64748b;
    margin-top: 14px;
}

body.theme-dark .statistics-root {
    background: #1e293b;
    color: #ffffff;
    border-color: #334155;
    box-shadow: none;
}
body.theme-dark .statistics-card,
body.theme-dark .statistics-chart,
body.theme-dark .statistics-top {
    background: #0f172a;
    border-color: #334155;
    box-shadow: none;
}
body.theme-dark .statistics-card strong,
body.theme-dark .statistics-program-count {
    color: #f8fafc;
}
body.theme-dark .statistics-card span,
body.theme-dark .statistics-legend,
body.theme-dark .statistics-date,
body.theme-dark .statistics-program-title small,
body.theme-dark .statistics-top-empty {
    color: #cbd5e1;
}
body.theme-dark .statistics-program-row {
    background: #0f172a;
    border-color: #334155;
}
body.theme-dark .statistics-bars {
    border-bottom-color: #334155;
}

/*   */
.commission-timer {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.commission-timer i {
    color: #2563eb;
}
.commission-timer strong {
    color: #1d4ed8;
}
.commission-timer.commission-timer--opened {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}
.commission-timer.commission-timer--opened i,
.commission-timer.commission-timer--opened strong {
    color: #16a34a;
}
.commission-box {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    border-radius: 48px;
    padding: 48px 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}
.commission-info h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.commission-info h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.commission-info p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.commission-info i {
    width: 28px;
    color: #2563eb;
}
.commission-docs {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 24px;
    border-radius: 28px;
    min-width: 240px;
}

body.theme-dark .commission-box {
    background: #1e293b;
    color: #ffffff;
    border-color: #334155;
    box-shadow: none;
}
body.theme-dark .commission-timer {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.theme-dark .commission-timer i {
    color: #93c5fd;
}
body.theme-dark .commission-timer strong {
    color: #bfdbfe;
}
body.theme-dark .commission-timer.commission-timer--opened {
    background: #052e16;
    border-color: #166534;
    color: #86efac;
}
body.theme-dark .commission-timer.commission-timer--opened i,
body.theme-dark .commission-timer.commission-timer--opened strong {
    color: #bbf7d0;
}
body.theme-dark .commission-info i {
    color: #90cdf4;
}
body.theme-dark .commission-docs {
    background: #0f172a;
    border-color: #334155;
}

/* contact section */
.contact-section {
    background: #f1f5f9;
}
.contact-container {
    text-align: center;
}
.contact-lead {
    margin-bottom: 24px;
}
.contact-whatsapp-btn {
    background: #0f172a;
}
.contact-hotline {
    margin-top: 24px;
    font-size: 0.8rem;
}

/*  */
footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

/*    */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 32px;
    padding: 32px;
    position: relative;
    animation: fadeInUp 0.3s ease;
}
.modal-content h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    cursor: pointer;
}
.quiz-question {
    margin: 20px 0;
}
.quiz-question p {
    font-weight: 600;
    margin-bottom: 8px;
}
.quiz-option {
    display: block;
    margin: 8px 0;
}
.quiz-result {
    margin-top: 20px;
    background: #eef2ff;
    padding: 16px;
    border-radius: 20px;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}

/* - */
.apply-section {
    background: #f8fafc;
}
.apply-box {
    background: #ffffff;
    border-radius: 26px;
    padding: 18px;
    box-shadow: 0 14px 24px -20px rgba(15, 23, 42, 0.35);
    border: 1px solid #e2e8f0;
    max-width: 1120px;
    margin: 0 auto;
}
.apply-layout {
    display: flex;
    justify-content: center;
    width: 100%;
}
.apply-form-wrap {
    border-radius: 24px;
    padding: 30px 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    width: min(980px, 100%);
    box-shadow: 0 16px 28px -22px rgba(15, 23, 42, 0.32);
}
.apply-form-title {
    font-size: 1.7rem;
    color: #0f172a;
    margin-bottom: 20px;
    text-align: center;
}
.apply-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.field-full {
    grid-column: 1 / -1;
}
.field label {
    display: block;
    font-weight: 650;
    margin-bottom: 8px;
    color: #0f172a;
}
.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
    background: #f8fafc;
    transition: 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    background: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.field input[type="file"] {
    padding: 9px 10px;
    background: #ffffff;
    border-style: dashed;
}
.field input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 8px 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}
.field input[type="file"]::file-selector-button:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}
.field input[type="file"]::-webkit-file-upload-button {
    margin-right: 12px;
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 8px 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 600;
    cursor: pointer;
}
.field textarea {
    resize: vertical;
    /* min-height: 110px; */
}
.consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    color: #334155;
}
.consent input {
    margin-top: 4px;
}
.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.status {
    margin-top: 12px;
    font-weight: 700;
}


.mobile-only {
    display: none;
}

/*  */
@media (max-width: 360px) {
    .logo-title {
    font-size: 1.1rem!important;
    }
}
@media (max-width: 780px) {
    .hero { padding: 40px 0 20px }
    .hero::before { background: (180deg, rgb(255 255 255 / 50) 10%, rgba(255, 255, 255, 0.2) 100%) }
    body.theme-dark .hero::before { background: linear-gradient(180deg, rgba(15, 23, 42, 0.62) 0%, rgba(11, 18, 32, 0.62) 100%); }
    .hero-emblem { max-width: 160px; }
    .hero-image a {
        padding: 8px 16px;
        font-size: 12px;
    }
    .hero-buttons { justify-content: center; align-items: center; }
    .hero-text h2 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .games-hero {
        min-height: 380px;
        padding: 64px 0;
        background-position: center right;
    }
    .logo-title {
    font-size: 1.4rem;
    }
    .mobile-only {
        display: inline;
    }
    .games-hero::before {
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.94) 0%, rgba(248, 250, 252, 0.74) 100%);
    }
    .games-hero h1 {
        font-size: 1.3rem;
    }
    .games-hero p:not(.games-kicker) {
        font-size: 0.9rem;
    }
    .games-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .game-card {
        transform-style: flat;
    }
    .game-card-link {
        border-radius: 22px;
        transform: none;
        transform-style: flat;
        will-change: auto;
    }
    .game-card-link:hover,
    .game-card-link:focus-visible {
        transform: none;
    }
    .game-card-link:hover .game-card-image img,
    .game-card-link:focus-visible .game-card-image img {
        transform: none;
    }
    .game-card-image {
        aspect-ratio: 16 / 11;
        min-height: clamp(220px, 62vw, 360px);
    }
    .game-card-image img {
        object-position: center 45%;
    }
    .game-card-body {
        padding: 18px;
        gap: 10px;
        transform: none;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }
    .header-flex { flex-wrap: nowrap; gap: 0; }
    .burger-btn { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
        z-index: 200;
    }
    .nav-links.is-open { display: flex; }
    .nav-links a {
        padding: 12px 24px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 1rem;
    }
    .nav-links .theme-toggle { padding: 12px 24px; }
    .filter-group { gap: 12px; justify-content: center; }
    .filter-group.filter-group-blocks {
        align-items: center;
        flex-direction: column;
    }
    /* Фильтры на мобильном — два ряда по два блока */
    .filter-pill { background: #e8ebf9; }
    body.theme-dark .filter-pill { background: #181c32;  }
    .filter-bar {
        flex-wrap: wrap;
        gap: 8px 6px;
    }
    .filter-sep {
        display: none;
    }
    .filter-group-inline {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        flex-wrap: wrap;
    }
    .apply-grid {
        grid-template-columns: 1fr;
    }
    .apply-form-wrap {
        padding: 22px 16px;
    }
    .apply-form-title {
        font-size: 1.35rem;
    }
    .spec-card {
        position: relative;
        padding-right: 76px;
        padding-bottom: 48px;
    }
    .spec-card .spec-icon {
        position: absolute;
        right: 22px;
        bottom: 18px;
        margin-bottom: 0;
        font-size: 2.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-card-link,
    .game-card-image img {
        transition: none;
    }

    .game-card-link:hover,
    .game-card-link:focus-visible {
        transform: none;
    }
}

button {
    cursor: pointer;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.theme-toggle-label {
    font-size: 0.85rem;
}
.theme-icon {
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.theme-icon-sun {
    color: #f59e0b;
}
.theme-icon-moon {
    color: #94a3b8;
}
.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.2s;
    border-radius: 999px;
}
.theme-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.theme-switch input:checked + .theme-slider {
    background-color: #0f172a;
}
.theme-switch input:checked + .theme-slider::before {
    transform: translateX(22px);
}

/* ===== Dark Theme ===== */
body.theme-dark {
    background-color: #0b1220;
    color: #e2e8f0;
}
body.theme-dark header {
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
body.theme-dark .logo-sub,
body.theme-dark .logo p,
body.theme-dark .section-sub,
body.theme-dark .details-description,
body.theme-dark .spec-desc,
body.theme-dark .specialties-empty,
body.theme-dark .test-progress-text,
body.theme-dark .consent,
body.theme-dark .status {
    color: #94a3b8;
}
body.theme-dark .nav-links a,
body.theme-dark .section-title,
body.theme-dark .details-title,
body.theme-dark .spec-code,
body.theme-dark .filter-label-top,
body.theme-dark .filter-block-title,
body.theme-dark .apply-form-title {
    color: #e2e8f0;
}
body.theme-dark .nav-links a:hover {
    color: #93c5fd;
}
body.theme-dark .burger-btn span {
    background: #e2e8f0;
}
body.theme-dark .nav-links {
    background: rgba(15, 23, 42, 0.98);
}
body.theme-dark .theme-toggle {
    background: #0f172a;
    border-color: #1f2937;
    color: #e2e8f0;
}
body.theme-dark .theme-icon-sun {
    color: #94a3b8;
}
body.theme-dark .theme-icon-moon {
    color: #e2e8f0;
}
body.theme-dark .hero {
    background: url(../img/hero.webp) top center / cover no-repeat;
}
body.theme-dark .hero::before {
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.62) 0%, rgba(11, 18, 32, 0.62) 100%);
}
body.theme-dark .hero-text h2 {
    color: #e2e8f0;
}
body.theme-dark .hero-text p {
    color: #cbd5f5;
}
body.theme-dark section {
    border-bottom-color: #1f2937;
}
body.theme-dark .spec-card,
body.theme-dark .benefit-item,
body.theme-dark .career-block,
body.theme-dark .details-card,
body.theme-dark .details-empty,
body.theme-dark .modal-content,
body.theme-dark #careerTestForm .quiz-question,
body.theme-dark #specialtyFitForm .quiz-question,
body.theme-dark .apply-box,
body.theme-dark .apply-form-wrap {
    background-color: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
}
/* Тёмная тема: фильтры */
body.theme-dark .filter-bar {
    background: #111827;
    border-color: #1f2937;
}
body.theme-dark .filter-sep {
    background: #334155;
}
body.theme-dark .filter-pill {
    color: #94a3b8;
}
body.theme-dark .filter-pill:hover {
    background: #1e293b;
    color: #e2e8f0;
}
body.theme-dark .filter-pill:has(input:checked) {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
body.theme-dark .filter-clear {
    border-color: #334155;
    color: #64748b;
}
body.theme-dark .filter-clear {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.theme-dark .btn-outline {
    border-color: #60a5fa;
    color: #93c5fd;
}
body.theme-dark .btn-outline:hover {
    background: rgba(59, 130, 246, 0.15);
}
body.theme-dark .btn-test {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.12);
}
body.theme-dark .btn-test:hover {
    background: #e2e8f0;
}
body.theme-dark .btn-details {
    background: #1f2937;
}
body.theme-dark .spec-card:hover {
    border-color: #334155;
}
body.theme-dark .benefit-item i,
body.theme-dark .career-list i {
    color: #93c5fd;
}
body.theme-dark .games-hero::before {
    background: linear-gradient(105deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.25) 100%);
}
body.theme-dark .games-kicker {
    background: rgba(147, 197, 253, 0.16);
    color: #bfdbfe;
}
body.theme-dark .games-hero h1 {
    color: #e2e8f0;
}
body.theme-dark .games-hero p:not(.games-kicker) {
    color: #cbd5f5;
}
body.theme-dark .games-section {
    background: #0f172a;
}
body.theme-dark .game-card-link {
    background: #1e293b;
    border-color: #334155;
}
body.theme-dark .game-specialty {
    background: rgba(147, 197, 253, 0.14);
    color: #bfdbfe;
}
body.theme-dark .game-title {
    color: #f8fafc;
}
body.theme-dark .game-description {
    color: #cbd5e1;
}
body.theme-dark .game-action {
    color: #93c5fd;
}
body.theme-dark .details-back {
    color: #93c5fd;
}
body.theme-dark .details-gallery img {
    border-color: #1f2937;
}
body.theme-dark .quiz-result {
    background: #0f172a;
}
body.theme-dark #careerTestForm .quiz-option-label,
body.theme-dark #specialtyFitForm .quiz-option-label {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
body.theme-dark #careerTestForm .quiz-option:hover .quiz-option-label,
body.theme-dark #specialtyFitForm .quiz-option:hover .quiz-option-label {
    background: #1e293b;
    border-color: #60a5fa;
}
body.theme-dark #careerTestForm .quiz-option input:checked + .quiz-option-label,
body.theme-dark #specialtyFitForm .quiz-option input:checked + .quiz-option-label {
    background: #2563eb;
    border-color: #60a5fa;
    color: #ffffff;
}
body.theme-dark .test-progress-wrap {
    background: #1f2937;
}
body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
body.theme-dark .field input:focus,
body.theme-dark .field select:focus,
body.theme-dark .field textarea:focus {
    background: #111827;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
body.theme-dark .field input[type="file"],
body.theme-dark .field input[type="file"]::file-selector-button,
body.theme-dark .field input[type="file"]::-webkit-file-upload-button {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.theme-dark .modal {
    background: rgba(2, 6, 23, 0.75);
}
body.theme-dark .contact-section {
    background: #0f172a;
}
body.theme-dark .contact-lead,
body.theme-dark .contact-hotline {
    color: #cbd5e1;
}
body.theme-dark .contact-whatsapp-btn {
    background: #1e293b;
}
body.theme-dark .contact-whatsapp-btn:hover {
    background: #334155;
}
body.theme-dark footer {
    background: #0b1220;
    color: #94a3b8;
}

@media (max-width: 780px) {
    .theme-toggle {
        justify-content: center;
    }
}

.admin-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0 18px;
}

.admin-create-panel__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}
.admin-create-form {
    margin-top: 16px;
}
.admin-create-form h3 {
    margin: 0 0 12px;
}

/* Admin editor readability */
body.admin-page .field label {
    color: #0f172a;
}
body.admin-page .admin-check-option {
    color: #0f172a;
    font-weight: 600;
}
body.admin-page #professionsList input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}
body.admin-page .admin-program-row {
    transition: background-color 0.15s ease;
}
body.admin-page .admin-program-row:hover {
    background: #f8fafc;
}
body.admin-page .admin-program-row--selected {
    background: #eff6ff;
}
body.admin-page .admin-program-btn--selected {
    background: rgba(37, 99, 235, 0.12);
    border-color: #2563eb;
    color: #1d4ed8;
}

body.theme-dark.admin-page .field label {
    color: #e2e8f0;
}
body.theme-dark.admin-page .admin-check-option {
    color: #e2e8f0;
}
body.theme-dark.admin-page .admin-program-row:hover {
    background: #172033;
}
body.theme-dark.admin-page .admin-program-row--selected {
    background: #1f2a40;
}
body.theme-dark.admin-page .admin-program-btn--selected {
    background: rgba(96, 165, 250, 0.18);
    border-color: #60a5fa;
    color: #bfdbfe;
}

/*   */
.details-main {
    padding: 44px 0 70px;
}
.details-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 16px;
}
.details-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 14px 32px -20px rgba(15, 23, 42, 0.35);
    --details-logo-shift-x: 0px;
    --details-logo-shift-y: -30px;
    --details-logo-rotate: 0deg;
}
.details-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}
.details-top-main {
    min-width: 0;
    flex: 1;
}
.details-prof-icons-box {
    flex: 0 0 170px;
    width: 170px;
    display: flex;
    justify-content: flex-end;
    position: relative;
    transform: translate(var(--details-logo-shift-x), var(--details-logo-shift-y)) rotate(var(--details-logo-rotate));
    transform-origin: 100% 0;
}
.details-prof-icons {
    display: none;
}
.details-prof-icons-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.56;
    pointer-events: none;
    user-select: none;
}
.details-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 14px;
}
.details-description {
    color: #334155;
    margin-bottom: 18px;
    font-size: 1.05rem;
}
.details-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.details-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.details-gallery img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}
.details-video-wrap iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 16px;
}
.details-empty {
    text-align: center;
    padding: 30px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
}

@media (max-width: 900px) {
    .details-top {
        flex-direction: column;
        gap: 10px;
    }
    .details-prof-icons-box {
        --details-logo-shift-y: -18px;
        --details-logo-rotate: 0deg;
        order: -1;
        width: 128px;
        flex-basis: auto;
        align-self: flex-end;
    }
}

/*   */
.test-head {
    margin-bottom: 14px;
}
.test-progress-wrap {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-top: 12px;
}
.test-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    transition: width 0.25s ease;
}
.test-progress-text {
    margin-top: 8px;
    color: #475569;
    font-size: 0.92rem;
}
#careerTestForm {
    display: grid;
    gap: 14px;
}
#careerTestForm .quiz-question,
#specialtyFitForm .quiz-question {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 14px 10px;
    background: #ffffff;
}
#careerTestForm .quiz-question p,
#specialtyFitForm .quiz-question p {
    margin-bottom: 10px;
}
#careerTestForm .quiz-options,
#specialtyFitForm .quiz-options {
    display: grid;
    gap: 10px;
    justify-items: start;
}
#careerTestForm .quiz-option,
#specialtyFitForm .quiz-option {
    display: block;
    margin: 0;
    cursor: pointer;
    width: min(100%, 150px);
}
#careerTestForm .quiz-option input,
#specialtyFitForm .quiz-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
#careerTestForm .quiz-option-label,
#specialtyFitForm .quiz-option-label {
    display: block;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 500;
    text-align: center;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
#careerTestForm .quiz-option:hover .quiz-option-label,
#specialtyFitForm .quiz-option:hover .quiz-option-label {
    border-color: #60a5fa;
    background: #eff6ff;
    transform: translateY(-1px);
}
#careerTestForm .quiz-option input:checked + .quiz-option-label,
#specialtyFitForm .quiz-option input:checked + .quiz-option-label {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

#specialtyFitForm {
    display: grid;
    gap: 14px;
}

/* ===== Галерея / слайдер на странице специальности ===== */
.gallery-slider {
    margin-top: 24px;
}

.gallery-main {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 16 / 9;
    max-height: 540px;
}

#galleryMainMedia {
    width: 100%;
    height: 100%;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

.gallery-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

.gallery-main iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.15s ease, opacity 0.15s ease;
    opacity: 0.65;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb-video {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    background: #0f172a;
    color: #ffffff;
    overflow: hidden;
}

.gallery-thumb-video img,
.gallery-thumb-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb-video::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
}

.gallery-thumb-video i {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.92);
    font-size: 0.8rem;
    transform: translate(-50%, -50%);
}

.gallery-thumb:hover {
    opacity: 0.9;
    border-color: #94a3b8;
}

.gallery-thumb--active {
    border-color: #2563eb;
    opacity: 1;
}

.theme-dark .gallery-main {
    background: #020617;
}

.theme-dark .gallery-thumb {
    border-color: transparent;
}

.theme-dark .gallery-thumb--active {
    border-color: #3b82f6;
}

/* Стрелки слайдера */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
    z-index: 10;
    opacity: 0.7;
}
.gallery-arrow:hover { background: rgba(0,0,0,.7); opacity: 1; }
.gallery-arrow--prev { left: 10px; }
.gallery-arrow--next { right: 10px; }

/* ===== Видео на странице специальности ===== */
.details-video {
    margin-top: 32px;
}

.details-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.theme-dark .details-section-title {
    color: #93c5fd;
}

.theme-dark .video-wrapper {
    background: #020617;
}

/* ===== Подробное описание ===== */
.details-desc-full {
    margin-top: 28px;
}

.desc-full-text {
    color: #374151;
    font-size: 1rem;
    line-height: 1.75;
    margin-top: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.theme-dark .desc-full-text {
    color: #cbd5e1;
}

/* ===== Количество мест ===== */
.details-seats {
    margin-top: 28px;
}

.seats-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.seats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f1f5f9;
    border-radius: 10px;
    max-width: 340px;
}

.seats-city {
    color: #475569;
    font-size: .95rem;
}

.seats-count {
    font-weight: 600;
    color: #1e3c72;
    font-size: .95rem;
}

.theme-dark .seats-row {
    background: #1e293b;
}

.theme-dark .seats-city {
    color: #94a3b8;
}

.theme-dark .seats-count {
    color: #93c5fd;
}

/* ===== Мастер-класс ===== */
.details-masterclass {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 16px;
    border: 1px solid #bfdbfe;
}

.theme-dark .details-masterclass {
    background: linear-gradient(135deg, #1e3a5f, #1e3c72);
    border-color: #1d4ed8;
}

/* ===== Блок «Тест на профориентацию» на странице специальности ===== */
.details-career-test {
    margin-top: 40px;
}

.details-random-photo {
    margin-top: 40px;
    border-radius: 20px;
    overflow: hidden;
    background: #0f172a;
}

.details-random-photo img {
    width: 100%;
    height: min(56vw, 560px);
    min-height: 260px;
    object-fit: cover;
    display: block;
}

.details-commission {
    margin-top: 40px;
}

.career-test-inner {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    color: white;
}

.career-test-text h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.career-test-text p {
    color: rgba(255,255,255,.8);
    font-size: .95rem;
    margin-bottom: 16px;
}

.career-test-text .btn-primary {
    background: white;
    color: #1e3c72;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.career-test-text .btn-primary:hover {
    background: #f1f5f9;
}

.career-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.career-test-actions .btn-outline {
    border-color: rgba(255,255,255,.72);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.career-test-actions .btn-outline:hover {
    background: rgba(255,255,255,.14);
    color: #ffffff;
}

.fit-result {
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #dbe4ef;
    background: #f8fafc;
    display: grid;
    gap: 12px;
}

.fit-result > i {
    font-size: 2.4rem;
}

.fit-result h3 {
    font-size: 1.35rem;
    margin: 0;
}

.fit-result p {
    margin: 0;
    color: #334155;
}

.fit-result--positive {
    background: #f0fdf4;
    border-color: #86efac;
}

.fit-result--positive > i {
    color: #16a34a;
}

.fit-result--negative {
    background: #fff7ed;
    border-color: #fdba74;
}

.fit-result--negative > i {
    color: #f97316;
}

.fit-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

body.theme-dark .fit-result {
    background: #0f172a;
    border-color: #334155;
}

body.theme-dark .fit-result p {
    color: #cbd5e1;
}

body.theme-dark .fit-result--positive {
    background: #052e16;
    border-color: #166534;
}

body.theme-dark .fit-result--negative {
    background: #431407;
    border-color: #9a3412;
}

.career-test-icon {
    font-size: 4rem;
    color: rgba(255,255,255,.25);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .career-test-inner {
        flex-direction: column;
        text-align: center;
    }
    .career-test-icon { display: none; }
    .details-random-photo img {
        height: 72vw;
        min-height: 220px;
    }
}

@media (max-width: 900px) {
    .statistics-root {
        border-radius: 32px;
        padding: 28px;
    }
    .statistics-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .statistics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .statistics-root {
        border-radius: 24px;
        padding: 18px;
    }
    .statistics-cards {
        grid-template-columns: 1fr;
    }
    .statistics-chart-top {
        align-items: flex-start;
        flex-direction: column;
    }
    .statistics-days {
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .statistics-day {
        height: auto;
        min-height: 48px;
        grid-template-columns: 68px minmax(0, 1fr) auto;
        grid-template-rows: auto;
        align-items: center;
        gap: 10px;
        padding: 10px;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: #f8fafc;
    }
    .statistics-bars {
        display: none;
    }
    .statistics-date {
        order: 1;
        text-align: left;
        color: #334155;
        font-size: 0.82rem;
        font-weight: 700;
    }
    .statistics-mobile-values {
        order: 2;
        display: grid;
        grid-auto-flow: column;
        gap: 8px;
        color: #475569;
        font-size: 0.78rem;
        font-weight: 700;
    }
    .statistics-mobile-values span {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    body.theme-dark .statistics-day {
        background: #0f172a;
        border-color: #334155;
    }
    body.theme-dark .statistics-date,
    body.theme-dark .statistics-mobile-values {
        color: #cbd5e1;
    }
}
