:root {
    --text: #151515;
    --muted: #686868;
    --line: #e7e7e7;
    --soft: #f5f5f5;
    --accent: #d30010;
    --dark: #111315;
    --green: #0f8b6f;
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #fff;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

main {
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    max-width: 100%;
}

.site-header {
    align-items: center;
    background: #fff;
    display: grid;
    gap: 24px;
    grid-template-columns: auto 1fr auto;
    min-height: 84px;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    align-items: center;
    display: inline-flex;
    font-size: 20px;
    font-weight: 800;
    gap: 14px;
}

.brand img {
    display: block;
    height: 52px;
    object-fit: contain;
    width: 52px;
}

.nav,
.account,
.footer > div:last-child {
    align-items: center;
    display: flex;
    gap: 22px;
}

.nav {
    font-size: 13px;
    justify-content: center;
}

.nav a,
.account > a,
.account .link-button {
    align-items: center;
    background: #fff0f1;
    border-radius: 6px;
    color: var(--accent);
    display: inline-flex;
    gap: 7px;
    font-weight: 800;
    padding: 9px 13px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav a:hover,
.account > a:hover,
.account .link-button:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.account {
    font-size: 13px;
}

.account-name {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.account form {
    margin: 0;
}

.button,
button {
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    gap: 9px;
    font-weight: 800;
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
}

.button.small,
button.small {
    padding: 9px 14px;
}

.button.ghost {
    background: #171717;
}

.button.danger {
    background: #8f0010;
}

.button.full {
    width: 100%;
}

.link-button {
    background: transparent;
    color: var(--accent);
    padding: 0;
}

.site-header .nav a,
.site-header .account > a:not(.button),
.site-header .account .link-button {
    align-items: center;
    background: #fff0f1;
    border-radius: 6px;
    color: var(--accent);
    display: inline-flex;
    gap: 7px;
    padding: 9px 13px;
}

.site-header .nav a:hover,
.site-header .account > a:not(.button):hover,
.site-header .account .link-button:hover {
    background: var(--accent);
    color: #fff;
}

.flash {
    border-radius: 4px;
    margin: 18px auto 0;
    max-width: 1120px;
    padding: 12px 16px;
}

.flash.success {
    background: #e8f6f2;
    color: var(--green);
}

.flash.error {
    background: #ffe9eb;
    color: var(--accent);
}

.popup-alert {
    align-items: center;
    background: rgba(0, 0, 0, .45);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 50;
}

.popup-alert > div {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
    max-width: 380px;
    padding: 26px;
    width: 100%;
}

.popup-alert strong {
    color: var(--accent);
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.hero {
    align-items: center;
    display: grid;
    gap: 70px;
    grid-template-columns: minmax(280px, 520px) 1fr;
    min-height: 560px;
    overflow: hidden;
    padding: 72px 32px 96px;
}

.hero-copy,
.hero-media {
    transition: transform 3s cubic-bezier(.16, 1, .3, 1);
    will-change: opacity, transform;
}

.hero.hero-animated .hero-copy {
    transform: translate3d(-125%, 0, 0);
}

.hero.hero-animated .hero-media {
    transform: translate3d(125%, 0, 0);
}

.hero.hero-animated.is-visible .hero-copy,
.hero.hero-animated.is-visible .hero-media {
    transform: translate3d(0, 0, 0);
}

.hero.hero-animated:not(.is-ready) .hero-copy,
.hero.hero-animated:not(.is-ready) .hero-media {
    transition: none;
}

.hero-copy,
.courses,
.disciplines,
.cta,
.course-detail,
.curriculum,
.page-heading,
.auth-page,
.admin-table-wrap {
    margin: 0 auto;
    max-width: 1120px;
    width: 100%;
}

.hero-copy,
.hero-media,
.course-card,
.course-detail-main,
.price-box,
.admin-card,
.admin-management-block {
    min-width: 0;
}

.eyebrow {
    color: var(--accent);
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 60px;
    line-height: 1;
    margin-bottom: 24px;
}

h2 {
    font-size: 28px;
    line-height: 1.15;
}

.hero p,
.page-heading p,
.course-detail p {
    color: var(--muted);
    max-width: 580px;
}

.hero-media,
.course-image {
    background:
        linear-gradient(120deg, rgba(211, 0, 16, .85), transparent 38%),
        linear-gradient(45deg, #101010 0%, #252525 45%, #f0f0f0 46%, #151515 48%, #303030 100%);
    border-radius: 4px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, .18);
}

.hero-media {
    aspect-ratio: 16 / 9;
}

.disciplines {
    background: var(--soft);
    max-width: none;
    padding: 72px 32px;
}

.disciplines > * {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
}

.section-title span {
    background: var(--accent);
    display: block;
    height: 2px;
    margin-bottom: 14px;
    width: 86px;
}

.section-title.centered {
    text-align: center;
}

.section-title.centered span {
    margin-left: auto;
    margin-right: auto;
}

.discipline-grid,
.course-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.course-card:hover {
    transform: scale(1.1);
    transition: ease 0.5s all;
}


.discipline-grid div {
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    min-height: 110px;
    padding: 34px 28px;
    text-transform: uppercase;
}

.courses {
    padding: 88px 32px;
}

.course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 34px;
}

.course-grid.compact {
    padding: 0 32px 80px;
}

.course-card {
    border-bottom: 1px solid var(--line);
}

.course-image {
    aspect-ratio: 16 / 9;
    background-position: center;
    background-size: cover;
    box-shadow: none;
}

.course-body {
    padding: 18px 0 22px;
}

.course-body small {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.course-body h3 {
    font-size: 22px;
    line-height: 1.1;
    margin: 8px 0 10px;
}

.course-body p {
    color: var(--muted);
    min-height: 54px;
}

.course-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.course-footer a {
    align-items: center;
    color: var(--accent);
    display: inline-flex;
    font-size: 11px;
    gap: 6px;
    font-weight: 800;
    text-transform: uppercase;
}

.cta {
    background:
        linear-gradient(90deg, rgba(17, 19, 21, .96), rgba(17, 19, 21, .82)),
        linear-gradient(45deg, #151515, #3a3a3a);
    color: #fff;
    max-width: none;
    padding: 90px 32px;
    text-align: center;
}

.cta h2,
.cta p {
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
}

.cta p {
    color: #d8d8d8;
}

.course-detail {
    display: grid;
    gap: 60px;
    grid-template-columns: 1fr 320px;
    padding: 80px 32px 42px;
}

.price-box,
.auth-card {
    border-radius: 4px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .12);
    padding: 32px;
}

.price-box strong {
    display: block;
    font-size: 34px;
    margin-bottom: 22px;
}

.price-box p + .button,
.price-box .button + .button {
    margin-top: 12px;
}

.whatsapp-button {
    align-items: center;
    background: var(--green);
    gap: 10px;
}

.button-icon {
    display: block;
    fill: currentColor;
    flex: 0 0 auto;
    height: 22px;
    width: 22px;
}

.stats {
    color: var(--muted);
    display: flex;
    gap: 24px;
    margin-top: 28px;
}

.course-presentation {
    margin-top: 30px;
}

.course-presentation video {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 4px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .12);
    display: block;
    width: 100%;
}

.curriculum {
    padding: 28px 32px 90px;
}

.lesson-row {
    background: var(--soft);
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 18px 22px;
}

.muted-row {
    color: var(--muted);
}

.module-heading {
    border-bottom: 1px solid var(--line);
    margin: 30px 0 14px;
    padding-bottom: 10px;
}

.module-heading span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.module-heading h3 {
    margin: 4px 0 0;
}

.module-heading p {
    color: var(--muted);
    margin: 6px 0 0;
}

.lesson-title {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.lesson-title a {
    align-items: center;
    color: var(--accent);
    display: inline-flex;
    font-size: 12px;
    gap: 6px;
    font-weight: 800;
    text-transform: uppercase;
}

.lesson-row video {
    border-radius: 4px;
    margin-top: 14px;
    max-height: 520px;
    width: 100%;
}

.watch-page {
    align-items: start;
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 1fr) 360px;
    margin: 0 auto;
    max-width: 1280px;
    padding: 54px 32px 90px;
}

.watch-main h1 {
    font-size: 42px;
    margin: 10px 0 10px;
}

.back-link {
    align-items: center;
    color: var(--accent);
    display: inline-flex;
    font-size: 12px;
    gap: 6px;
    font-weight: 800;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.watch-player {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 4px;
    display: block;
    margin-top: 26px;
    width: 100%;
}

.watch-description {
    margin-top: 30px;
}

.watch-actions {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: 30px;
}

.watch-sidebar {
    border: 1px solid var(--line);
    border-radius: 4px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 22px;
    position: sticky;
    top: 104px;
}

.watch-sidebar h2 {
    font-size: 20px;
}

.watch-module {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    padding: 16px 0;
}

.watch-module strong {
    font-size: 13px;
}

.watch-module a,
.watch-module span {
    border-radius: 4px;
    color: var(--muted);
    display: flex;
    font-size: 14px;
    gap: 12px;
    justify-content: space-between;
    padding: 10px;
}

.watch-module a.active {
    background: var(--soft);
    color: var(--text);
    font-weight: 800;
}

.auth-page {
    display: grid;
    min-height: 620px;
    padding: 70px 32px;
    place-items: center;
}

.auth-card {
    max-width: 440px;
    width: 100%;
}

.auth-card label {
    display: grid;
    font-weight: 700;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-card a {
    align-items: center;
    color: var(--accent);
    display: inline-flex;
    gap: 6px;
    font-weight: 700;
}

.terms-check {
    align-items: flex-start;
    display: flex !important;
    font-size: 13px;
    font-weight: 400 !important;
    gap: 10px !important;
    line-height: 1.4;
}

.terms-check input {
    flex: 0 0 auto;
    margin-top: 3px;
    min-height: auto;
    width: auto;
}

.terms-check a {
    display: inline;
}

.legal-page {
    margin: 0 auto;
    max-width: 880px;
    padding: 70px 32px 90px;
}

.legal-page h1 {
    font-size: 44px;
}

.legal-page p {
    color: var(--muted);
}

.legal-block {
    border-top: 1px solid var(--line);
    padding: 22px 0 4px;
}

.legal-block h2 {
    font-size: 22px;
}

.legal-note {
    font-size: 13px;
    margin: 26px 0;
}

.error-page {
    display: grid;
    gap: 18px;
    margin: 0 auto;
    max-width: 720px;
    min-height: 520px;
    padding: 90px 32px;
    place-content: center;
    text-align: center;
}

.error-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 10px;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 4px;
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

.page-heading {
    padding: 70px 32px 32px;
}

.admin-table-wrap {
    overflow-x: auto;
    padding: 0 32px 90px;
}

.admin-panels {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto 44px;
    max-width: 1120px;
    padding: 0 32px;
}

.admin-card {
    border: 1px solid var(--line);
    border-radius: 4px;
    display: grid;
    gap: 14px;
    padding: 24px;
}

.admin-card label {
    display: grid;
    font-weight: 700;
    gap: 8px;
}

.admin-management {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 auto 44px;
    max-width: 1120px;
    padding: 0 32px;
}

.admin-management-block {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px;
}

.admin-list {
    display: grid;
    gap: 12px;
}

.admin-list-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 0 12px;
}

.admin-list-row strong,
.admin-list-row span {
    display: block;
}

.admin-list-row span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.admin-table {
    border-collapse: collapse;
    min-width: 900px;
    width: 100%;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 16px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-size: 12px;
    text-transform: uppercase;
}

.admin-form {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: 150px 1fr 100px;
}

.course-picker {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 12px;
}

.course-picker summary {
    cursor: pointer;
    font-weight: 700;
}

.course-picker div {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.course-picker label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.course-picker input {
    min-height: auto;
    width: auto;
}

.inline-editor {
    margin-top: 12px;
}

.inline-editor summary {
    color: var(--accent);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.inline-editor form {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-top: 14px;
}

.inline-editor label {
    display: grid;
    font-weight: 700;
    gap: 6px;
}

.empty-state {
    background: var(--soft);
    border-radius: 4px;
    margin: 24px auto 80px;
    max-width: 1120px;
    padding: 28px;
}

.footer {
    align-items: start;
    background: var(--dark);
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 52px 32px;
}

.footer p,
.footer span {
    color: #bbb;
}

.footer a {
    color: #fff;
    font-weight: 700;
}

@media (max-width: 860px) {
    .site-header {
        gap: 14px;
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 14px 16px;
    }

    .brand {
        font-size: 18px;
        gap: 10px;
    }

    .brand img {
        height: 42px;
        width: 42px;
    }

    .nav,
    .account {
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .site-header .nav a,
    .site-header .account > a:not(.button),
    .site-header .account .link-button {
        font-size: 12px;
        padding: 8px 10px;
    }

    .hero,
    .course-detail {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 30px;
        min-height: auto;
        padding: 42px 18px 58px;
    }

    .hero.hero-animated .hero-copy {
        transform: translate3d(-130%, 0, 0);
    }

    .hero.hero-animated .hero-media {
        transform: translate3d(130%, 0, 0);
    }

    .hero-media {
        min-height: 190px;
    }

    .courses,
    .course-detail,
    .curriculum,
    .page-heading,
    .auth-page,
    .course-grid.compact,
    .admin-table-wrap {
        padding-left: 18px;
        padding-right: 18px;
    }

    .course-detail {
        gap: 28px;
        padding-top: 42px;
    }

    .price-box,
    .auth-card {
        padding: 24px;
    }

    h1 {
        font-size: 42px;
    }

    .discipline-grid,
    .course-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-panels {
        grid-template-columns: 1fr;
    }

    .admin-management,
    .admin-list-row {
        grid-template-columns: 1fr;
    }

    .watch-page {
        display: grid;
        gap: 28px;
        grid-template-columns: 1fr;
        padding: 28px 16px 56px;
    }

    .watch-main h1 {
        font-size: 32px;
        line-height: 1.08;
    }

    .watch-player {
        margin-top: 18px;
    }

    .watch-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .watch-actions .button {
        width: 100%;
    }

    .watch-sidebar {
        max-height: none;
        overflow: visible;
        position: static;
        top: auto;
    }

    .watch-module a,
    .watch-module span {
        align-items: flex-start;
        display: grid;
        gap: 4px;
        justify-content: stretch;
    }

    .lesson-title {
        align-items: flex-start;
        display: grid;
        gap: 10px;
    }

    .footer {
        display: grid;
        gap: 28px;
    }
}

@media (max-width: 520px) {
    .site-header {
        position: static;
    }

    .brand span {
        overflow-wrap: anywhere;
    }

    .account-name {
        width: 100%;
    }

    .button,
    button,
    .site-header .account > .button {
        width: 100%;
    }

    .nav,
    .account {
        width: 100%;
    }

    .account form {
        width: 100%;
    }

    .site-header .nav a,
    .site-header .account > a:not(.button),
    .site-header .account .link-button {
        justify-content: center;
    }

    .hero-copy,
    .courses,
    .course-detail-main,
    .curriculum,
    .page-heading,
    .auth-card {
        min-width: 0;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 24px;
    }

    .stats,
    .course-footer,
    .watch-actions,
    .footer,
    .footer > div:last-child {
        align-items: stretch;
        display: grid;
        gap: 12px;
    }

    .course-footer a,
    .course-footer strong {
        justify-content: flex-start;
    }

    .auth-page {
        min-height: auto;
        padding-top: 36px;
        padding-bottom: 48px;
    }

    .legal-page {
        padding: 42px 18px 58px;
    }

    .legal-page h1 {
        font-size: 32px;
    }

    .watch-page {
        padding-top: 22px;
    }

    .watch-sidebar {
        padding: 16px;
    }

    .error-actions {
        display: grid;
    }
}
