/* ===== Командный марафон России — публичный лендинг ===== */

.tm-public-page {
    --tm-cream: #F5F3F1;
}

/* Плашка «закрыто на сайте» (видна только админу/модератору) */
.tm-public__closed-notice {
    margin: 16px 0;
    padding: 12px 16px;
    background: #FFF6E5;
    border: 1px solid #F2D998;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tm-public__closed-label { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #8C6300; font-size: 13px; }
.tm-public__closed-msg { color: #5C5851; font-size: 13px; }

.tm-section__title {
    text-transform: uppercase;
    margin: 0 0 36px;
    color: var(--darkBlue);
}
.tm-section__title--light { color: var(--white); }
.tm-stages__title {
    font-size: clamp(32px, 4vw, 40px);
}

/* ---------- HERO ---------- */
.tm-hero {
    background: var(--darkBlue);
    margin-top: 24px;
    color: var(--white);
}
.tm-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    min-height: 420px;
    position: relative;
    overflow: hidden;
    align-items: stretch;
    padding-right: 0;
}
.tm-hero__content {
    z-index: 2;
    padding: 50px 0 47px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tm-hero__title {
    color: var(--white);
    text-align: left;
    font-size: clamp(32px, 4vw, 40px);
    margin: 0;
 }
.tm-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px 6px 8px;
    background: rgba(118, 154, 201, 0.1);
    backdrop-filter: blur(200px);
    border-radius: 31px;
    color: var(--white);
    font-size: 12px;
    letter-spacing: 5%;
    text-transform: uppercase;
}
.tm-hero__lead { display: flex; flex-direction: column; gap: 8px; }
.tm-hero__lead p {
    margin: 0;
    line-height: 130%;
    font-size: clamp(16px, 1.5vw, 18px);
}
.tm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 22px;
}
.tm-hero__cta {
    display: inline-block;
    background: var(--lightBlue);
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background-color 0.15s ease;
}
.tm-hero__cta:hover { opacity: 0.88; }
.tm-hero__secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    border-radius: 10px;
    border: 1px solid var(--white);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.tm-hero__secondary:hover { background: var(--white); color: var(--darkBlue); }
.tm-hero__secondary:hover svg path { stroke: var(--darkBlue); }

.tm-hero__media { position: relative; overflow: hidden; }
.tm-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tm-hero__decor {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 0px;
    bottom: 0px;
    height: 100%;
    width: auto;
    pointer-events: none;
    transform: rotateY(180deg);
}
.tm-hero__decor_mobile {
    display: none;
}

/* ---------- КАК РАБОТАЕТ ---------- */
.tm-how { padding: 48px 0; }
.tm-how__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.tm-step {
    background: #769AC91A;
    border-radius: 24px;
    padding: clamp(16px, 2vw, 24px);
    color: var(--darkBlue);
    line-height: 130%;
}
.tm-step__icon {
    width: clamp(50px, 5vw, 64px);
    height: clamp(50px, 5vw, 64px);
    border-radius: 8px;
    background-color: #769AC9;
    display: grid;
    place-items: center;
    color: var(--white);
    margin-bottom: 39px;
}
.tm-step__text { display: flex; flex-direction: column; gap: 10px; }
.tm-step__num {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 5%;
}
.tm-step__title {
    font-size: clamp(20px, 2vw, 24px);
    letter-spacing: 0.0175em;
    font-weight: 600;
}
.tm-step__desc {
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.5;
}

/* Кто может принять участие */
.tm-who {
    margin-top: 48px;
    background: var(--darkBlue);
    color: var(--white);
    border-radius: 24px;
    padding: clamp(16px, 2vw, 24px);
}
.tm-who__title {
    font-weight: 600;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 130%;
    margin-bottom: 16px;
}
.tm-who__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tm-who__list li {
    position: relative;
    padding-left: 12px;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}
.tm-who__list li::before {
    content: '';
    position: absolute;
    left: 0px;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--lightBlue);
}

/* ---------- ЭТАПЫ (таймлайн) ---------- */
.tm-stages { background: var(--darkBlue); padding: 48px 0; }
.tm-timeline { position: relative; max-width: 890px; margin: 0 auto; padding: 8px 0; }
.tm-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--lightBlue);
    transform: translateX(-50%);
}
.tm-timeline__row { position: relative; display: flex; padding: 14px 0; min-height: 96px; color: var(--white);}
.tm-timeline__row--left { justify-content: flex-start; }
.tm-timeline__row--right { justify-content: flex-end; }
.tm-timeline__cell { width: 48%; }
.tm-timeline__row--left .tm-timeline__cell { padding-right: 16px; text-align: right; }
.tm-timeline__row--right .tm-timeline__cell { padding-left: 16px; text-align: left; }
.tm-timeline__dot {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--lightBlue);
    transform: translateX(-50%);
}
.tm-timeline__date { display: block; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--lightBlue); margin-bottom: clamp(5px, 1vw, 13px); }
.tm-timeline__title {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    letter-spacing: 2%;
    margin-bottom: 6px;
}
.tm-timeline__desc {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}

/* ---------- ТОП-10 ТАБЛИЦА ---------- */
.tm-rating { padding: 48px 0; }
.tm-table__wrap { border: 1px solid #795F521A; border-radius: 16px; overflow: auto; }
.tm-table { width: 100%; border-collapse: collapse; color: var(--darkBlue);}
.tm-table th, .tm-table td {
    text-align: left;
    padding: 16px;
    font-size: 16px;
    line-height: 24px;
    border-right: 1px solid rgba(121, 95, 82, 0.1);
    border-bottom: 1px solid rgba(121, 95, 82, 0.1);
    vertical-align: middle;
}
.tm-table th { font-weight: 600; background: #795F521A; text-transform: none; }
.tm-table th:last-child, .tm-table td:last-child { border-right: none; }
.tm-table tbody tr:last-child td { border-bottom: none; }
.tm-table tr.is-winner td { background: rgba(232, 178, 58, 0.12); font-weight: 500; }
.tm-table__crown { margin-right: 6px; }
.tm-table__empty { text-align: center; color: #8A8A8A; }
.tm-medals { display: inline-flex; align-items: center; }
.tm-medal { display: inline-flex; margin-right: -8px; }
.tm-medal:last-child { margin-right: 0; }
.tm-medals__empty { color: #B9B4AD; }

/* ---------- FAQ ---------- */
.tm-faq { padding-top: 48px; }
.tm-faq__title {
    text-align: left;
    margin-bottom: 31px;
}
.tm-faq__layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 36px;
    align-items: start;
}
.tm-faq__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.tm-faq__item { border-bottom: 1px solid rgba(33, 33, 45, 0.1); padding-bottom: 16px; }
.tm-faq__row {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    text-align: left;
}
.tm-faq__q { font-size: clamp(18px, 2vw, 24px); font-weight: 500; line-height: 1.3; color: var(--darkBlue); }
.tm-faq__chevron { flex-shrink: 0; transition: transform 0.2s ease; }
.tm-faq__item.is-open .tm-faq__chevron { transform: rotate(180deg); }
.tm-faq__answer { margin-top: 8px; }
.tm-faq__answer p { margin: 0; font-size: 18px; line-height: 1.3; color: var(--darkBlue); }

.tm-faq__cta {

    background: var(--darkBlue);
    color: var(--white);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
}
.tm-faq__cta-title { margin: 0; font-size: clamp(18px, 2vw, 24px); font-weight: 500; line-height: 1.3; }
.tm-faq__cta-text { margin: 0; font-size: clamp(14px, 1.5vw, 18px); line-height: 1.3; }
.tm-faq__cta-btn {
    width: 100%;
    padding: 9px 22px;
    background: var(--lightBlue);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 0.08px;
    text-transform: uppercase;
    line-height: 24px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.tm-faq__cta-btn:hover { opacity: 0.88; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .tm-hero__inner {
        display: flex;
        flex-direction: column-reverse;
        padding: 0;
    }
    .tm-hero__content {
        padding: 30px clamp(1rem, 4vw, 3rem) 50px;
    }
    .tm-hero__media {
        height: 429px;
    }
    .tm-hero__decor {
        display: none;
    }
    .tm-how__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .tm-faq__layout { grid-template-columns: 1fr; }
    .tm-faq__main { padding-right: 0; }
}
@media (max-width: 720px) {
    /* Таймлайн в одну колонку слева */
    .tm-timeline::before { left: 5px; }
    .tm-timeline__row, .tm-timeline__row--left, .tm-timeline__row--right { justify-content: flex-start; }
    .tm-timeline__cell, .tm-timeline__row--left .tm-timeline__cell, .tm-timeline__row--right .tm-timeline__cell {
        width: 100%;
        padding-left: 28px;
        padding-right: 0;
        text-align: left;
    }
    .tm-timeline__dot { left: 5px; }
    .tm-table th, .tm-table td { padding: 10px; font-size: 14px; }
}

@media (max-width: 576px) {
    .tm-hero__decor_mobile {
        display: block;
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        object-fit: cover;
        transform: rotateY(180deg);
    }
    .tm-hero__cta,
    .tm-hero__secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .tm-how__grid { grid-template-columns: 1fr; }
    .tm-stages__title {
        text-align: start;
    }
}
