/* ****************************** */
/* Стили для #body и контента CMS */
/* ****************************** */

#body {
    position: relative;
    margin: 0;
    top: 0;
    overflow-x: hidden; /* Защита от горизонтального скролла */
    display: block;
    background-color: #F5F5F5; /* Фон страницы */
    padding-bottom: 40px;
}

/* ---------- Хлебные крошки ---------- */
#body .breadcrumbs {
    background-color: transparent;
    color: #6b7280;
    border: none;
    border-radius: 0;
    text-align: left;
    font-size: 14px;
    padding: 0;
    margin-bottom: 24px;
}

#body .breadcrumbs a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
}

#body .breadcrumbs a:hover {
    color: #883F52; /* Акцентный цвет */
}

/* Старые стили breadcrumbs из CMS, если они остаются */
.breadcrumbs {
    font-size: 0.9em;
    padding-top: 0.2em;
    padding-bottom: 0.3em;
}

/* ---------- Основная белая карточка контента ---------- */
#body .main.container {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-top: 5px solid #883F52; 
    margin: 0 auto;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}
/* Убираем "окошки внутри окошек" (вложенные рамки CMS) */
#body .main.container .content,
#body .main.container .entry,
#body .main.container .article,
#body .main.container .item_card,
#body .main.container .ck-box .col,
#body .main.container .contact-metod {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Если вы использовали классы Tailwind в шаблоне страницы, обнуляем их тоже */
#body .main.container .bg-white,
#body .main.container .rounded-xl,
#body .main.container .border {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
/* Заголовок страницы внутри контента */
#body .main.container h1 {
    font-size: 32px;          /* Увеличили размер */
    width: 100%;
    text-align: left; 
    color: #111827;           /* Максимально темный (почти черный) для контраста */
    font-weight: 800;         /* Делаем очень жирным (Extra Bold) */
    margin-top: 0;
    margin-bottom: 28px;
    line-height: 1.2;
    padding-bottom: 20px;
	text-align: center;
}

/* ---------- Таблицы внутри контента ---------- */
#body .main.container table {
    display: block;
    max-width: 100% !important;
    overflow-x: auto !important; /* Скролл на мобилках */
    height: max-content !important;
    margin: 24px 0;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#body .main.container table th, 
#body .main.container table tr {
    box-sizing: border-box;
    padding: 12px 16px;
}

#body .main.container table th {
    background-color: #F9FAFB; /* Мягкий серый фон вместо красного */
    color: #374151;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

#body .main.container table td {
    border-bottom: 1px solid #f3f4f6;
    padding: 12px 16px;
}

/* ---------- WYSIWYG Контент (Текст из админки) ---------- */
.cms-breadcrumbs a {
    color: #6b7280;
    transition: color 0.2s;
    text-decoration: none;
}
.cms-breadcrumbs a:hover {
    color: #883F52;
}
.cms-breadcrumbs > span, .cms-breadcrumbs > div {
    display: none;
}
.cms-breadcrumbs a:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: #d1d5db;
    font-weight: 300;
}

.cms-title h1 {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    line-height: 1.2;
    margin: 0;
}

.cms-content h2, .cms-content h3, .cms-content h4 {
    color: #1f2937;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.cms-content h2 { font-size: 1.5rem; }
.cms-content h3 { font-size: 1.25rem; }

.cms-content p {
    margin-bottom: 1rem;
}

.cms-content a {
    color: #883F52;
    text-decoration: underline;
    text-decoration-color: rgba(136, 63, 82, 0.3);
    transition: text-decoration-color 0.2s;
}
.cms-content a:hover {
    text-decoration-color: #883F52;
}

.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem auto;
    display: block;
}

.cms-content ul, .cms-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-position: inside;
}
.cms-content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
}
.cms-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
}

/* Красивые таблицы внутри визуального редактора */
.cms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.cms-content th, .cms-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}
.cms-content th {
    background-color: #f9fafb;
    font-weight: 600;
}
.cms-content tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* ---------- Боковое меню разделов ---------- */
.section_menu .panel-body {
    font-size: 0.9em;
    background-color: white;
    border: 1px RGBA(0,0,0,0.08) solid;
    border-radius: 12px;
}
.section_menu ul:not(.parent_active) {
    display: none;
}
.section_menu .active > ul {
    display: block;
}
.section_menu li:first-letter {
    text-transform: uppercase;
}
.panel-body {
    font-size: 0.9em;
    background-color: #f3f1eb;
}
.panel-body ul, .panel-body ol {
    list-style: none;
    padding: 0;
}
.panel-body li.active a{
    color: #883F52;
    font-weight: 500;
}
.panel-body ul.level_1 li{
    opacity: 0.7;
}

/* ---------- Кнопки "Поделиться" (Yandex Share) ---------- */
.page_share_buttons {
    margin-top: 45px;
    padding-top: 15px;
    margin-bottom: 24px;
    position: relative;
}
.ya-share2__container {
    display: flex !important;
    gap: 8px;
}
.ya-share2__link {
    border-radius: 9999px !important; /* Круглые/овальные кнопки */
    transition: transform 0.2s, opacity 0.2s !important;
    opacity: 0.8;
}
.ya-share2__link:hover {
    transform: translateY(-2px); /* Легкий подъем при наведении */
    opacity: 1;
}

/* ---------- Адаптивность контента ---------- */
@media screen and (max-width: 768px) {
    #body .main.container {
        padding: 20px;
        border-radius: 12px;
    }
    #body .main.container h1, .cms-title h1 {
        font-size: 26px; /* Чуть меньше на телефонах, но всё ещё жирный */
    }
}

@media screen and (max-width: 700px){
    .breadcrumbs{
        height: max-content;
        padding: 0;
        background-color: transparent !important;
        border: none !important;
    }
    .breadcrumbs a{
        color: #6b7280;
    }
}