/* ═══════════════════════════════════════════════════════════════
   LMS — Tilda member-area replica
   Font: Montserrat (loaded in each standalone template)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Shared reset ─────────────────────────────────────────────── */
.tlk-body * { box-sizing: border-box; }
.tlk-body {
    margin: 0;
    padding: 0;
    font-family: Montserrat, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ─── Кнопка профиля (tlk-userbar на Тильде): белый круг с тенью у правого края ─── */
.tlk-userbar {
    position: fixed;
    top: 185px;
    right: 46px;
    z-index: 9100;
}
.tlk-userbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    color: #0093d5;
    text-decoration: none;
    transition: box-shadow .2s;
}
.tlk-userbar-btn svg { width: 24px; height: 24px; fill: currentColor; }
.tlk-userbar-btn:hover { box-shadow: 0 0 14px rgba(0, 0, 0, .3); }

/* ─── Видео ──────────────────────────────────────────────────────── */
.cm-video-wrap {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.cm-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ══════════════════════════════════════════════════════════════════
   СПИСОК КУРСОВ /lk — как /members (tmst-breadcrumbs + tlk-resources)
   ══════════════════════════════════════════════════════════════════ */
.tlk-lk-body {
    min-height: 100vh;
    background: #f5f5f5;
    color: #171717;
}

.tlk-breadcrumbs {
    display: flex;
    align-items: center;
    max-width: 1199px;
    margin: 0 auto;
    padding: 48px 20px 0;
    font-size: 15px;
    line-height: 19px;
}
.tlk-breadcrumbs__home { display: flex; color: #171717; }
.tlk-breadcrumbs__home svg { display: block; }
.tlk-breadcrumbs__divider { margin: 0 8px; }
.tlk-breadcrumbs__item { color: #949494; }

.tlk-lk-main {
    max-width: 1199px;
    margin: 0 auto;
    padding: 68px 20px 60px;
}

.tlk-lk-heading {
    margin: 0 0 25px;
    font-size: 25.74px;
    font-weight: 700;
    line-height: 31px;
    color: #171717;
}

.tlk-lk-card {
    padding: 26px 30px;
    border-radius: 4px;
    background: #fff;
}
.tlk-lk-item + .tlk-lk-item { margin-top: 32px; }
.tlk-lk-link {
    font-size: 15px;
    font-weight: 700;
    line-height: 19px;
    color: #171717;
    text-decoration: none;
    box-shadow: inset 0 -1px 0 #78b3cd;
    transition: opacity .2s;
}
.tlk-lk-link:hover { opacity: .7; }

.tlk-lk-empty { margin: 0; font-size: 15px; color: #555; }

.tlk-lk-footer {
    margin: 26px 0 0;
    font-size: 14px;
    line-height: 18px;
    color: #949494;
}

/* ══════════════════════════════════════════════════════════════════
   СТРАНИЦА КУРСА — как /members/courses/… (tlk-lectures)
   ══════════════════════════════════════════════════════════════════ */
.tlk-course-body {
    min-height: 100vh;
    background: #fff;
    color: #333;
}

.tlk-course-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 100px 15px;
}

.tlk-course-header {
    position: relative;
    margin-bottom: 60px;
    padding-bottom: 70px;
}
/* Линия под заголовком почти во всю ширину окна */
.tlk-course-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: min(1272px, calc(100vw - 100px));
    height: 1px;
    background: #e0e0e0;
    transform: translateX(-50%);
}
.tlk-course-title {
    margin: 0;
    font: 600 34px/43px 'FuturaPT', Arial, sans-serif;
    color: #333;
}

.tlk-partition-title {
    margin: 0 0 30px;
    font: 600 26px/34px 'FuturaPT', Arial, sans-serif;
    color: #333;
}
.tlk-course-card + .tlk-partition-title { margin-top: 60px; }

.tlk-course-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 20px 0 20px 40px;
    border-top: 1px solid #e0e0e0;
    text-decoration: none;
    color: #0093d5;
    box-shadow: inset 0 -1px 0 #78b3cd;
}

/* Значок слева: пройден — зелёный круг с галочкой, иначе раскрытая книга */
.tlk-tick-done,
.tlk-tick-book {
    position: absolute;
    left: 0;
}
.tlk-tick-done {
    top: 18px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #058a09;
}
.tlk-tick-done::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 9px;
    width: 6px;
    height: 10px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(45deg);
}
.tlk-tick-book {
    top: 16px;
    left: -2px;
    width: 30px;
    height: 30px;
}

.tlk-card-num {
    flex-shrink: 0;
    padding-right: 10px;
    font-size: 20px;
    line-height: 23.4px;
    color: #ccc;
}
.tlk-card-right { min-width: 0; }
.tlk-card-name {
    display: block;
    font-size: 20px;
    line-height: 23.4px;
}
.tlk-card-descr {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    line-height: 19.2px;
}
.tlk-course-card:hover .tlk-card-name,
.tlk-course-card:hover .tlk-card-descr { opacity: .75; }

/* ══════════════════════════════════════════════════════════════════
   УРОК — как /members/courses/…/урок (tlk-lecture + tlk-menu + tlk-switcher)
   ══════════════════════════════════════════════════════════════════ */
.tlk-lesson-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-left: 50px;
    overflow-x: hidden;
    background: #fff;
    color: #000;
}

/* Тёмная панель 50px слева */
.tlk-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9002;
    width: 50px;
    height: 100vh;
    padding-top: 6px;
    background: #3d3d3d;
}
.tlk-burger {
    position: relative;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.tlk-burger span {
    position: absolute;
    left: 12px;
    width: 26px;
    height: 2px;
    background: #fff;
    transition: transform .25s, opacity .25s, top .25s;
}
.tlk-burger span:nth-child(1) { top: 16px; }
.tlk-burger span:nth-child(2) { top: 24px; }
.tlk-burger span:nth-child(3) { top: 32px; }
.tlk-burger.is-open span:nth-child(1) { top: 24px; transform: rotate(45deg); }
.tlk-burger.is-open span:nth-child(2) { opacity: 0; }
.tlk-burger.is-open span:nth-child(3) { top: 24px; transform: rotate(-45deg); }

/* Название курса снизу вверх */
.tlk-panel-label {
    position: absolute;
    bottom: 45px;
    left: 11px;
    max-height: calc(100vh - 130px);
    overflow: hidden;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 18px;
    line-height: 28px;
    color: #fff;
    pointer-events: none;
}

/* Выезжающее меню уроков: тёмное, 255px, из-под панели */
.tlk-menu {
    position: fixed;
    top: 0;
    left: -255px;
    z-index: 9001;
    width: 255px;
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, .3);
    background: #3d3d3d;
    color: #fff;
    transition: left .3s ease;
}
.tlk-menu.is-open { left: 50px; }

.tlk-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    background: rgba(0, 0, 0, .75);
}
.tlk-menu-overlay.is-open { display: block; }

.tlk-menu-inner { padding: 20px 20px 30px; }

.tlk-menu-back {
    position: relative;
    display: block;
    padding-left: 35px;
    font-size: 20px;
    line-height: 27px;
    color: #fff;
    text-decoration: none;
}
.tlk-menu-back__icon {
    position: absolute;
    top: 1px;
    left: 0;
    display: flex;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    color: #3d3d3d;
}
.tlk-menu-back__icon svg { width: 100%; height: 100%; }

.tlk-menu-section-title {
    margin: 25px 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #a6a6a6;
}

.tlk-menu-link {
    position: relative;
    display: block;
    padding: 5px 0 5px 22px;
    font-size: 13px;
    line-height: 16px;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
}
.tlk-menu-link:hover { color: #fff; }
.tlk-menu-link.is-active { font-weight: 700; color: #fff; }

.tlk-menu-book {
    position: absolute;
    top: 4px;
    left: 0;
    width: 18px;
    height: 18px;
}
.tlk-menu-check {
    position: absolute;
    top: 7px;
    left: 4px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #2ecc8f;
    border-bottom: 2px solid #2ecc8f;
    transform: rotate(45deg);
}

/* Содержимое урока: колонка 1024px по центру */
.tlk-lecture-container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 60px 20px;
}

.tlk-lecture-title {
    max-width: 650px;
    margin: 0 0 45px;
    font: 600 50.4px/50.4px 'FuturaPT', Arial, sans-serif;
    color: #000;
}

.tlk-lecture-desc {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 300;
    line-height: 22px;
    color: #000;
}

.tlk-lecture-video + .tlk-lecture-video { margin-top: 30px; }

.tlk-lecture-content {
    margin-top: 32px;
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.tlk-lecture-materials {
    margin-top: 30px;
    padding: 20px;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 15px;
    line-height: 1.6;
}

/* Переключатель уроков внизу во всю ширину */
.tlk-switcher {
    display: flex;
    border-top: 1px solid rgba(0, 0, 0, .4);
}
.tlk-switcher__item { flex: 1 1 50%; min-width: 0; }
.tlk-switcher__item a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 45px;
    font-size: 14px;
    line-height: 20px;
    color: #000;
    text-decoration: none;
}
.tlk-switcher__item--next a { justify-content: flex-end; }
.tlk-switcher__item a span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tlk-switcher__item a svg { flex-shrink: 0; }
.tlk-switcher__item a:hover { color: #0093d5; }

/* ─── Планшет и телефон ───────────────────────────────────────── */
@media (max-width: 960px) {
    .tlk-userbar { top: 20px; right: 20px; }
}
@media (max-width: 640px) {
    .tlk-breadcrumbs { padding-top: 24px; }
    .tlk-lk-main { padding-top: 40px; }
    .tlk-lk-card { padding: 20px; }

    .tlk-course-container { padding: 70px 15px 60px; }
    .tlk-course-header { margin-bottom: 40px; padding-bottom: 40px; }
    .tlk-course-title { font-size: 28px; line-height: 34px; }
    .tlk-partition-title { font-size: 22px; line-height: 28px; }
    .tlk-card-name { font-size: 17px; line-height: 21px; }
    .tlk-card-descr { font-size: 14px; line-height: 18px; }

    .tlk-lecture-container { padding: 40px 15px; }
    .tlk-lecture-title { font-size: 34px; line-height: 36px; margin-bottom: 25px; }
    .tlk-lecture-desc { font-size: 16px; }
    .tlk-switcher__item a { padding: 20px 15px; }
}

/* ─── Вход /members/login (inc/login.php, template-parts/login.php) ─────────────
   Как форма кабинета Тильды: слева белая колонка 30% (форма 340px по центру), справа фото */
.tlk-login-body { background: #fff; }
.tlk-login {
    display: flex;
    min-height: 100vh;
}
.tlk-login__side {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 max(30%, 424px);
    padding: 40px 25px;
    background: #fff;
}
.tlk-login__box { width: 340px; max-width: 100%; }
.tlk-login__logo { display: inline-block; }
.tlk-login__logo img { display: block; width: 150px; height: 50px; object-fit: contain; object-position: left center; }
.tlk-login__title {
    margin: 21px 0 30px;
    font: 600 24px/31px 'FuturaPT', Arial, sans-serif;
    color: #000;
}
.tlk-login__form { display: flex; flex-direction: column; }
.tlk-login__field { display: block; margin-bottom: 20px; }
.tlk-login__label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
    color: #000;
}
.tlk-login__input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 10px;
    border: 0;
    border-bottom: 1px solid #d9d9d9;
    border-radius: 0;
    background: transparent;
    font: 400 16px Montserrat, Arial, sans-serif;
    color: #000;
    outline: none;
    transition: border-color .2s;
}
.tlk-login__input::placeholder { color: #ccc; }
.tlk-login__input:focus { border-bottom-color: #0093d5; }
.tlk-login__password { position: relative; display: block; }
.tlk-login__password .tlk-login__input { padding-right: 40px; }
.tlk-login__eye {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    color: #b4b8bd;
    transform: translateY(-50%);
    cursor: pointer;
}
.tlk-login__eye svg { display: block; width: 100%; height: 100%; }
.tlk-login__eye.is-open .tlk-login__eye-slash { display: none; }
.tlk-login__error {
    margin: -4px 0 16px;
    font-size: 14px;
    line-height: 20px;
    color: #e2252c;
}
.tlk-login__submit {
    align-self: flex-start;
    width: 147px;
    height: 40px;
    margin-top: 13px;
    padding: 0;
    border: 0;
    border-radius: 50px;
    background: #0093d5;
    font: 400 14px Montserrat, Arial, sans-serif;
    color: #fff;
    cursor: pointer;
    transition: background-color .2s;
}
.tlk-login__submit:hover { background: #007db5; }
.tlk-login__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 37px;
}
.tlk-login__link {
    font-size: 14px;
    line-height: 20px;
    color: #0093d5;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 147, 213, .4);
    opacity: .6;
    transition: opacity .2s;
}
.tlk-login__link:hover { opacity: 1; }
.tlk-login__photo {
    flex: 1 1 auto;
    margin-left: -8px;
    background: #f1f1f1 url('https://static.tildacdn.com/tild6562-3839-4339-b338-633032376363/-59_1.jpg') center / cover no-repeat;
}

@media (max-width: 959px) {
    .tlk-login__side { flex: 1 1 auto; }
    .tlk-login__photo { display: none; }
}
@media (max-width: 639px) {
    .tlk-login__box { width: 325px; }
    .tlk-login__links { flex-direction: column; align-items: flex-start; }
}
