/* ==========================================================================
   1. ШАПКА САЙТА (ЛОГОТИП + ЦЕНТРИРОВАННОЕ ОПИСАНИЕ)
   ========================================================================== */

/* Удаляем лишний заголовок-тире */
.container-header .site-title {
    display: none !important;
}

/* Выравниваем лого и текст в одну линию */
.container-header .navbar-brand {
    display: flex !important;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.container-header .site-logo {
    flex-shrink: 0;
    margin-right: 20px;
}

/* Центрируем описание в оставшемся месте */
.container-header .site-description {
    flex-grow: 1;
    text-align: center;
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    color: #ffffff;
    margin: 0;
    max-width: none;
}

/* ==========================================================================
   2. СЕТКА (GRID) И АДАПТИВНОСТЬ
   ========================================================================== */

/* Десктоп и планшеты: Сайдбар слева, контент справа */
@media (min-width: 801px) {
    div.site-grid {
        display: grid !important;
        grid-template-columns: 1fr 3fr !important;
        gap: 24px;
        align-items: start;
    }
    div.site-grid > .container-sidebar-left { grid-column: 1; grid-row: 1; }
    div.site-grid > .container-component { grid-column: 2; grid-row: 1; }
}

/* Мобильные устройства: всё в один столбец */
@media (max-width: 800px) {
    div.site-grid {
        display: flex !important;
        flex-direction: column !important;
    }
    div.site-grid > .container-sidebar-left { order: 1; width: 100% !important; }
    div.site-grid > .container-component { order: 2; width: 100% !important; }

    .container-header .navbar-brand { flex-direction: column; text-align: center; }
    .container-header .site-logo { margin-right: 0; margin-bottom: 15px; }
    .container-header .site-description { font-size: 1.1rem; }
}

/* ==========================================================================
   3. ЛЕВЫЙ САЙДБАР (CARD DESIGN)
   ========================================================================== */

div.site-grid > .container-sidebar-left {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    padding: 15px !important;
    border: 1px solid #eef2f6 !important;
    margin-bottom: 20px;
}

/* Эффект наведения на пункт меню */
div.site-grid > .container-sidebar-left a:hover {
    background-color: #f1f5f9 !important;
    color: #2563eb !important;
    transform: translateX(4px);
}



/* ==========================================================================
   4. СПОЙЛЕРЫ (DETAILS / SUMMARY)
   ========================================================================== */

details {
    background-color: #ffffff !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

details:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Заголовок спойлера */
summary {
    padding: 15px 20px !important;
    list-style: none !important;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    background-color: #fafbfc;
    display: flex !important;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none !important;
}

/* Наша кастомная стрелочка перед текстом */
summary::before {
    content: '→';
    margin-right: 12px;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

/* Поворот стрелки при открытии */
details[open] summary::before {
    transform: rotate(90deg);
    color: #2563eb;
}

details[open] summary {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

/* Внутренний контент спойлера */
details > *:not(summary) {
    padding: 15px 20px 15px 45px !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}





/* ==========================================================================
   1. ОБЩИЕ ОТСТУПЫ СЕТКИ (ОТ ЛОГОТИПА И КРАЕВ)
   ========================================================================== */

div.site-grid {
    margin-top: 15px !important;    /* Отступ сверху от логотипа */
    margin-left: 10px !important;   /* Отступ от левого края экрана */
    margin-right: 10px !important;  /* Отступ от правого края для симметрии */
    gap: 20px !important;           /* Расстояние между сайдбаром и контентом */
}

/* Настройка колонок для десктопа */
@media (min-width: 992px) {
    div.site-grid {
        display: grid !important;
        grid-template-columns: 280px 1fr !important;
        align-items: start;
    }
}

/* ==========================================================================
   2. ЛЕВЫЙ САЙДБАР (CARD DESIGN)
   ========================================================================== */

div.site-grid > .container-sidebar-left {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    padding: 15px !important;
    border: 1px solid #eef2f6 !important;
    /* Если нужно, чтобы именно сам блок имел отступ внутри: */
    margin-bottom: 20px !important;
}

/* ССЫЛКИ В САЙДБАРЕ: Исправление переноса стрелочки */
div.site-grid > .container-sidebar-left a {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;     /* Строго в одну строку */
    align-items: center !important;
    justify-content: space-between !important;
    
    padding: 10px 15px !important;
    margin-bottom: 5px !important;
    color: #334155 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

/* Эффект при наведении */
div.site-grid > .container-sidebar-left a:hover {
    background-color: #f1f5f9 !important;
    color: #2563eb !important;
    transform: translateX(5px);
}



/* ==========================================================================
   3. СПОЙЛЕРЫ (DETAILS / SUMMARY)
   ========================================================================== */

details {
    background-color: #ffffff !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

details:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08) !important;
}

summary {
    padding: 15px 20px !important;
    list-style: none !important;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    background-color: #fafbfc;
    display: flex !important;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none !important;
}

/* Кастомная стрелка спойлера */
summary::before {
    content: '→';
    margin-right: 12px;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

details[open] summary::before {
    transform: rotate(90deg);
    color: #2563eb;
}

details[open] summary {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

/* Контент внутри открытого спойлера */
details > *:not(summary) {
    padding: 15px 20px 15px 45px !important;
}




/* Выравнивание текста новости по ширине */
body.site.com_content .com-content-category-blog .blog-items .blog-item .item-content {
    text-align: justify;
    width: 100%;
    /*
    padding-right: 5px;
    */
}