/* ============================================ */
/* КОНСТРУКТОР ДПО — СТИЛИ (ФИНАЛЬНАЯ ВЕРСИЯ)   */
/* MBA-центр ВШЭУ ЮУрГУ                         */
/* ============================================ */

:root {
    --blue: #356df1;
    --dark: #0f131f;
    --text: #35415b;
    --grey: #727f9f;
    --bg: #f2f4f7;
    --border: #e3e7f0;
    --white: #fff;
    --green: #27ae60;
    --red: #e74c3c;
    --radius: 8px;
}

/* ---------- БАЗОВЫЕ СБРОСЫ ДЛЯ СТРАНИЦЫ ---------- */
.page-id-1038,
.page-id-1038 body {
    overflow-x: hidden;
}

.page-id-1038 .l-section,
.page-id-1038 .l-section-h,
.page-id-1038 .l-section-h.i-cf,
.page-id-1038 .wpb-content-wrapper,
.page-id-1038 .l-main,
.page-id-1038 article,
.page-id-1038 .l-canvas,
.page-id-1038 .l-content,
.page-id-1038 .upb_row_bg,
.page-id-1038 .vc_row,
.page-id-1038 .wpb_row,
.page-id-1038 .g-cols,
.page-id-1038 .vc_column_container,
.page-id-1038 .wpb_column,
.page-id-1038 .vc_column-inner {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ---------- КНОПКИ ПЕРЕКЛЮЧЕНИЯ ---------- */
.mode-switch {
    text-align: center;
    margin: 0 0 30px 0;
    padding: 0 20px;
}

.mode-btn {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 0.8em 2.5em;
    border-radius: 0.3em;
    background: var(--blue);
    border: 2px solid var(--blue);
    color: #fff;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s;
}

.mode-btn.active {
    background: #fff !important;
    color: var(--blue) !important;
}

.mode-btn:hover {
    background: #e8f0ff !important;
    color: var(--blue) !important;
}

/* ---------- ИНФОРМАЦИОННЫЙ БАННЕР ---------- */
.info-banner {
    max-width: 1300px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
    font-family: Inter, sans-serif;
    box-sizing: border-box;
}

.info-banner-hero {
    background: #356df1;
    border-radius: 12px;
    padding: 40px 50px;
    color: #fff;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.info-banner-hero h2 {
    font-family: Roboto, sans-serif;
    font-size: 28px;
    margin: 0 0 12px 0;
    color: #fff;
}

.info-banner-hero p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
    line-height: 1.6;
}

.info-banner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.info-banner-card {
    background: #fff;
    border: 1px solid #e3e7f0;
    border-radius: 10px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.info-banner-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.info-banner-icon i {
    color: #356df1;
}

.info-banner-card h4 {
    font-family: Roboto, sans-serif;
    font-size: 19px;
    color: #0f131f;
    margin: 0 0 10px 0;
}

.info-banner-card p {
    font-size: 14px;
    color: #35415b;
    margin: 0 0 15px 0;
    line-height: 1.6;
    flex: 1;
}

.info-banner-link {
    color: #356df1;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.info-banner-link:hover {
    text-decoration: underline;
}

/* ---------- НАДПИСЬ НАД КОНСТРУКТОРОМ ---------- */
.constructor-intro {
    max-width: 1300px;
    margin: 0 auto 25px auto;
    text-align: center;
    font-family: Inter, sans-serif;
    padding: 0 20px;
    box-sizing: border-box;
}

.constructor-intro-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f131f;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.constructor-intro-subtitle {
    font-size: 14px;
    color: #727f9f;
    margin: 0;
    line-height: 1.6;
}

/* ---------- ОСНОВНОЙ КОНТЕЙНЕР ---------- */
#mainApp {
    display: flex;
    gap: 25px;
    max-width: 1300px;
    margin: 0 auto !important;
    font-family: Inter, sans-serif;
    padding: 0 20px 100px 20px !important;
    box-sizing: border-box;
}

/* ---------- ПАНЕЛЬ ФИЛЬТРОВ ---------- */
#filterPanel {
    width: 260px;
    flex-shrink: 0;
    background: #e3e7f0;
    border-radius: var(--radius);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

#filterPanel h3 {
    color: var(--dark);
    margin: 0 0 15px 0;
    font-size: 16px;
    font-family: Roboto, sans-serif;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: Inter, sans-serif;
    background: var(--white);
    color: var(--text);
    box-sizing: border-box;
}

#resetFiltersBtn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--blue);
    color: var(--blue);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

#resetFiltersBtn:hover {
    background: var(--blue);
    color: #fff;
}

/* ---------- БЛОК СТОИМОСТИ ---------- */
.price-block {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.price-toggle-btn {
    width: 100%;
    padding: 10px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    font-family: Inter, sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(53, 109, 241, 0.25);
    box-sizing: border-box;
}

.price-toggle-btn:hover {
    background: #2b5cd1;
}

.price-btn-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.price-toggle-btn.open .price-btn-arrow {
    transform: rotate(180deg);
}

.price-progress {
    margin-top: 12px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-label {
    font-size: 11px;
    color: var(--grey);
    margin-top: 5px;
    text-align: center;
}

.price-table-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, margin-top 0.35s ease, opacity 0.25s ease;
    opacity: 0;
    margin-top: 0;
}

.price-table-hidden.open {
    max-height: 250px;
    opacity: 1;
    margin-top: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    color: var(--grey);
    border-bottom: 1px dotted var(--border);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.highlight {
    color: var(--blue);
    font-weight: 700;
}

/* ---------- БЛОК СРАВНЕНИЯ ---------- */
.compare-block {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #d5dbe6;
}

.compare-open-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #356df1;
    color: #356df1;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: Inter, sans-serif;
    transition: all 0.2s;
    box-sizing: border-box;
}

.compare-open-btn:hover {
    background: #e8f0ff;
}

.compare-mini-panel {
    display: none;
    margin-top: 10px;
}

.compare-mini-panel.open {
    display: block;
}

.compare-mini-hint {
    font-size: 11px;
    color: #727f9f;
    margin: 0 0 8px 0;
}

.compare-mini-slot {
    background: #fff;
    border: 2px dashed #d5dbe6;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #727f9f;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.compare-mini-slot.active {
    border-color: #356df1;
    background: #e8f0ff;
}

.compare-mini-slot.filled {
    border-style: solid;
    border-color: #356df1;
    background: #e8f0ff;
    color: #356df1;
    font-weight: 600;
}

.compare-mini-slot:hover {
    border-color: #356df1;
}

#compareMiniBtn {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: #356df1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    font-family: Inter, sans-serif;
    transition: all 0.2s;
}

#compareMiniBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#compareMiniBtn:not(:disabled):hover {
    background: #2b5cd1;
}

/* ---------- ОБЛАСТЬ КОНТЕНТА ---------- */
#contentArea {
    flex: 1;
    min-width: 0;
}

/* ---------- КОНСТРУКТОР МОДУЛЕЙ ---------- */
#constructorContainer {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
    overflow: hidden;
}

/* ---------- КАТАЛОГ ПРОГРАММ ---------- */
#catalogContainer {
    display: none;
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 5px;
}

#catalogContainer.active {
    display: block;
}

#catalogContainer::-webkit-scrollbar {
    width: 5px;
}

#catalogContainer::-webkit-scrollbar-track {
    background: transparent;
}

#catalogContainer::-webkit-scrollbar-thumb {
    background: #d5dbe6;
    border-radius: 10px;
}

/* ---------- СЕТКА МОДУЛЕЙ ---------- */
#moduleGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    padding-bottom: 30px;
    align-content: start;
}

#moduleGrid::-webkit-scrollbar {
    width: 5px;
}

#moduleGrid::-webkit-scrollbar-track {
    background: transparent;
}

#moduleGrid::-webkit-scrollbar-thumb {
    background: #d5dbe6;
    border-radius: 10px;
}

/* Кнопки «Показать ещё» / «Свернуть» */
.show-more-btn {
    font-family: Inter, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 0.7em 2em;
    border-radius: 0.3em;
    background: #356df1;
    border: 2px solid #356df1;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.show-more-btn:hover {
    background: #e8f0ff;
    color: #356df1;
}

/* ---------- КАРТОЧКА МОДУЛЯ ---------- */
.module-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.module-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-0.01px);
    border-color: var(--blue);
}

.module-card.selected {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(53, 109, 241, 0.2);
}

.module-card .module-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--blue);
    font-weight: 700;
    margin-bottom: 8px;
}

.module-card .module-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.3;
    flex: 1;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.module-card .module-name:hover {
    color: var(--blue);
    text-decoration: underline;
}

.module-card .module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.module-card .meta-tag {
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--text);
}

.module-card .meta-tag.start-date-tag {
    background: #e8f0ff;
    color: var(--blue);
    font-weight: 600;
}

.module-card .module-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    gap: 8px;
}

.module-card .module-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

.module-card .module-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.module-card .module-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: Inter, sans-serif;
    line-height: 1.3;
}

.module-card .module-btn.compare {
    background: #fff;
    color: var(--blue);
    border: 1px solid var(--blue);
}

.module-card .module-btn.compare:hover {
    background: #e8f0ff;
}

.module-card .module-btn.add {
    background: var(--blue);
    color: #fff;
}

.module-card .module-btn.add:hover {
    background: #2b5cd1;
}

.module-card .module-btn.added {
    background: #e8f0ff;
    color: var(--blue);
    border: 1px solid var(--blue);
}

/* ---------- КНОПКА «НАВЕРХ» ---------- */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 99;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #356df1;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(53, 109, 241, 0.3);
    transition: all 0.3s;
}

#scrollToTopBtn:hover {
    background: #2b5cd1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(53, 109, 241, 0.4);
}

/* ---------- КАРТОЧКИ ПРОГРАММ ---------- */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.program-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-sizing: border-box;
}

.program-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.program-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px 0;
    font-family: Roboto, sans-serif;
}

.program-desc {
    font-size: 13px;
    color: var(--grey);
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.program-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.program-meta-item {
    font-size: 12px;
    color: var(--text);
    background: var(--bg);
    padding: 5px 10px;
    border-radius: 6px;
}

.program-meta-item.start-date-tag {
    background: #e8f0ff;
    color: var(--blue);
    font-weight: 600;
}

.program-modules {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 12px;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 15px;
    flex: 1;
}

.program-modules strong {
    color: var(--dark);
    font-size: 13px;
}

.program-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.program-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.program-btn {
    padding: 10px 22px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.program-btn:hover {
    background: #2b5cd1;
}

/* ---------- КОРЗИНА ---------- */
#cartBar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: none;
    width: 90%;
    max-width: 850px;
}

#cartBar.visible {
    display: block;
    animation: slideUp 0.3s ease;
}

/* ---------- ПРЕДУПРЕЖДЕНИЕ О СКИДКАХ (шапка корзины) ---------- */
.cart-warning {
    background: #e74c3c;
    border: 3px solid #c0392b;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    padding: 14px 20px;
    margin-bottom: 0;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(231, 76, 60, 0.35);
    animation: warningPulse 2s ease-in-out infinite;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

@keyframes warningPulse {
    0%, 100% {
        box-shadow: 0 -4px 20px rgba(231, 76, 60, 0.35);
    }
    50% {
        box-shadow: 0 -4px 30px rgba(231, 76, 60, 0.7);
    }
}

#cartBar .cart-inner {
    background: #f0f2f7;
    border: 1px solid #d5dbe6;
    border-radius: 0 0 12px 12px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 35px rgba(15, 19, 31, 0.15);
    position: relative;
    z-index: 2;
}

.cart-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 0;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: var(--text);
    min-width: 130px;
}

.cart-toggle-btn:hover {
    color: var(--blue);
}

.cart-toggle-arrow {
    display: inline-block;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.cart-toggle-btn.open .cart-toggle-arrow {
    transform: rotate(180deg);
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    flex: 1;
    justify-content: center;
}

.cart-divider {
    color: #c5cdd8;
}

.cart-price-main {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.cart-discount-badge {
    background: #dce6fa;
    color: var(--blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cart-actions {
    display: flex;
    gap: 8px;
}

.cart-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
}

.cart-btn-clear {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--grey);
}

.cart-btn-clear:hover {
    background: var(--bg);
    color: var(--text);
}

.cart-btn-order {
    background: var(--blue);
    color: #fff;
}

.cart-btn-order:hover {
    background: #2b5cd1;
}

/* Выпадающий список корзины */
.cart-module-dropdown {
    display: block;
    background: #fff;
    border: 1px solid #d5dbe6;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, margin-bottom 0.35s ease, opacity 0.25s ease;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 38%;
    margin-bottom: 0;
    box-shadow: 0 -4px 20px rgba(15, 19, 31, 0.06);
    z-index: 1;
}

.cart-module-dropdown.open {
    max-height: 220px;
    opacity: 1;
    margin-bottom: 8px;
    overflow-y: auto;
}

.cart-module-dropdown .cart-module-item {
    padding: 10px 18px;
    border-bottom: 1px solid #f0f2f7;
    font-size: 13px;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-module-dropdown .cart-module-item:last-child {
    border-bottom: none;
}

.cart-module-dropdown .cart-module-item .remove-item {
    color: var(--grey);
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.cart-module-dropdown .cart-module-item .remove-item:hover {
    color: var(--red);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ---------- МОДАЛЬНЫЕ ОКНА ---------- */
#compareModal,
#orderModal,
#programModal,
#moduleModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 19, 31, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#programModal,
#moduleModal {
    background: rgba(15, 19, 31, 0);
    transition: background 0.3s ease;
}

#programModal.active,
#moduleModal.active {
    background: rgba(15, 19, 31, 0.7);
}

#compareModal.active,
#orderModal.active {
    display: flex;
}

#compareModalContent,
#orderModalContent {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

#programModalContent,
#moduleModalContent {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 800px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#programModal.active #programModalContent,
#moduleModal.active #moduleModalContent {
    transform: scale(1) translateY(0);
    opacity: 1;
}

#closeCompareModalBtn,
#closeModalBtn,
#closeProgramModalBtn,
#closeModuleModalBtn {
    position: absolute;
    top: 12px;
    right: 15px;
    background: var(--bg);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--grey);
    z-index: 1;
}

#closeProgramModalBtn,
#closeModuleModalBtn {
    top: 15px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.modal-subtitle {
    font-size: 13px;
    color: var(--grey);
    margin: 0 0 20px 0;
}

/* ---------- ДЕТАЛИ ПРОГРАММЫ ---------- */
.program-detail-header {
    background: var(--dark);
    color: #fff;
    padding: 30px;
    border-radius: 12px 12px 0 0;
}

.program-detail-header .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.program-detail-header h2 {
    margin: 0 0 8px 0;
    font-family: Roboto, sans-serif;
    font-size: 22px;
    color: #fff;
}

.program-detail-header .subtitle {
    font-size: 13px;
    opacity: 0.7;
}

.program-detail-body {
    padding: 30px;
}

.program-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.program-detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.program-detail-meta .meta-item strong {
    color: var(--dark);
}

.program-detail-modules {
    background: var(--bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.program-detail-modules h4 {
    margin: 0 0 15px 0;
    color: var(--dark);
}

.program-detail-modules ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 30px;
}

.program-detail-modules ul li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px dotted var(--border);
    break-inside: avoid;
}

.program-detail-modules ul li::before {
    content: '✓ ';
    color: var(--blue);
    font-weight: bold;
}

.program-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.program-detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
}

.program-detail-btn {
    padding: 12px 28px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.program-detail-btn:hover {
    background: #2b5cd1;
}

/* ---------- ДЕТАЛИ МОДУЛЯ ---------- */
.module-detail-header {
    background: var(--blue);
    color: #fff;
    padding: 30px;
    border-radius: 12px 12px 0 0;
}

.module-detail-header .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.module-detail-header h2 {
    margin: 0;
    font-family: Roboto, sans-serif;
    font-size: 22px;
    color: #fff;
    line-height: 1.3;
}

.module-detail-body {
    padding: 30px;
}

.module-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.module-detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.module-detail-meta .meta-item strong {
    color: var(--dark);
}

.module-detail-block {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.module-detail-block:last-child {
    border-bottom: none;
}

.module-detail-block h4 {
    margin: 0 0 10px 0;
    color: var(--dark);
    font-family: Roboto, sans-serif;
    font-size: 15px;
}

.module-detail-block p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}

.module-detail-plan {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.module-detail-plan span {
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    padding: 8px 14px;
    border-radius: 6px;
}

.module-detail-plan strong {
    color: var(--dark);
}

.module-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--border);
    padding-top: 20px;
    margin-top: 25px;
}

.module-detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
}

.module-detail-btn {
    padding: 12px 28px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
}

.module-detail-btn:hover {
    background: #2b5cd1;
}

/* ---------- ТАБЛИЦА СРАВНЕНИЯ ---------- */
#compareModalContent h3 {
    color: #0f131f;
    font-family: Roboto, sans-serif;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #356df1;
}

#compareTable {
    overflow-x: auto;
}

#compareTable table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: Inter, sans-serif;
}

#compareTable thead th {
    background: #0f131f;
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 1;
}

#compareTable thead th:first-child {
    border-radius: 8px 0 0 0;
    width: 180px;
    min-width: 150px;
}

#compareTable thead th:last-child {
    border-radius: 0 8px 0 0;
}

#compareTable tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e3e7f0;
    vertical-align: top;
    line-height: 1.5;
    color: #35415b;
}

#compareTable tbody tr:nth-child(even) td {
    background: #f8f9fb;
}

#compareTable tbody tr:hover td {
    background: #e8f0ff;
}

#compareTable tbody td:first-child {
    font-weight: 700;
    color: #0f131f;
    background: #f2f4f7;
    font-size: 12px;
    white-space: nowrap;
}

#compareTable tbody td:not(:first-child) {
    font-size: 12px;
}

/* ---------- АДАПТИВНОСТЬ ---------- */
@media (max-width: 900px) {
    #mainApp {
        flex-direction: column;
    }
    #filterPanel {
        width: 100%;
        position: static;
    }
    #moduleGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    #constructorContainer,
    #catalogContainer {
        height: auto;
        max-height: none;
    }
    .programs-grid {
        grid-template-columns: 1fr;
    }
    .info-banner-grid {
        grid-template-columns: 1fr;
    }
    .info-banner-hero {
        padding: 30px 25px;
    }
    .info-banner-hero h2 {
        font-size: 22px;
    }
    .cart-inner {
        flex-direction: column;
        gap: 10px;
    }
    #cartBar {
        width: 95%;
    }
    .cart-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    .cart-module-dropdown {
        width: 100%;
    }
}

@media (max-width: 600px) {
    #moduleGrid {
        grid-template-columns: 1fr;
    }
    .mode-btn {
        padding: 0.6em 1.5em;
        font-size: 14px;
        margin: 0 5px;
    }
    .program-detail-modules ul {
        columns: 1;
    }
    #scrollToTopBtn {
        width: 40px;
        height: 40px;
        bottom: 80px;
        right: 15px;
        font-size: 18px;
    }
    .info-banner-hero {
        padding: 25px 20px;
    }
    .info-banner-hero h2 {
        font-size: 20px;
    }
    .info-banner-card {
        padding: 20px;
    }
    .constructor-intro-title {
        font-size: 17px;
    }
    .module-detail-body,
    .program-detail-body {
        padding: 20px;
    }
    .module-detail-header,
    .program-detail-header {
        padding: 25px 20px;
    }
    .cart-warning {
        font-size: 11px;
        padding: 12px 14px;
        border-radius: 10px 10px 0 0;
    }
    #cartBar .cart-inner {
        border-radius: 0 0 10px 10px;
    }
}