:root {
    --bg: #fbf7f0;
    --bg2: #f3eadc;
    --card: #fff;
    --text: #2f261d;
    --muted: #6e5c49;
    --primary: #b57a3c;
    --primary2: #8f5a2b;
    --accent: #d69a45;
    --border: rgba(96, 67, 35, 0.10);
    --shadow: 0 20px 60px rgba(73, 48, 20, 0.08);
}

html[data-theme="dark"] {
    --bg: #1f1610;
    --bg2: #2a1d15;
    --card: rgba(255,255,255,.06);
    --text: #f4eadf;
    --muted: #c8b39a;
    --primary: #d8a15d;
    --primary2: #b57a3c;
    --accent: #f0c47a;
    --border: rgba(255,255,255,.10);
    --shadow: 0 24px 80px rgba(0,0,0,.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(251, 247, 240, 0.72), rgba(251, 247, 240, 0.72)),
        url("school-bg.pg") center center / cover no-repeat fixed;
    overflow-x: hidden;
}

html[data-theme="dark"] body {
    background:
        linear-gradient(rgba(31, 22, 16, 0.72), rgba(31, 22, 16, 0.72)),
        url("school-bg.jpg") center center / cover no-repeat fixed;
}

canvas#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}
.hero-split {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    overflow: hidden;
}

.half {
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 2s ease;
    will-change: transform;
}

.half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.left {
    transform: translateX(0);
}

.right {
    transform: translateX(0);
}

.hero-split.split-open .left {
    transform: translateX(-100%);
}

.hero-split.split-open .right {
    transform: translateX(100%);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(18px);
    background: rgba(251, 247, 240, 0.84);
    border-bottom: 1px solid rgba(150, 108, 62, 0.08);
}

html[data-theme="dark"] .header {
    background: rgba(31, 22, 16, 0.80);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.video-placeholder {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #111;
}

.video-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo {
    font-weight: 800;
    letter-spacing: -.03em;
    font-size: 1.05rem;
}

.logo span {
    color: #8f5a2b;
}

.menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.menu a {
    color: var(--muted);
    font-weight: 500;
}

.menu a:hover {
    color: var(--text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-toggle,
.burger {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.16);
    color: var(--text);
    height: 44px;
    border-radius: 12px;
}

.theme-toggle {
    padding: 0 14px;
    font-weight: 700;
}

.burger {
    display: none;
    width: 44px;
    font-size: 1.2rem;
}

.hero {
    position: relative;
    padding: 84px 0 40px;
    overflow: hidden;
    background: linear-gradient(-45deg, rgba(251,247,240,0.88), rgba(243,229,204,0.78), rgba(248,239,226,0.84), rgba(231,207,170,0.72));
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 28px;
    align-items: center;
}

.hero-content {
    color: #2f261d;
}

.badge {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(181, 122, 60, .12);
    color: #8f5a2b;
    border: 1px solid rgba(181, 122, 60, .16);
    font-weight: 600;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.02;
    margin: 0 0 18px;
    letter-spacing: -.05em;
    color: #2f261d;
}

.hero p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 660px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 28px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 700;
    transition: .25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    box-shadow: 0 16px 34px rgba(181, 122, 60, .20);
}

.btn-secondary {
    background: rgba(255,255,255,.20);
    border: 1px solid var(--border);
    color: var(--text);
}

.hero-card,
.card,
.price-item,
.form,
.stats div,
.section-card {
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: none;
    color: var(--text);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .price-item,
html[data-theme="dark"] .form,
html[data-theme="dark"] .stats div,
html[data-theme="dark"] .section-card {
    background: rgba(255,255,255,.06);
}

.hero-card {
    border-radius: 28px;
    padding: 28px;
}

.hero-card h2,
.hero-card p,
.hero-card li {
    color: var(--text);
}

.hero-card ul {
    padding-left: 18px;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stats div {
    padding: 16px 10px;
    border-radius: 20px;
    text-align: center;
}

.stats strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text);
}

.stats span {
    color: var(--muted);
    font-size: .92rem;
}

.section {
    padding: 84px 0;
}

.section-card {
    margin: 0 auto;
    max-width: 1180px;
    border-radius: 32px;
    padding: 34px 20px;
}

.section.alt {
    background: transparent;
    border: none;
}

.section-head {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-head span,
.contact span {
    display: inline-block;
    color: #b57a3c;
    font-weight: 700;
    margin-bottom: 10px;
}

html[data-theme="dark"] .section-head span,
html[data-theme="dark"] .contact span {
    color: #f0c47a;
}

.section-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.section-head p,
.card p,
.review p,
.contact p,
.form-note {
    color: var(--muted);
    line-height: 1.7;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.services-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.services-gallery img {
    width: 100%;
    aspect-ratio: 1 / 2;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

@media (max-width: 768px) {
    .services-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .services-gallery {
        grid-template-columns: 1fr;
    }
}

.card {
    border-radius: 24px;
    padding: 24px;
    transition: .25s ease;
}
.image-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: stretch;
}

.card-image {
    flex: 1 1 300px;
    width: 30%;
    max-width: 30%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(73, 48, 20, 0.08);
    border: 1px solid rgba(96, 67, 35, 0.10);
}

.card-image-blue {
    border-radius: 18px;
}

.card-image-green {
    border-radius: 32px;
}

.card-image-yellow {
    border-radius: 10px;
}

@media (max-width: 768px) {
    .card-image {
        flex: 1 1 100%;
        height: 220px;
    }
}

.card:hover {
    transform: translateY(-4px);
}

.price-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.price-item {
    padding: 28px 24px;
    border-radius: 24px;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    margin: 10px 0 4px;
}

.accent {
    color: var(--accent);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qr-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.qr-code {
    width: 180px;
    height: 180px;
    display: block;
    border-radius: 16px;
    background: #fff;
    padding: 8px;
    box-shadow: var(--shadow);
}

.qr-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.form {
    padding: 24px;
    border-radius: 24px;
    display: grid;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: rgba(255,255,255,.04);
}

input::placeholder,
textarea::placeholder {
    color: #8c98b4;
    transition: color 0.3s ease;
}

select option {
    background: #fff;
    color: #0f172a;
}

html[data-theme="dark"] select option {
    background: #0b1220;
    color: #e5eefc;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(181, 122, 60, .60);
    box-shadow: 0 0 0 4px rgba(181, 122, 60, .15), 0 8px 25px rgba(181, 122, 60, .18);
    transform: translateY(-1px);
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: rgba(140,152,180,.5);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b57a3c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

html[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f0c47a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.wide {
    width: 100%;
}

.footer {
    padding: 24px 0 36px;
    background: rgba(181, 122, 60, 0.10);
    border-top: 1px solid rgba(143, 90, 43, 0.18);
    color: var(--muted);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

html[data-theme="dark"] .footer {
    background: rgba(255,255,255,0.04);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.video-player {
    width: 100%;
    height: 450px;
    background: #000;
    margin-bottom: 15px;
}

.video-js {
    width: 100% !important;
    height: 100% !important;
}

.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
    overflow: visible;
}

.thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.thumbnail img {
    display: block;
    width: 190px;
    height: 120px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    transform: translateY(-6px) scale(1.05);
    border-color: #a8743d;
    box-shadow: 0 10px 25px rgba(168,116,61,.25);
}

.thumbnail:hover img {
    filter: brightness(1.1);
}

.thumbnail.active {
    border-color: #b57a3c;
    box-shadow: 0 0 20px rgba(181,122,60,.35), 0 0 40px rgba(181,122,60,.18);
    animation: pulse 2s ease-in-out infinite;
}

.thumbnail.active img {
    filter: brightness(1.15);
}

.pagination {
    text-align: center;
    margin-top: 10px;
}

.pagination button {
    cursor: pointer;
    padding: 6px 12px;
    margin: 0 5px;
    font-size: 16px;
    background-color: #b57a3c;
    color: white;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: #8f5a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(143,90,43,.25);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}

.pagination button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.videos-section .btn-back-to-main {
    background-color: #b57a3c;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 20px;
}

.videos-section .btn-back-to-main:hover {
    background-color: #8f5a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(143,90,43,.25);
}

.auth-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.auth-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(181, 122, 60, .10);
    color: var(--text);
    font-size: .92rem;
    border: 1px solid var(--border);
}

.start-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

.start-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}

.start-btn {
    position: absolute;
    left: 25%;
    top: 92%;
    transform: translate(-50%, -50%);
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    background: rgba(128, 217, 152, 0.55);
    color: red;
    font-weight: 700;
    font-size: 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    z-index: 2;
    transition: 0.25s ease;
    white-space: nowrap;
}

.start-btn:hover {
    background: #66cc33;
    color: #fff;
    transform: translate(-50%, -50%) translateY(-2px);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(181,122,60,.35), 0 0 40px rgba(181,122,60,.18);
    }
    50% {
        box-shadow: 0 0 25px rgba(181,122,60,.45), 0 0 50px rgba(181,122,60,.24);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .grid-3,
    .price-box,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .menu {
        display: none;
        position: absolute;
        top: 76px;
        left: 20px;
        right: 20px;
        flex-direction: column;
        background: rgba(251, 247, 240, 0.96);
        border: 1px solid rgba(150, 108, 62, 0.10);
        border-radius: 18px;
        padding: 14px;
        box-shadow: var(--shadow);
    }

    html[data-theme="dark"] .menu {
        background: rgba(31, 22, 16, 0.96);
        border: 1px solid rgba(255,255,255,.06);
    }

    .menu.open {
        display: flex;
    }

    .burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .qr-box {
        align-items: center;
    }
}

@media (max-width: 600px) {
    .video-player {
        height: auto;
    }

    .video-js {
        height: auto !important;
        max-height: 250px !important;
    }

    .thumbnail img {
        width: 110px;
        height: 70px;
    }

    .pagination button {
        padding: 8px 14px;
        font-size: 14px;
    }

    .start-btn {
        left: 50%;
        top: auto;
        bottom: 24px;
        padding: 12px 22px;
        font-size: 0.95rem;
    }
	/* ===== Видео и ограничение для гостей ===== */

.videos-section {
    position: relative;
    padding-bottom: 20px;
}

.video-player {
    position: relative;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.video-player .video-js {
    width: 100% !important;
    height: auto !important;
    min-height: 320px;
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    z-index: 30;
}

.lock-box {
    width: min(100%, 460px);
    background: #ffffff;
    color: #111827;
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.lock-box h3 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
}

.lock-box p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
}

.lock-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.lock-actions .btn {
    min-width: 150px;
}

/* ===== Тонкая настройка видеоуроков ===== */

.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.thumbnail {
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.04);
}

.thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.thumbnail.active {
    border-color: #3b82f6;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination button {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    background: #e5e7eb;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #d1d5db;
    transform: translateY(-1px);
}

.pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ===== Адаптивность ===== */

@media (max-width: 900px) {
    .lock-box {
        padding: 24px 18px;
    }

    .lock-box h3 {
        font-size: 20px;
    }

    .lock-box p {
        font-size: 15px;
    }

    .video-player .video-js {
        min-height: 260px;
    }
}

@media (max-width: 600px) {
    .video-player {
        border-radius: 14px;
    }
	.hero-card video {
    display: block;
    margin-top: -10px;
}

    .video-player .video-js {
        min-height: 220px;
    }

    .lock-overlay {
        padding: 12px;
    }

    .lock-box {
        width: 100%;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .lock-box h3 {
        font-size: 18px;
    }

    .lock-box p {
        font-size: 14px;
    }

    .lock-actions .btn {
        width: 100%;
    }

    .thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 10px;
    }

    .pagination button {
        width: 100%;
    }
}

/* ===== Тёмная тема ===== */

html[data-theme="dark"] .lock-box {
    background: #111827;
    color: #f9fafb;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .lock-box p {
    color: #cbd5e1;
}

html[data-theme="dark"] .pagination button {
    background: #374151;
    color: #f9fafb;
}

html[data-theme="dark"] .pagination button:hover:not(:disabled) {
    background: #4b5563;
}

html[data-theme="dark"] .thumbnail {
    background: rgba(255, 255, 255, 0.03);
} 
}