/* Стили для страницы курса */
.page-intro {
    padding: 60px 0 40px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    color: #555;
}

.course-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 100px;
    align-items: start;
}

.info-block h3 {
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
}

.features-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 12px;
}

.features-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #ccc;
}

.cta-block {
    background: #000;
    color: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.btn-primary {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #f0f0f0;
}

/* Навигация по подкатегориям */
.sub-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.sub-nav__link {
    display: inline-block;
    padding: 12px 24px;
    background: #f4f4f4;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sub-nav__link:hover {
    background: #000;
    color: #fff;
}

/* Специфика контента страницы */
.page-intro {
    padding: 40px 0 30px;
}

.back-link {
    display: block;
    margin-bottom: 15px;
    color: #888;
    text-decoration: none;
}

.course-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.cta-block {
    background: #1a1a1a;
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.contact-item {
    margin-bottom: 40px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.social-link {
    text-decoration: underline;
    color: #555;
    font-size: 1rem;
    transition: color 0.2s;
}

.social-link:hover {
    color: #000;
}

.contact-text {
    text-decoration: none;
    color: #555;
    font-size: 1.1rem;
}

/* Стили формы */
.contacts-form-container {
    background: #fcfcfc;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #eee;
}

.contacts-form-container h3 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1a1a1a;
}

.faq-section {
    max-width: 900px;
    margin: 0 auto 80px;
}

.faq-category {
    margin-bottom: 50px;
}

.faq-category__title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.faq-item {
    border-bottom: 1px solid #f0f0f0;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    color: #1a1a1a;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #666;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-answer p {
    padding-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

/* Класс для активного состояния (будет добавляться через JS) */
.faq-item.active .faq-answer {
    max-height: 300px;
    /* Достаточно для текста */
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    /* Плюс превращается в крестик */
}


.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.payment-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 30px;
    transition: box-shadow 0.3s ease;
}

.payment-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.payment-card__header h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #1a1a1a;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.payment-list {
    list-style: none;
    padding: 0;
}

.payment-list li {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #555;
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

.payment-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: bold;
}

.payment-notice {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #1a1a1a;
    margin-bottom: 80px;
}

.payment-notice p {
    font-size: 0.95rem;
    color: #333;
    margin: 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 60px auto 100px;
    padding-left: 40px;
    /* Место для линии */
}

/* Вертикальная линия */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #eee;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

/* Точка на линии */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 3px solid #fff;
    z-index: 2;
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

.founder-minimal {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 100px;
    padding: 40px;
    border-top: 1px solid #eee;
}

.founder-minimal h2 {
    margin-bottom: 20px;
}

.founder-minimal p {
    font-style: italic;
    font-size: 1.2rem;
    color: #555;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto 100px;
    line-height: 1.8;
    color: #444;
}

.legal-item {
    margin-bottom: 50px;
}

.legal-item h2 {
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: 700;
}

.legal-item p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.legal-list {
    padding-left: 20px;
    margin-bottom: 20px;
}

.legal-list li {
    margin-bottom: 10px;
    position: relative;
    list-style: disc;
}

.legal-item a {
    color: #1a1a1a;
    text-decoration: underline;
}


/* Иконки в карточках библиотеки */
.card-icon {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #1a1a1a;
}

/* Список тем */
.lib-category {
    margin-bottom: 40px;
}

.lib-category__title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #1a1a1a;
}

.topics-list {
    list-style: none;
}

.topics-list li {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.topics-list li a {
    text-decoration: none;
    color: #555;
    transition: color 0.2s;
}

.topics-list li a:hover {
    color: #000;
    padding-left: 5px;
}

/* Стили словаря */
.dict-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fcfcfc;
}

.dict-table th,
.dict-table td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.dict-table th {
    background: #1a1a1a;
    color: #fff;
    font-weight: 500;
}

.dict-table tr:hover {
    background: #f5f5f5;
}

/* Стили для статей библиотеки */
.topic-article {
    max-width: 800px;
    margin: 40px auto 80px;
}

.topic-breadcrumb {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.topic-breadcrumb a {
    color: #888;
    text-decoration: none;
}

.topic-breadcrumb a:hover {
    color: #1a1a1a;
}

.topic-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.topic-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.topic-meta {
    font-size: 0.85rem;
    color: #999;
}

.topic-lead {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Выделенные блоки */
.info-block--accent {
    background: #f9f9f9;
    padding: 30px;
    border-left: 4px solid #1a1a1a;
    border-radius: 0 8px 8px 0;
    margin: 30px 0;
}

.formula {
    font-family: "Courier New", Courier, monospace;
    font-size: 1.8rem;
    text-align: center;
    margin-top: 20px;
    font-weight: 700;
}

.example-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.dict-mini {
    list-style: none;
    padding: 0;
}

.dict-mini li {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.btn-secondary {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #1a1a1a;
    color: #fff;
}

#topicSearch {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.topics-list li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.topics-list li:hover {
    background: #f9f9f9;
    padding-left: 25px;
}

.back-link {
    cursor: pointer;
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: underline;
}

/* Увеличиваем размер формул MathJax */
.mjx-chtml {
    font-size: 115% !important;
}

/* Добавляем отступ блочным формулам */
mjx-container[display="true"] {
    margin: 6px 0 !important;
}



.card-status {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.training-list {
    display: grid;
    gap: 15px;
    margin-bottom: 80px;
}

.training-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.training-item:hover {
    border-color: #1a1a1a;
    transform: translateX(5px);
}

.item-name {
    font-weight: 500;
    font-size: 1.1rem;
}

.item-action {
    color: #888;
    font-size: 0.9rem;
}

#trainSearch {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0 30px;
}



.task-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.question-text {
    font-size: 1.4rem;
    margin-bottom: 30px;
}

/* Варианты ответов */
.options-list {
    display: grid;
    gap: 6px;
    list-style: none;
    padding: 0;
}

.option-btn {
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    background: none;
    width: 100%;
    font-size: 1rem;
}

.option-btn:hover {
    border-color: #1a1a1a;
}

.option-btn.correct {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
    animation: bounce 0.5s;
}

.option-btn.wrong {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
    animation: shake 0.4s;
}

/* Подсказка */
.hint-box {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #fffde7;
    border-left: 4px solid #fbc02d;
    border-radius: 4px;
}

.hint-box.active {
    display: block;
}

/* Анимации */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn-check {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.btn-skip {
    margin-top: 10px;
    width: 100%;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
}


/* Стиль для выбранного, но еще не проверенного ответа */
.option-btn.selected.active-choice {
    border-color: #1a1a1a;
    background-color: #f0f0f0;
    font-weight: 600;
}


.task-nav {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.task-footer-btns {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-secondary {
    flex: 1;
    background: none;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    background: #f9f9f9;
}

.task-controls {
    margin-top: 12px;
}

/* Убираем фокусную рамку с формул MathJax */
mjx-container:focus,
.mjx-chtml:focus,
mjx-container [tabindex]:focus {
    outline: none !important;
}

/* Делаем формулы "некликабельными", чтобы они не перехватывали клик у кнопок */
mjx-container {
    pointer-events: none;
}

/* Возвращаем клики самой кнопке, чтобы выбор ответа работал */
.option-btn {
    pointer-events: auto;
}

.task-image-container {
    text-align: center;
    margin: 20px 0;
}

.task-img {
    max-width: 100%;
    /* Не шире контейнера */
    height: auto;
    /* Сохраняем пропорции */
    border-radius: 8px;
    /* Смягчаем углы для минимализма */
    border: 1px solid #eee;
    /* Легкая рамка */
    display: inline-block;
}




















/* Адаптивность для курса */
@media (max-width: 900px) {
    .course-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .contacts-form-container {
        padding: 30px 20px;
    }
}

@media (max-width: 800px) {
    .course-content {
        grid-template-columns: 1fr;
    }

    .sub-nav {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    mjx-container {
        font-size: 16px !important;
    }

    .legal-content {
        padding: 0 10px;
    }

    .legal-item h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .timeline {
        padding-left: 30px;
    }

    .timeline-item::before {
        left: -34px;
    }

    .task-img {
        width: 100%;
    }
}