/* ============================================
   СТРАНИЦА НАПРАВЛЕНИЯ ПОДГОТОВКИ (ID 66)
   ============================================ */

/* Общий фон страницы */
body.page-id-66 {
    background: #f0f4f8;
}

/* Контентная область */
.post-66 .entry-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Заголовок страницы */




/* ============================================
   КАРТОЧКА ПРОГРАММЫ (h4)
   ============================================ */
.post-66 .entry-content h4.wp-block-heading {
    background: white;
    border-radius: 16px 16px 0 0;
    margin-top: 50px;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: none;
    padding: 0;
}

/* Первый h4 без отступа сверху */
.post-66 .entry-content h4.wp-block-heading:first-child {
    margin-top: 0;
}

/* Шапка блока — название программы */
.post-66 .entry-content h4.wp-block-heading strong {
    display: block;
    padding: 22px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: #5b56fd;
    line-height: 1.5;
    letter-spacing: 0.2px;
    position: relative;
}

/* Декоративный элемент на шапке */
.post-66 .entry-content h4.wp-block-heading strong::before {
    content: '🎓';
    margin-right: 10px;
    font-size: 1.3rem;
}

/* Магистратура — другая иконка */
.post-66 .entry-content h4.wp-block-heading:not(:first-child) strong::before {
    content: '🔬';
}

/* ============================================
   ПАРАГРАФЫ
   ============================================ */
.post-66 .entry-content p.wp-block-paragraph {
    background: white;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    color: #34495e;
    font-size: 0.98rem;
    line-height: 1.8;
    border-left: none;
    border-right: none;
}

/* Параграф с формой обучения / сроком / местами (короткие инфо-строки) */
.post-66 .entry-content h4.wp-block-heading + p.wp-block-paragraph,
.post-66 .entry-content h4.wp-block-heading + p.wp-block-paragraph + p.wp-block-paragraph,
.post-66 .entry-content .wp-block-group + p.wp-block-paragraph {
    background: white;
    padding: 14px 30px;
    margin: 0;
    font-size: 0.95rem;
    color: #2c3e50;
    border-bottom: 1px solid #f0f3f6;
    position: relative;
    padding-left: 55px;
}



/* Инфо-блоки: форма, срок, места */
.post-66 .entry-content p.wp-block-paragraph:has(+ p.wp-block-paragraph):has(+ p.wp-block-paragraph + p.wp-block-paragraph) {
    border-bottom: 1px solid #eef2f7;
}

/* ============================================
   ИНФОРМАЦИОННАЯ ПОЛОСКА (Форма, Срок, Места)
   ============================================ */

/* Стиль для коротких параграфов-характеристик */
.post-66 .entry-content h4 + p,
.post-66 .entry-content h4 + p + p,
.post-66 .entry-content h4 + p + p + p {
    background: white;
    padding: 12px 30px 12px 30px;
    margin: 0;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f4f8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   ПОДЗАГОЛОВКИ ВНУТРИ КОНТЕНТА
   (Вступительные испытания, Особенности, Перспективы)
   ============================================ */
.post-66 .entry-content p.wp-block-paragraph:has(+ ul) {
    background: #f8fafe;
    padding: 16px 30px;
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a5276;
    border-top: 2px solid #e8f0fe;
    border-bottom: none;
    position: relative;
}



/* ============================================
   СПИСКИ (ul)
   ============================================ */
.post-66 .entry-content ul.wp-block-list {
    background: white;
    margin: 0;
    padding: 8px 30px 16px 30px;
    list-style: none;
    border-bottom: 1px solid #f0f4f8;
}

.post-66 .entry-content ul.wp-block-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    color: #34495e;
    font-size: 0.95rem;
    line-height: 1.7;
    border-bottom: 1px solid #f7f9fc;
}

.post-66 .entry-content ul.wp-block-list li:last-child {
    border-bottom: none;
}

/* Маркер списка */
.post-66 .entry-content ul.wp-block-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 18px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #2c7da0, #48b5e4);
    border-radius: 50%;
}

/* ============================================
   БЛОК "ПОДРОБНЕЕ" — ССЫЛКИ КАК КНОПКИ
   ============================================ */
.post-66 .entry-content p.wp-block-paragraph a {
    color: #2c7da0;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    word-break: break-all;
}

.post-66 .entry-content p.wp-block-paragraph a:hover {
    color: #1a5276;
    text-decoration: underline;
}

/* Параграфы со ссылками "Подробнее" */
.post-66 .entry-content p.wp-block-paragraph:has(a[href*="abit.susu"]),
.post-66 .entry-content p.wp-block-paragraph:has(a[href*="susu.ru/ru/plan"]) {
    background: white;
    padding: 12px 30px;
    margin: 0;
}

/* Последний параграф со ссылкой — закругление снизу */
.post-66 .entry-content p.wp-block-paragraph:has(a[href*="susu.ru/ru/plan"]) {
    border-radius: 0 0 16px 16px;
    padding-bottom: 20px;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

/* Стилизация ссылок как мини-кнопок */
.post-66 .entry-content p:has(a[href*="abit.susu"]) a,
.post-66 .entry-content p:has(a[href*="susu.ru/ru/plan"]) a {
    display: inline-block;
    background: linear-gradient(135deg, #eaf4fb, #dceefb);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a5276;
    transition: all 0.3s ease;
    word-break: break-all;
    margin-top: 4px;
}

.post-66 .entry-content p:has(a[href*="abit.susu"]) a:hover,
.post-66 .entry-content p:has(a[href*="susu.ru/ru/plan"]) a:hover {
    background: linear-gradient(135deg, #2c7da0, #48b5e4);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(44, 125, 160, 0.3);
}

/* ============================================
   ФИНАЛЬНЫЙ ПАРАГРАФ (после последнего блока)
   ============================================ */
.post-66 .entry-content p.wp-block-paragraph:empty {
    display: none;
}

/* ============================================
   ДЛИННЫЙ ТЕКСТОВЫЙ ПАРАГРАФ
   (описание после обучения — "По окончании...")
   ============================================ */
.post-66 .entry-content ul.wp-block-list + p.wp-block-paragraph:not(:has(a)) {
    background: #f8fafe;
    padding: 18px 30px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #34495e;
    border-left: 4px solid #48b5e4;
    border-top: 1px solid #e8f0fe;
}

/* ============================================
   БЛОК wp-block-group (внутри магистратуры)
   ============================================ */
.post-66 .entry-content .wp-block-group {
    background: white;
    margin: 0;
    padding: 4px 30px;
    border-bottom: 1px solid #f0f4f8;
}

.post-66 .entry-content .wp-block-group p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* ============================================
   ПАРАГРАФ "Вступительные испытания" со ссылкой
   ============================================ */
.post-66 .entry-content p.wp-block-paragraph:has(a[href*="pvi"]) {
    background: #f8fafe;
    padding: 16px 30px 16px 48px;
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a5276;
    border-top: 2px solid #e8f0fe;
    position: relative;
}



.post-66 .entry-content p:has(a[href*="pvi"]) a {
    display: inline-block;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e65100;
    margin-left: 6px;
}

.post-66 .entry-content p:has(a[href*="pvi"]) a:hover {
    background: linear-gradient(135deg, #e65100, #ff8f00);
    color: white;
    text-decoration: none;
}

/* ============================================
   ТЕНЬ ВСЕЙ КАРТОЧКИ
   ============================================ */
/* Общая белая область между h4 и последним параграфом */
.post-66 .entry-content h4 + p,
.post-66 .entry-content h4 + p + p,
.post-66 .entry-content h4 + p + p + p,
.post-66 .entry-content ul.wp-block-list,
.post-66 .entry-content .wp-block-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* ============================================
   ВТОРОЙ ДУБЛИРУЮЩИЙСЯ БЛОК ТЕКСТА
   (большой параграф с br — скрываем если он дублирует)
   ============================================ */
.post-66 .entry-content h4 + p + p:has(br) {
    display: none;
}


/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
    .post-66 .entry-content {
        padding: 20px 12px 40px;
    }

    .post-66 .entry-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .post-66 .entry-content h4.wp-block-heading {
        margin-top: 35px;
        border-radius: 12px 12px 0 0;
    }

    .post-66 .entry-content h4.wp-block-heading strong {
        padding: 16px 20px;
        font-size: 1.05rem;
    }

    .post-66 .entry-content p.wp-block-paragraph,
    .post-66 .entry-content h4 + p,
    .post-66 .entry-content h4 + p + p,
    .post-66 .entry-content h4 + p + p + p {
        padding-left: 20px;
        padding-right: 20px;
    }

    .post-66 .entry-content ul.wp-block-list {
        padding-left: 20px;
        padding-right: 20px;
    }

    .post-66 .entry-content ul.wp-block-list li {
        padding-left: 24px;
        font-size: 0.9rem;
    }

    .post-66 .entry-content p.wp-block-paragraph:has(+ ul) {
        padding-left: 40px;
    }

    .post-66 .entry-content p.wp-block-paragraph:has(+ ul)::before {
        left: 20px;
    }

    .post-66 .entry-content p:has(a[href*="abit.susu"]) a,
    .post-66 .entry-content p:has(a[href*="susu.ru/ru/plan"]) a {
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    .post-66 .entry-content p.wp-block-paragraph:has(a[href*="susu.ru/ru/plan"]) {
        border-radius: 0 0 12px 12px;
    }

    .post-66 .entry-content .wp-block-group {
        padding: 4px 20px;
    }

    .post-66 .entry-content ul.wp-block-list + p.wp-block-paragraph:not(:has(a)) {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .post-66 .entry-content h4.wp-block-heading strong {
        font-size: 0.95rem;
        padding: 14px 16px;
    }

    .post-66 .entry-content h4.wp-block-heading strong::before {
        display: none;
    }
}
      .line-chart {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    clear: both;
    width: 100%;
    display: block;
}
        
        .chart-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: #1a3a4a;
            margin: 0 0 20px 0;
            text-align: center;
        }
        
        .chart-svg {
            width: 100%;
            height: auto;
            background: white;
            border-radius: 12px;
        }
        
        @media (max-width: 768px) {
            .line-chart {
                padding: 15px;
            }
            
            .chart-svg {
                height: auto;
                min-height: 250px;
            }
        }

/* ============================================
   КНОПКА + СПИСОК = ОДИН МИКРОБЛОК
   ============================================ */

/* Абзац ПЕРЕД кнопкой — закрываем его снизу */
.post-66 .entry-content p.wp-block-paragraph:has(+ .wp-block-buttons) {
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: none;
    border-radius: 0;
	padding-left: 55px;
	padding-top: 10px;
}

/* Сам блок кнопки — начало нового микроблока */
.post-66 .entry-content .wp-block-buttons {
    margin: 0;
    padding: 18px 30px 10px;
    background: #f8fafe;
    border-top: 2px solid #e8f0fe;
    border-bottom: none;
    border-radius: 0;
    box-shadow: none;
}

.post-66 .entry-content .wp-block-buttons.is-layout-flex {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.post-66 .entry-content .wp-block-buttons .wp-block-button {
    margin: 0;
}

/* Сама кнопка */
.post-66 .entry-content .wp-block-buttons .wp-block-button__link,
.post-66 .entry-content .wp-block-buttons a.wp-block-button__link.wp-element-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #cfe0f2;

    background: linear-gradient(135deg, #f4f9ff 0%, #e3f0fb 100%);
    color: #1a5276;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;

    box-shadow: 0 4px 14px rgba(26, 82, 118, 0.08);
    transition: all 0.25s ease;
    white-space: normal;
    word-break: break-word;
}

.post-66 .entry-content .wp-block-buttons .wp-block-button__link:hover,
.post-66 .entry-content .wp-block-buttons a.wp-block-button__link.wp-element-button:hover {
    background: linear-gradient(135deg, #2c7da0 0%, #48b5e4 100%);
    color: #fff;
    border-color: #2c7da0;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(44, 125, 160, 0.22);
    text-decoration: none;
}

.post-66 .entry-content .wp-block-buttons .wp-block-button__link::after,
.post-66 .entry-content .wp-block-buttons a.wp-block-button__link.wp-element-button::after {
    content: "↗";
    font-size: 0.95em;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.post-66 .entry-content .wp-block-buttons .wp-block-button__link:hover::after,
.post-66 .entry-content .wp-block-buttons a.wp-block-button__link.wp-element-button:hover::after {
    transform: translate(2px, -1px);
}

/* Список ПОСЛЕ кнопки — склеиваем */
.post-66 .entry-content .wp-block-buttons + ul.wp-block-list {
    margin-top: 0;
    padding-top: 10px;
    background: #f8fafe;
    border-top: none;
}

/* Если кнопки в конце блока (ссылки "Подробнее") */
.post-66 .entry-content ul.wp-block-list + .wp-block-buttons,
.post-66 .entry-content p.wp-block-paragraph + .wp-block-buttons + .wp-block-buttons {
    border-top: none;
    padding-top: 8px;
}

/* Мобилка */
@media (max-width: 768px) {
    .post-66 .entry-content .wp-block-buttons {
        padding: 14px 20px 8px;
    }

    .post-66 .entry-content .wp-block-buttons .wp-block-button {
        width: 100%;
    }

    .post-66 .entry-content .wp-block-buttons .wp-block-button__link,
    .post-66 .entry-content .wp-block-buttons a.wp-block-button__link.wp-element-button {
        display: flex;
        width: 100%;
        padding: 11px 14px;
        font-size: 0.88rem;
    }
}
/* ============================================
   НИЖНИЕ КНОПКИ "ПОДРОБНЕЕ" — ЗАКРЫВАЮТ КАРТОЧКУ
   ============================================ */

/* Если после абзаца идет кнопка, но после кнопки НЕ идет список —
   значит это нижний кнопочный блок карточки */
.post-66 .entry-content p.wp-block-paragraph + .wp-block-buttons:not(:has(+ ul.wp-block-list)) {
    margin: 0;
    padding: 14px 30px 0;
    background: #fff;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
}

/* Если нижних кнопок несколько подряд */
.post-66 .entry-content .wp-block-buttons:not(:has(+ ul.wp-block-list)) + .wp-block-buttons {
    margin: 0;
    padding: 10px 30px 0;
    background: #fff;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
}

/* Последний кнопочный блок в цепочке — закрывает карточку снизу */
.post-66 .entry-content .wp-block-buttons:not(:has(+ ul.wp-block-list)):not(:has(+ .wp-block-buttons)) {
    padding-bottom: 20px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    margin-bottom: 0;
}

/* Чтобы абзац перед нижними кнопками не создавал лишний разрыв */
.post-66 .entry-content p.wp-block-paragraph:has(+ .wp-block-buttons:not(:has(+ ul.wp-block-list))) {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 10px;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .post-66 .entry-content p.wp-block-paragraph + .wp-block-buttons:not(:has(+ ul.wp-block-list)),
    .post-66 .entry-content .wp-block-buttons:not(:has(+ ul.wp-block-list)) + .wp-block-buttons {
        padding-left: 20px;
        padding-right: 20px;
    }

    .post-66 .entry-content .wp-block-buttons:not(:has(+ ul.wp-block-list)):not(:has(+ .wp-block-buttons)) {
        border-radius: 0 0 12px 12px;
        padding-bottom: 16px;
    }
}