/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ТРЕНАЖЕРА (3D-построение сечений)
   ============================================================ */

/* ---- ОБЩИЕ БЛОКИ ---- */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 40px;
}

/* ---- БЛОК 1: ВСТУПЛЕНИЕ ---- */
.intro-block {
    padding: 20px 0 20px;
    text-align: center;
}

.intro-block h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.intro-block .intro-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- БЛОК 2: КАК ЭТО РАБОТАЕТ ---- */
.how-it-works {
    padding: 40px 0 30px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 820px;
    margin: 0 auto 24px;
}

.step-card {
    background: var(--bg-surface);
    padding: 24px 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--btn-primary-text);
    background: var(--btn-primary-bg);
    border-radius: 50%;
    margin-bottom: 12px;
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.tip-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px;
    background: var(--bg-canvas);
    border-radius: 10px;
    justify-content: center;
}

.tip-block i {
    font-size: 1.2rem;
    color: var(--accent-chart);
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-block span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tip-block strong {
    color: var(--text-primary);
}

/* ---- БЛОК 3: ВЫБОР ФИГУРЫ ---- */
.figure-select {
    padding: 40px 0 30px;
}

.figure-select h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.figure-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.figure-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 32px 20px;
    background: var(--bg-base);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    min-width: 180px;
}

.figure-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.figure-card img {
    width: 120px;
    height: auto;
    display: block;
    margin-bottom: 14px;
}

.figure-card span {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ---- БЛОК 4: ПРИМЕРЫ ЗАДАНИЙ ---- */
.examples-block {
    padding: 40px 0 30px;
}

.examples-block h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.examples-desc {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 780px;
    margin: 0 auto;
}

.example-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-base);
}

.example-item:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.example-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- БЛОК 5: PDF-ГИД (МАГНИТ) ---- */
.pdf-block {
    padding: 30px 0;
}

.pdf-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 36px;
    background: var(--bg-canvas);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.pdf-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pdf-content > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.pdf-content strong {
    color: var(--text-primary);
}

.pdf-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pdf-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

.pdf-list li i {
    color: var(--accent-success);
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.btn-primary i {
    font-size: 1.1rem;
}

.pdf-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 14px;
    margin-bottom: 0;
}

/* ---- БЛОК 6: БИБЛИОТЕКА ЗАДАНИЙ ---- */
.library-block {
    padding: 40px 0 30px;
}

.library-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 36px 40px;
    background: var(--bg-base);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.library-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--bg-canvas);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.library-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.library-content > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.library-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.library-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 5px 0;
    line-height: 1.5;
}

.library-list li i {
    color: var(--accent-success);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.library-list li strong {
    color: var(--text-primary);
}

.library-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin-bottom: 14px;
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.price-year {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1rem;
}

.library-cta .btn-primary {
    padding: 12px 32px;
}

.library-note {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* ---- БЛОК 7: CTA (ФИНАЛЬНЫЙ ПРИЗЫВ) ---- */
.cta-block {
    padding: 50px 0 30px;
    text-align: center;
}

.cta-block h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.cta-block p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 992px) {
    .page-wrapper {
        padding: 16px 16px 30px;
    }

    .intro-block h1 {
        font-size: 1.8rem;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .examples-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .intro-block h1 {
        font-size: 1.5rem;
    }

    .intro-block .intro-desc {
        font-size: 1rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .step-card {
        padding: 18px 16px;
    }

    .step-card h3 {
        font-size: 1rem;
    }

    .figure-grid {
        gap: 16px;
    }

    .figure-card {
        min-width: 140px;
        padding: 16px 20px 16px;
    }

    .figure-card img {
        width: 90px;
    }

    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pdf-content {
        padding: 24px 20px;
    }

    .pdf-content h2 {
        font-size: 1.2rem;
    }

    .library-content {
        padding: 24px 18px;
    }

    .library-content h2 {
        font-size: 1.3rem;
    }

    .library-cta {
        flex-direction: column;
        gap: 12px;
    }

    .price {
        font-size: 1.1rem;
    }

    .cta-block h2 {
        font-size: 1.4rem;
    }

    .cta-block p {
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .page-wrapper {
        padding: 12px 12px 24px;
    }

    .intro-block {
        padding: 16px 0 12px;
    }

    .intro-block h1 {
        font-size: 1.25rem;
    }

    .intro-block .intro-desc {
        font-size: 0.9rem;
    }

    .how-it-works {
        padding: 24px 0 16px;
    }

    .how-it-works h2 {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }

    .step-card {
        padding: 14px 12px;
    }

    .step-number {
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 0.95rem;
    }

    .step-card p {
        font-size: 0.85rem;
    }

    .figure-select {
        padding: 24px 0 16px;
    }

    .figure-select h2 {
        font-size: 1.2rem;
    }

    .figure-card {
        min-width: 120px;
        padding: 12px 14px 12px;
    }

    .figure-card img {
        width: 70px;
    }

    .figure-card span {
        font-size: 0.9rem;
    }

    .examples-block {
        padding: 24px 0 16px;
    }

    .examples-block h2 {
        font-size: 1.2rem;
    }

    .examples-desc {
        font-size: 0.9rem;
    }

    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pdf-block {
        padding: 16px 0;
    }

    .pdf-content {
        padding: 18px 14px;
    }

    .pdf-content h2 {
        font-size: 1.05rem;
    }

    .pdf-content > p {
        font-size: 0.9rem;
    }

    .pdf-list li {
        font-size: 0.85rem;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .library-block {
        padding: 24px 0 16px;
    }

    .library-content {
        padding: 18px 14px;
    }

    .library-content h2 {
        font-size: 1.15rem;
    }

    .library-content > p {
        font-size: 0.9rem;
    }

    .library-list li {
        font-size: 0.85rem;
    }

    .price {
        font-size: 1rem;
    }

    .price-year {
        font-size: 0.9rem;
    }

    .library-cta .btn-primary {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .library-note {
        font-size: 0.75rem;
    }

    .cta-block {
        padding: 28px 0 16px;
    }

    .cta-block h2 {
        font-size: 1.2rem;
    }

    .cta-block p {
        font-size: 0.85rem;
    }

    .btn-large {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* ---- Статусы карточек фигур: бесплатно / по подписке ---- */
.figure-card {
    position: relative;
}

.figure-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
    display: none;
}

.figure-badge-free {
    background: var(--accent-green);
    color: #ffffff;
    display: none!important;
}

.figure-badge-lock {
    background: var(--accent-chart);
    color: #ffffff;
}

.figure-card.is-locked {
    cursor: default;
}

.figure-card.is-locked:hover {
    border-color: var(--border-light);
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.figure-card.is-locked img {
    -webkit-filter: blur(1px) saturate(0.75);
    filter: blur(1px) saturate(0.75);
    opacity: 0.85;
}

.figure-lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg-base);
    color: var(--text-secondary);
    font-size: 1.2rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
    z-index: 3;
}

/* ---- Карточки 2D-тренажёров ---- */
.example-trainer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 14px 10px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
}

.example-trainer:hover {
    border-color: var(--border-focus);
    -webkit-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    transform: translateY(-3px);
    -webkit-box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.example-trainer img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 10px;
}

.example-trainer span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.4;
}

/* ===== ВРЕМЕННО СКРЫТ БЛОК «Для подготовки к самостоятельным и контрольной» =====
   Скрывает блок библиотеки заданий (20+ задач) на странице /math/constructor/.
   Разметка сохранена в math/constructor/index.html — для возврата удалить это правило. */
.library-block {
    display: none !important;
}