/* 1. Фон для сайта */

/* 1-1. Устанавливаем фон для всего сайта */
body {
    background-image: url('/images/bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* 1-2. Делаем основной блок контента белым */
/* В Cassiopeia контент обычно оборачивается в .site-grid или .container-component */
.site-grid > main, 
.container-component {
    background-color: #ffffff !important;
    padding: 25px !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Добавим легкую тень для объема */
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Change background of the entire breadcrumbs module wrapper */
.mod-breadcrumbs {
    background-color: #ffffff; /* Replace with your desired color */
    padding: 10px; /* Optional: adds space around breadcrumbs */
    border-radius: 4px; /* Optional: rounds corners */
}

/* Change background of the navigation container itself */
nav.mod-breadcrumbs {
    background-color: #ffffff;
    color: #fff;
}


/* 1-3. Очищаем фон у родительских контейнеров, если они мешают */
.site-grid {
    background-color: transparent !important;
}


/* 2. Кнопка 'Версия для слабовидящих' */
.access-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #ffffff; /* Белый фон */
    color: #000000; /* Черный текст для контраста */
    border: 2px solid #000000; /* Четкая рамка */
    padding: 12px 24px;
    border-radius: 4px; /* Квадратная или чуть скругленная форма выглядит строже */
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase; /* Все буквы заглавные */
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.access-btn-label i {
    font-size: 20px;
}

/* Эффект при наведении */
.access-btn-label:hover {
    background-color: #000000;
    color: #ffffff;
}

/* Если нужно, чтобы кнопка растягивалась на всю ширину модуля */
@media (max-width: 768px) {
    .access-btn-label {
        width: 100%;
        justify-content: center;
    }
}

/* 3. Исправление пагинации в мобильной версии */

.pagination {
    display: flex;
    flex-wrap: wrap;
}

/* 4. Размер шрифта лого */



/* 5. Изменения порядка отображения модулей в мобильной версии - для отображения левого меню над контентом */


@supports (display: grid) {
    @media (max-width: 991.98px) {
        .site-grid {
            grid-template-areas:
              ". side-l side-l side-l side-l ."
              ". top-a top-a top-a top-a ."
              ". top-b top-b top-b top-b ."
              ". comp comp comp comp ."
              ". side-r side-r side-r side-r ."
              ". bot-a bot-a bot-b bot-b ."
              ". banner banner banner banner ."
        }
    }
}
/* 6. Добавление линии после каждой статьи */

/* Add hr between articles in blog view */

.blog-item {
    margin-bottom: 40px; /* Adjust as needed */
    padding-bottom: 20px; /* Optional: adds space before a separator line */
    border-bottom: 2px solid #761216; /* Optional: adds a horizontal line separator */
  
  }

/* Remove line from the very last article */
.blog-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .item-435 {
        display: none !important;
    }
}



/* Общие настройки для всех иконок файлов */
a[href$=".pdf"]::before,
a[href$=".doc"]::before, a[href$=".docx"]::before,
a[href$=".xls"]::before, a[href$=".xlsx"]::before,
a[href$=".ppt"]::before, a[href$=".pptx"]::before,
a[href$=".zip"]::before, a[href$=".rar"]::before,
a[href$=".jpg"]::before, a[href$=".png"]::before, a[href$=".gif"]::before,
a[href$=".rtf"]::before, a[href$=".rtf"]::before,
a[href$=".mp3"]::before, a[href$=".wav"]::before,
a[href$=".mp4"]::before, a[href$=".avi"]::before {
    font-family: "Font Awesome 6 Free"; /* В некоторых версиях может быть "Font Awesome 6 Free" */
    font-weight: 900; /* Обязательно для Solid иконок */
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Эффект при наведении (иконка чуть увеличится) */
a:hover::before {
    transform: scale(1.2);
}

/* 1. PDF - Красный */
a[href$=".pdf"]::before { content: "\f1c1"; color: #e74c3c; }

/* 2. Word (doc, docx) - Синий */
a[href$=".doc"]::before, 
a[href$=".docx"]::before { content: "\f1c2"; color: #2b579a; }

/* 3. Excel (xls, xlsx) - Зеленый */
a[href$=".xls"]::before, 
a[href$=".xlsx"]::before { content: "\f1c3"; color: #217346; }

/* 4. Powerpoint (ppt, pptx) - Оранжевый */
a[href$=".ppt"]::before, 
a[href$=".pptx"]::before { content: "\f1c4"; color: #d24726; }

/* 5. Архивы (zip, rar) - Желтый/Коричневый */
a[href$=".zip"]::before, 
a[href$=".rar"]::before { content: "\f1c6"; color: #f39c12; }

/* 6. Изображения (jpg, png, gif) - Фиолетовый */
a[href$=".jpg"]::before, 
a[href$=".png"]::before, 
a[href$=".gif"]::before { content: "\f1c5"; color: #9b59b6; }

/* 7. Аудио (mp3, wav) - Голубой */
a[href$=".mp3"]::before, 
a[href$=".wav"]::before { content: "\f1c7"; color: #3498db; }

/* 8. Видео (mp4, avi) - Темно-серый */
a[href$=".mp4"]::before, 
a[href$=".avi"]::before { content: "\f1c8"; color: #34495e; }

/* 9. Rtf - Синий */
a[href$=".rtf"]::before, 
a[href$=".rtf"]::before { content: "\f15c"; color: #2b579a; }


/* Иконка для документов с ЭЦП (используем иконку Award) */
.eds-link::before {
    content: "\f559" !important; /* Код для fa-award */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: #27ae60 !important; /* Насыщенный зеленый цвет */
    margin-right: 8px;
}


/* Позиционирование для контейнера */
.eds-link {
    position: relative;
    text-decoration: none;
}

/* Создаем само облачко подсказки */
.eds-link:hover::after {
    content: attr(data-tooltip); /* Берем текст из атрибута data-tooltip */
    position: absolute;
    bottom: 120%; /* Показываем над ссылкой */
    left: 0;
    left: -10px; /* Смещаем к иконке */
    background: #333;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Маленький треугольник под подсказкой */
.eds-link:hover::after {
    content: attr(data-tooltip);
    white-space: pre-wrap; /* Это заставляет CSS уважать переносы строк из HTML */
    width: max-content;    /* Или фиксированная ширина */
    max-width: 250px;
    /* ... остальные стили из предыдущего сообщения ... */
}

/* Маленький треугольник под облачком */
.eds-link:hover::before {
    /* Это перекроет твою иконку, поэтому лучше использовать 
       дополнительный псевдоэлемент или вкладывать иконку тегом <i> */
}


/* --- Стилизация заголовков для Cassiopeia --- */

.item-content h1, .item-content h2, .item-content h3 {
    font-weight: 600; /* Вместо стандартных 700 или 800 */
}

/* --- Компактные заголовки (минус еще 15%) --- */

/* --- Финальные компактные заголовки (сверхплавное масштабирование) --- */

/* Главный заголовок статьи (H1) */
.page-header h1, 
.item-content h1 {
    font-size: calc(1.1rem + 0.5vw); 
}

/* Заголовок второго уровня (H2) */
.item-content h2 {
    font-size: calc(1rem + 0.35vw); /* Уменьшили шаг роста */
}

/* Заголовок третьего уровня (H3) */
.item-content h3 {
    font-size: calc(0.9rem + 0.2vw); /* Сделали более стабильным */
}

/* Заголовок четвертого уровня (H4) */
.item-content h4 {
    font-size: calc(0.85rem + 0.1vw); /* Почти не меняется при росте экрана */
}


/* Делаем основной текст более читаемым при компактных заголовках */
.item-content {
    line-height: 1.6; /* Увеличивает межстрочный интервал для легкости */
    letter-spacing: 0.01em; /* Совсем чуть-чуть раздвигает буквы */
}

/* Перенос кнопки "Подробнее" вправо */
.readmore {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem; /* Добавим немного отступа сверху для аккуратности */
}